larkreport

package
v3.4.51 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 25, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	IncludeDeletedExclude = 0 // 不包括已删除
	IncludeDeletedInclude = 1 // 包括已删除

)
View Source
const (
	UserIdTypeUserId  = "user_id"  // 以user_id来识别用户
	UserIdTypeUnionId = "union_id" // 以union_id来识别用户
	UserIdTypeOpenId  = "open_id"  // 以open_id来识别用户
)
View Source
const (
	UserIdTypeRemoveRuleViewUserId  = "user_id"  //
	UserIdTypeRemoveRuleViewUnionId = "union_id" //
	UserIdTypeRemoveRuleViewOpenId  = "open_id"  //
)
View Source
const (
	UserIdTypeQueryTaskUserId  = "user_id"  // 以user_id来识别用户
	UserIdTypeQueryTaskUnionId = "union_id" // 以union_id来识别用户
	UserIdTypeQueryTaskOpenId  = "open_id"  // 以open_id来识别用户
)

Variables

This section is empty.

Functions

This section is empty.

Types

type DepartmentId

type DepartmentId struct {
	DepartmentId *string `json:"department_id,omitempty"` //

	OpenDepartmentId *string `json:"open_department_id,omitempty"` //
}

type DepartmentIdBuilder

type DepartmentIdBuilder struct {
	// contains filtered or unexported fields
}

func NewDepartmentIdBuilder

func NewDepartmentIdBuilder() *DepartmentIdBuilder

func (*DepartmentIdBuilder) Build

func (builder *DepartmentIdBuilder) Build() *DepartmentId

func (*DepartmentIdBuilder) DepartmentId

func (builder *DepartmentIdBuilder) DepartmentId(departmentId string) *DepartmentIdBuilder

示例值:

func (*DepartmentIdBuilder) OpenDepartmentId

func (builder *DepartmentIdBuilder) OpenDepartmentId(openDepartmentId string) *DepartmentIdBuilder

示例值:

type FormContent

type FormContent struct {
	FieldId *string `json:"field_id,omitempty"` // 表单字段ID

	FieldName *string `json:"field_name,omitempty"` // 表单字段名称

	FieldValue *string `json:"field_value,omitempty"` // 表单字段值
}

type FormContentBuilder

type FormContentBuilder struct {
	// contains filtered or unexported fields
}

func NewFormContentBuilder

func NewFormContentBuilder() *FormContentBuilder

func (*FormContentBuilder) Build

func (builder *FormContentBuilder) Build() *FormContent

func (*FormContentBuilder) FieldId

func (builder *FormContentBuilder) FieldId(fieldId string) *FormContentBuilder

表单字段ID

示例值:6968626905868156948

func (*FormContentBuilder) FieldName

func (builder *FormContentBuilder) FieldName(fieldName string) *FormContentBuilder

表单字段名称

示例值:表单测试

func (*FormContentBuilder) FieldValue

func (builder *FormContentBuilder) FieldValue(fieldValue string) *FormContentBuilder

表单字段值

示例值:测试数据

type FormField

type FormField struct {
	Name *string `json:"name,omitempty"` // 字段名称

	Type *string `json:"type,omitempty"` // 字段类型
}

type FormFieldBuilder

type FormFieldBuilder struct {
	// contains filtered or unexported fields
}

func NewFormFieldBuilder

func NewFormFieldBuilder() *FormFieldBuilder

func (*FormFieldBuilder) Build

func (builder *FormFieldBuilder) Build() *FormField

func (*FormFieldBuilder) Name

func (builder *FormFieldBuilder) Name(name string) *FormFieldBuilder

字段名称

示例值:ou_133f0b6d0f097cf7d7ba00b38fffb112

func (*FormFieldBuilder) Type

func (builder *FormFieldBuilder) Type(type_ string) *FormFieldBuilder

字段类型

示例值:张三

type QueryRuleReq

type QueryRuleReq struct {
	// contains filtered or unexported fields
}

type QueryRuleReqBuilder

type QueryRuleReqBuilder struct {
	// contains filtered or unexported fields
}

