Documentation ¶
Index ¶
- Variables
- func Callback(c *gin.Context)
- func CardCallback(c *gin.Context)
- func MsgTemplateUpgrade(msgTemplate string) string
- func SendMessages(receiveID string, receivers []string, msgTemplate string, number string, ...)
- func TimeCheck1(receiveID string, receivers []string, msgTemplate string, number string, ...)
- func TimeCheck2(receiveID string, receivers []string, msgTemplate string, number string, ...)
- func TimeCheck3(receiveID string, receivers []string, msgTemplate string, number string, ...)
- type CallBackReq
- type CallBackResp
- type CardPostReq
- type CreateMessageRequest
- type CreateMessageResponse
- type DecodeCallBackReq
- type DecryptToken
- type Event
- type GetMessageHistoryBody
- type GetMessageHistoryMessageItem
- type GetMessageHistoryResponse
- type Header
- type Mention
- type MentionV1
- type Message
- type MessageBody
- type MessageCallBackResp
- type MessageEvent
- type MessageItem
- type MessageSender
- type ReceiveEventEncrypt
- type ReceiveMessageEvent
- type SendMessageReq
- type Sender
- type UploadImageResponse
- type UploadImageResponseBody
- type UserID
Constants ¶
This section is empty.
Variables ¶
View Source
var ( LarkAppId string LarkAppSecret string VerificationToken string EncryptKey string )
View Source
var Atm *feishu.DefaultAccessTokenManager
View Source
var FeishuClient *feishu.Client
View Source
var FeishuConfig map[string]string
Functions ¶
func CardCallback ¶
func MsgTemplateUpgrade ¶
func SendMessages ¶
func TimeCheck1 ¶
func TimeCheck2 ¶
Types ¶
type CallBackReq ¶
type CallBackReq struct {
Encrypt string `json:"encrypt"`
}
type CallBackResp ¶
type CallBackResp struct {
Challenge string `json:"challenge"`
}
type CardPostReq ¶
type CardPostReq struct { OpenId string `json:"open_id"` UserId string `json:"user_id"` OpenMessageId string `json:"open_message_id"` TenantKey string `json:"tenant_key"` Token string `json:"token"` Action struct { Value struct { Type string `json:"type"` Numbers string `json:"numbers"` } `json:"value"` Tag string `json:"tag"` } `json:"action"` }
type CreateMessageRequest ¶
type CreateMessageRequest struct { ReceiveID string `json:"receive_id"` Content string `json:"content"` MsgType string `json:"msg_type"` }
func GenCreateMessageRequest ¶
func GenCreateMessageRequest(chatID, content, msgType string) *CreateMessageRequest
type CreateMessageResponse ¶
type CreateMessageResponse struct { Code int `json:"code"` Message string `json:"message"` Data *MessageItem `json:"data"` }
type DecodeCallBackReq ¶
type DecryptToken ¶
type GetMessageHistoryBody ¶
type GetMessageHistoryBody struct { HasMore bool `json:"has_more"` PageToken string `json:"page_token,omitempty"` Items []*GetMessageHistoryMessageItem `json:"items,omitempty"` }
type GetMessageHistoryMessageItem ¶
type GetMessageHistoryMessageItem struct { MessageID string `json:"message_id,omitempty"` RootID string `json:"root_id,omitempty"` ParentID string `json:"parent_id,omitempty"` MsgType string `json:"msg_type,omitempty"` CreateTime string `json:"create_time,omitempty"` UpdateTime string `json:"update_time,omitempty"` Deleted bool `json:"deleted,omitempty"` ChatID string `json:"chat_id,omitempty"` Sender *MessageSender `json:"sender,omitempty"` Body *MessageBody `json:"body,omitempty"` Mentions []*MentionV1 `json:"mentions,omitempty"` UpperMessageID string `json:"upper_message_id,omitempty"` }
type GetMessageHistoryResponse ¶
type GetMessageHistoryResponse struct { Code int `json:"code"` Message string `json:"message"` Data *GetMessageHistoryBody `json:"data"` }
type Message ¶
type Message struct { MessageID string `json:"message_id"` RootID string `json:"root_id"` ParentID string `json:"parent_id"` CreateTime string `json:"create_time"` ChatID string `json:"chat_id"` ChatType string `json:"chat_type"` MessageType string `json:"message_type"` Content string `json:"content"` Mentions []*Mention `json:"mentions,omitempty"` }
type MessageBody ¶
type MessageBody struct {
Content string `json:"content,omitempty"`
}
type MessageCallBackResp ¶
type MessageCallBackResp struct { Schema string `json:"schema"` Header struct { EventID string `json:"event_id"` EventType string `json:"event_type"` CreateTime string `json:"create_time"` Token string `json:"token"` AppID string `json:"app_id"` TenantKey string `json:"tenant_key"` } `json:"header"` Event struct { Sender struct { SenderID struct { UnionID string `json:"union_id"` UserID string `json:"user_id"` OpenID string `json:"open_id"` } `json:"sender_id"` SenderType string `json:"sender_type"` TenantKey string `json:"tenant_key"` } `json:"sender"` Message struct { MessageID string `json:"message_id"` RootID string `json:"root_id"` ParentID string `json:"parent_id"` CreateTime string `json:"create_time"` ChatID string `json:"chat_id"` ChatType string `json:"chat_type"` MessageType string `json:"message_type"` Content string `json:"content"` Mentions []struct { Key string `json:"key"` ID struct { UnionID string `json:"union_id"` UserID string `json:"user_id"` OpenID string `json:"open_id"` } `json:"id"` Name string `json:"name"` TenantKey string `json:"tenant_key"` } `json:"mentions"` } `json:"message"` } `json:"event"` }
type MessageEvent ¶
type MessageItem ¶
type MessageItem struct { MessageID string `json:"message_id,omitempty"` RootID string `json:"root_id,omitempty"` ParentID string `json:"parent_id,omitempty"` MsgType string `json:"msg_type,omitempty"` CreateTime string `json:"create_time,omitempty"` UpdateTime string `json:"update_time,omitempty"` Deleted bool `json:"deleted,omitempty"` ChatID string `json:"chat_id,omitempty"` Sender *MessageSender `json:"sender,omitempty"` Body *MessageBody `json:"body,omitempty"` }
func SendGroupMessage ¶
func SendGroupMessage(receiveID string, msgTemplate string) (*MessageItem, error)
func SendMessage ¶
func SendMessage(receiveID string, msgTemplate string) (*MessageItem, error)
type MessageSender ¶
type ReceiveEventEncrypt ¶
type ReceiveEventEncrypt struct {
Encrypt string `json:"encrypt" form:"encrypt"`
}
type ReceiveMessageEvent ¶
type ReceiveMessageEvent struct { Schema string `json:"schema"` Header Header `json:"header"` Event MessageEvent `json:"event"` }
type SendMessageReq ¶
type UploadImageResponse ¶
type UploadImageResponse struct { Code int `json:"code"` Message string `json:"message"` Data *UploadImageResponseBody `json:"data,omitempty"` }
type UploadImageResponseBody ¶
type UploadImageResponseBody struct {
ImageKey string `json:"image_key"`
}
Click to show internal directories.
Click to hide internal directories.