Documentation ¶
Index ¶
- Constants
- func ApprovalNodeIDKey(id int) string
- func Validate(appID, secret string) error
- type ApprovalInstanceInfo
- type ApprovalNode
- type ApproveType
- type CancelApprovalInstanceArgs
- type Client
- func (client *Client) CancelApprovalInstance(args *CancelApprovalInstanceArgs) error
- func (client *Client) CreateApprovalDefinition(arg *CreateApprovalDefinitionArgs) (string, error)
- func (client *Client) CreateApprovalInstance(args *CreateApprovalInstanceArgs) (string, error)
- func (client *Client) GetApprovalDefinition(approvalCode string) (*larkapproval.GetApprovalRespData, error)
- func (client *Client) GetApprovalDefinitionNodeKeyMap(approvalCode string) (map[string]string, error)
- func (client *Client) GetApprovalInstance(args *GetApprovalInstanceArgs) (*ApprovalInstanceInfo, error)
- func (client *Client) GetDepartmentInfoByID(id string) (*DepartmentInfo, error)
- func (client *Client) GetUserInfoByID(id string) (*UserInfo, error)
- func (client *Client) GetUserOpenIDByEmailOrMobile(_type, value string) (string, error)
- func (client *Client) ListAppContactRange() (*ContactRange, error)
- func (client *Client) ListSubDepartmentsInfo(departmentID string) ([]*DepartmentInfo, error)
- func (client *Client) ListUserFromDepartment(departmentID string) ([]*UserInfo, error)
- func (client *Client) SubscribeApprovalDefinition(args *SubscribeApprovalDefinitionArgs) error
- type ContactRange
- type CreateApprovalDefinitionArgs
- type CreateApprovalInstanceArgs
- type DepartmentInfo
- type GetApprovalInstanceArgs
- type SubscribeApprovalDefinitionArgs
- type UserApprovalComment
- type UserInfo
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" )
View Source
const ( // ApproverSelectionMethodFree is the approver selection method in the definition of approval // Free means the approval sponsor can choose the approver freely ApproverSelectionMethodFree = "Free" )
Variables ¶
This section is empty.
Functions ¶
func ApprovalNodeIDKey ¶
Types ¶
type ApprovalInstanceInfo ¶
type ApprovalInstanceInfo struct { // key1 is node id, key2 is user open id ApproverInfoWithNode map[string]map[string]*UserApprovalComment ApproveOrReject config.ApproveOrReject }
type ApprovalNode ¶
type ApprovalNode struct { ApproverIDList []string Type ApproveType }
type ApproveType ¶
type ApproveType string
const ( ApproveTypeAnd ApproveType = "AND" ApproveTypeOr ApproveType = "OR" ApproveTypeSequential ApproveType = "SEQUENTIAL" QueryTypeEmail = "email" QueryTypeMobile = "mobile" )
type Client ¶
func (*Client) CancelApprovalInstance ¶
func (client *Client) CancelApprovalInstance(args *CancelApprovalInstanceArgs) error
func (*Client) CreateApprovalDefinition ¶
func (client *Client) CreateApprovalDefinition(arg *CreateApprovalDefinitionArgs) (string, error)
func (*Client) CreateApprovalInstance ¶
func (client *Client) CreateApprovalInstance(args *CreateApprovalInstanceArgs) (string, error)
func (*Client) GetApprovalDefinition ¶
func (client *Client) GetApprovalDefinition(approvalCode string) (*larkapproval.GetApprovalRespData, error)
func (*Client) GetApprovalDefinitionNodeKeyMap ¶
func (*Client) GetApprovalInstance ¶
func (client *Client) GetApprovalInstance(args *GetApprovalInstanceArgs) (*ApprovalInstanceInfo, error)
func (*Client) GetDepartmentInfoByID ¶
func (client *Client) GetDepartmentInfoByID(id string) (*DepartmentInfo, error)
func (*Client) GetUserInfoByID ¶
func (*Client) GetUserOpenIDByEmailOrMobile ¶
func (*Client) ListAppContactRange ¶
func (client *Client) ListAppContactRange() (*ContactRange, error)
ListAppContactRange get users, departments, groups open id authorized by the lark app
func (*Client) ListSubDepartmentsInfo ¶
func (client *Client) ListSubDepartmentsInfo(departmentID string) ([]*DepartmentInfo, error)
func (*Client) ListUserFromDepartment ¶
func (*Client) SubscribeApprovalDefinition ¶
func (client *Client) SubscribeApprovalDefinition(args *SubscribeApprovalDefinitionArgs) error
type ContactRange ¶
type CreateApprovalDefinitionArgs ¶
type CreateApprovalDefinitionArgs struct { Name string Description string Nodes []*ApprovalNode }
type CreateApprovalInstanceArgs ¶
type CreateApprovalInstanceArgs struct { ApprovalCode string UserOpenID string Nodes []*ApprovalNode FormContent string }
type DepartmentInfo ¶
type GetApprovalInstanceArgs ¶
type GetApprovalInstanceArgs struct {
InstanceID string
}
type SubscribeApprovalDefinitionArgs ¶
type SubscribeApprovalDefinitionArgs struct {
ApprovalID string
}
type UserApprovalComment ¶
type UserApprovalComment struct {
Comment string
}
Click to show internal directories.
Click to hide internal directories.