func NewQueryRuleReqBuilder

func NewQueryRuleReqBuilder() *QueryRuleReqBuilder

func (*QueryRuleReqBuilder) Build

func (builder *QueryRuleReqBuilder) Build() *QueryRuleReq

func (*QueryRuleReqBuilder) IncludeDeleted

func (builder *QueryRuleReqBuilder) IncludeDeleted(includeDeleted int) *QueryRuleReqBuilder

是否包括已删除,默认未删除

示例值:0

func (*QueryRuleReqBuilder) RuleName

func (builder *QueryRuleReqBuilder) RuleName(ruleName string) *QueryRuleReqBuilder

规则名称

示例值:工作月报

func (*QueryRuleReqBuilder) UserIdType

func (builder *QueryRuleReqBuilder) UserIdType(userIdType string) *QueryRuleReqBuilder

此次调用中使用的用户ID的类型

示例值:

type QueryRuleResp

type QueryRuleResp struct {
	*larkcore.ApiResp `json:"-"`
	larkcore.CodeError
	Data *QueryRuleRespData `json:"data"` // 业务数据
}

func (*QueryRuleResp) Success

func (resp *QueryRuleResp) Success() bool

type QueryRuleRespData

type QueryRuleRespData struct {
	Rules []*Rule `json:"rules,omitempty"` // 规则列表
}

type QueryTaskPathReqBodyBuilder

type QueryTaskPathReqBodyBuilder struct {
	// contains filtered or unexported fields
}

func NewQueryTaskPathReqBodyBuilder

func NewQueryTaskPathReqBodyBuilder() *QueryTaskPathReqBodyBuilder

func (*QueryTaskPathReqBodyBuilder) Build

func (builder *QueryTaskPathReqBodyBuilder) Build() (*QueryTaskReqBody, error)

func (*QueryTaskPathReqBodyBuilder) CommitEndTime

func (builder *QueryTaskPathReqBodyBuilder) CommitEndTime(commitEndTime int) *QueryTaskPathReqBodyBuilder

提交结束时间时间戳

示例值:1622427266

func (*QueryTaskPathReqBodyBuilder) CommitStartTime

func (builder *QueryTaskPathReqBodyBuilder) CommitStartTime(commitStartTime int) *QueryTaskPathReqBodyBuilder

提交开始时间时间戳

示例值:1622427266

func (*QueryTaskPathReqBodyBuilder) PageSize

func (builder *QueryTaskPathReqBodyBuilder) PageSize(pageSize int) *QueryTaskPathReqBodyBuilder

单次分页返回的条数

示例值:10

func (*QueryTaskPathReqBodyBuilder) PageToken

func (builder *QueryTaskPathReqBodyBuilder) PageToken(pageToken string) *QueryTaskPathReqBodyBuilder

分页标识符

示例值:6895699275733778451

func (*QueryTaskPathReqBodyBuilder) RuleId

汇报规则ID

示例值:6894419345318182932

func (*QueryTaskPathReqBodyBuilder) UserId

用户ID

示例值:ou_133f0b6d0f097cf7d7ba00b38fffb110

type QueryTaskReq

type QueryTaskReq struct {
	Body *QueryTaskReqBody `body:""`
	// contains filtered or unexported fields
}

type QueryTaskReqBody

type QueryTaskReqBody struct {
	CommitStartTime *int `json:"commit_start_time,omitempty"` // 提交开始时间时间戳

	CommitEndTime *int `json:"commit_end_time,omitempty"` // 提交结束时间时间戳

	RuleId *string `json:"rule_id,omitempty"` // 汇报规则ID

	UserId *string `json:"user_id,omitempty"` // 用户ID

	PageToken *string `json:"page_token,omitempty"` // 分页标识符

	PageSize *int `json:"page_size,omitempty"` // 单次分页返回的条数
}

type QueryTaskReqBodyBuilder

type QueryTaskReqBodyBuilder struct {
	// contains filtered or unexported fields
}

func NewQueryTaskReqBodyBuilder

func NewQueryTaskReqBodyBuilder() *QueryTaskReqBodyBuilder

