Documentation ¶
Index ¶
- Constants
- func HandJSONTopResponse(responseData interface{}, content []byte)
- func HandXMLTopResponse(responseData interface{}, content []byte)
- type AccessTokenResponse
- type ActivateSuiteResponse
- type Admins
- type AuthCorpInfo
- type AuthOrgScopes
- type CBCallBackRequest
- type CBCallBackResponse
- type CBGetFailedCallbackResponse
- type CBQueryCallbackResponse
- type Cache
- type ChatCreateRequest
- type ChatCreateResponse
- type ChatGetInfo
- type ChatGetResponse
- type ChatSendActionCard
- type ChatSendActionCardRequest
- type ChatSendFile
- type ChatSendFileRequest
- type ChatSendImage
- type ChatSendImageRequest
- type ChatSendLink
- type ChatSendLinkRequest
- type ChatSendMarkdown
- type ChatSendMarkdownRequest
- type ChatSendOA
- type ChatSendOARequest
- type ChatSendRequest
- type ChatSendResponse
- type ChatSendText
- type ChatSendTextRequest
- type ChatSendVoice
- type ChatSendVoiceRequest
- type ChatUpdateRequest
- type ChatUpdateResponse
- type CorpExtcontactRequest
- type CspaceAddRequest
- type CspaceAddResponse
- type CspaceAddToSingleChatRequest
- type CspaceAddToSingleChatResponse
- type CspaceGetCustomSpaceRequest
- type CspaceGetCustomSpaceResponse
- type CspaceGrantCustomSpaceRequest
- type CspaceGrantCustomSpaceResponse
- type DTConfig
- type DTIsvGetCompanyInfo
- type DataRecordResponse
- type DataRequest
- type DataUpdateResponse
- type Department
- type DepartmentCreateRequest
- type DepartmentCreateResponse
- type DepartmentDeleteResponse
- type DepartmentDetailResponse
- type DepartmentListParentDeptsByDeptResponse
- type DepartmentListParentDeptsResponse
- type DepartmentListsubParam
- type DepartmentListsubResponse
- type DepartmentUpdateRequest
- type DepartmentUpdateResponse
- type DingTalkClient
- func (dtc *DingTalkClient) CBDeleteCallback() (CBCallBackResponse, error)
- func (dtc *DingTalkClient) CBGetFailedCallbacks() (CBGetFailedCallbackResponse, error)
- func (dtc *DingTalkClient) CBQueryCallback() (CBQueryCallbackResponse, error)
- func (dtc *DingTalkClient) CBRegisterCallback(info *CBCallBackRequest) (CBCallBackResponse, error)
- func (dtc *DingTalkClient) CBUpdateCallback(info *CBCallBackRequest) (CBCallBackResponse, error)
- func (dtc *DingTalkClient) ChatCreate(info *ChatCreateRequest) (ChatCreateResponse, error)
- func (dtc *DingTalkClient) ChatGet(chatId string) (ChatGetResponse, error)
- func (dtc *DingTalkClient) ChatSend(info interface{}) (ChatSendResponse, error)
- func (dtc *DingTalkClient) ChatUpdate(info *ChatUpdateRequest) (ChatUpdateResponse, error)
- func (dtc *DingTalkClient) CspaceAdd(info *CspaceAddRequest) (CspaceAddResponse, error)
- func (dtc *DingTalkClient) CspaceAddToSingleChat(info *CspaceAddToSingleChatRequest) (CspaceAddToSingleChatResponse, error)
- func (dtc *DingTalkClient) CspaceGetCustomSpace(info *CspaceGetCustomSpaceRequest) (CspaceGetCustomSpaceResponse, error)
- func (dtc *DingTalkClient) CspaceGrantCustomSpace(info *CspaceGrantCustomSpaceRequest) (CspaceGrantCustomSpaceResponse, error)
- func (dtc *DingTalkClient) DataRecord(info *DataRequest) (DataRecordResponse, error)
- func (dtc *DingTalkClient) DataUpdate(info *DataRequest) (DataUpdateResponse, error)
- func (dtc *DingTalkClient) DepartmentCreate(info *DepartmentCreateRequest) (DepartmentCreateResponse, error)
- func (dtc *DingTalkClient) DepartmentDelete(id int) (DepartmentDeleteResponse, error)
- func (dtc *DingTalkClient) DepartmentDetail(id interface{}, lang interface{}) (DepartmentDetailResponse, error)
- func (dtc *DingTalkClient) DepartmentListParentDepts(userId string) (DepartmentListParentDeptsResponse, error)
- func (dtc *DingTalkClient) DepartmentListParentDeptsByDept(id int) (DepartmentListParentDeptsByDeptResponse, error)
- func (dtc *DingTalkClient) DepartmentListsub(param DepartmentListsubParam) (DepartmentListsubResponse, error)
- func (dtc *DingTalkClient) DepartmentUpdate(info *DepartmentUpdateRequest) (DepartmentUpdateResponse, error)
- func (dtc *DingTalkClient) FileUploadChunk(info *FileUploadChunkRequest) (FileUploadChunkResponse, error)
- func (dtc *DingTalkClient) FileUploadEndTransaction(info *FileUploadEndTransactionRequest) (FileUploadEndTransactionResponse, error)
- func (dtc *DingTalkClient) FileUploadSingle(agentID string, fileSize int64, fileName string, reader io.Reader) (FileUploadSingleResponse, error)
- func (dtc *DingTalkClient) FileUploadStartTransaction(agentID string, fileSize int, chunkNumbers int) (FileUploadStartTransactionResponse, error)
- func (dtc *DingTalkClient) GetAuthScopes() (ScopesResponse, error)
- func (dtc *DingTalkClient) GetConfig(nonceStr string, timestamp string, url string) string
- func (dtc *DingTalkClient) GetJSAPITicket() (ticket string, err error)
- func (dtc *DingTalkClient) IsvActivateSuite(authCorpID string, permanentCode string) (ActivateSuiteResponse, error)
- func (dtc *DingTalkClient) IsvGetCAT(tmpAuthCode string)
- func (dtc *DingTalkClient) IsvGetCompanyInfo(authCorpID string) (GetCompanyInfoResponse, error)
- func (dtc *DingTalkClient) IsvGetCorpAccessToken(authCorpID string, permanentCode string) (GetCorpAccessTokenResponse, error)
- func (dtc *DingTalkClient) IsvGetPermanentCode(tmpAuthCode string) (GetPermanentCodeResponse, error)
- func (dtc *DingTalkClient) MediaDownloadFile(mediaID string, write io.Writer) error
- func (dtc *DingTalkClient) MediaUpload(mediaType string, fileName string, reader io.Reader) (MediaUploadResponse, error)
- func (dtc *DingTalkClient) MessageCorpconversationAsyncsend(param MessageCorpconversationAsyncsendParam) (MessageCorpconversationAsyncsendResponse, error)
- func (dtc *DingTalkClient) MessageSendToConversation(info interface{}) (MessageSendToConversationResponse, error)
- func (dtc *DingTalkClient) MicroAppCreate(info *MicroAppCreateRequest) (MicroAppCreateResponse, error)
- func (dtc *DingTalkClient) MicroAppDelete(agentId int) (MicroAppDeleteResponse, error)
- func (dtc *DingTalkClient) MicroAppList() (MicroAppListResponse, error)
- func (dtc *DingTalkClient) MicroAppListByUserId(userId string) (MicroAppListByUserIdResponse, error)
- func (dtc *DingTalkClient) MicroAppRuleDelete(agentId int, ruleId int) (MicroAppRuleDeleteResponse, error)
- func (dtc *DingTalkClient) MicroAppRuleGetRuleList(userId string, agentId string) (MicroAppRuleGetRuleListResponse, error)
- func (dtc *DingTalkClient) MicroAppRuleGetUserTota(agentId int, ruleIdList []int) (MicroAppRuleGetUserTotaResponse, error)
- func (dtc *DingTalkClient) MicroAppSetVisibleScopes(info *MicroAppSetVisibleScopesRequest) (MicroAppSetVisibleScopesResponse, error)
- func (dtc *DingTalkClient) MicroAppUpdate(info *MicroAppUpdateRequest) (MicroAppUpdateResponse, error)
- func (dtc *DingTalkClient) MicroAppVisibleScopes(agentId int) (MicroAppVisibleScopesResponse, error)
- func (dtc *DingTalkClient) RefreshCompanyAccessToken() error
- func (dtc *DingTalkClient) RefreshSNSAccessToken() error
- func (dtc *DingTalkClient) RefreshSSOAccessToken() error
- func (dtc *DingTalkClient) RefreshSuiteAccessToken() error
- func (dtc *DingTalkClient) SNSGetPersistentCode(code string) (SNSGetPersistentCodeResponse, error)
- func (dtc *DingTalkClient) SNSGetSNSToken(openID string, persistentCode string) (SNSGetSNSTokenResponse, error)
- func (dtc *DingTalkClient) SNSGetUserInfo(snsToken string) (SNSGetUserInfoResponse, error)
- func (dtc *DingTalkClient) SSOAdminInfoByCode(code string) (SSOAdminInfoByCodeResponse, error)
- func (dtc *DingTalkClient) SmartworkAttendanceListRecord(info *SmartworkAttendanceListRecordRequest) (SmartworkAttendanceListRecordResponse, error)
- func (dtc *DingTalkClient) SmartworkCheckinRecord(info *SmartworkCheckinRecordRequest) (SmartworkCheckinRecordResponse, error)
- func (dtc *DingTalkClient) SubDepartmentList(id interface{}) (SubDepartmentListResponse, error)
- func (dtc *DingTalkClient) TodoUsersUnionidTasks(param TodoUsersUnionidTasksParam) (TodoUsersUnionidTasksResponse, error)
- func (dtc *DingTalkClient) TopCorpExtcontactCreate(info *CorpExtcontactRequest) ([]byte, error)
- func (dtc *DingTalkClient) TopCorpExtcontactGet(userID string) ([]byte, error)
- func (dtc *DingTalkClient) TopCorpExtcontactList(size int, offset int) ([]byte, error)
- func (dtc *DingTalkClient) TopCorpExtcontactListlabelgroups(size int, offset int) ([]byte, error)
- func (dtc *DingTalkClient) TopCorpExtcontactUpdate(info *CorpExtcontactRequest) ([]byte, error)
- func (dtc *DingTalkClient) TopCorpHealthStepinfoGetUserStatus(userId string) ([]byte, error)
- func (dtc *DingTalkClient) TopCorpHealthStepinfoListByUserid(userIds []string, statDate string) ([]byte, error)
- func (dtc *DingTalkClient) TopCorpMessageCorpconversationAsyncsend(info *TopCorpMessageCorpconversationAsyncsendRequest) ([]byte, error)
- func (dtc *DingTalkClient) TopCorpMessageCorpconversationAsyncsendbycode(info *TopCorpMessageCorpconversationAsyncsendbycodeRequest) ([]byte, error)
- func (dtc *DingTalkClient) TopCorpMessageCorpconversationGetsendprogress(agentId int, taskId int) ([]byte, error)
- func (dtc *DingTalkClient) TopCorpMessageCorpconversationGetsendresult(agentId interface{}, taskId interface{}) ([]byte, error)
- func (dtc *DingTalkClient) TopCorpRoleAddRolesForemps(rolelIdList []int, userIdList []string) ([]byte, error)
- func (dtc *DingTalkClient) TopCorpRoleDeleteRole(roleId int) ([]byte, error)
- func (dtc *DingTalkClient) TopCorpRoleGetRoleGroup(groupId int) ([]byte, error)
- func (dtc *DingTalkClient) TopCorpRoleList(size int, offset int) ([]byte, error)
- func (dtc *DingTalkClient) TopCorpRoleRemoveRolesForemps(roleIdList []int, userIdList []string) ([]byte, error)
- func (dtc *DingTalkClient) TopCorpRoleSimpleList(roleId int, size int, offset int) ([]byte, error)
- func (dtc *DingTalkClient) TopSmartworkAttendsGetsimplegroups(offset int, size int) ([]byte, error)
- func (dtc *DingTalkClient) TopSmartworkAttendsListschedule(workDate string, offset int, size int) ([]byte, error)
- func (dtc *DingTalkClient) TopSmartworkBpmsProcessCopy(info *SmartworkBpmsProcessCopyRequest) ([]byte, error)
- func (dtc *DingTalkClient) TopSmartworkBpmsProcessSync(info *SmartworkBpmsProcessSyncRequest) ([]byte, error)
- func (dtc *DingTalkClient) TopSmartworkBpmsProcessinstanceCreate(info *SmartworkBpmsProcessinstanceCreateRequest) ([]byte, error)
- func (dtc *DingTalkClient) TopSmartworkBpmsProcessinstanceList(info *SmartworkBpmsProcessinstanceListRequest) ([]byte, error)
- func (dtc *DingTalkClient) TopSmartworkCheckinRecordGet(info *SmartworkCheckinRecordGetRequest) ([]byte, error)
- func (dtc *DingTalkClient) UserAdminList() (UserAdminListResponse, error)
- func (dtc *DingTalkClient) UserBatchDelete(userIdList []string) (UserBatchDeleteResponse, error)
- func (dtc *DingTalkClient) UserCanAccessMicroapp(appID string, userID string) (UserCanAccessMicroappResponse, error)
- func (dtc *DingTalkClient) UserCreate(info *UserCreateRequest) (UserCreateResponse, error)
- func (dtc *DingTalkClient) UserDelete(userID string) (UserDeleteResponse, error)
- func (dtc *DingTalkClient) UserGetOrgUserCount(onlyActive int) (UserGetOrgUserCountResponse, error)
- func (dtc *DingTalkClient) UserIdByCode(code string) (UserIdResponse, error)
- func (dtc *DingTalkClient) UserIdByUnionId(unionID string) (UserIdByUnionIdResponse, error)
- func (dtc *DingTalkClient) UserInfoByUserId(userID string, lang string, isvGetCompanyInfo *DTIsvGetCompanyInfo) (UserInfoResponse, error)
- func (dtc *DingTalkClient) UserList(param UserListParam) (UserListResponse, error)
- func (dtc *DingTalkClient) UserSimpleList(departmentID int) (UserSimpleListResponse, error)
- func (dtc *DingTalkClient) UserUpdate(info *UserUpdateRequest) (UserUpdateResponse, error)
- type DingTalkCrypto
- func (c *DingTalkCrypto) CreateSignature(token, timestamp, nonce, msg string) string
- func (c *DingTalkCrypto) GetDecryptMsg(signature, timestamp, nonce, secretMsg string) (string, error)
- func (c *DingTalkCrypto) GetEncryptMsg(msg, timestamp, nonce string) (string, string, error)
- func (c *DingTalkCrypto) VerificationSignature(token, timestamp, nonce, msg, sigture string) bool
- type Expirable
- type FailedCallbacks
- type FileCache
- type FileUploadChunkRequest
- type FileUploadChunkResponse
- type FileUploadEndTransactionRequest
- type FileUploadEndTransactionResponse
- type FileUploadSingleResponse
- type FileUploadStartTransactionResponse
- type GCIRAuthCorpInfo
- type GCIRAuthUserInfo
- type GetCompanyInfoResponse
- type GetCorpAccessTokenResponse
- type GetPermanentCodeResponse
- type MALBUIAppList
- type MediaDownloadFileResponse
- type MediaUploadResponse
- type MessageCorpconversationAsyncsendParam
- type MessageCorpconversationAsyncsendResponse
- type MessageSendActionCard
- type MessageSendActionCardRequest
- type MessageSendFile
- type MessageSendFileRequest
- type MessageSendImage
- type MessageSendImageRequest
- type MessageSendLink
- type MessageSendLinkRequest
- type MessageSendMarkdown
- type MessageSendMarkdownRequest
- type MessageSendOA
- type MessageSendOARequest
- type MessageSendRequest
- type MessageSendText
- type MessageSendTextRequest
- type MessageSendToConversationResponse
- type MessageSendVoice
- type MessageSendVoiceRequest
- type MicroAppCreateRequest
- type MicroAppCreateResponse
- type MicroAppDeleteResponse
- type MicroAppListByUserIdResponse
- type MicroAppListResponse
- type MicroAppRGUTResult
- type MicroAppRuleDeleteResponse
- type MicroAppRuleGetRuleListResponse
- type MicroAppRuleGetUserTotaResponse
- type MicroAppSetVisibleScopesRequest
- type MicroAppSetVisibleScopesResponse
- type MicroAppUpdateRequest
- type MicroAppUpdateResponse
- type MicroAppVisibleScopesResponse
- type OpenAPIResponse
- type Roles
- type SNSAccessTokenResponse
- type SNSGetPersistentCodeResponse
- type SNSGetSNSTokenResponse
- type SNSGetUserInfo
- type SNSGetUserInfoResponse
- type SSOAccessTokenResponse
- type SSOAdminInfoByCodeResponse
- type SSOCorpInfo
- type SSOUserInfo
- type ScopesResponse
- type SmartworkALRRecordResult
- type SmartworkAttendanceListRecordRequest
- type SmartworkAttendanceListRecordResponse
- type SmartworkBpmsProcessCopyRequest
- type SmartworkBpmsProcessSyncRequest
- type SmartworkBpmsProcessinstanceCreateRequest
- type SmartworkBpmsProcessinstanceListRequest
- type SmartworkCheckinRecordData
- type SmartworkCheckinRecordGetRequest
- type SmartworkCheckinRecordRequest
- type SmartworkCheckinRecordResponse
- type SubDepartmentListResponse
- type SuiteAccessTokenResponse
- type TicketResponse
- type TodoUsersUnionidTasksDetailUrlParam
- type TodoUsersUnionidTasksNotifyConfigsParam
- type TodoUsersUnionidTasksParam
- type TodoUsersUnionidTasksResponse
- type TopCHSGUSResponse
- type TopCHSGUSResult
- type TopCHSLBUResponse
- type TopCHSLBUResult
- type TopCMCACodeResponse
- type TopCMCACodeResult
- type TopCMCAResponse
- type TopCMCAResult
- type TopCMCGRProgress
- type TopCMCGRResponse
- type TopCMCGRResult
- type TopCMCGResponse
- type TopCMCGResult
- type TopCRSLResponse
- type TopCRSLResult
- type TopConfig
- type TopCorpHealthStepinfoGetUserStatusResponse
- type TopCorpHealthStepinfoListByUseridResponse
- type TopCorpMessageCorpconversationAsyncsendRequest
- type TopCorpMessageCorpconversationAsyncsendResponse
- type TopCorpMessageCorpconversationAsyncsendbycodeRequest
- type TopCorpMessageCorpconversationAsyncsendbycodeResponse
- type TopCorpMessageCorpconversationGetsendprogressResponse
- type TopCorpMessageCorpconversationGetsendresultResponse
- type TopCorpRoleSimpleListResponse
- type TopErrorResponse
- type TopMapRequest
- type UDetailedList
- type USimpleList
- type Unmarshallable
- type UserAdminListResponse
- type UserBatchDeleteResponse
- type UserCanAccessMicroappResponse
- type UserCreateRequest
- type UserCreateResponse
- type UserDeleteResponse
- type UserGetOrgUserCountResponse
- type UserIdByUnionIdResponse
- type UserIdResponse
- type UserInfoResponse
- type UserListParam
- type UserListResponse
- type UserListResult
- type UserSimpleListResponse
- type UserUpdateRequest
- type UserUpdateResponse
Constants ¶
const ( VERSION = "0.1" OAPIURL = "https://oapi.dingtalk.com/" NEWOAPIURL = "https://api.dingtalk.com/" TOPAPIURL = "https://eco.taobao.com/router/rest" MessageTypeText = "text" MessageTypeActionCard = "action_card" MessageTypeImage = "image" MessageTypeVoice = "voice" MessageTypeFile = "file" MessageTypeLink = "link" MessageTypeOA = "oa" MessageTypeMarkdown = "markdown" )
包外部可用的常量
Variables ¶
This section is empty.
Functions ¶
func HandJSONTopResponse ¶
func HandJSONTopResponse(responseData interface{}, content []byte)
func HandXMLTopResponse ¶
func HandXMLTopResponse(responseData interface{}, content []byte)
Types ¶
type AccessTokenResponse ¶
type AccessTokenResponse struct { OpenAPIResponse AccessToken string `json:"access_token"` Expires int `json:"expires_in"` Created int64 }
func (*AccessTokenResponse) CreatedAt ¶
func (e *AccessTokenResponse) CreatedAt() int64
func (*AccessTokenResponse) ExpiresIn ¶
func (e *AccessTokenResponse) ExpiresIn() int
type ActivateSuiteResponse ¶
type ActivateSuiteResponse struct {
OpenAPIResponse
}
type AuthCorpInfo ¶
type AuthOrgScopes ¶
type CBCallBackRequest ¶
type CBCallBackResponse ¶
type CBCallBackResponse struct {
OpenAPIResponse
}
type CBGetFailedCallbackResponse ¶
type CBGetFailedCallbackResponse struct { OpenAPIResponse HasMore bool `json:"has_more"` FailedList []FailedCallbacks `json:"failed_list"` }
type CBQueryCallbackResponse ¶
type CBQueryCallbackResponse struct { OpenAPIResponse CallbackTag []string `json:"call_back_tag"` Token string `json:"token"` AesKey string `json:"aes_key"` URL string `json:"url"` }
type ChatCreateRequest ¶
type ChatCreateResponse ¶
type ChatCreateResponse struct { OpenAPIResponse ChatId string `json:"chatid"` }
type ChatGetInfo ¶
type ChatGetResponse ¶
type ChatGetResponse struct { OpenAPIResponse ChatInfo ChatGetInfo `json:"chat_info"` }
type ChatSendActionCard ¶
type ChatSendActionCard struct { Title string `json:"title"` Markdown string `json:"markdown"` SingleTitle string `json:"single_title,omitempty"` SingleUrl string `json:"single_url,omitempty"` BtnOrientation string `json:"btn_orientation,omitempty"` BtnJSONList interface{} `json:"btn_json_list,omitempty"` AgentId string `json:"agentid,omitempty"` }
type ChatSendActionCardRequest ¶
type ChatSendActionCardRequest struct { ChatSendRequest ActionCard *ChatSendActionCard `json:"action_card"` }
type ChatSendFile ¶
type ChatSendFile struct {
MediaId string `json:"media_id"`
}
type ChatSendFileRequest ¶
type ChatSendFileRequest struct { ChatSendRequest File *ChatSendFile `json:"file"` }
type ChatSendImage ¶
type ChatSendImage struct {
MediaId string `json:"media_id"`
}
type ChatSendImageRequest ¶
type ChatSendImageRequest struct { ChatSendRequest Image *ChatSendImage `json:"image"` }
type ChatSendLink ¶
type ChatSendLinkRequest ¶
type ChatSendLinkRequest struct { ChatSendRequest Link *ChatSendLink `json:"link"` }
type ChatSendMarkdown ¶
type ChatSendMarkdownRequest ¶
type ChatSendMarkdownRequest struct { ChatSendRequest Markdown *ChatSendMarkdown `json:"markdown"` }
type ChatSendOA ¶
type ChatSendOARequest ¶
type ChatSendOARequest struct { ChatSendRequest Oa *ChatSendOA `json:"oa"` }
type ChatSendRequest ¶
type ChatSendResponse ¶
type ChatSendResponse struct {
OpenAPIResponse
}
type ChatSendText ¶
type ChatSendText struct {
Content string `json:"content"`
}
type ChatSendTextRequest ¶
type ChatSendTextRequest struct { ChatSendRequest Text *ChatSendText `json:"text"` }
type ChatSendVoice ¶
type ChatSendVoiceRequest ¶
type ChatSendVoiceRequest struct { ChatSendRequest Voice *ChatSendVoice `json:"voice"` }
type ChatUpdateRequest ¶
type ChatUpdateResponse ¶
type ChatUpdateResponse struct {
OpenAPIResponse
}
type CorpExtcontactRequest ¶
type CorpExtcontactRequest struct { Title string `json:"title,omitempty"` LabelIDs []int `json:"label_ids"` Address string `json:"address,omitempty"` Remark string `json:"remark,omitempty"` FollowerUserID string `json:"follower_user_id"` Name string `json:"name"` UserID string `json:"user_id,omitempty"` StateCode string `json:"state_code"` CompanyName string `json:"company_name,omitempty"` Mobile string `json:"mobile"` }
type CspaceAddRequest ¶
type CspaceAddResponse ¶
type CspaceAddResponse struct { OpenAPIResponse Dentry string }
type CspaceAddToSingleChatResponse ¶
type CspaceAddToSingleChatResponse struct {
OpenAPIResponse
}
type CspaceGetCustomSpaceResponse ¶
type CspaceGetCustomSpaceResponse struct { OpenAPIResponse SpaceID string }
type CspaceGrantCustomSpaceResponse ¶
type CspaceGrantCustomSpaceResponse struct {
OpenAPIResponse
}
type DTIsvGetCompanyInfo ¶
type DataRecordResponse ¶
type DataRecordResponse struct { OpenAPIResponse ID string `json:"id"` }
type DataRequest ¶
type DataRequest struct { ID string `json:"id,omitempty"` StartTimeMs string `json:"startTimeMs"` EndTimeMs string `json:"endTimeMs"` Module string `json:"module,omitempty"` OriginID string `json:"originId,omitempty"` UserID string `json:"userid"` AgentID string `json:"agentId"` CallbackUrl string `json:"callbackUrl"` Extension interface{} `json:"extension,omitempty"` }
type DataUpdateResponse ¶
type DataUpdateResponse struct {
OpenAPIResponse
}
type Department ¶
type DepartmentCreateRequest ¶
type DepartmentCreateRequest struct { Name string `json:"name"` ParentId string `json:"parentid"` Order string `json:"order,omitempty"` CreateDeptGroup bool `json:"createDeptGroup,omitempty"` DeptHiding bool `json:"deptHiding,omitempty"` DeptPerimits string `json:"deptPerimits,omitempty"` UserPerimits string `json:"userPerimits,omitempty"` OuterDept string `json:"outerDept,omitempty"` OuterPermitDepts string `json:"outerPermitDepts,omitempty"` OuterPermitUsers string `json:"outerPermitUsers,omitempty"` SourceIdentifier string `json:"sourceIdentifier,omitempty"` }
type DepartmentCreateResponse ¶
type DepartmentCreateResponse struct { OpenAPIResponse Id int }
type DepartmentDeleteResponse ¶
type DepartmentDeleteResponse struct {
OpenAPIResponse
}
type DepartmentDetailResponse ¶
type DepartmentDetailResponse struct { OpenAPIResponse Id int Name string Order int ParentId int CreateDeptGroup bool AutoAddUser bool DeptHiding bool DeptPerimits string UserPerimits string OuterDept bool OuterPermitDepts string OuterPermitUsers string OrgDeptOwner string DeptManagerUserIdList string SourceIdentifier string }
type DepartmentListParentDeptsByDeptResponse ¶
type DepartmentListParentDeptsByDeptResponse struct { OpenAPIResponse ParentIds []int `json:"parentIds"` }
type DepartmentListParentDeptsResponse ¶
type DepartmentListParentDeptsResponse struct { OpenAPIResponse ParentIds interface{} `json:"dep"` }
type DepartmentListsubParam ¶ added in v1.0.5
type DepartmentListsubResponse ¶ added in v1.0.5
type DepartmentListsubResponse struct { OpenAPIResponse Result []Department `json:"result"` }
type DepartmentUpdateRequest ¶
type DepartmentUpdateRequest struct { Lang string `json:"lang,omitempty"` Name string `json:"name,omitempty"` ParentId string `json:"parentid,omitempty"` Order string `json:"order,omitempty"` Id string `json:"id"` CreateDeptGroup bool `json:"createDeptGroup,omitempty"` AutoAddUser bool `json:"autoAddUser,omitempty"` DeptManagerUseridList string `json:"deptManagerUseridList,omitempty"` DeptHiding bool `json:"deptHiding,omitempty"` DeptPerimits string `json:"deptPerimits,omitempty"` UserPerimits string `json:"userPerimits,omitempty"` OuterDept string `json:"outerDept,omitempty"` OuterPermitDepts string `json:"outerPermitDepts,omitempty"` OuterPermitUsers string `json:"outerPermitUsers,omitempty"` OrgDeptOwner string `json:"orgDeptOwner,omitempty"` SourceIdentifier string `json:"sourceIdentifier,omitempty"` }
type DepartmentUpdateResponse ¶
type DepartmentUpdateResponse struct { OpenAPIResponse Id int }
type DingTalkClient ¶
type DingTalkClient struct { DTConfig *DTConfig TopConfig *TopConfig HTTPClient *http.Client AccessToken string SSOAccessToken string SNSAccessToken string SuiteAccessToken string AccessTokenCache Cache TicketCache Cache SSOAccessTokenCache Cache SNSAccessTokenCache Cache SuiteAccessTokenCache Cache DevType string Locker *sync.Mutex }
func NewDingTalkClient ¶
func NewDingTalkClient(devType string, config *DTConfig) *DingTalkClient
func NewDingTalkCompanyClient ¶
func NewDingTalkCompanyClient(config *DTConfig) *DingTalkClient
func NewDingTalkISVClient ¶
func NewDingTalkISVClient(config *DTConfig) *DingTalkClient
func NewDingTalkMiniClient ¶
func NewDingTalkMiniClient(config *DTConfig) *DingTalkClient
func (*DingTalkClient) CBDeleteCallback ¶
func (dtc *DingTalkClient) CBDeleteCallback() (CBCallBackResponse, error)
删除事件回调接口
func (*DingTalkClient) CBGetFailedCallbacks ¶
func (dtc *DingTalkClient) CBGetFailedCallbacks() (CBGetFailedCallbackResponse, error)
获取回调失败的结果
func (*DingTalkClient) CBQueryCallback ¶
func (dtc *DingTalkClient) CBQueryCallback() (CBQueryCallbackResponse, error)
查询事件回调接口
func (*DingTalkClient) CBRegisterCallback ¶
func (dtc *DingTalkClient) CBRegisterCallback(info *CBCallBackRequest) (CBCallBackResponse, error)
注册事件回调接口
func (*DingTalkClient) CBUpdateCallback ¶
func (dtc *DingTalkClient) CBUpdateCallback(info *CBCallBackRequest) (CBCallBackResponse, error)
更新事件回调接口
func (*DingTalkClient) ChatCreate ¶
func (dtc *DingTalkClient) ChatCreate(info *ChatCreateRequest) (ChatCreateResponse, error)
创建会话
func (*DingTalkClient) ChatGet ¶
func (dtc *DingTalkClient) ChatGet(chatId string) (ChatGetResponse, error)
获取会话
func (*DingTalkClient) ChatSend ¶
func (dtc *DingTalkClient) ChatSend(info interface{}) (ChatSendResponse, error)
发送群消息
func (*DingTalkClient) ChatUpdate ¶
func (dtc *DingTalkClient) ChatUpdate(info *ChatUpdateRequest) (ChatUpdateResponse, error)
修改会话
func (*DingTalkClient) CspaceAdd ¶
func (dtc *DingTalkClient) CspaceAdd(info *CspaceAddRequest) (CspaceAddResponse, error)
新增文件到用户钉盘
func (*DingTalkClient) CspaceAddToSingleChat ¶
func (dtc *DingTalkClient) CspaceAddToSingleChat(info *CspaceAddToSingleChatRequest) (CspaceAddToSingleChatResponse, error)
发送文件给指定用户
func (*DingTalkClient) CspaceGetCustomSpace ¶
func (dtc *DingTalkClient) CspaceGetCustomSpace(info *CspaceGetCustomSpaceRequest) (CspaceGetCustomSpaceResponse, error)
获取企业下的自定义空间
func (*DingTalkClient) CspaceGrantCustomSpace ¶
func (dtc *DingTalkClient) CspaceGrantCustomSpace(info *CspaceGrantCustomSpaceRequest) (CspaceGrantCustomSpaceResponse, error)
授权用户访问企业下的自定义空间
func (*DingTalkClient) DataRecord ¶
func (dtc *DingTalkClient) DataRecord(info *DataRequest) (DataRecordResponse, error)
记录统计数据
func (*DingTalkClient) DataUpdate ¶
func (dtc *DingTalkClient) DataUpdate(info *DataRequest) (DataUpdateResponse, error)
更新统计数据
func (*DingTalkClient) DepartmentCreate ¶
func (dtc *DingTalkClient) DepartmentCreate(info *DepartmentCreateRequest) (DepartmentCreateResponse, error)
创建部门
func (*DingTalkClient) DepartmentDelete ¶
func (dtc *DingTalkClient) DepartmentDelete(id int) (DepartmentDeleteResponse, error)
删除部门
func (*DingTalkClient) DepartmentDetail ¶
func (dtc *DingTalkClient) DepartmentDetail(id interface{}, lang interface{}) (DepartmentDetailResponse, error)
获取部门详情
func (*DingTalkClient) DepartmentListParentDepts ¶
func (dtc *DingTalkClient) DepartmentListParentDepts(userId string) (DepartmentListParentDeptsResponse, error)
查询指定用户的所有上级父部门路径
func (*DingTalkClient) DepartmentListParentDeptsByDept ¶
func (dtc *DingTalkClient) DepartmentListParentDeptsByDept(id int) (DepartmentListParentDeptsByDeptResponse, error)
查询部门的所有上级父部门路径
func (*DingTalkClient) DepartmentListsub ¶ added in v1.0.5
func (dtc *DingTalkClient) DepartmentListsub(param DepartmentListsubParam) (DepartmentListsubResponse, error)
获取部门列表
func (*DingTalkClient) DepartmentUpdate ¶
func (dtc *DingTalkClient) DepartmentUpdate(info *DepartmentUpdateRequest) (DepartmentUpdateResponse, error)
更新部门
func (*DingTalkClient) FileUploadChunk ¶
func (dtc *DingTalkClient) FileUploadChunk(info *FileUploadChunkRequest) (FileUploadChunkResponse, error)
上传文件块
func (*DingTalkClient) FileUploadEndTransaction ¶
func (dtc *DingTalkClient) FileUploadEndTransaction(info *FileUploadEndTransactionRequest) (FileUploadEndTransactionResponse, error)
提交文件上传事务
func (*DingTalkClient) FileUploadSingle ¶
func (dtc *DingTalkClient) FileUploadSingle(agentID string, fileSize int64, fileName string, reader io.Reader) (FileUploadSingleResponse, error)
上传单个文件
func (*DingTalkClient) FileUploadStartTransaction ¶
func (dtc *DingTalkClient) FileUploadStartTransaction(agentID string, fileSize int, chunkNumbers int) (FileUploadStartTransactionResponse, error)
开启文件上传事务
func (*DingTalkClient) GetAuthScopes ¶
func (dtc *DingTalkClient) GetAuthScopes() (ScopesResponse, error)
获取授权范围
func (*DingTalkClient) GetConfig ¶
func (dtc *DingTalkClient) GetConfig(nonceStr string, timestamp string, url string) string
配置config信息
func (*DingTalkClient) GetJSAPITicket ¶
func (dtc *DingTalkClient) GetJSAPITicket() (ticket string, err error)
获取Ticket
func (*DingTalkClient) IsvActivateSuite ¶
func (dtc *DingTalkClient) IsvActivateSuite(authCorpID string, permanentCode string) (ActivateSuiteResponse, error)
激活套件
func (*DingTalkClient) IsvGetCAT ¶
func (dtc *DingTalkClient) IsvGetCAT(tmpAuthCode string)
直接获取企业授权的凭证
func (*DingTalkClient) IsvGetCompanyInfo ¶
func (dtc *DingTalkClient) IsvGetCompanyInfo(authCorpID string) (GetCompanyInfoResponse, error)
获取企业的基本信息
func (*DingTalkClient) IsvGetCorpAccessToken ¶
func (dtc *DingTalkClient) IsvGetCorpAccessToken(authCorpID string, permanentCode string) (GetCorpAccessTokenResponse, error)
获取企业授权的凭证
func (*DingTalkClient) IsvGetPermanentCode ¶
func (dtc *DingTalkClient) IsvGetPermanentCode(tmpAuthCode string) (GetPermanentCodeResponse, error)
获取企业授权的永久授权码
func (*DingTalkClient) MediaDownloadFile ¶
func (dtc *DingTalkClient) MediaDownloadFile(mediaID string, write io.Writer) error
获取媒体文件
func (*DingTalkClient) MediaUpload ¶
func (dtc *DingTalkClient) MediaUpload(mediaType string, fileName string, reader io.Reader) (MediaUploadResponse, error)
上传媒体文件
func (*DingTalkClient) MessageCorpconversationAsyncsend ¶ added in v1.0.10
func (dtc *DingTalkClient) MessageCorpconversationAsyncsend(param MessageCorpconversationAsyncsendParam) (MessageCorpconversationAsyncsendResponse, error)
发送工作通知
func (*DingTalkClient) MessageSendToConversation ¶
func (dtc *DingTalkClient) MessageSendToConversation(info interface{}) (MessageSendToConversationResponse, error)
发送普通消息
func (*DingTalkClient) MicroAppCreate ¶
func (dtc *DingTalkClient) MicroAppCreate(info *MicroAppCreateRequest) (MicroAppCreateResponse, error)
创建微应用
func (*DingTalkClient) MicroAppDelete ¶
func (dtc *DingTalkClient) MicroAppDelete(agentId int) (MicroAppDeleteResponse, error)
删除微应用
func (*DingTalkClient) MicroAppList ¶
func (dtc *DingTalkClient) MicroAppList() (MicroAppListResponse, error)
列出微应用
func (*DingTalkClient) MicroAppListByUserId ¶
func (dtc *DingTalkClient) MicroAppListByUserId(userId string) (MicroAppListByUserIdResponse, error)
列出员工可见的微应用
func (*DingTalkClient) MicroAppRuleDelete ¶
func (dtc *DingTalkClient) MicroAppRuleDelete(agentId int, ruleId int) (MicroAppRuleDeleteResponse, error)
删除规则(定向开放接口)
func (*DingTalkClient) MicroAppRuleGetRuleList ¶
func (dtc *DingTalkClient) MicroAppRuleGetRuleList(userId string, agentId string) (MicroAppRuleGetRuleListResponse, error)
获取指定微应用下指定用户绑定的全部规则(定向开放接口)
func (*DingTalkClient) MicroAppRuleGetUserTota ¶
func (dtc *DingTalkClient) MicroAppRuleGetUserTota(agentId int, ruleIdList []int) (MicroAppRuleGetUserTotaResponse, error)
获取规则绑定的用户数(定向开放接口)
func (*DingTalkClient) MicroAppSetVisibleScopes ¶
func (dtc *DingTalkClient) MicroAppSetVisibleScopes(info *MicroAppSetVisibleScopesRequest) (MicroAppSetVisibleScopesResponse, error)
设置微应用的可见范围
func (*DingTalkClient) MicroAppUpdate ¶
func (dtc *DingTalkClient) MicroAppUpdate(info *MicroAppUpdateRequest) (MicroAppUpdateResponse, error)
更新微应用
func (*DingTalkClient) MicroAppVisibleScopes ¶
func (dtc *DingTalkClient) MicroAppVisibleScopes(agentId int) (MicroAppVisibleScopesResponse, error)
获取企业设置的微应用可见范围
func (*DingTalkClient) RefreshCompanyAccessToken ¶
func (dtc *DingTalkClient) RefreshCompanyAccessToken() error
刷新企业获取的access_token
func (*DingTalkClient) RefreshSNSAccessToken ¶
func (dtc *DingTalkClient) RefreshSNSAccessToken() error
刷新 SNS access_token
func (*DingTalkClient) RefreshSSOAccessToken ¶
func (dtc *DingTalkClient) RefreshSSOAccessToken() error
刷新企业获取的sso_access_token
func (*DingTalkClient) RefreshSuiteAccessToken ¶
func (dtc *DingTalkClient) RefreshSuiteAccessToken() error
刷新 isv suite_access_token
func (*DingTalkClient) SNSGetPersistentCode ¶
func (dtc *DingTalkClient) SNSGetPersistentCode(code string) (SNSGetPersistentCodeResponse, error)
func (*DingTalkClient) SNSGetSNSToken ¶
func (dtc *DingTalkClient) SNSGetSNSToken(openID string, persistentCode string) (SNSGetSNSTokenResponse, error)
func (*DingTalkClient) SNSGetUserInfo ¶
func (dtc *DingTalkClient) SNSGetUserInfo(snsToken string) (SNSGetUserInfoResponse, error)
func (*DingTalkClient) SSOAdminInfoByCode ¶
func (dtc *DingTalkClient) SSOAdminInfoByCode(code string) (SSOAdminInfoByCodeResponse, error)
通过CODE换取微应用管理员的身份信息
func (*DingTalkClient) SmartworkAttendanceListRecord ¶
func (dtc *DingTalkClient) SmartworkAttendanceListRecord(info *SmartworkAttendanceListRecordRequest) (SmartworkAttendanceListRecordResponse, error)
考勤打卡记录开放
func (*DingTalkClient) SmartworkCheckinRecord ¶
func (dtc *DingTalkClient) SmartworkCheckinRecord(info *SmartworkCheckinRecordRequest) (SmartworkCheckinRecordResponse, error)
获得签到数据
func (*DingTalkClient) SubDepartmentList ¶
func (dtc *DingTalkClient) SubDepartmentList(id interface{}) (SubDepartmentListResponse, error)
获取子部门Id列表
func (*DingTalkClient) TodoUsersUnionidTasks ¶ added in v1.0.10
func (dtc *DingTalkClient) TodoUsersUnionidTasks(param TodoUsersUnionidTasksParam) (TodoUsersUnionidTasksResponse, error)
TodoUsersUnionidTasks 新增钉钉待办任务
func (*DingTalkClient) TopCorpExtcontactCreate ¶
func (dtc *DingTalkClient) TopCorpExtcontactCreate(info *CorpExtcontactRequest) ([]byte, error)
添加企业外部联系人
func (*DingTalkClient) TopCorpExtcontactGet ¶
func (dtc *DingTalkClient) TopCorpExtcontactGet(userID string) ([]byte, error)
外部单个联系人详情
func (*DingTalkClient) TopCorpExtcontactList ¶
func (dtc *DingTalkClient) TopCorpExtcontactList(size int, offset int) ([]byte, error)
获取外部联系人列表
func (*DingTalkClient) TopCorpExtcontactListlabelgroups ¶
func (dtc *DingTalkClient) TopCorpExtcontactListlabelgroups(size int, offset int) ([]byte, error)
外部联系人标签列表
func (*DingTalkClient) TopCorpExtcontactUpdate ¶
func (dtc *DingTalkClient) TopCorpExtcontactUpdate(info *CorpExtcontactRequest) ([]byte, error)
更新外部联系人
func (*DingTalkClient) TopCorpHealthStepinfoGetUserStatus ¶
func (dtc *DingTalkClient) TopCorpHealthStepinfoGetUserStatus(userId string) ([]byte, error)
查询用户是否开启了钉钉运动
func (*DingTalkClient) TopCorpHealthStepinfoListByUserid ¶
func (dtc *DingTalkClient) TopCorpHealthStepinfoListByUserid(userIds []string, statDate string) ([]byte, error)
批量查询多个用户的钉钉运动步数
func (*DingTalkClient) TopCorpMessageCorpconversationAsyncsend ¶
func (dtc *DingTalkClient) TopCorpMessageCorpconversationAsyncsend(info *TopCorpMessageCorpconversationAsyncsendRequest) ([]byte, error)
企业会话消息异步发送
func (*DingTalkClient) TopCorpMessageCorpconversationAsyncsendbycode ¶
func (dtc *DingTalkClient) TopCorpMessageCorpconversationAsyncsendbycode(info *TopCorpMessageCorpconversationAsyncsendbycodeRequest) ([]byte, error)
通过用户授权码异步向企业会话发送消息
func (*DingTalkClient) TopCorpMessageCorpconversationGetsendprogress ¶
func (dtc *DingTalkClient) TopCorpMessageCorpconversationGetsendprogress(agentId int, taskId int) ([]byte, error)
获取异步发送企业会话消息的发送进度
func (*DingTalkClient) TopCorpMessageCorpconversationGetsendresult ¶
func (dtc *DingTalkClient) TopCorpMessageCorpconversationGetsendresult(agentId interface{}, taskId interface{}) ([]byte, error)
获取异步向企业会话发送消息的结果
func (*DingTalkClient) TopCorpRoleAddRolesForemps ¶
func (dtc *DingTalkClient) TopCorpRoleAddRolesForemps(rolelIdList []int, userIdList []string) ([]byte, error)
批量为员工增加角色信息
func (*DingTalkClient) TopCorpRoleDeleteRole ¶
func (dtc *DingTalkClient) TopCorpRoleDeleteRole(roleId int) ([]byte, error)
删除角色信息
func (*DingTalkClient) TopCorpRoleGetRoleGroup ¶
func (dtc *DingTalkClient) TopCorpRoleGetRoleGroup(groupId int) ([]byte, error)
获取角色组信息
func (*DingTalkClient) TopCorpRoleList ¶
func (dtc *DingTalkClient) TopCorpRoleList(size int, offset int) ([]byte, error)
获取企业角色列表
func (*DingTalkClient) TopCorpRoleRemoveRolesForemps ¶
func (dtc *DingTalkClient) TopCorpRoleRemoveRolesForemps(roleIdList []int, userIdList []string) ([]byte, error)
批量删除员工角的色信息
func (*DingTalkClient) TopCorpRoleSimpleList ¶
获取角色的员工列表
func (*DingTalkClient) TopSmartworkAttendsGetsimplegroups ¶
func (dtc *DingTalkClient) TopSmartworkAttendsGetsimplegroups(offset int, size int) ([]byte, error)
获取考勤组列表详情
func (*DingTalkClient) TopSmartworkAttendsListschedule ¶
func (dtc *DingTalkClient) TopSmartworkAttendsListschedule(workDate string, offset int, size int) ([]byte, error)
考勤排班信息按天全量查询接口
func (*DingTalkClient) TopSmartworkBpmsProcessCopy ¶
func (dtc *DingTalkClient) TopSmartworkBpmsProcessCopy(info *SmartworkBpmsProcessCopyRequest) ([]byte, error)
复制审批流
func (*DingTalkClient) TopSmartworkBpmsProcessSync ¶
func (dtc *DingTalkClient) TopSmartworkBpmsProcessSync(info *SmartworkBpmsProcessSyncRequest) ([]byte, error)
更新审批流
func (*DingTalkClient) TopSmartworkBpmsProcessinstanceCreate ¶
func (dtc *DingTalkClient) TopSmartworkBpmsProcessinstanceCreate(info *SmartworkBpmsProcessinstanceCreateRequest) ([]byte, error)
发起审批实例
func (*DingTalkClient) TopSmartworkBpmsProcessinstanceList ¶
func (dtc *DingTalkClient) TopSmartworkBpmsProcessinstanceList(info *SmartworkBpmsProcessinstanceListRequest) ([]byte, error)
获取审批实例列表
func (*DingTalkClient) TopSmartworkCheckinRecordGet ¶
func (dtc *DingTalkClient) TopSmartworkCheckinRecordGet(info *SmartworkCheckinRecordGetRequest) ([]byte, error)
获取多个用户的签到记录
func (*DingTalkClient) UserAdminList ¶
func (dtc *DingTalkClient) UserAdminList() (UserAdminListResponse, error)
获取管理员列表
func (*DingTalkClient) UserBatchDelete ¶
func (dtc *DingTalkClient) UserBatchDelete(userIdList []string) (UserBatchDeleteResponse, error)
批量删除成员
func (*DingTalkClient) UserCanAccessMicroapp ¶
func (dtc *DingTalkClient) UserCanAccessMicroapp(appID string, userID string) (UserCanAccessMicroappResponse, error)
获取管理员的微应用管理权限
func (*DingTalkClient) UserCreate ¶
func (dtc *DingTalkClient) UserCreate(info *UserCreateRequest) (UserCreateResponse, error)
创建成员
func (*DingTalkClient) UserDelete ¶
func (dtc *DingTalkClient) UserDelete(userID string) (UserDeleteResponse, error)
删除成员
func (*DingTalkClient) UserGetOrgUserCount ¶
func (dtc *DingTalkClient) UserGetOrgUserCount(onlyActive int) (UserGetOrgUserCountResponse, error)
获取企业员工人数
func (*DingTalkClient) UserIdByCode ¶
func (dtc *DingTalkClient) UserIdByCode(code string) (UserIdResponse, error)
通过Code换取userid
func (*DingTalkClient) UserIdByUnionId ¶
func (dtc *DingTalkClient) UserIdByUnionId(unionID string) (UserIdByUnionIdResponse, error)
通过UnionId获取UserId
func (*DingTalkClient) UserInfoByUserId ¶
func (dtc *DingTalkClient) UserInfoByUserId(userID string, lang string, isvGetCompanyInfo *DTIsvGetCompanyInfo) (UserInfoResponse, error)
通过userid 换取 用户详细信息
func (*DingTalkClient) UserList ¶
func (dtc *DingTalkClient) UserList(param UserListParam) (UserListResponse, error)
获取部门成员(详情版)
func (*DingTalkClient) UserSimpleList ¶
func (dtc *DingTalkClient) UserSimpleList(departmentID int) (UserSimpleListResponse, error)
获取部门成员(简化版)
func (*DingTalkClient) UserUpdate ¶
func (dtc *DingTalkClient) UserUpdate(info *UserUpdateRequest) (UserUpdateResponse, error)
更新成员
type DingTalkCrypto ¶
type DingTalkCrypto struct { Token string EncodingAESKey string SuiteKey string BKey []byte Block cipher.Block }
func NewDingTalkCrypto ¶
func NewDingTalkCrypto(token, encodingAESKey, suiteKey string) *DingTalkCrypto
func (*DingTalkCrypto) CreateSignature ¶
func (c *DingTalkCrypto) CreateSignature(token, timestamp, nonce, msg string) string
数据签名
func (*DingTalkCrypto) GetDecryptMsg ¶
func (c *DingTalkCrypto) GetDecryptMsg(signature, timestamp, nonce, secretMsg string) (string, error)
func (*DingTalkCrypto) GetEncryptMsg ¶
func (c *DingTalkCrypto) GetEncryptMsg(msg, timestamp, nonce string) (string, string, error)
func (*DingTalkCrypto) VerificationSignature ¶
func (c *DingTalkCrypto) VerificationSignature(token, timestamp, nonce, msg, sigture string) bool
验证数据签名
type FailedCallbacks ¶
type FileUploadChunkRequest ¶
type FileUploadChunkResponse ¶
type FileUploadChunkResponse struct {
OpenAPIResponse
}
type FileUploadEndTransactionResponse ¶
type FileUploadEndTransactionResponse struct { OpenAPIResponse MediaID string `json:"media_id"` }
type FileUploadSingleResponse ¶
type FileUploadSingleResponse struct { OpenAPIResponse MediaID string `json:"media_id"` }
type FileUploadStartTransactionResponse ¶
type FileUploadStartTransactionResponse struct { OpenAPIResponse UploadID string `json:"upload_id"` }
type GCIRAuthCorpInfo ¶
type GCIRAuthCorpInfo struct { CorpLogoURL string `json:"corp_logo_url"` CorpName string `json:"corp_name"` CorpID string `json:"corpid"` Industry string `json:"industry"` InviteCode string `json:"invite_code"` LicenseCode string `json:"license_code"` AuthChannel string `json:"auth_channel"` AuthChannelType string `json:"auth_channel_type"` IsAuthenticated bool `json:"is_authenticated"` AuthLevel int `json:"auth_level"` InviteURL string `json:"invite_url"` }
type GCIRAuthUserInfo ¶
type GCIRAuthUserInfo struct {
UserID string `json:"userId"`
}
type GetCompanyInfoResponse ¶
type GetCompanyInfoResponse struct { OpenAPIResponse AuthCorpInfo GCIRAuthCorpInfo `json:"auth_corp_info"` AuthUserInfo GCIRAuthUserInfo `json:"auth_user_info"` AuthInfo interface{} `json:"auth_info"` ChannelAuthInfo interface{} `json:"channel_auth_info"` }
type GetCorpAccessTokenResponse ¶
type GetCorpAccessTokenResponse struct { OpenAPIResponse AccessToken string `json:"access_token"` Expires int `json:"expires_in"` }
type GetPermanentCodeResponse ¶
type GetPermanentCodeResponse struct { OpenAPIResponse PermanentCode string `json:"permanent_code"` ChPermanentCode string `json:"ch_permanent_code"` AuthCorpInfo AuthCorpInfo `json:"auth_corp_info"` }
type MALBUIAppList ¶
type MALBUIAppList struct { AppIcon string `json:"appIcon"` AgentId int `json:"agentId"` AppDesc string `json:"appDesc"` IsSelf bool `json:"isSelf"` Name string `json:"name"` HomePageUrl string `json:"homepageUrl"` PcHomePageUrl string `json:"pcHomepageUrl"` AppStatus int `json:"appStatus"` OmpLink string `json:"ompLink"` }
type MediaDownloadFileResponse ¶
type MediaDownloadFileResponse struct { OpenAPIResponse MediaID string Writer io.Writer }
type MediaUploadResponse ¶
type MediaUploadResponse struct { OpenAPIResponse Type string MediaID string `json:"media_id"` CreatedAt int64 `json:"created_at"` }
type MessageCorpconversationAsyncsendParam ¶ added in v1.0.10
type MessageCorpconversationAsyncsendResponse ¶ added in v1.0.10
type MessageCorpconversationAsyncsendResponse struct { OpenAPIResponse TaskId int64 `json:"task_id"` }
type MessageSendActionCard ¶
type MessageSendActionCard struct { Title string `json:"title"` Markdown string `json:"markdown"` SingleTitle string `json:"single_title,omitempty"` SingleUrl string `json:"single_url,omitempty"` BtnOrientation string `json:"btn_orientation,omitempty"` BtnJSONList interface{} `json:"btn_json_list,omitempty"` AgentId string `json:"agentid,omitempty"` }
type MessageSendActionCardRequest ¶
type MessageSendActionCardRequest struct { MessageSendRequest ActionCard *MessageSendActionCard `json:"action_card"` }
type MessageSendFile ¶
type MessageSendFile struct {
MediaId string `json:"media_id"`
}
type MessageSendFileRequest ¶
type MessageSendFileRequest struct { MessageSendRequest File *MessageSendFile `json:"file"` }
type MessageSendImage ¶
type MessageSendImage struct {
MediaId string `json:"media_id"`
}
type MessageSendImageRequest ¶
type MessageSendImageRequest struct { MessageSendRequest Image *MessageSendImage `json:"image"` }
type MessageSendLink ¶
type MessageSendLinkRequest ¶
type MessageSendLinkRequest struct { MessageSendRequest Link *MessageSendLink `json:"link"` }
type MessageSendMarkdown ¶
type MessageSendMarkdownRequest ¶
type MessageSendMarkdownRequest struct { MessageSendRequest Markdown *MessageSendMarkdown `json:"markdown"` }
type MessageSendOA ¶
type MessageSendOARequest ¶
type MessageSendOARequest struct { MessageSendRequest Oa *MessageSendOA `json:"oa"` }
type MessageSendRequest ¶
type MessageSendText ¶
type MessageSendText struct {
Content string `json:"content"`
}
type MessageSendTextRequest ¶
type MessageSendTextRequest struct { MessageSendRequest Text *MessageSendText `json:"text"` }
type MessageSendToConversationResponse ¶
type MessageSendToConversationResponse struct { OpenAPIResponse Receiver string }
type MessageSendVoice ¶
type MessageSendVoiceRequest ¶
type MessageSendVoiceRequest struct { MessageSendRequest Voice *MessageSendVoice `json:"voice"` }
type MicroAppCreateRequest ¶
type MicroAppCreateResponse ¶
type MicroAppCreateResponse struct { OpenAPIResponse AgentId int `json:"agentId"` }
type MicroAppDeleteResponse ¶
type MicroAppDeleteResponse struct {
OpenAPIResponse
}
type MicroAppListByUserIdResponse ¶
type MicroAppListByUserIdResponse struct { OpenAPIResponse AppList []MALBUIAppList }
type MicroAppListResponse ¶
type MicroAppListResponse struct { OpenAPIResponse AppList []MALBUIAppList }
type MicroAppRGUTResult ¶
type MicroAppRuleDeleteResponse ¶
type MicroAppRuleDeleteResponse struct {
OpenAPIResponse
}
type MicroAppRuleGetRuleListResponse ¶
type MicroAppRuleGetRuleListResponse struct { OpenAPIResponse RuleIdList []int `json:"ruleIdList"` }
type MicroAppRuleGetUserTotaResponse ¶
type MicroAppRuleGetUserTotaResponse struct { OpenAPIResponse Result []MicroAppRGUTResult }
type MicroAppSetVisibleScopesResponse ¶
type MicroAppSetVisibleScopesResponse struct {
OpenAPIResponse
}
type MicroAppUpdateRequest ¶
type MicroAppUpdateRequest struct { AppIcon string `json:"appIcon,omitempty"` AppName string `json:"appName,omitempty"` AppDesc string `json:"appDesc,omitempty"` HomePageUrl string `json:"homepageUrl,omitempty"` PcHomePageUrl string `json:"pcHomepageUrl,omitempty"` OmpLink string `json:"ompLink,omitempty"` AgentId int `json:"agentId"` }
type MicroAppUpdateResponse ¶
type MicroAppUpdateResponse struct { OpenAPIResponse AgentId int `json:"agentId"` }
type MicroAppVisibleScopesResponse ¶
type MicroAppVisibleScopesResponse struct { OpenAPIResponse IsHidden bool `json:"isHidden"` DeptVisibleScopes []int `json:"deptVisibleScopes"` UserVisibleScopes []string `json:"userVisibleScopes"` }
type OpenAPIResponse ¶
type SNSAccessTokenResponse ¶
type SNSAccessTokenResponse struct { OpenAPIResponse SNSAccessToken string `json:"access_token"` Expires int `json:"expires_in"` Created int64 }
func (*SNSAccessTokenResponse) CreatedAt ¶
func (e *SNSAccessTokenResponse) CreatedAt() int64
func (*SNSAccessTokenResponse) ExpiresIn ¶
func (e *SNSAccessTokenResponse) ExpiresIn() int
type SNSGetPersistentCodeResponse ¶
type SNSGetPersistentCodeResponse struct { OpenAPIResponse OpenID string `json:"openid"` PersistentCode string `json:"persistent_code"` UnionID string `json:"unionid"` }
type SNSGetSNSTokenResponse ¶
type SNSGetSNSTokenResponse struct { OpenAPIResponse Expires int `json:"expires_in"` SnsToken string `json:"sns_token"` }
type SNSGetUserInfo ¶
type SNSGetUserInfoResponse ¶
type SNSGetUserInfoResponse struct { OpenAPIResponse UserInfo SNSGetUserInfo `json:"user_info"` }
type SSOAccessTokenResponse ¶
type SSOAccessTokenResponse struct { OpenAPIResponse SSOAccessToken string `json:"access_token"` Expires int `json:"expires_in"` Created int64 }
func (*SSOAccessTokenResponse) CreatedAt ¶
func (e *SSOAccessTokenResponse) CreatedAt() int64
func (*SSOAccessTokenResponse) ExpiresIn ¶
func (e *SSOAccessTokenResponse) ExpiresIn() int
type SSOAdminInfoByCodeResponse ¶
type SSOAdminInfoByCodeResponse struct { OpenAPIResponse CorpInfo SSOCorpInfo `json:"corp_info"` IsSys bool `json:"is_sys"` }
type SSOCorpInfo ¶
type SSOUserInfo ¶
type ScopesResponse ¶
type ScopesResponse struct { OpenAPIResponse AuthUserField []string ConditionField []string AuthOrgScopes }
type SmartworkALRRecordResult ¶
type SmartworkALRRecordResult struct { GmtModified int64 `json:"gmtModified"` IsLegal string `json:"isLegal"` BaseCheckTime int64 `json:"baseCheckTime"` ID int64 `json:"id"` UserAddress string `json:"userAddress"` UserID string `json:"userId"` CheckType string `json:"checkType"` TimeResult string `json:"timeResult"` DeviceID string `json:"deviceId"` CorpID string `json:"corpId"` SourceType string `json:"sourceType"` WorkDate int64 `json:"workDate"` PlanCheckTime int64 `json:"planCheckTime"` GmtCreate int64 `json:"gmtCreate"` LocationMethod string `json:"locationMethod"` LocationResult string `json:"locationResult"` UserLongitude float64 `json:"userLongitude"` PlanID int64 `json:"planId"` GroupID int64 `json:"groupId"` UserAccuracy int `json:"userAccuracy"` UserCheckTime int64 `json:"userCheckTime"` UserLatitude float64 `json:"userLatitude"` ProcInstId string `json:"procInstId"` }
type SmartworkAttendanceListRecordResponse ¶
type SmartworkAttendanceListRecordResponse struct { OpenAPIResponse RecordResult []SmartworkALRRecordResult `json:"recordresult"` }
type SmartworkBpmsProcessinstanceCreateRequest ¶
type SmartworkBpmsProcessinstanceCreateRequest struct { AgentID int64 `json:"agent_id"` ProcessCode string `json:"process_code"` OriginatorUserID string `json:"originator_user_id"` DeptID int `json:"dept_id"` Approvers []string `json:"approvers"` CCList []string `json:"cc_list"` CCPosition []string `json:"cc_position"` FormComponentValueVo []map[string]string `json:"form_component_values"` }
type SmartworkCheckinRecordData ¶
type SmartworkCheckinRecordData struct { Name string `json:"name"` UserID string `json:"userId"` Timestamp int64 `json:"timestamp"` Avatar string `json:"avatar"` Place string `json:"place"` DetailPlace string `json:"detailPlace"` Remark string `json:"remark"` Latitude float64 `json:"latitude"` Longitude float64 `json:"longitude"` ImageList []string `json:"imageList"` }
type SmartworkCheckinRecordResponse ¶
type SmartworkCheckinRecordResponse struct { OpenAPIResponse Data []SmartworkCheckinRecordData `json:"data"` }
type SubDepartmentListResponse ¶
type SubDepartmentListResponse struct { OpenAPIResponse SubDeptIdList []int }
type SuiteAccessTokenResponse ¶
type SuiteAccessTokenResponse struct { OpenAPIResponse SuiteAccessToken string `json:"suite_access_token"` Expires int `json:"expires_in"` Created int64 }
func (*SuiteAccessTokenResponse) CreatedAt ¶
func (e *SuiteAccessTokenResponse) CreatedAt() int64
func (*SuiteAccessTokenResponse) ExpiresIn ¶
func (e *SuiteAccessTokenResponse) ExpiresIn() int
type TicketResponse ¶
type TicketResponse struct { OpenAPIResponse Ticket string `json:"ticket"` Expires int `json:"expires_in"` Created int64 }
func (*TicketResponse) CreatedAt ¶
func (e *TicketResponse) CreatedAt() int64
func (*TicketResponse) ExpiresIn ¶
func (e *TicketResponse) ExpiresIn() int
type TodoUsersUnionidTasksDetailUrlParam ¶ added in v1.0.10
type TodoUsersUnionidTasksNotifyConfigsParam ¶ added in v1.0.10
type TodoUsersUnionidTasksNotifyConfigsParam struct {
DingNotify string `json:"dingNotify,omitempty"`
}
type TodoUsersUnionidTasksParam ¶ added in v1.0.10
type TodoUsersUnionidTasksParam struct { UnionId string `json:"-"` OperatorId string `json:"-"` SourceId string `json:"sourceId,omitempty"` Subject string `json:"subject"` CreatorId string `json:"creatorId"` Description string `json:"description,omitempty"` DueTime int64 `json:"dueTime,omitempty"` ExecutorIds string `json:"executorIds,omitempty"` ParticipantIds string `json:"participantIds,omitempty"` DetailUrl *TodoUsersUnionidTasksDetailUrlParam `json:"detailUrl,omitempty"` IsOnlyShowExecutor bool `json:"isOnlyShowExecutor,omitempty"` Priority int64 `json:"priority,omitempty"` NotifyConfigs *TodoUsersUnionidTasksNotifyConfigsParam `json:"notifyConfigs,omitempty"` }
type TodoUsersUnionidTasksResponse ¶ added in v1.0.10
type TodoUsersUnionidTasksResponse struct { CreatedTime int64 `json:"createdTime"` CreatorID string `json:"creatorId"` Done bool `json:"done"` DueTime int64 `json:"dueTime"` ExecutorIds []string `json:"executorIds"` ID string `json:"id"` ModifiedTime int64 `json:"modifiedTime"` ParticipantIds []string `json:"participantIds"` Priority int64 `json:"priority"` RequestID string `json:"requestId"` Source string `json:"source"` StartTime int64 `json:"startTime"` Subject string `json:"subject"` }
type TopCHSGUSResponse ¶
type TopCHSGUSResponse struct { Result TopCHSGUSResult RequestId string `json:"request_id"` }
type TopCHSGUSResult ¶
type TopCHSLBUResponse ¶
type TopCHSLBUResponse struct { Result TopCHSLBUResult RequestId string `json:"request_id"` }
type TopCHSLBUResult ¶
type TopCMCACodeResponse ¶
type TopCMCACodeResponse struct {
Result TopCMCACodeResult
}
type TopCMCACodeResult ¶
type TopCMCAResponse ¶
type TopCMCAResponse struct { Result TopCMCAResult RequestId string `json:"request_id"` }
type TopCMCAResult ¶
type TopCMCGRProgress ¶
type TopCMCGRResponse ¶
type TopCMCGRResponse struct {
Result TopCMCGRResult
}
type TopCMCGRResult ¶
type TopCMCGRResult struct { DingOpenErrCode int `json:"ding_open_errcode"` ErrorMsg string `json:"error_msg"` Success bool Progress TopCMCGRProgress `json:"progress"` }
type TopCMCGResponse ¶
type TopCMCGResponse struct {
Result TopCMCGRResult
}
type TopCMCGResult ¶
type TopCRSLResponse ¶
type TopCRSLResponse struct { Result TopCRSLResult RequestId string `json:"request_id"` }
type TopCRSLResult ¶
type TopCRSLResult struct { HasMore bool `json:"has_more"` List interface{} }
type TopCorpHealthStepinfoGetUserStatusResponse ¶
type TopCorpHealthStepinfoGetUserStatusResponse struct { ErrorResponse TopErrorResponse `json:"error_response"` DingTalkCorpHealthStepinfoGetuserstatusResponse TopCHSGUSResponse `json:"dingtalk_corp_health_stepinfo_getuserstatus_response"` }
type TopCorpHealthStepinfoListByUseridResponse ¶
type TopCorpHealthStepinfoListByUseridResponse struct { ErrorResponse TopErrorResponse `json:"error_response"` DingtalkCorpHealthStepinfoListByUseridResponse TopCHSLBUResponse `json:"dingtalk_corp_health_stepinfo_listbyuserid_response"` }
type TopCorpMessageCorpconversationAsyncsendResponse ¶
type TopCorpMessageCorpconversationAsyncsendResponse struct { ErrorResponse TopErrorResponse `json:"error_response"` DingtalkCorpMessageCorpconversationAsyncsendResponse TopCMCAResponse `json:"dingtalk_corp_message_corpconversation_asyncsend_response"` }
type TopCorpMessageCorpconversationAsyncsendbycodeResponse ¶
type TopCorpMessageCorpconversationAsyncsendbycodeResponse struct { ErrorResponse TopErrorResponse `json:"error_response"` DingtalkCorpMessageCorpconversationAsyncsendbycodeResponse TopCMCACodeResponse `json:"dingtalk_corp_message_corpconversation_asyncsendbycode_response"` }
type TopCorpMessageCorpconversationGetsendprogressResponse ¶
type TopCorpMessageCorpconversationGetsendprogressResponse struct { ErrorResponse TopErrorResponse `json:"error_response"` DingtalkCorpMessageCorpconversationGetsendprogressResponse TopCMCGRResponse `json:"dingtalk_corp_message_corpconversation_getsendprogress_response"` }
type TopCorpMessageCorpconversationGetsendresultResponse ¶
type TopCorpMessageCorpconversationGetsendresultResponse struct { ErrorResponse TopErrorResponse `json:"error_response"` DingtalkCorpMessageCorpconversationGetsendresultResponse TopCMCGResponse `json:"dingtalk_corp_message_corpconversation_getsendresult_response"` }
type TopCorpRoleSimpleListResponse ¶
type TopCorpRoleSimpleListResponse struct { ErrorResponse TopErrorResponse `json:"error_response"` DingtalkCorpRoleSimpleListResponse TopCRSLResponse `json:"dingtalk_corp_role_simplelist_response"` }
type TopErrorResponse ¶
type TopMapRequest ¶
type TopMapRequest map[string]interface{}
type UDetailedList ¶
type UDetailedList struct { UserID string `json:"userid"` UnionID string `json:"unionid"` Name string `json:"name"` Avatar string `json:"avatar"` StateCode string `json:"state_code"` Mobile string `json:"mobile"` HideMobile bool `json:"hide_mobile"` Telephone string `json:"telephone"` JobNumber string `json:"job_number"` Title string `json:"title"` Email string `json:"email"` OrgEmail string `json:"org_email"` WorkPlace string `json:"work_place"` Remark string `json:"remark"` DeptIdList []int64 `json:"dept_id_list"` DeptOrder int64 `json:"dept_order"` Extension string `json:"extension"` HiredDate int64 `json:"hired_date"` Active bool `json:"active"` Admin bool `json:"admin"` Boss bool `json:"boss"` Leader bool `json:"leader"` ExclusiveAccount bool `json:"exclusive_account"` LoginID string `json:"login_id"` ExclusiveAccountType string `json:"exclusive_account_type"` Nickname string `json:"nickname"` }
type USimpleList ¶
type Unmarshallable ¶
type Unmarshallable interface {
// contains filtered or unexported methods
}
type UserAdminListResponse ¶
type UserAdminListResponse struct { OpenAPIResponse AdminList []Admins }
type UserBatchDeleteResponse ¶
type UserBatchDeleteResponse struct {
OpenAPIResponse
}
type UserCanAccessMicroappResponse ¶
type UserCanAccessMicroappResponse struct { OpenAPIResponse CanAccess bool }
type UserCreateRequest ¶
type UserCreateRequest struct { UserID string `json:"userid,omitempty"` Name string `json:"name"` OrderInDepts string `json:"orderInDepts,omitempty"` Department []int `json:"department"` Position string `json:"position,omitempty"` Mobile string `json:"mobile"` Tel string `json:"tel,omitempty"` WorkPlace string `json:"workPlace,omitempty"` Remark string `json:"remark,omitempty"` Email string `json:"email,omitempty"` OrgEmail string `json:"orgEmail,omitempty"` JobNumber string `json:"jobnumber,omitempty"` IsHide bool `json:"isHide,omitempty"` IsSenior bool `json:"isSenior,omitempty"` Extattr interface{} `json:"extattr,omitempty"` }
type UserCreateResponse ¶
type UserCreateResponse struct { OpenAPIResponse UserID string }
type UserDeleteResponse ¶
type UserDeleteResponse struct {
OpenAPIResponse
}
type UserGetOrgUserCountResponse ¶
type UserGetOrgUserCountResponse struct { OpenAPIResponse Count int }
type UserIdByUnionIdResponse ¶
type UserIdByUnionIdResponse struct { OpenAPIResponse UserID string `json:"userid"` ContactType int `json:"contactType"` }
type UserIdResponse ¶
type UserIdResponse struct { OpenAPIResponse UserID string `json:"userid"` DeviceID string `json:"deviceId"` IsSys bool `json:"is_sys"` SysLevel int `json:"sys_level"` }
type UserInfoResponse ¶
type UserInfoResponse struct { OpenAPIResponse UserID string `json:"userid"` OpenID string `json:"openid"` Name string Tel string WorkPlace string Remark string Mobile string Email string OrgEmail string Active bool IsAdmin bool IsBoos bool DingID string UnionID string IsHide bool Department []int Position string Avatar string Jobnumber string IsSenior bool StateCode string OrderInDepts string IsLeaderInDepts string Extattr interface{} Roles []Roles }
type UserListParam ¶
type UserListResponse ¶
type UserListResponse struct { OpenAPIResponse Result UserListResult `json:"result"` }
type UserListResult ¶ added in v1.0.8
type UserListResult struct { HasMore bool `json:"has_more"` NextCursor int64 `json:"next_cursor"` List []UDetailedList `json:"list"` }
type UserSimpleListResponse ¶
type UserSimpleListResponse struct { OpenAPIResponse HasMore bool UserList []USimpleList }
type UserUpdateRequest ¶
type UserUpdateRequest struct { Lang string `json:"lang,omitempty"` UserID string `json:"userid"` Name string `json:"name"` OrderInDepts string `json:"orderInDepts,omitempty"` Department []int `json:"department,omitempty"` Position string `json:"position,omitempty"` Mobile string `json:"mobile,omitempty"` Tel string `json:"tel,omitempty"` WorkPlace string `json:"workPlace,omitempty"` Remark string `json:"remark,omitempty"` Email string `json:"email,omitempty"` OrgEmail string `json:"orgEmail,omitempty"` JobNumber string `json:"jobnumber,omitempty"` IsHide bool `json:"isHide,omitempty"` IsSenior bool `json:"isSenior,omitempty"` Extattr interface{} `json:"extattr,omitempty"` }
type UserUpdateResponse ¶
type UserUpdateResponse struct {
OpenAPIResponse
}
Source Files ¶
- constants.go
- crypto.go
- dingtalk.go
- open_api_auth.go
- open_api_callback.go
- open_api_chat.go
- open_api_cspace.go
- open_api_data.go
- open_api_department.go
- open_api_file.go
- open_api_media.go
- open_api_message.go
- open_api_microapp.go
- open_api_response.go
- open_api_smartwork.go
- open_api_sns.go
- open_api_sso.go
- open_api_task.go
- open_api_user.go
- request.go
- top_api.go
- top_api_response.go
- util.go