Documentation ¶
Index ¶
- Constants
- func GetLarkClientByIMAppID(id string) (*lark.Client, error)
- func GetLarkUserID(approvalID, queryType, queryValue string) (string, error)
- func RemoveLarkApprovalInstanceManager(instanceID string)
- type ApprovalInstanceEvent
- type ApprovalManager
- func (l *ApprovalManager) CheckAndUpdateUUID(uuid string) bool
- func (l *ApprovalManager) GetNodeKeyMap() map[string]string
- func (l *ApprovalManager) GetNodeUserApprovalResults(nodeID string) map[string]*UserApprovalResult
- func (l *ApprovalManager) UpdateNodeKeyMap(nodeKey, nodeCustomKey string)
- func (l *ApprovalManager) UpdateNodeUserApprovalResult(nodeID, userID string, result *UserApprovalResult)
- type ApprovalManagerMap
- type ApprovalTaskEvent
- type CallbackData
- type DepartmentInfo
- type EventHandlerResponse
- type NodeUserApprovalResult
- type UserApprovalResult
Constants ¶
View Source
const ( // ApprovalStatusNotFound not defined by lark open api, it just means not found in local manager. ApprovalStatusNotFound = "NOTFOUND" ApprovalStatusPending = "PENDING" ApprovalStatusApproved = "APPROVED" ApprovalStatusRejected = "REJECTED" ApprovalStatusCanceled = "CANCELED" ApprovalStatusDeleted = "DELETED" )
Variables ¶
This section is empty.
Functions ¶
func GetLarkUserID ¶
func RemoveLarkApprovalInstanceManager ¶
func RemoveLarkApprovalInstanceManager(instanceID string)
Types ¶
type ApprovalInstanceEvent ¶
type ApprovalInstanceEvent struct { AppID string `json:"app_id"` ApprovalCode string `json:"approval_code"` InstanceCode string `json:"instance_code"` InstanceOperateTime string `json:"instance_operate_time"` OperateTime string `json:"operate_time"` Status string `json:"status"` TenantKey string `json:"tenant_key"` Type string `json:"type"` UUID string `json:"uuid"` }
type ApprovalManager ¶
func GetLarkApprovalInstanceManager ¶
func GetLarkApprovalInstanceManager(instanceID string) *ApprovalManager
func (*ApprovalManager) CheckAndUpdateUUID ¶
func (l *ApprovalManager) CheckAndUpdateUUID(uuid string) bool
func (*ApprovalManager) GetNodeKeyMap ¶
func (l *ApprovalManager) GetNodeKeyMap() map[string]string
func (*ApprovalManager) GetNodeUserApprovalResults ¶
func (l *ApprovalManager) GetNodeUserApprovalResults(nodeID string) map[string]*UserApprovalResult
func (*ApprovalManager) UpdateNodeKeyMap ¶
func (l *ApprovalManager) UpdateNodeKeyMap(nodeKey, nodeCustomKey string)
func (*ApprovalManager) UpdateNodeUserApprovalResult ¶
func (l *ApprovalManager) UpdateNodeUserApprovalResult(nodeID, userID string, result *UserApprovalResult)
type ApprovalManagerMap ¶
type ApprovalTaskEvent ¶
type ApprovalTaskEvent struct { AppID string `json:"app_id"` OpenID string `json:"open_id"` TenantKey string `json:"tenant_key"` Type string `json:"type"` ApprovalCode string `json:"approval_code"` InstanceCode string `json:"instance_code"` TaskID string `json:"task_id"` UserID string `json:"user_id"` Status string `json:"status"` OperateTime string `json:"operate_time"` CustomKey string `json:"custom_key"` DefKey string `json:"def_key"` Extra string `json:"extra"` }
type CallbackData ¶
type DepartmentInfo ¶
type DepartmentInfo struct { UserList []*lark.UserInfo `json:"user_list"` SubDepartmentList []*lark.DepartmentInfo `json:"sub_department_list"` }
func GetLarkAppContactRange ¶
func GetLarkAppContactRange(approvalID string) (*DepartmentInfo, error)
func GetLarkDepartment ¶
func GetLarkDepartment(approvalID, openID string) (*DepartmentInfo, error)
type EventHandlerResponse ¶
type EventHandlerResponse struct {
Challenge string `json:"challenge"`
}
func EventHandler ¶
func EventHandler(appID, sign, ts, nonce, body string) (*EventHandlerResponse, error)
type NodeUserApprovalResult ¶
type NodeUserApprovalResult map[string]map[string]*UserApprovalResult
type UserApprovalResult ¶
type UserApprovalResult struct { Result string ApproveOrReject config.ApproveOrReject OperationTime int64 }
Click to show internal directories.
Click to hide internal directories.