func (*QueryTaskReqBodyBuilder) Build

func (builder *QueryTaskReqBodyBuilder) Build() *QueryTaskReqBody

func (*QueryTaskReqBodyBuilder) CommitEndTime

func (builder *QueryTaskReqBodyBuilder) CommitEndTime(commitEndTime int) *QueryTaskReqBodyBuilder

提交结束时间时间戳

示例值:1622427266

func (*QueryTaskReqBodyBuilder) CommitStartTime

func (builder *QueryTaskReqBodyBuilder) CommitStartTime(commitStartTime int) *QueryTaskReqBodyBuilder

提交开始时间时间戳

示例值:1622427266

func (*QueryTaskReqBodyBuilder) PageSize

func (builder *QueryTaskReqBodyBuilder) PageSize(pageSize int) *QueryTaskReqBodyBuilder

单次分页返回的条数

示例值:10

func (*QueryTaskReqBodyBuilder) PageToken

func (builder *QueryTaskReqBodyBuilder) PageToken(pageToken string) *QueryTaskReqBodyBuilder

分页标识符

示例值:6895699275733778451

func (*QueryTaskReqBodyBuilder) RuleId

func (builder *QueryTaskReqBodyBuilder) RuleId(ruleId string) *QueryTaskReqBodyBuilder

汇报规则ID

示例值:6894419345318182932

func (*QueryTaskReqBodyBuilder) UserId

func (builder *QueryTaskReqBodyBuilder) UserId(userId string) *QueryTaskReqBodyBuilder

用户ID

示例值:ou_133f0b6d0f097cf7d7ba00b38fffb110

type QueryTaskReqBuilder

type QueryTaskReqBuilder struct {
	// contains filtered or unexported fields
}

func NewQueryTaskReqBuilder

func NewQueryTaskReqBuilder() *QueryTaskReqBuilder

func (*QueryTaskReqBuilder) Body

任务查询

func (*QueryTaskReqBuilder) Build

func (builder *QueryTaskReqBuilder) Build() *QueryTaskReq

func (*QueryTaskReqBuilder) UserIdType

func (builder *QueryTaskReqBuilder) UserIdType(userIdType string) *QueryTaskReqBuilder

此次调用中使用的用户ID的类型

示例值:

type QueryTaskResp

type QueryTaskResp struct {
	*larkcore.ApiResp `json:"-"`
	larkcore.CodeError
	Data *QueryTaskRespData `json:"data"` // 业务数据
}

func (*QueryTaskResp) Success

func (resp *QueryTaskResp) Success() bool

type QueryTaskRespData

type QueryTaskRespData struct {
	Items []*Task `json:"items,omitempty"` // 任务列表

	HasMore *bool `json:"has_more,omitempty"` // 是否有下一页数据

	PageToken *string `json:"page_token,omitempty"` // 下一页分页的token
}

type RemoveRuleViewPathReqBodyBuilder

type RemoveRuleViewPathReqBodyBuilder struct {
	// contains filtered or unexported fields
}

func NewRemoveRuleViewPathReqBodyBuilder

func NewRemoveRuleViewPathReqBodyBuilder() *RemoveRuleViewPathReqBodyBuilder

func (*RemoveRuleViewPathReqBodyBuilder) Build

func (*RemoveRuleViewPathReqBodyBuilder) UserIds

列表为空删除规则下全用户视图,列表不为空删除指定用户视图,大小限制200。

示例值:["ou_d6a5b5a55c77ca0b5b6c6ca0dd628c85","ou_d6a5b5a55c77ca0b5b6c6ca0dd628c55"]

type RemoveRuleViewReq

type RemoveRuleViewReq struct {
	Body *RemoveRuleViewReqBody `body:""`
	// contains filtered or unexported fields
}

type RemoveRuleViewReqBody

type RemoveRuleViewReqBody struct {
	UserIds []string `json:"user_ids,omitempty"` // 列表为空删除规则下全用户视图,列表不为空删除指定用户视图,大小限制200。
}

type RemoveRuleViewReqBodyBuilder

