| 1 | package larkscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/chat/lark`/ |
| 2 | |
| 3 | // RequestBody represents the payload sent to the Lark API. |
| 4 | type RequestBodyscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/chat/lark`/RequestBody# struct { |
| 5 | MsgTypescip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/chat/lark`/RequestBody#MsgType. MsgTypescip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/chat/lark`/MsgType# `json:"msg_type"` |
| 6 | Contentscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/chat/lark`/RequestBody#Content. Contentscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/chat/lark`/Content# `json:"content"` |
| 7 | Timestampscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/chat/lark`/RequestBody#Timestamp. string `json:"timestamp,omitempty"` |
| 8 | Signscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/chat/lark`/RequestBody#Sign. string `json:"sign,omitempty"` |
| 9 | } |
| 10 | |
| 11 | // MsgType defines the type of message to send. |
| 12 | type MsgTypescip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/chat/lark`/MsgType# string |
| 13 | |
| 14 | // Content holds the message content, supporting text or post formats. |
| 15 | type Contentscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/chat/lark`/Content# struct { |
| 16 | Textscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/chat/lark`/Content#Text. string `json:"text,omitempty"` |
| 17 | Postscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/chat/lark`/Content#Post. *Postscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/chat/lark`/Post# `json:"post,omitempty"` |
| 18 | } |
| 19 | |
| 20 | // Post represents a rich post message with language-specific content. |
| 21 | type Postscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/chat/lark`/Post# struct { |
| 22 | Zhscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/chat/lark`/Post#Zh. *Messagescip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/chat/lark`/Message# `json:"zh_cn,omitempty"` // Chinese content |
| 23 | Enscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/chat/lark`/Post#En. *Messagescip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/chat/lark`/Message# `json:"en_us,omitempty"` // English content |
| 24 | } |
| 25 | |
| 26 | // Message defines the structure of a post message. |
| 27 | type Messagescip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/chat/lark`/Message# struct { |
| 28 | Titlescip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/chat/lark`/Message#Title. string `json:"title"` |
| 29 | Contentscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/chat/lark`/Message#Content. [][]Itemscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/chat/lark`/Item# `json:"content"` |
| 30 | } |
| 31 | |
| 32 | // Item represents a content element within a post message. |
| 33 | type Itemscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/chat/lark`/Item# struct { |
| 34 | Tagscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/chat/lark`/Item#Tag. TagValuescip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/chat/lark`/TagValue# `json:"tag"` |
| 35 | Textscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/chat/lark`/Item#Text. string `json:"text,omitempty"` |
| 36 | Linkscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/chat/lark`/Item#Link. string `json:"href,omitempty"` |
| 37 | } |
| 38 | |
| 39 | // TagValue specifies the type of content item. |
| 40 | type TagValuescip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/chat/lark`/TagValue# string |
| 41 | |
| 42 | // Response represents the API response from Lark. |
| 43 | type Responsescip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/chat/lark`/Response# struct { |
| 44 | Codescip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/chat/lark`/Response#Code. int `json:"code"` |
| 45 | Msgscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/chat/lark`/Response#Msg. string `json:"msg"` |
| 46 | Datascip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/chat/lark`/Response#Data. any `json:"data"` |
| 47 | } |
| 48 | |
| 49 | // Constants for message types supported by Lark. |
| 50 | const ( |
| 51 | MsgTypeTextscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/chat/lark`/MsgTypeText. MsgTypescip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/chat/lark`/MsgType# = "text" |
| 52 | MsgTypePostscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/chat/lark`/MsgTypePost. MsgTypescip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/chat/lark`/MsgType# = "post" |
| 53 | ) |
| 54 | |
| 55 | // Constants for tag values supported by Lark. |
| 56 | // |
| 57 | //nolint:goconst // TagValueTextContent and MsgTypeText have same value but represent different concepts |
| 58 | const ( |
| 59 | TagValueTextContentscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/chat/lark`/TagValueTextContent. TagValuescip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/chat/lark`/TagValue# = "text" |
| 60 | TagValueLinkscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/chat/lark`/TagValueLink. TagValuescip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/chat/lark`/TagValue# = "a" |
| 61 | ) |