Documentation ¶
Index ¶
- Constants
- func CreateNativeClient() (client *dingtalkoauth2_1_0.Client, err error)
- func GetAccessToken(appKey, appSecret string) (accessToken string, expireIn int64, err error)
- func GetUserIdByMobile(accessToken string, mobile string) (userId string, err error)
- func SendCorpConversationMarkdownMessage(accessToken string, agentId int64, userIds []string, title, content string) error
- type DingtalkBaseResponse
- type DingtalkMessageObj
- type DingtalkMessageType
- type GetUserIdByMobileRequest
- type GetUserIdByMobileResponse
- type MarkdownMessage
- type SendCorpConversationMarkdownMessageRequest
- type SendCorpConversationMarkdownMessageResponse
Constants ¶
View Source
const ( DINGTALKMESSAGETYPE_MARKDOWN = DingtalkMessageType("markdown") DINGTALKMESSAGETYPE_TEXT = DingtalkMessageType("text") DINGTALKMESSAGETYPE_IMAGE = DingtalkMessageType("image") DINGTALKMESSAGETYPE_LINK = DingtalkMessageType("link") DINGTALKMESSAGETYPE_FILE = DingtalkMessageType("file") DINGTALKMESSAGETYPE_VOICE = DingtalkMessageType("voice") DINGTALKMESSAGETYPE_OA = DingtalkMessageType("oa") DINGTALKMESSAGETYPE_ACTIONCARD = DingtalkMessageType("action_card") )
View Source
const DINGTALK_OAPI_DOMAIN = "https://oapi.dingtalk.com"
Variables ¶
This section is empty.
Functions ¶
func CreateNativeClient ¶
func CreateNativeClient() (client *dingtalkoauth2_1_0.Client, err error)
func GetAccessToken ¶
func GetUserIdByMobile ¶
Types ¶
type DingtalkBaseResponse ¶
type DingtalkMessageObj ¶
type DingtalkMessageObj struct { MsgType DingtalkMessageType `json:"msgtype"` Markdown MarkdownMessage `json:"markdown"` }
type DingtalkMessageType ¶
type DingtalkMessageType string
type GetUserIdByMobileResponse ¶
type GetUserIdByMobileResponse struct { DingtalkBaseResponse Result struct { UserId string `json:"userid"` } `json:"result"` }
type MarkdownMessage ¶
type SendCorpConversationMarkdownMessageRequest ¶
type SendCorpConversationMarkdownMessageRequest struct { AgentId int64 `json:"agent_id"` UseridList string `json:"userid_list"` ToAllUser bool `json:"to_all_user"` Msg DingtalkMessageObj `json:"msg"` }
type SendCorpConversationMarkdownMessageResponse ¶
type SendCorpConversationMarkdownMessageResponse struct { DingtalkBaseResponse TaskId int64 `json:"task_id"` }
Click to show internal directories.
Click to hide internal directories.