type RemoveRuleViewReqBodyBuilder struct {
	// contains filtered or unexported fields
}

func NewRemoveRuleViewReqBodyBuilder

func NewRemoveRuleViewReqBodyBuilder() *RemoveRuleViewReqBodyBuilder

func (*RemoveRuleViewReqBodyBuilder) Build

func (*RemoveRuleViewReqBodyBuilder) UserIds

列表为空删除规则下全用户视图,列表不为空删除指定用户视图,大小限制200。

示例值:["ou_d6a5b5a55c77ca0b5b6c6ca0dd628c85","ou_d6a5b5a55c77ca0b5b6c6ca0dd628c55"]

type RemoveRuleViewReqBuilder

type RemoveRuleViewReqBuilder struct {
	// contains filtered or unexported fields
}

func NewRemoveRuleViewReqBuilder

func NewRemoveRuleViewReqBuilder() *RemoveRuleViewReqBuilder

func (*RemoveRuleViewReqBuilder) Body

移除规则看板

func (*RemoveRuleViewReqBuilder) Build

func (builder *RemoveRuleViewReqBuilder) Build() *RemoveRuleViewReq

func (*RemoveRuleViewReqBuilder) RuleId

func (builder *RemoveRuleViewReqBuilder) RuleId(ruleId string) *RemoveRuleViewReqBuilder

汇报规则ID

示例值:6894419345318182122

func (*RemoveRuleViewReqBuilder) UserIdType

func (builder *RemoveRuleViewReqBuilder) UserIdType(userIdType string) *RemoveRuleViewReqBuilder

示例值:

type RemoveRuleViewResp

type RemoveRuleViewResp struct {
	*larkcore.ApiResp `json:"-"`
	larkcore.CodeError
}

func (*RemoveRuleViewResp) Success

func (resp *RemoveRuleViewResp) Success() bool

type Rule

type Rule struct {
	RuleId *string `json:"rule_id,omitempty"` // 规则唯一标识

	Name *string `json:"name,omitempty"` // 规则名称

	IconName *string `json:"icon_name,omitempty"` // 规则图标

	CreatedAt *int `json:"created_at,omitempty"` // 创建时间

	CreatorUserId *string `json:"creator_user_id,omitempty"` // 创建人ID

	CreatorUserName *string `json:"creator_user_name,omitempty"` // 创建人名称

	OwnerUserId *string `json:"owner_user_id,omitempty"` // 规则所有者ID

	OwnerUserName *string `json:"owner_user_name,omitempty"` // 规则所有者名称

	FormSchema []*FormField `json:"form_schema,omitempty"` // 表单定义

	IsDeleted *int `json:"is_deleted,omitempty"` // 规则是否已删除

	NeedReportUserIds []string `json:"need_report_user_ids,omitempty"` // 需要汇报的用户ID列表

	NeedReportDepartmentIds []string `json:"need_report_department_ids,omitempty"` // 需要汇报的部门ID列表(如果id为0,表示全员)

	NeedReportChatIds []string `json:"need_report_chat_ids,omitempty"` // 需要汇报的群ID列表

	CcUserIds []string `json:"cc_user_ids,omitempty"` // 抄送用户ID列表

	CcDepartmentIds []string `json:"cc_department_ids,omitempty"` // 抄送部门ID列表

	ToUserIds []string `json:"to_user_ids,omitempty"` // 汇报对象用户ID列表

	ToChatIds []string `json:"to_chat_ids,omitempty"` // 汇报对象群ID列表

	ToLeaders []int `json:"to_leaders,omitempty"` // 上级汇报对象,0表示第一级,依次类推,最大为5表示第六级

	ToDepartmentOwners []int `json:"to_department_owners,omitempty"` // 部门负责人汇报对象,0表示第一级,依次类推,最大为5表示第六级

	ManagerUserIds []string `json:"manager_user_ids,omitempty"` // 规则管理员用户ID列表

	CcChatIds []string `json:"cc_chat_ids,omitempty"` // 抄送群ID列表
}

type RuleBuilder

type RuleBuilder struct {
	// contains filtered or unexported fields
}

func NewRuleBuilder

