Documentation ¶
Overview ¶
* Copyright 2023 The KodeRover Authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License.
Index ¶
- Constants
- func GetDingTalkClientByIMAppID(id string) (*dingtalk.Client, error)
- func GetDingTalkUserIDByMobile(id, mobile string) (string, error)
- func RemoveDingTalkApprovalManager(instanceID string)
- type ApprovalManager
- type ApprovalManagerMap
- type DepartmentInfo
- 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 string) (map[string]string, error)
- func (c *DingTalkCrypto) GetEncryptMsgDetail(msg, timestamp, nonce string) (string, string, error)
- func (c *DingTalkCrypto) VerificationSignature(token, timestamp, nonce, msg, sigture string) bool
- type EventInstanceChangeData
- type EventResponse
- type EventTaskChangeData
- type SubDepartmentAndUserIDsResponse
- type UserApprovalResult
- type UserInfo
Constants ¶
View Source
const ( EventTaskChange = "bpms_task_change" EventInstanceChange = "bpms_instance_change" )
Variables ¶
This section is empty.
Functions ¶
func RemoveDingTalkApprovalManager ¶
func RemoveDingTalkApprovalManager(instanceID string)
Types ¶
type ApprovalManager ¶
func GetDingTalkApprovalManager ¶
func GetDingTalkApprovalManager(instanceID string) *ApprovalManager
func (*ApprovalManager) GetAllUserApprovalResults ¶
func (l *ApprovalManager) GetAllUserApprovalResults() map[string]*UserApprovalResult
func (*ApprovalManager) SetUserApprovalResult ¶
func (l *ApprovalManager) SetUserApprovalResult(userID, result, remark string, time int64)
type ApprovalManagerMap ¶
type DepartmentInfo ¶
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, error)
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 string) (map[string]string, error)
func (*DingTalkCrypto) GetEncryptMsgDetail ¶
func (c *DingTalkCrypto) GetEncryptMsgDetail(msg, timestamp, nonce string) (string, string, error)
func (*DingTalkCrypto) VerificationSignature ¶
func (c *DingTalkCrypto) VerificationSignature(token, timestamp, nonce, msg, sigture string) bool
type EventInstanceChangeData ¶
type EventInstanceChangeData struct { EventType string `json:"EventType"` ProcessInstanceID string `json:"processInstanceId"` FinishTime int64 `json:"finishTime"` CorpID string `json:"corpId"` Title string `json:"title"` Type string `json:"type"` URL string `json:"url"` Result string `json:"result"` CreateTime int64 `json:"createTime"` StaffID string `json:"staffId"` ProcessCode string `json:"processCode"` }
type EventResponse ¶
type EventResponse struct { MsgSignature string `json:"msg_signature"` TimeStamp string `json:"timeStamp"` Nonce string `json:"nonce"` Encrypt string `json:"encrypt"` }
func EventHandler ¶
func EventHandler(appKey string, body []byte, signature, ts, nonce string) (*EventResponse, error)
type EventTaskChangeData ¶
type EventTaskChangeData struct { EventType string `json:"EventType"` ProcessInstanceID string `json:"processInstanceId"` FinishTime int64 `json:"finishTime"` CorpID string `json:"corpId"` Title string `json:"title"` Type string `json:"type"` Result string `json:"result"` Remark string `json:"remark"` CreateTime int64 `json:"createTime"` StaffID string `json:"staffId"` ProcessCode string `json:"processCode"` }
type SubDepartmentAndUserIDsResponse ¶
type SubDepartmentAndUserIDsResponse struct { SubDepartmentIDs []*DepartmentInfo `json:"sub_department_list"` Users []*UserInfo `json:"user_list"` }
func GetDingTalkDepartment ¶
func GetDingTalkDepartment(id, departmentID string) (*SubDepartmentAndUserIDsResponse, error)
type UserApprovalResult ¶
Click to show internal directories.
Click to hide internal directories.