Documentation ¶
Index ¶
- Constants
- func CalculateJsApiSign(ticket string, nonceStr string, timestamp int64, url string) string
- func CorpAuth(url string, suiteKey string, suiteSecret string, suiteTicket string, ...) (string, error)
- func Ddbase64sign(key string) (bt []byte, err error)
- func ExcuteOapi(url string, oauthAppId string, oauthAppSecret string, body string) (string, error)
- func PKCS7Padding(ciphertext []byte, blockSize int) []byte
- func PKCS7UnPadding(plantText []byte) []byte
- func RobotSender(webHook string, msg WorkNoticeMsg)
- type ActionCardBtnJsonList
- type ActionCardNotice
- type AddFileToUserCSpaceResp
- type AdminList
- type Agent
- type AuthCorpInfo
- type AuthInfo
- type AuthUserInfo
- type BaseResp
- type BeginUploadTransaction
- type CanAccessMicroAppResp
- type CancelTaskGroupRequest
- type ChannelAgent
- type ChannelAuthInfo
- type CommitUploadTransaction
- type Corp
- type CreateOrUpdateBackLogReq
- type CreateOrUpdateBackLogResp
- type CreateOrUpdateBackLogResult
- type CreateProcessInstanceReq
- type CreateProcessInstanceResp
- type CreateWorkRecordRequest
- type CreateWorkRecordResp
- type CreateWorkRecordResult
- type CreateWorkRecordTaskRequest
- type CreateWorkRecordTaskResp
- type CreateWorkRecordTaskRespTasks
- type CreateWorkRecordTaskTop
- type Crypto
- func (c *Crypto) DecryptMsg(signature, timeStamp, nonce, secretStr string) (string, error)
- func (c *Crypto) EncryptMsg(replyMsg, timeStamp, nonce string) (string, string, error)
- func (c *Crypto) GenerateSignature(token, timeStamp, nonce, secretStr string) string
- func (c *Crypto) RandomString(n int, alphabets ...byte) string
- func (c *Crypto) VerifySignature(token, timeStamp, nonce, secretStr, sigture string) bool
- type DeleteBackLogReq
- type DepartmentInfo
- type DingTalkClient
- func (client *DingTalkClient) AddFileToUserCSpace(code string, mediaId string, spaceId string, folderId string, name string, ...) (*AddFileToUserCSpaceResp, error)
- func (client *DingTalkClient) BaseGetDepMemberList(url string, deptId string, lang string, offset int64, size int64, order string) (GetDepMemberListResp, error)
- func (client *DingTalkClient) BeginUploadChunk(uploadId string, sequence int, reader io.Reader) (*BaseResp, error)
- func (client *DingTalkClient) BeginUploadTransaction(size int64, count int) (*BeginUploadTransaction, error)
- func (client *DingTalkClient) CanAccessMicroApp(adminId string, appId string) (CanAccessMicroAppResp, error)
- func (client *DingTalkClient) CancelTaskGroup(req CancelTaskGroupRequest) (*BaseResp, error)
- func (client *DingTalkClient) CommitUploadTransaction(size int64, count int, uploadId string) (*CommitUploadTransaction, error)
- func (client *DingTalkClient) CreateOrUpdateBackLog(req SaveProcessRequest) (*CreateOrUpdateBackLogResp, error)
- func (client *DingTalkClient) CreateProcessInstance(createParams CreateProcessInstanceReq) (CreateProcessInstanceResp, error)
- func (client *DingTalkClient) CreateWorkRecord(req CreateWorkRecordRequest, title *string) (*CreateWorkRecordResp, error)
- func (client *DingTalkClient) CreateWorkRecordTask(req CreateWorkRecordTaskRequest) (*CreateWorkRecordTaskResp, error)
- func (client *DingTalkClient) DeleteBackLog(req DeleteBackLogReq) (*BaseResp, error)
- func (client *DingTalkClient) FileUploadSingle(path string) (*FileUploadSingleResp, error)
- func (client *DingTalkClient) FormConditionList(processCode string, agentId *int64) (FormConditionListResp, error)
- func (client *DingTalkClient) GetAdminList() (GetAdminListResp, error)
- func (client *DingTalkClient) GetAdminScope(adminId string) (GetAdminScopeResp, error)
- func (client *DingTalkClient) GetAuthScopes() (GetAuthScopesResp, error)
- func (client *DingTalkClient) GetCspaceInfo(userId string) (GetCspaceInfoResp, error)
- func (client *DingTalkClient) GetCustomSpace(domain string) (*GetCustomSpaceResp, error)
- func (client *DingTalkClient) GetDepMemberDetailList(deptId string, lang string, offset int64, size int64, order string) (GetDepMemberListResp, error)
- func (client *DingTalkClient) GetDepMemberIds(deptId string) (GetDepMemberIdsResp, error)
- func (client *DingTalkClient) GetDepMemberList(deptId string, lang string, offset int64, size int64, order string) (GetDepMemberListResp, error)
- func (client *DingTalkClient) GetDeptDetail(id string, lang *string) (GetDeptDetailResp, error)
- func (client *DingTalkClient) GetDeptList(lang *string, fetchChild *bool, id string) (GetDeptListResp, error)
- func (client *DingTalkClient) GetExtcontactDetail(userId string) (GetExtcontactDetailResp, error)
- func (client *DingTalkClient) GetExtcontactList(size string, offset string) (GetExtcontactListResp, error)
- func (client *DingTalkClient) GetJsApiTicket(authType string) (*GetJsApiTicketResp, error)
- func (client *DingTalkClient) GetOrderInfo(orderId int64) (GetOrderInfoResp, error)
- func (client *DingTalkClient) GetOrgUserCount(onlyActive int) (GetOrgUserCountResp, error)
- func (client *DingTalkClient) GetProcessInstanceInfo(processInstanceId string) (GetProcessInstanceInfoResp, error)
- func (client *DingTalkClient) GetRoleDetail(roleId int64) (GetRoleDetailResp, error)
- func (client *DingTalkClient) GetRoleGroup(groupId int64) (GetRoleGroupResp, error)
- func (client *DingTalkClient) GetRoleList(offset int, size int) (GetRoleListResp, error)
- func (client *DingTalkClient) GetSkuPage(goodsCode string, callBackPage string) (GetSkuPageResp, error)
- func (client *DingTalkClient) GetSubDept(id string) (GetSubdeptResp, error)
- func (client *DingTalkClient) GetUserDetail(userId string, lang *string) (GetUserDetailResp, error)
- func (client *DingTalkClient) GetUserIdByUnionId(unionId string) (GetUserIdByUnionIdResp, error)
- func (client *DingTalkClient) GetUserInfoFromAdmin(code string) (GetUserInfoFromAdminResp, error)
- func (client *DingTalkClient) GetUserInfoFromThird(code string) (GetUserInfoFromThirdResp, error)
- func (client *DingTalkClient) GetUsersInRole(roleId int64, offset int, size int) (GetUsersInRoleResp, error)
- func (client *DingTalkClient) GetWorkNoticeProgress(taskId int64) (GetWorkNoticeProgressResp, error)
- func (client *DingTalkClient) GetWorkNoticeSendResult(taskId int64) (GetWorkNoticeResultResp, error)
- func (client *DingTalkClient) GrantCustomSpace(domain string, grantType string, userId string, path string, fileIds string, ...) (*BaseResp, error)
- func (client *DingTalkClient) ListLabelGroups(size string, offset string) (ListLabelGroupsResp, error)
- func (client *DingTalkClient) ListParentDepts(userId string) (ListParentDeptsResp, error)
- func (client *DingTalkClient) ListParentDeptsByDept(id string) (ListParentDeptsByDeptResp, error)
- func (client *DingTalkClient) OrderConsume(orderId int64, requestId string, quantity int, userId string) (*BaseResp, error)
- func (client *DingTalkClient) OrderFinish(orderId int64) (*BaseResp, error)
- func (client *DingTalkClient) RecallWorkNotice(taskId int64) (WorkNoticeRecallResp, error)
- func (client *DingTalkClient) SaveProcess(saveProcessRequest SaveProcessReq, fakeMode *bool, templateEditUrl *string) (SaveProcessResp, error)
- func (client *DingTalkClient) SendDingPanFileToSingleChat(userId string, mediaId string, fileName string) (*BaseResp, error)
- func (client *DingTalkClient) SendNormalNotice(sender string, cid string, msg WorkNoticeMsg) (SendNormalNoticeResp, error)
- func (client *DingTalkClient) SendWorkNotice(userIdList *string, deptIdList *string, toAllUser bool, msg WorkNoticeMsg) (SendWorkNoticeResp, error)
- func (client *DingTalkClient) UpdateWorkRecord(req UpdateWorkRecordRequest) (*BaseResp, error)
- func (client *DingTalkClient) UpdateWorkRecordTask(req UpdateWorkRecordTaskRequest) (*CreateWorkRecordTaskResp, error)
- func (client *DingTalkClient) UploadMedia(mediaType string, path string) (UploadMediaResp, error)
- type DingTalkOauthClient
- type DingTalkSDK
- func (s *DingTalkSDK) ActivateSuite(suiteAccessToken string, authCorpId string, permanentCode string) (*BaseResp, error)
- func (s *DingTalkSDK) CreateCorp(corpId string, suiteTicket string) *Corp
- func (s *DingTalkSDK) CreateCrypto() *Crypto
- func (s *DingTalkSDK) GetPermanentCode(suiteAccessToken string, tmpAuthCode string) (*GetPermanentCodeResp, error)
- func (s *DingTalkSDK) GetSuiteToken(suiteTicket string) (*GetSuiteAccessTokenResp, error)
- func (s *DingTalkSDK) GetUnfinishOrderList(suiteAccessToken string, itemCode string, page int64, size int64) (GetUnfinishOrderListResp, error)
- type ExtcontactDetail
- type FileNotice
- type FileUploadSingleResp
- type FormComponentList
- type FormComponentPropVo
- type FormComponentStatVo
- type FormComponentValues
- type FormComponentValuesVo
- type FormComponentVo
- type FormConditionListResp
- type GetAdminListResp
- type GetAdminScopeResp
- type GetAgentResp
- type GetAuthInfoResp
- type GetAuthScopesData
- type GetAuthScopesResp
- type GetCorpTokenResp
- type GetCspaceInfoResp
- type GetCustomSpaceResp
- type GetDepMemberIdsResp
- type GetDepMemberListResp
- type GetDeptDetailResp
- type GetDeptListResp
- type GetExtcontactDetailResp
- type GetExtcontactListResp
- type GetJsApiTicketResp
- type GetOrderInfoResp
- type GetOrgUserCountResp
- type GetPermanentCodeResp
- type GetProcessInstanceInfoResp
- type GetRoleDetailResp
- type GetRoleGroupResp
- type GetRoleListResp
- type GetRoleListResult
- type GetSkuPageResp
- type GetSubdeptResp
- type GetSuiteAccessTokenResp
- type GetUnfinishOrderListResp
- type GetUserDetailResp
- type GetUserIdByUnionIdResp
- type GetUserInRoleResult
- type GetUserInfoByCodeResp
- type GetUserInfoFromAdminResp
- type GetUserInfoFromThirdResp
- type GetUsersInRoleResp
- type GetWorkNoticeProgressResp
- type GetWorkNoticeResultResp
- type ImageNotice
- type Labels
- type LinkNotice
- type ListLabelGroupsResp
- type ListParentDeptsByDeptResp
- type ListParentDeptsResp
- type MarkdownNotice
- type NoticeProgress
- type NoticeSendResult
- type OANotice
- type OANoticeBody
- type OANoticeBodyForm
- type OANoticeBodyRich
- type OANoticeHead
- type OperationRecordsVo
- type OrderInfo
- type ProcessInstanceApproverVo
- type ProcessInstanceVo
- type Props
- type Role
- type RoleGroup
- type RoleGroupV1
- type RoleV1
- type SaveProcessReq
- type SaveProcessRequest
- type SaveProcessResp
- type SendNormalNoticeResp
- type SendWorkNoticeResp
- type TasksVo
- type TextNotice
- type UnfinishOrderInfo
- type UnfinishOrderList
- type UpdateWorkRecordRequest
- type UpdateWorkRecordTaskRequest
- type UpdateWorkRecordTaskResp
- type UpdateWorkRecordTaskTop
- type UploadMediaResp
- type UserDetailRole
- type UserList
- type VoiceNotice
- type WorkNoticeMsg
- type WorkNoticeRecallResp
Constants ¶
const (
AES_ENCODE_KEY_LENGTH = 43
)
Variables ¶
This section is empty.
Functions ¶
func CalculateJsApiSign ¶
func CorpAuth ¶
func CorpAuth(url string, suiteKey string, suiteSecret string, suiteTicket string, authCorpId string, agentId int64) (string, error)
CorpAuth is the common signature methods for multiple authentication interfaces Get a common interface for enterprise authentication information
func ExcuteOapi ¶
func PKCS7Padding ¶
func PKCS7UnPadding ¶
func RobotSender ¶
func RobotSender(webHook string, msg WorkNoticeMsg)
Types ¶
type ActionCardBtnJsonList ¶
type ActionCardNotice ¶
type AddFileToUserCSpaceResp ¶
type AuthCorpInfo ¶
type AuthCorpInfo 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 int64 `json:"auth_level"` InviteUrl string `json:"invite_url"` CorpProvince string `json:"corp_province"` CorpCity string `json:"corp_city"` }
type AuthUserInfo ¶
type AuthUserInfo struct {
UserId string `json:"userId"`
}
type BeginUploadTransaction ¶
type CanAccessMicroAppResp ¶
type CancelTaskGroupRequest ¶
type ChannelAgent ¶
type ChannelAuthInfo ¶
type ChannelAuthInfo struct {
ChannelAgent []ChannelAgent `json:"channelAgent"`
}
type CommitUploadTransaction ¶
type Corp ¶
func (*Corp) CreateDingTalkClient ¶
func (corp *Corp) CreateDingTalkClient() (*DingTalkClient, error)
func (*Corp) GetAgent ¶
func (corp *Corp) GetAgent(agentId int64) (GetAgentResp, error)
Desc: 获取授权应用信息 Doc: https://open-doc.dingtalk.com/microapp/serverapi3/vfitg0
func (*Corp) GetAuthInfo ¶
func (corp *Corp) GetAuthInfo() (GetAuthInfoResp, error)
Desc: 获取企业授权信息 Doc: https://open-doc.dingtalk.com/microapp/serverapi3/fmdqvx
func (*Corp) GetCorpToken ¶
func (corp *Corp) GetCorpToken() (GetCorpTokenResp, error)
GetCorpToken can get corporation's token Desc: 获取企业凭证 Doc: https://open-doc.dingtalk.com/microapp/serverapi3/hv357q
type CreateOrUpdateBackLogReq ¶
type CreateOrUpdateBackLogReq struct {
SaveProcessRequest SaveProcessRequest `json:"SaveProcessRequest"`
}
type CreateOrUpdateBackLogResp ¶
type CreateOrUpdateBackLogResp struct { BaseResp Result CreateOrUpdateBackLogResult `json:"result"` }
type CreateOrUpdateBackLogResult ¶
type CreateOrUpdateBackLogResult struct {
ProcessCode string `json:"process_code"`
}
type CreateProcessInstanceReq ¶
type CreateProcessInstanceReq struct { AgentId *int64 `json:"agent_id"` ProcessCode string `json:"process_code"` OriginatorUserId string `json:"originator_user_id"` DeptId int64 `json:"dept_id"` Approvers string `json:"approvers"` ApproversV2 *[]ProcessInstanceApproverVo `json:"approvers_v2"` CcList *string `json:"cc_list"` CcPosition *string `json:"cc_position"` FormComponentValues []FormComponentValuesVo `json:"form_component_values"` }
type CreateWorkRecordRequest ¶
type CreateWorkRecordRequest struct { AgentId int64 `json:"agentid"` ProcessCode string `json:"process_code"` OriginatorUserId string `json:"originator_user_id"` FormComponentValues []FormComponentValues `json:"form_component_values"` Url string `json:"url"` }
type CreateWorkRecordResp ¶
type CreateWorkRecordResp struct { BaseResp Result CreateWorkRecordResult `json:"result"` }
type CreateWorkRecordResult ¶
type CreateWorkRecordResult struct {
ProcessInstanceId string `json:"process_instance_id"`
}
type CreateWorkRecordTaskRequest ¶
type CreateWorkRecordTaskRequest struct { AgentId int64 `json:"agentid"` ProcessInstanceId string `json:"process_instance_id"` ActivityId *string `json:"activity_id,omitempty"` Tasks []CreateWorkRecordTaskTop `json:"tasks"` }
type CreateWorkRecordTaskResp ¶
type CreateWorkRecordTaskResp struct { BaseResp Tasks []CreateWorkRecordTaskRespTasks `json:"tasks"` }
type CreateWorkRecordTaskTop ¶
type Crypto ¶
type Crypto struct { Token string AesKey string SuiteKey string // contains filtered or unexported fields }
var DefaultDingtalkCrypto *Crypto
func (*Crypto) DecryptMsg ¶
signature: 签名字符串 timeStamp: 时间戳 nonce: 随机字符串 secretStr: 密文 返回: 解密后的明文
func (*Crypto) EncryptMsg ¶
replyMsg: 明文字符串 timeStamp: 时间戳 nonce: 随机字符串 返回: 密文,签名字符串
func (*Crypto) GenerateSignature ¶
数据签名
func (*Crypto) VerifySignature ¶
校验数据签名
type DeleteBackLogReq ¶
type DepartmentInfo ¶
type DingTalkClient ¶
func NewDingTalkClient ¶
func NewDingTalkClient(accessToken string, agentId int64) *DingTalkClient
func (*DingTalkClient) AddFileToUserCSpace ¶
func (client *DingTalkClient) AddFileToUserCSpace(code string, mediaId string, spaceId string, folderId string, name string, overwrite bool) (*AddFileToUserCSpaceResp, error)
Desc: 新增文件到用户钉盘 Doc: https://open-doc.dingtalk.com/microapp/serverapi3/zmmoa5#-6
func (*DingTalkClient) BaseGetDepMemberList ¶
func (client *DingTalkClient) BaseGetDepMemberList(url string, deptId string, lang string, offset int64, size int64, order string) (GetDepMemberListResp, error)
func (*DingTalkClient) BeginUploadChunk ¶
func (client *DingTalkClient) BeginUploadChunk(uploadId string, sequence int, reader io.Reader) (*BaseResp, error)
Desc: 分块上传文件:上传文件块 Doc: https://open-doc.dingtalk.com/microapp/serverapi3/zmmoa5#-12
func (*DingTalkClient) BeginUploadTransaction ¶
func (client *DingTalkClient) BeginUploadTransaction(size int64, count int) (*BeginUploadTransaction, error)
Desc: 分块上传文件:开启分块上传事务 Doc: https://open-doc.dingtalk.com/microapp/serverapi3/zmmoa5#-12
func (*DingTalkClient) CanAccessMicroApp ¶
func (client *DingTalkClient) CanAccessMicroApp(adminId string, appId string) (CanAccessMicroAppResp, error)
Desc: 查询管理员是否具备管理某个应用的权限 Doc: https://open-doc.dingtalk.com/microapp/serverapi3/momrx5
func (*DingTalkClient) CancelTaskGroup ¶
func (client *DingTalkClient) CancelTaskGroup(req CancelTaskGroupRequest) (*BaseResp, error)
Desc: 批量取消任务 Doc: https://open-doc.dingtalk.com/microapp/serverapi3/cqukim
func (*DingTalkClient) CommitUploadTransaction ¶
func (client *DingTalkClient) CommitUploadTransaction(size int64, count int, uploadId string) (*CommitUploadTransaction, error)
Desc: 提交文件上传事务 Doc: https://open-doc.dingtalk.com/microapp/serverapi3/zmmoa5#-12
func (*DingTalkClient) CreateOrUpdateBackLog ¶
func (client *DingTalkClient) CreateOrUpdateBackLog(req SaveProcessRequest) (*CreateOrUpdateBackLogResp, error)
Desc: 创建或更新待办模板 Doc: https://open-doc.dingtalk.com/microapp/serverapi3/hhaed5
func (*DingTalkClient) CreateProcessInstance ¶
func (client *DingTalkClient) CreateProcessInstance(createParams CreateProcessInstanceReq) (CreateProcessInstanceResp, error)
发起审批实例 https://open-doc.dingtalk.com/microapp/serverapi3/zzerip
func (*DingTalkClient) CreateWorkRecord ¶
func (client *DingTalkClient) CreateWorkRecord(req CreateWorkRecordRequest, title *string) (*CreateWorkRecordResp, error)
Desc: 创建待办实例 Doc: https://open-doc.dingtalk.com/microapp/serverapi3/gk2b3e
func (*DingTalkClient) CreateWorkRecordTask ¶
func (client *DingTalkClient) CreateWorkRecordTask(req CreateWorkRecordTaskRequest) (*CreateWorkRecordTaskResp, error)
Desc: 创建待办任务 Doc: https://open-doc.dingtalk.com/microapp/serverapi3/ulgaro
func (*DingTalkClient) DeleteBackLog ¶
func (client *DingTalkClient) DeleteBackLog(req DeleteBackLogReq) (*BaseResp, error)
Desc: 删除待办模板 Doc: https://open-doc.dingtalk.com/microapp/serverapi3/dvr6o6
func (*DingTalkClient) FileUploadSingle ¶
func (client *DingTalkClient) FileUploadSingle(path string) (*FileUploadSingleResp, error)
Desc: 单步文件上传 Doc: https://open-doc.dingtalk.com/microapp/serverapi2/wk3krc#g5zpqs
func (*DingTalkClient) FormConditionList ¶
func (client *DingTalkClient) FormConditionList(processCode string, agentId *int64) (FormConditionListResp, error)
查询已设置为条件的表单组件 https://open-doc.dingtalk.com/microapp/serverapi3/yqcw6y
func (*DingTalkClient) GetAdminList ¶
func (client *DingTalkClient) GetAdminList() (GetAdminListResp, error)
Desc: 获取管理员列表 Doc: https://open-doc.dingtalk.com/microapp/serverapi3/momrx5
func (*DingTalkClient) GetAdminScope ¶
func (client *DingTalkClient) GetAdminScope(adminId string) (GetAdminScopeResp, error)
Desc: 获取管理员通讯录权限范围 Doc: https://open-doc.dingtalk.com/microapp/serverapi3/momrx5
func (*DingTalkClient) GetAuthScopes ¶
func (client *DingTalkClient) GetAuthScopes() (GetAuthScopesResp, error)
func (*DingTalkClient) GetCspaceInfo ¶
func (client *DingTalkClient) GetCspaceInfo(userId string) (GetCspaceInfoResp, error)
获取审批钉盘空间信息 https://open-doc.dingtalk.com/microapp/serverapi3/dnh74x
func (*DingTalkClient) GetCustomSpace ¶
func (client *DingTalkClient) GetCustomSpace(domain string) (*GetCustomSpaceResp, error)
Desc: 获取企业下的自定义空间 Doc: https://open-doc.dingtalk.com/microapp/serverapi3/zmmoa5#-7
func (*DingTalkClient) GetDepMemberDetailList ¶
func (client *DingTalkClient) GetDepMemberDetailList(deptId string, lang string, offset int64, size int64, order string) (GetDepMemberListResp, error)
Desc: 获取部门用户详情 Doc: https://open-doc.dingtalk.com/microapp/serverapi3/momrx5
func (*DingTalkClient) GetDepMemberIds ¶
func (client *DingTalkClient) GetDepMemberIds(deptId string) (GetDepMemberIdsResp, error)
Desc: 获取部门用户userid列表 Doc: https://open-doc.dingtalk.com/microapp/serverapi3/momrx5
func (*DingTalkClient) GetDepMemberList ¶
func (client *DingTalkClient) GetDepMemberList(deptId string, lang string, offset int64, size int64, order string) (GetDepMemberListResp, error)
Desc: 获取部门用户 Doc: https://open-doc.dingtalk.com/microapp/serverapi3/momrx5
func (*DingTalkClient) GetDeptDetail ¶
func (client *DingTalkClient) GetDeptDetail(id string, lang *string) (GetDeptDetailResp, error)
获取部门详情 https://open-doc.dingtalk.com/microapp/serverapi3/fuqv8x#-2
func (*DingTalkClient) GetDeptList ¶
func (client *DingTalkClient) GetDeptList(lang *string, fetchChild *bool, id string) (GetDeptListResp, error)
获取部门列表 https://open-doc.dingtalk.com/microapp/serverapi3/fuqv8x#-1
func (*DingTalkClient) GetExtcontactDetail ¶
func (client *DingTalkClient) GetExtcontactDetail(userId string) (GetExtcontactDetailResp, error)
获取外部联系人详情 https://open-doc.dingtalk.com/microapp/serverapi3/grk4nv#-2
func (*DingTalkClient) GetExtcontactList ¶
func (client *DingTalkClient) GetExtcontactList(size string, offset string) (GetExtcontactListResp, error)
获取外部联系人列表 https://open-doc.dingtalk.com/microapp/serverapi3/grk4nv#-1
func (*DingTalkClient) GetJsApiTicket ¶
func (client *DingTalkClient) GetJsApiTicket(authType string) (*GetJsApiTicketResp, error)
Desc: 获取jsapi_ticket Doc: https://open-doc.dingtalk.com/microapp/dev/uwa7vs
func (*DingTalkClient) GetOrderInfo ¶
func (client *DingTalkClient) GetOrderInfo(orderId int64) (GetOrderInfoResp, error)
获取内购订单信息
func (*DingTalkClient) GetOrgUserCount ¶
func (client *DingTalkClient) GetOrgUserCount(onlyActive int) (GetOrgUserCountResp, error)
Desc: 获取企业员工人数 Doc: https://open-doc.dingtalk.com/microapp/serverapi3/momrx5
func (*DingTalkClient) GetProcessInstanceInfo ¶
func (client *DingTalkClient) GetProcessInstanceInfo(processInstanceId string) (GetProcessInstanceInfoResp, error)
获取审批实例详情 https://open-doc.dingtalk.com/microapp/serverapi3/tkgfol
func (*DingTalkClient) GetRoleDetail ¶
func (client *DingTalkClient) GetRoleDetail(roleId int64) (GetRoleDetailResp, error)
Desc: 获取角色详情 Doc: https://open-doc.dingtalk.com/microapp/serverapi3/qydf9c
func (*DingTalkClient) GetRoleGroup ¶
func (client *DingTalkClient) GetRoleGroup(groupId int64) (GetRoleGroupResp, error)
Desc: 获取角色组 Doc: https://open-doc.dingtalk.com/microapp/serverapi3/qydf9c
func (*DingTalkClient) GetRoleList ¶
func (client *DingTalkClient) GetRoleList(offset int, size int) (GetRoleListResp, error)
Desc: 获取角色列表 Doc: https://open-doc.dingtalk.com/microapp/serverapi3/qydf9c
func (*DingTalkClient) GetSkuPage ¶
func (client *DingTalkClient) GetSkuPage(goodsCode string, callBackPage string) (GetSkuPageResp, error)
获取内购商品SKU页面地址
func (*DingTalkClient) GetSubDept ¶
func (client *DingTalkClient) GetSubDept(id string) (GetSubdeptResp, error)
获取子部门ID列表 https://open-doc.dingtalk.com/microapp/serverapi3/fuqv8x#hvdqc
func (*DingTalkClient) GetUserDetail ¶
func (client *DingTalkClient) GetUserDetail(userId string, lang *string) (GetUserDetailResp, error)
Desc: 获取用户详情 Doc: https://open-doc.dingtalk.com/microapp/serverapi3/momrx5
func (*DingTalkClient) GetUserIdByUnionId ¶
func (client *DingTalkClient) GetUserIdByUnionId(unionId string) (GetUserIdByUnionIdResp, error)
Desc: 根据unionid获取userid Doc: https://open-doc.dingtalk.com/microapp/serverapi3/momrx5
func (*DingTalkClient) GetUserInfoFromAdmin ¶
func (client *DingTalkClient) GetUserInfoFromAdmin(code string) (GetUserInfoFromAdminResp, error)
应用管理后台免登(获取应用管理员的身份信息) https://open-doc.dingtalk.com/microapp/serverapi3/ydc8us
func (*DingTalkClient) GetUserInfoFromThird ¶
func (client *DingTalkClient) GetUserInfoFromThird(code string) (GetUserInfoFromThirdResp, error)
第三方企业应用免登(获取用户userid) https://open-doc.dingtalk.com/microapp/serverapi3/xcdh0r
func (*DingTalkClient) GetUsersInRole ¶
func (client *DingTalkClient) GetUsersInRole(roleId int64, offset int, size int) (GetUsersInRoleResp, error)
Desc: 获取角色下的员工列表 Doc: https://open-doc.dingtalk.com/microapp/serverapi3/qydf9c
func (*DingTalkClient) GetWorkNoticeProgress ¶
func (client *DingTalkClient) GetWorkNoticeProgress(taskId int64) (GetWorkNoticeProgressResp, error)
Desc: 查询工作通知消息的发送进度 Doc: https://open-doc.dingtalk.com/microapp/serverapi3/is3zms#
func (*DingTalkClient) GetWorkNoticeSendResult ¶
func (client *DingTalkClient) GetWorkNoticeSendResult(taskId int64) (GetWorkNoticeResultResp, error)
Desc: 查询工作通知消息的发送结果 Doc: https://open-doc.dingtalk.com/microapp/serverapi3/is3zms#
func (*DingTalkClient) GrantCustomSpace ¶
func (client *DingTalkClient) GrantCustomSpace(domain string, grantType string, userId string, path string, fileIds string, duration int) (*BaseResp, error)
Desc: 授权用户访问企业自定义空间 Doc: https://open-doc.dingtalk.com/microapp/serverapi3/zmmoa5#-8
func (*DingTalkClient) ListLabelGroups ¶
func (client *DingTalkClient) ListLabelGroups(size string, offset string) (ListLabelGroupsResp, error)
获取外部联系人标签列表 https://open-doc.dingtalk.com/microapp/serverapi3/grk4nv#khcve
func (*DingTalkClient) ListParentDepts ¶
func (client *DingTalkClient) ListParentDepts(userId string) (ListParentDeptsResp, error)
查询指定用户的所有上级父部门路径 https://open-doc.dingtalk.com/microapp/serverapi3/fuqv8x#-4
func (*DingTalkClient) ListParentDeptsByDept ¶
func (client *DingTalkClient) ListParentDeptsByDept(id string) (ListParentDeptsByDeptResp, error)
查询部门的所有上级父部门路径 https://open-doc.dingtalk.com/microapp/serverapi3/fuqv8x#-3
func (*DingTalkClient) OrderConsume ¶
func (client *DingTalkClient) OrderConsume(orderId int64, requestId string, quantity int, userId string) (*BaseResp, error)
应用内购商品核销
func (*DingTalkClient) OrderFinish ¶
func (client *DingTalkClient) OrderFinish(orderId int64) (*BaseResp, error)
内购商品订单处理完成
func (*DingTalkClient) RecallWorkNotice ¶
func (client *DingTalkClient) RecallWorkNotice(taskId int64) (WorkNoticeRecallResp, error)
Desc: 工作通知消息撤回 Doc: https://open-doc.dingtalk.com/microapp/serverapi3/is3zms#
func (*DingTalkClient) SaveProcess ¶
func (client *DingTalkClient) SaveProcess(saveProcessRequest SaveProcessReq, fakeMode *bool, templateEditUrl *string) (SaveProcessResp, error)
创建或更新审批模板 https://open-doc.dingtalk.com/microapp/serverapi3/svyi4c
func (*DingTalkClient) SendDingPanFileToSingleChat ¶
func (client *DingTalkClient) SendDingPanFileToSingleChat(userId string, mediaId string, fileName string) (*BaseResp, error)
Desc: 发送钉盘文件给指定用户 Doc: https://open-doc.dingtalk.com/microapp/serverapi3/zmmoa5#-5
func (*DingTalkClient) SendNormalNotice ¶
func (client *DingTalkClient) SendNormalNotice(sender string, cid string, msg WorkNoticeMsg) (SendNormalNoticeResp, error)
Desc: 发送普通消息 Doc: https://open-doc.dingtalk.com/microapp/serverapi3/wvdxel
func (*DingTalkClient) SendWorkNotice ¶
func (client *DingTalkClient) SendWorkNotice(userIdList *string, deptIdList *string, toAllUser bool, msg WorkNoticeMsg) (SendWorkNoticeResp, error)
Desc: 工作通知消息 Doc: https://open-doc.dingtalk.com/microapp/serverapi3/is3zms
func (*DingTalkClient) UpdateWorkRecord ¶
func (client *DingTalkClient) UpdateWorkRecord(req UpdateWorkRecordRequest) (*BaseResp, error)
Desc: 更新实例状态 Doc: https://open-doc.dingtalk.com/microapp/serverapi3/vo0gqo
func (*DingTalkClient) UpdateWorkRecordTask ¶
func (client *DingTalkClient) UpdateWorkRecordTask(req UpdateWorkRecordTaskRequest) (*CreateWorkRecordTaskResp, error)
Desc: 更新任务状态 Doc: https://open-doc.dingtalk.com/microapp/serverapi3/sbl5ms
func (*DingTalkClient) UploadMedia ¶
func (client *DingTalkClient) UploadMedia(mediaType string, path string) (UploadMediaResp, error)
type DingTalkOauthClient ¶
func NewDingTalkOauthClient ¶
func NewDingTalkOauthClient() *DingTalkOauthClient
func (*DingTalkOauthClient) GetUserInfoByCode ¶
func (client *DingTalkOauthClient) GetUserInfoByCode(code string) (GetUserInfoByCodeResp, error)
服务端通过临时授权码获取授权用户的个人信息 https://open-doc.dingtalk.com/microapp/serverapi3/vmzkak
type DingTalkSDK ¶
type DingTalkSDK struct { SuiteKey string SuiteSecret string Token string AesKey string AppId int64 }
func NewSDK ¶
func NewSDK() *DingTalkSDK
func (*DingTalkSDK) ActivateSuite ¶
func (*DingTalkSDK) CreateCorp ¶
func (s *DingTalkSDK) CreateCorp(corpId string, suiteTicket string) *Corp
func (*DingTalkSDK) CreateCrypto ¶
func (s *DingTalkSDK) CreateCrypto() *Crypto
func (*DingTalkSDK) GetPermanentCode ¶
func (s *DingTalkSDK) GetPermanentCode(suiteAccessToken string, tmpAuthCode string) (*GetPermanentCodeResp, error)
func (*DingTalkSDK) GetSuiteToken ¶
func (s *DingTalkSDK) GetSuiteToken(suiteTicket string) (*GetSuiteAccessTokenResp, error)
func (*DingTalkSDK) GetUnfinishOrderList ¶
func (s *DingTalkSDK) GetUnfinishOrderList(suiteAccessToken string, itemCode string, page int64, size int64) (GetUnfinishOrderListResp, error)
获取未处理的已支付订单
type ExtcontactDetail ¶
type ExtcontactDetail struct { Title string `json:"title"` LabelIds []int64 `json:"label_ids"` Remark string `json:"remark"` Address string `json:"address"` Name string `json:"name"` FollowerUserId string `json:"follower_user_id"` StateCode string `json:"state_code"` CompanyName string `json:"company_name"` UserId string `json:"userid"` }
type FileNotice ¶
type FileNotice struct {
MediaId string `json:"media_id"`
}
type FileUploadSingleResp ¶
type FormComponentList ¶
type FormComponentPropVo ¶
type FormComponentPropVo struct { Id string `json:"id"` Label string `json:"label"` Required *bool `json:"required"` NotPrint *string `json:"not_print"` Placeholder *string `json:"placeholder"` NotUpper *string `json:"not_upper"` Unit *string `json:"unit"` Options *[]string `json:"options"` Choice *int64 `json:"choice"` Link *string `json:"link"` ActionName *string `json:"action_name"` StatField *[]FormComponentStatVo `json:"stat_field"` }
type FormComponentStatVo ¶
type FormComponentValues ¶
type FormComponentValuesVo ¶
type FormComponentVo ¶
type FormComponentVo struct { ComponentName string `json:"component_name"` Props FormComponentPropVo `json:"props"` Children *FormComponentVo `json:"children"` }
type FormConditionListResp ¶
type GetAdminListResp ¶
type GetAdminScopeResp ¶
type GetAgentResp ¶
type GetAgentResp struct { BaseResp AgentId int64 `json:"agentid"` Name string `json:"name"` LogoUrl string `json:"logo_url"` Description string `json:"description"` Close int64 `json:"close"` }
======================== 获取授权应用信息: https://open-doc.dingtalk.com/microapp/serverapi3/vfitg0
type GetAuthInfoResp ¶
type GetAuthInfoResp struct { BaseResp AuthCorpInfo AuthCorpInfo `json:"auth_corp_info"` AuthUserInfo AuthUserInfo `json:"auth_user_info"` AuthInfo AuthInfo `json:"auth_info"` ChannelAuthInfo ChannelAuthInfo `json:"channel_auth_info"` }
======================== 获取企业授权信息: https://open-doc.dingtalk.com/microapp/serverapi3/hv357q
type GetAuthScopesData ¶
type GetAuthScopesResp ¶
type GetAuthScopesResp struct { BaseResp AuthUserField []string `json:"auth_user_field"` ConditionField []string `json:"condition_field"` AuthOrgScopes GetAuthScopesData `json:"auth_org_scopes"` }
type GetCorpTokenResp ¶
type GetCorpTokenResp struct { BaseResp AccessToken string `json:"access_token"` ExpiresIn int64 `json:"expires_in"` }
======================== 获取企业凭证: https://open-doc.dingtalk.com/microapp/serverapi3/vfitg0
type GetCspaceInfoResp ¶
type GetCustomSpaceResp ¶
type GetDepMemberIdsResp ¶
type GetDepMemberListResp ¶
type GetDeptDetailResp ¶
type GetDeptDetailResp struct { BaseResp Id int64 `json:"id"` Name string `json:"name"` Order int64 `json:"order"` ParentId int64 `json:"parentid"` CreateDeptGroup bool `json:"createDeptGroup"` AutoAddUser bool `json:"autoAddUser"` DeptHiding bool `json:"deptHiding"` DeptPermits string `json:"deptPermits"` UserPermits string `json:"userPermits"` OuterDept bool `json:"outerDept"` OuterPermitDepts string `json:"outerPermitDepts"` OuterPermitUsers string `json:"outerPermitUsers"` OrgDeptOwner string `json:"orgDeptOwner"` DeptManagerUseridList string `json:"deptManagerUseridList"` SourceIdentifier string `json:"sourceIdentifier"` }
type GetDeptListResp ¶
type GetDeptListResp struct { BaseResp Department []DepartmentInfo `json:"department"` }
type GetExtcontactDetailResp ¶
type GetExtcontactDetailResp struct { BaseResp Result ExtcontactDetail `json:"result"` }
type GetExtcontactListResp ¶
type GetExtcontactListResp struct { BaseResp Results []ExtcontactDetail `json:"results"` }
type GetJsApiTicketResp ¶
type GetOrderInfoResp ¶
type GetOrgUserCountResp ¶
type GetPermanentCodeResp ¶
type GetPermanentCodeResp struct { PermanentCode string `json:"permanent_code"` AuthCorpInfo AuthCorpInfo `json:"auth_corp_info"` }
type GetProcessInstanceInfoResp ¶
type GetProcessInstanceInfoResp struct { BaseResp ProcessInstance ProcessInstanceVo `json:"process_instance"` }
type GetRoleDetailResp ¶
type GetRoleGroupResp ¶
type GetRoleGroupResp struct { BaseResp RoleGroup RoleGroupV1 `json:"role_group"` }
type GetRoleListResp ¶
type GetRoleListResp struct { BaseResp Result GetRoleListResult `json:"result"` }
type GetRoleListResult ¶
type GetSkuPageResp ¶
type GetSubdeptResp ¶
type GetSuiteAccessTokenResp ¶
type GetUnfinishOrderListResp ¶
type GetUnfinishOrderListResp struct { BaseResp Result UnfinishOrderList `json:"result"` }
type GetUserDetailResp ¶
type GetUserIdByUnionIdResp ¶
type GetUserInRoleResult ¶
type GetUserInfoByCodeResp ¶
type GetUserInfoFromAdminResp ¶
type GetUserInfoFromAdminResp struct { BaseResp CropInfo struct { CropName string `json:"crop_name"` CropId string `json:"cropid"` } IsSys bool `json:"is_sys"` UserInfo struct { Avatar string `json:"avatar"` Email string `json:"email"` Name string `json:"name"` UserId string `json:"userid"` } `json:"user_info"` }
type GetUsersInRoleResp ¶
type GetUsersInRoleResp struct { BaseResp Result GetUserInRoleResult `json:"result"` }
type GetWorkNoticeProgressResp ¶
type GetWorkNoticeProgressResp struct { BaseResp Progress NoticeProgress `json:"progress"` }
type GetWorkNoticeResultResp ¶
type GetWorkNoticeResultResp struct { BaseResp SendResult NoticeSendResult `json:"send_result"` }
type ImageNotice ¶
type ImageNotice struct {
MediaId string `json:"media_id"`
}
type LinkNotice ¶
type ListLabelGroupsResp ¶
type ListParentDeptsResp ¶
type MarkdownNotice ¶
type NoticeProgress ¶
type NoticeSendResult ¶
type NoticeSendResult struct { InvalidUserIdList []string `json:"invalid_user_id_list"` ForbiddenUserIdList []string `json:"forbidden_user_id_list"` FailedUserIdList []string `json:"failed_user_id_list"` ReadUserIdList []string `json:"read_user_id_list"` UnreadUserIdList []string `json:"unread_user_id_list"` InvalidDeptIdList []string `json:"invalid_dept_id_list"` }
type OANotice ¶
type OANotice struct { MsgUrl string `json:"message_url"` Head OANoticeHead `json:"head"` Body OANoticeBody `json:"body"` }
type OANoticeBody ¶
type OANoticeBody struct { Title *string `json:"title"` Form *[]OANoticeBodyForm `json:"form"` Rich *OANoticeBodyRich `json:"rich"` Content *string `json:"content"` Image *string `json:"image"` FileCount *string `json:"file_count"` Author *string `json:"author"` }
type OANoticeBodyForm ¶
type OANoticeBodyRich ¶
type OANoticeHead ¶
type OperationRecordsVo ¶
type OrderInfo ¶
type OrderInfo struct { CreateTimestamp int64 `json:"create_timestamp"` StartTimestamp int64 `json:"start_timestamp"` EndTimestamp int64 `json:"end_timestamp"` PaidTimestamp int64 `json:"paid_timestamp"` Quantity int `json:"quantity"` Status int `json:"status"` TotalActualPayFee int64 `json:"total_actual_pay_fee"` GoodsCode string `json:"goods_code"` ItemCode string `json:"item_code"` CorpId string `json:"corp_id"` BizOrderId int64 `json:"biz_order_id"` }
type ProcessInstanceVo ¶
type ProcessInstanceVo struct { Title string `json:"title"` CreateTime string `json:"create_time"` FinishTime string `json:"finish_time"` OriginatorUserId string `json:"originator_userid"` OriginatorDeptId string `json:"originator_dept_id"` Status string `json:"status"` CcUserIds string `json:"cc_userids"` FormComponentValues []FormComponentValuesVo `json:"form_component_values"` Result string `json:"result"` BusinessId string `json:"business_id"` OperationRecords []OperationRecordsVo `json:"operation_records"` Tasks []TasksVo `json:"tasks"` OriginatorDeptName string `json:"originator_dept_name"` BizAction string `json:"biz_action"` AttachedProcessInstanceIds []string `json:"attached_process_instance_ids"` }
type RoleGroupV1 ¶
type SaveProcessReq ¶
type SaveProcessRequest ¶
type SaveProcessResp ¶
type SendNormalNoticeResp ¶
type SendWorkNoticeResp ¶
type TextNotice ¶
type TextNotice struct {
Content string `json:"content"`
}
type UnfinishOrderInfo ¶
type UnfinishOrderInfo struct { BizOrderId int64 `json:"biz_order_id"` CorpId string `json:"corp_id"` CreateTimestamp int64 `json:"create_timestamp"` GoodsCode string `json:"goods_code"` ItemCode string `json:"item_code"` PaidTimestamp int64 `json:"paid_timestamp"` Quantity int `json:"quantity"` Status int `json:"status"` TotalActualPayFee int64 `json:"total_actual_pay_fee"` }
type UnfinishOrderList ¶
type UnfinishOrderList struct {
Items []UnfinishOrderInfo `json:"items"`
}
type UpdateWorkRecordRequest ¶
type UpdateWorkRecordTaskRequest ¶
type UpdateWorkRecordTaskRequest struct { AgentId int64 `json:"agentid"` ProcessInstanceId string `json:"process_instance_id"` Tasks []UpdateWorkRecordTaskTop `json:"tasks"` }
type UpdateWorkRecordTaskResp ¶
type UpdateWorkRecordTaskResp struct {
CreateWorkRecordTaskResp
}
type UpdateWorkRecordTaskTop ¶
type UploadMediaResp ¶
type UserDetailRole ¶
type UserList ¶
type UserList struct { Name string `json:"name"` UnionId string `json:"unionid"` UserId string `json:"userid"` IsLeaderInDepts string `json:"isLeaderInDepts"` IsBoos bool `json:"isBoss"` HiredDate int64 `json:"hiredDate"` IsSenior bool `json:"isSenior"` Department []int64 `json:"department"` OrderInDepts string `json:"orderInDepts"` Active bool `json:"active"` Avatar string `json:"avatar"` IsAdmin bool `json:"isAdmin"` IsHide bool `json:"isHide"` JobNumber string `json:"jobnumber"` Position string `json:"position"` DingId string `json:"dingId"` Roles []UserDetailRole `json:"roles"` }
type VoiceNotice ¶
type WorkNoticeMsg ¶
type WorkNoticeMsg struct { MsgType string `json:"msgtype"` Text *TextNotice `json:"text"` Image *ImageNotice `json:"image"` Voice *VoiceNotice `json:"voice"` File *FileNotice `json:"file"` Link *LinkNotice `json:"link"` OA *OANotice `json:"oa"` Markdown *MarkdownNotice `json:"markdown"` ActionCard *ActionCardNotice `json:"action_card"` }
type WorkNoticeRecallResp ¶
type WorkNoticeRecallResp struct {
BaseResp
}
Source Files ¶
- api_auth_caller.go
- api_auth_models.go
- api_authentication_caller.go
- api_authentication_models.go
- api_authscope_caller.go
- api_authscope_model.go
- api_backlog_caller.go
- api_backlog_models.go
- api_cspace_caller.go
- api_cspace_models.go
- api_dept_caller.go
- api_dept_models.go
- api_extcontact_caller.go
- api_extcontact_models.go
- api_media_caller.go
- api_media_models.go
- api_notify_caller.go
- api_notify_models.go
- api_order_caller.go
- api_order_models.go
- api_process_caller.go
- api_process_models.go
- api_robot_caller.go
- api_role_caller.go
- api_role_models.go
- api_user_caller.go
- api_user_models.go
- callback_sign.go
- sdk.go