func NewRuleBuilder() *RuleBuilder

func (*RuleBuilder) Build

func (builder *RuleBuilder) Build() *Rule

func (*RuleBuilder) CcChatIds

func (builder *RuleBuilder) CcChatIds(ccChatIds []string) *RuleBuilder

抄送群ID列表

示例值:['oc_a7bb9ca5efa68ab8b4fdd2e3b54fffsf']

func (*RuleBuilder) CcDepartmentIds

func (builder *RuleBuilder) CcDepartmentIds(ccDepartmentIds []string) *RuleBuilder

抄送部门ID列表

示例值:['od-251480c0bfb8c5c8784ea194ef8b734d']

func (*RuleBuilder) CcUserIds

func (builder *RuleBuilder) CcUserIds(ccUserIds []string) *RuleBuilder

抄送用户ID列表

示例值:['ou_45454c20ef2c92c173445abf6f4955rf']

func (*RuleBuilder) CreatedAt

func (builder *RuleBuilder) CreatedAt(createdAt int) *RuleBuilder

创建时间

示例值:1622427266

func (*RuleBuilder) CreatorUserId

func (builder *RuleBuilder) CreatorUserId(creatorUserId string) *RuleBuilder

创建人ID

示例值:ou_133f0b6d0f097cf7d7ba00b38fffb110

func (*RuleBuilder) CreatorUserName

func (builder *RuleBuilder) CreatorUserName(creatorUserName string) *RuleBuilder

创建人名称

示例值:张三

func (*RuleBuilder) FormSchema

func (builder *RuleBuilder) FormSchema(formSchema []*FormField) *RuleBuilder

表单定义

示例值:

func (*RuleBuilder) IconName

func (builder *RuleBuilder) IconName(iconName string) *RuleBuilder

规则图标

示例值:日报

func (*RuleBuilder) IsDeleted

func (builder *RuleBuilder) IsDeleted(isDeleted int) *RuleBuilder

规则是否已删除

示例值:0

func (*RuleBuilder) ManagerUserIds

func (builder *RuleBuilder) ManagerUserIds(managerUserIds []string) *RuleBuilder

规则管理员用户ID列表

示例值:['ou_c04cebc780341ab22bd311ba6902sseb']

func (*RuleBuilder) Name

func (builder *RuleBuilder) Name(name string) *RuleBuilder

规则名称

示例值:工作月报

func (*RuleBuilder) NeedReportChatIds

func (builder *RuleBuilder) NeedReportChatIds(needReportChatIds []string) *RuleBuilder

需要汇报的群ID列表

示例值:['oc_a7bb9ca5efa68ab8b4fdd2e3b54ffref']

func (*RuleBuilder) NeedReportDepartmentIds

func (builder *RuleBuilder) NeedReportDepartmentIds(needReportDepartmentIds []string) *RuleBuilder

需要汇报的部门ID列表(如果id为0,表示全员)

示例值:

func (*RuleBuilder) NeedReportUserIds

func (builder *RuleBuilder) NeedReportUserIds(needReportUserIds []string) *RuleBuilder

需要汇报的用户ID列表

示例值:['ou_c04cebc780341ab22bd311ba6902ffsd']

func (*RuleBuilder) OwnerUserId

func (builder *RuleBuilder) OwnerUserId(ownerUserId string) *RuleBuilder

规则所有者ID

示例值:ou_133f0b6d0f097cf7d7ba00b38fffb111

func (*RuleBuilder) OwnerUserName

func (builder *RuleBuilder) OwnerUserName(ownerUserName string) *RuleBuilder

规则所有者名称

示例值:张三

func (*RuleBuilder) RuleId

func (builder *RuleBuilder) RuleId(ruleId string) *RuleBuilder

规则唯一标识

示例值:6894788526240432147

func (*RuleBuilder) ToChatIds

func (builder *RuleBuilder) ToChatIds(toChatIds []string) *RuleBuilder

汇报对象群ID列表

示例值:['oc_a7bb9ca5efa68ab8b4fdd2e3b54fcerf']

func (*RuleBuilder) ToDepartmentOwners

