Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Client ¶
type Client interface { UploadFile(ctx context.Context, fileName string, fileType LarkFileType, fileContent io.Reader) (fileKey string, err error) UploadMediaFile(ctx context.Context, fileName string, fileType LarkFileType, fileDuration int, fileContent io.Reader) (fileKey string, err error) UploadMessageImage(ctx context.Context, imageContent io.Reader) (imageKey string, err error) UploadAvatarImage(ctx context.Context, imageContent io.Reader) (imageKey string, err error) SendTextMessage(ctx context.Context, receiver Receiver, text string) (err error) SendMarkdownMessage(ctx context.Context, receiver Receiver, markdownHeader, markdownContent string, theme LarkMarkdownMessageTheme) (err error) SendImageMessage(ctx context.Context, receiver Receiver, imageContent io.Reader) (err error) SendAudioMessage(ctx context.Context, receiver Receiver, opusAudioMilliSeconds int, opusAudioContent io.Reader) (err error) GetMessageResourceFile(ctx context.Context, messageID string, fileKey string) (fileContent io.Reader, err error) }
type LarkFileType ¶
type LarkFileType string
const ( LarkFileTypeOpus LarkFileType = "opus" LarkFileTypeMp4 LarkFileType = "mp4" LarkFileTypePdf LarkFileType = "pdf" LarkFileTypeDoc LarkFileType = "doc" LarkFileTypeXls LarkFileType = "xls" LarkFileTypePpt LarkFileType = "ppt" LarkFileTypeStream LarkFileType = "stream" )
func (LarkFileType) String ¶
func (t LarkFileType) String() string
type LarkImageType ¶
type LarkImageType string
const ( LarkImageTypeMessage LarkImageType = "message" LarkImageTypeAvatar LarkImageType = "avatar" )
func (LarkImageType) String ¶
func (t LarkImageType) String() string
type LarkMarkdownMessageTheme ¶
type LarkMarkdownMessageTheme string
const ( LarkMarkdownMessageThemeBlue LarkMarkdownMessageTheme = "blue" LarkMarkdownMessageThemeWathet LarkMarkdownMessageTheme = "wathet" LarkMarkdownMessageThemeTurquoise LarkMarkdownMessageTheme = "turquoise" LarkMarkdownMessageThemeGreen LarkMarkdownMessageTheme = "green" LarkMarkdownMessageThemeYellow LarkMarkdownMessageTheme = "yellow" LarkMarkdownMessageThemeOrange LarkMarkdownMessageTheme = "orange" LarkMarkdownMessageThemeRed LarkMarkdownMessageTheme = "red" LarkMarkdownMessageThemeCarmine LarkMarkdownMessageTheme = "carmine" LarkMarkdownMessageThemeViolet LarkMarkdownMessageTheme = "violet" LarkMarkdownMessageThemePurple LarkMarkdownMessageTheme = "purple" LarkMarkdownMessageThemeIndigo LarkMarkdownMessageTheme = "indigo" LarkMarkdownMessageThemeGrey LarkMarkdownMessageTheme = "grey" )
func (LarkMarkdownMessageTheme) String ¶
func (t LarkMarkdownMessageTheme) String() string
type LarkReceiverIdType ¶
type LarkReceiverIdType string
const ( LarkReceiverIdTypeOpenID LarkReceiverIdType = "open_id" LarkReceiverIdTypeUserID LarkReceiverIdType = "user_id" LarkReceiverIdTypeUnionID LarkReceiverIdType = "union_id" LarkReceiverIdTypeEmail LarkReceiverIdType = "email" LarkReceiverIdTypeChatID LarkReceiverIdType = "chat_id" )
func (LarkReceiverIdType) String ¶
func (t LarkReceiverIdType) String() string
type Receiver ¶ added in v1.2.5
type Receiver struct { Type LarkReceiverIdType `json:"type" yaml:"type" xml:"type"` // 接收方类型 Receiver string `json:"receiver" yaml:"receiver" xml:"receiver"` // 接收方ID,根据type不同而不同 }
Receiver 飞书消息接收方
Click to show internal directories.
Click to hide internal directories.