Documentation
¶
Index ¶
- func AddRobot(ctx context.Context, chatId string, robots []string) error
- func CreateGroup(ctx context.Context, name string, users []string) (string, error)
- func DeleteGroup(ctx context.Context, chatId string) error
- func Init(_domain, _appId, _appSecret string) error
- func TemplateSimpleMessage(content string, extra map[string]interface{}) map[string]interface{}
- func UserIds(ctx context.Context, emails []string) (map[string]string, error)
- func UserInfos(ctx context.Context, emails []string) (map[string]UserInfo, error)
- type AuthTokenInternalResponse
- type EventBody
- type EventMessage
- type Response
- type TenantAuthTokenInternalResponse
- type UserInfo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateGroup ¶
func TemplateSimpleMessage ¶
Types ¶
type EventBody ¶
type EventBody struct {
Type string `json:"type"`
AppID string `json:"app_id"`
TenantKey string `json:"tenant_key"`
ChatType string `json:"chat_type"`
ChatName string `json:"chat_name,omitempty"`
MsgType string `json:"msg_type"`
RootID string `json:"root_id,omitempty"`
ParentID string `json:"parent_id,omitempty"`
OpenID string `json:"open_id,omitempty"`
OpenChatID string `json:"open_chat_id,omitempty"`
OpenMessageID string `json:"open_message_id,omitempty"`
IsMention bool `json:"is_mention,omitempty"`
Title string `json:"title,omitempty"`
Text string `json:"text,omitempty"`
RealText string `json:"text_without_at_bot,omitempty"`
ImageKey string `json:"image_key,omitempty"`
ImageURL string `json:"image_url,omitempty"`
FileKey string `json:"file_key,omitempty"`
}
EventBody ...
type EventMessage ¶
type EventMessage struct {
UUID string `json:"uuid"`
Timestamp string `json:"ts"`
// Token is shown by Lark to indicate it is not a fake message, check at your own need
Token string `json:"token"`
EventType string `json:"type"`
Challenge string `json:"challenge,omitempty"`
Event EventBody `json:"event"`
}
func ParseEvent ¶
func ParseEvent(data []byte) (EventMessage, error)
ParseEvent unmarshal the body and return the Lark Event
type TenantAuthTokenInternalResponse ¶
type TenantAuthTokenInternalResponse struct {
Code int `json:"code"`
TenantAppAccessToken string `json:"tenant_access_token"`
Expire int `json:"expire"`
}
TenantAuthTokenInternalResponse .
Click to show internal directories.
Click to hide internal directories.