func (builder *RuleBuilder) ToDepartmentOwners(toDepartmentOwners []int) *RuleBuilder

部门负责人汇报对象,0表示第一级,依次类推,最大为5表示第六级

示例值:[0]

func (*RuleBuilder) ToLeaders

func (builder *RuleBuilder) ToLeaders(toLeaders []int) *RuleBuilder

上级汇报对象,0表示第一级,依次类推,最大为5表示第六级

示例值:[0]

func (*RuleBuilder) ToUserIds

func (builder *RuleBuilder) ToUserIds(toUserIds []string) *RuleBuilder

汇报对象用户ID列表

示例值:['ou_c04cebc780341ab22bd311ba6902fdfe']

type Task

type Task struct {
	TaskId *string `json:"task_id,omitempty"` // 汇报任务ID

	RuleName *string `json:"rule_name,omitempty"` // 规则名称

	FromUserId *string `json:"from_user_id,omitempty"` // 汇报用户ID

	FromUserName *string `json:"from_user_name,omitempty"` // 汇报用户名称

	DepartmentName *string `json:"department_name,omitempty"` // 汇报用户部门名称

	CommitTime *int `json:"commit_time,omitempty"` // 提交时间时间戳

	FormContents []*FormContent `json:"form_contents,omitempty"` // 汇报表单内容

	RuleId *string `json:"rule_id,omitempty"` // 汇报规则ID

	DepartmentIds []string `json:"department_ids,omitempty"` // 部门id

	ToUserIds []string `json:"to_user_ids,omitempty"` // 汇报给谁

	ToUserNames []string `json:"to_user_names,omitempty"` // 汇报给谁的名字
}

type TaskBuilder

type TaskBuilder struct {
	// contains filtered or unexported fields
}

func NewTaskBuilder

func NewTaskBuilder() *TaskBuilder

func (*TaskBuilder) Build

func (builder *TaskBuilder) Build() *Task

func (*TaskBuilder) CommitTime

func (builder *TaskBuilder) CommitTime(commitTime int) *TaskBuilder

提交时间时间戳

示例值:1622548713

func (*TaskBuilder) DepartmentIds

func (builder *TaskBuilder) DepartmentIds(departmentIds []string) *TaskBuilder

部门id

示例值:

func (*TaskBuilder) DepartmentName

func (builder *TaskBuilder) DepartmentName(departmentName string) *TaskBuilder

汇报用户部门名称

示例值:部门A

func (*TaskBuilder) FormContents

func (builder *TaskBuilder) FormContents(formContents []*FormContent) *TaskBuilder

汇报表单内容

示例值:

func (*TaskBuilder) FromUserId

func (builder *TaskBuilder) FromUserId(fromUserId string) *TaskBuilder

汇报用户ID

示例值:ou_c04cebc780341ab22bd311ba6902ffeb

func (*TaskBuilder) FromUserName

func (builder *TaskBuilder) FromUserName(fromUserName string) *TaskBuilder

汇报用户名称

示例值:张三

func (*TaskBuilder) RuleId

func (builder *TaskBuilder) RuleId(ruleId string) *TaskBuilder

汇报规则ID

示例值:6968793659214921747

func (*TaskBuilder) RuleName

func (builder *TaskBuilder) RuleName(ruleName string) *TaskBuilder

规则名称

示例值:工作月报

func (*TaskBuilder) TaskId

func (builder *TaskBuilder) TaskId(taskId string) *TaskBuilder

汇报任务ID

示例值:6968793659214921747

func (*TaskBuilder) ToUserIds

func (builder *TaskBuilder) ToUserIds(toUserIds []string) *TaskBuilder

汇报给谁

示例值:

func (*TaskBuilder) ToUserNames

func (builder *TaskBuilder) ToUserNames(toUserNames []string) *TaskBuilder

汇报给谁的名字

示例值:

type V1

type V1 struct {
	Rule     *rule     // 规则
	RuleView *ruleView // 规则看板
	Task     *task     // 任务
}

func New

func New(config *larkcore.Config) *V1

type View

type View struct {
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL