larkdrive

package
v3.1.3 Latest Latest
Warning

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

Go to latest
Published: Feb 1, 2024 License: MIT Imports: 4 Imported by: 5

Documentation

Index

Constants

View Source
const (
	TokenTypeDoc      = "doc"      // 旧版文档
	TokenTypeSheet    = "sheet"    // 电子表格
	TokenTypeFile     = "file"     // 云空间文件
	TokenTypeWiki     = "wiki"     // 知识库节点
	TokenTypeBitable  = "bitable"  // 多维表格
	TokenTypeDocx     = "docx"     // 新版文档
	TokenTypeMindnote = "mindnote" // 思维笔记
	TokenTypeMinutes  = "minutes"  // 妙记
	TokenTypeSlides   = "slides"   // 幻灯片
)
View Source
const (
	ExternalAccessEntityOpen                    = "open"                       // 打开
	ExternalAccessEntityClosed                  = "closed"                     // 关闭
	ExternalAccessEntityAllowSharePartnerTenant = "allow_share_partner_tenant" // 允许分享给关联组织
)
View Source
const (
	SecurityEntityAnyoneCanView  = "anyone_can_view"  // 拥有可阅读权限的用户
	SecurityEntityAnyoneCanEdit  = "anyone_can_edit"  // 拥有可编辑权限的用户
	SecurityEntityOnlyFullAccess = "only_full_access" // 拥有可管理权限(包括我)的用户
)
View Source
const (
	CommentEntityAnyoneCanView = "anyone_can_view" // 拥有可阅读权限的用户
	CommentEntityAnyoneCanEdit = "anyone_can_edit" // 拥有可编辑权限的用户
)
View Source
const (
	ShareEntityAnyone     = "anyone"      // 所有可阅读或编辑此文档的用户
	ShareEntitySameTenant = "same_tenant" // 组织内所有可阅读或编辑此文档的用户
)
View Source
const (
	ManageCollaboratorEntityCollaboratorCanView    = "collaborator_can_view"    // 拥有可阅读权限的协作者
	ManageCollaboratorEntityCollaboratorCanEdit    = "collaborator_can_edit"    // 拥有可编辑权限的协作者
	ManageCollaboratorEntityCollaboratorFullAccess = "collaborator_full_access" // 拥有可管理权限(包括我)的协作者
)
View Source
const (
	LinkShareEntityTenantReadable        = "tenant_readable"         // 组织内获得链接的人可阅读
	LinkShareEntityTenantEditable        = "tenant_editable"         // 组织内获得链接的人可编辑
	LinkShareEntityPartnerTenantReadable = "partner_tenant_readable" // 关联组织的人可阅读
	LinkShareEntityPartnerTenantEditable = "partner_tenant_editable" // 关联组织的人可编辑
	LinkShareEntityAnyoneReadable        = "anyone_readable"         // 互联网上获得链接的任何人可阅读(仅external_access=“true”时有效)
	LinkShareEntityAnyoneEditable        = "anyone_editable"         // 互联网上获得链接的任何人可编辑(仅external_access=“true”时有效)
	LinkShareEntityClosed                = "closed"                  // 关闭链接分享
)
View Source
const (
	CopyEntityAnyoneCanView  = "anyone_can_view"  // 拥有可阅读权限的用户
	CopyEntityAnyoneCanEdit  = "anyone_can_edit"  // 拥有可编辑权限的用户
	CopyEntityOnlyFullAccess = "only_full_access" // 拥有可管理权限(包括我)的协作者
)
View Source
const (
	TokenTypePatchPermissionPublicDoc      = "doc"      // 旧版文档
	TokenTypePatchPermissionPublicSheet    = "sheet"    // 电子表格
	TokenTypePatchPermissionPublicFile     = "file"     // 云空间文件
	TokenTypePatchPermissionPublicWiki     = "wiki"     // 知识库节点
	TokenTypePatchPermissionPublicBitable  = "bitable"  // 多维表格
	TokenTypePatchPermissionPublicDocx     = "docx"     // 新版文档
	TokenTypePatchPermissionPublicMindnote = "mindnote" // 思维笔记
	TokenTypePatchPermissionPublicMinutes  = "minutes"  // 妙记
	TokenTypePatchPermissionPublicSlides   = "slides"   // 幻灯片
)

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 FileLike

type FileLike struct {
	UserId             *string `json:"user_id,omitempty"`              // 用户 ID
	LastLikedTime      *string `json:"last_liked_time,omitempty"`      // 用户最后点赞时间,秒级时间戳
	UserName           *string `json:"user_name,omitempty"`            // 用户名字,用户信息被脱敏时此值不会返回
	UserEnName         *string `json:"user_en_name,omitempty"`         // 用户英文名字,用户信息被脱敏时此值不会返回
	UserAvatarUrl      *string `json:"user_avatar_url,omitempty"`      // 用户头像,用户信息被脱敏时此值不会返回
	UserIsDesensitized *bool   `json:"user_is_desensitized,omitempty"` // 用户信息是否脱敏
}

type FileLikeBuilder

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

func NewFileLikeBuilder

func NewFileLikeBuilder() *FileLikeBuilder

func (*FileLikeBuilder) Build

func (builder *FileLikeBuilder) Build() *FileLike

func (*FileLikeBuilder) LastLikedTime

func (builder *FileLikeBuilder) LastLikedTime(lastLikedTime string) *FileLikeBuilder

用户最后点赞时间,秒级时间戳

示例值:1690857821

func (*FileLikeBuilder) UserAvatarUrl

func (builder *FileLikeBuilder) UserAvatarUrl(userAvatarUrl string) *FileLikeBuilder

用户头像,用户信息被脱敏时此值不会返回

示例值:https://foo.icon.com/xxxx

func (*FileLikeBuilder) UserEnName

func (builder *FileLikeBuilder) UserEnName(userEnName string) *FileLikeBuilder

用户英文名字,用户信息被脱敏时此值不会返回

示例值:San Zhang

func (*FileLikeBuilder) UserId

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

用户 ID

示例值:ou_3bbe8a09c20e89cce9bff989ed840674

func (*FileLikeBuilder) UserIsDesensitized

func (builder *FileLikeBuilder) UserIsDesensitized(userIsDesensitized bool) *FileLikeBuilder

用户信息是否脱敏

示例值:false

func (*FileLikeBuilder) UserName

func (builder *FileLikeBuilder) UserName(userName string) *FileLikeBuilder

用户名字,用户信息被脱敏时此值不会返回

示例值:张三

type GetPermissionPublicReq

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

type GetPermissionPublicReqBuilder

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

func NewGetPermissionPublicReqBuilder

func NewGetPermissionPublicReqBuilder() *GetPermissionPublicReqBuilder

func (*GetPermissionPublicReqBuilder) Build

func (*GetPermissionPublicReqBuilder) Token

文件的 token

示例值:doccnBKgoMyY5OMbUG6FioTXuBe

func (*GetPermissionPublicReqBuilder) Type

文件类型,需要与文件的 token 相匹配

示例值:doc

type GetPermissionPublicResp

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

func (*GetPermissionPublicResp) Success

func (resp *GetPermissionPublicResp) Success() bool

type GetPermissionPublicRespData

type GetPermissionPublicRespData struct {
	PermissionPublic *PermissionPublic `json:"permission_public,omitempty"` // 返回的文档公共设置
}

type MyLike

type MyLike struct {
	LastLikedTime *string `json:"last_liked_time,omitempty"` // 用户最后点赞时间,秒级时间戳
	FileToken     *string `json:"file_token,omitempty"`      // 点赞的文件 token
	FileType      *string `json:"file_type,omitempty"`       // 点赞的文件类型
	FileName      *string `json:"file_name,omitempty"`       // 点赞的文件名,无文件阅读权限时不返回此字段
	FileUrl       *string `json:"file_url,omitempty"`        // 点赞的文件链接,无文件阅读权限时不返回此字段
	FileIsDeleted *bool   `json:"file_is_deleted,omitempty"` // 点赞的文件是否已被删除
}

type MyLikeBuilder

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

func NewMyLikeBuilder

func NewMyLikeBuilder() *MyLikeBuilder

func (*MyLikeBuilder) Build

func (builder *MyLikeBuilder) Build() *MyLike

func (*MyLikeBuilder) FileIsDeleted

func (builder *MyLikeBuilder) FileIsDeleted(fileIsDeleted bool) *MyLikeBuilder

点赞的文件是否已被删除

示例值:false

func (*MyLikeBuilder) FileName

func (builder *MyLikeBuilder) FileName(fileName string) *MyLikeBuilder

点赞的文件名,无文件阅读权限时不返回此字段

示例值:title

func (*MyLikeBuilder) FileToken

func (builder *MyLikeBuilder) FileToken(fileToken string) *MyLikeBuilder

点赞的文件 token

示例值:J6Lddz22AovnqkxWEXBcUJIingx

func (*MyLikeBuilder) FileType

func (builder *MyLikeBuilder) FileType(fileType string) *MyLikeBuilder

点赞的文件类型

示例值:doc

func (*MyLikeBuilder) FileUrl

func (builder *MyLikeBuilder) FileUrl(fileUrl string) *MyLikeBuilder

点赞的文件链接,无文件阅读权限时不返回此字段

示例值:https://sample.feishu.cn/docs/doccnfYZzTlvXqZIGTdAHKabcef

func (*MyLikeBuilder) LastLikedTime

func (builder *MyLikeBuilder) LastLikedTime(lastLikedTime string) *MyLikeBuilder

用户最后点赞时间,秒级时间戳

示例值:1690857821

type PatchPermissionPublicReq

type PatchPermissionPublicReq struct {
	PermissionPublic *PermissionPublic `body:""`
	// contains filtered or unexported fields
}

type PatchPermissionPublicReqBuilder

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

func NewPatchPermissionPublicReqBuilder

func NewPatchPermissionPublicReqBuilder() *PatchPermissionPublicReqBuilder

func (*PatchPermissionPublicReqBuilder) Build

func (*PatchPermissionPublicReqBuilder) PermissionPublic

func (builder *PatchPermissionPublicReqBuilder) PermissionPublic(permissionPublic *PermissionPublic) *PatchPermissionPublicReqBuilder

func (*PatchPermissionPublicReqBuilder) Token

文件的 token

示例值:doccnBKgoMyY5OMbUG6FioTXuBe

func (*PatchPermissionPublicReqBuilder) Type

文件类型,需要与文件的 token 相匹配

示例值:doc

type PatchPermissionPublicResp

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

func (*PatchPermissionPublicResp) Success

func (resp *PatchPermissionPublicResp) Success() bool

type PatchPermissionPublicRespData

type PatchPermissionPublicRespData struct {
	PermissionPublic *PermissionPublic `json:"permission_public,omitempty"` // 本次更新后文档公共设置
}

type PermissionPublic

type PermissionPublic struct {
	ExternalAccessEntity     *string `json:"external_access_entity,omitempty"`     // 允许内容被分享到组织外
	SecurityEntity           *string `json:"security_entity,omitempty"`            // 谁可以创建副本、打印、下载
	CommentEntity            *string `json:"comment_entity,omitempty"`             // 谁可以评论
	ShareEntity              *string `json:"share_entity,omitempty"`               // 谁可以添加和管理协作者-组织维度
	ManageCollaboratorEntity *string `json:"manage_collaborator_entity,omitempty"` // 谁可以添加和管理协作者-协作者维度
	LinkShareEntity          *string `json:"link_share_entity,omitempty"`          // 链接分享设置
	CopyEntity               *string `json:"copy_entity,omitempty"`                // 谁可以复制内容
	LockSwitch               *bool   `json:"lock_switch,omitempty"`                // 节点是否已加锁,加锁之后不再继承父级页面的权限
}

type PermissionPublicBuilder

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

func NewPermissionPublicBuilder

func NewPermissionPublicBuilder() *PermissionPublicBuilder

func (*PermissionPublicBuilder) Build

func (builder *PermissionPublicBuilder) Build() *PermissionPublic

func (*PermissionPublicBuilder) CommentEntity

func (builder *PermissionPublicBuilder) CommentEntity(commentEntity string) *PermissionPublicBuilder

谁可以评论

示例值:anyone_can_view

func (*PermissionPublicBuilder) CopyEntity

func (builder *PermissionPublicBuilder) CopyEntity(copyEntity string) *PermissionPublicBuilder

谁可以复制内容

示例值:anyone_can_view

func (*PermissionPublicBuilder) ExternalAccessEntity

func (builder *PermissionPublicBuilder) ExternalAccessEntity(externalAccessEntity string) *PermissionPublicBuilder

允许内容被分享到组织外

示例值:open

func (*PermissionPublicBuilder) LinkShareEntity

func (builder *PermissionPublicBuilder) LinkShareEntity(linkShareEntity string) *PermissionPublicBuilder

链接分享设置

示例值:tenant_readable

func (*PermissionPublicBuilder) LockSwitch

func (builder *PermissionPublicBuilder) LockSwitch(lockSwitch bool) *PermissionPublicBuilder

节点是否已加锁,加锁之后不再继承父级页面的权限

示例值:false

func (*PermissionPublicBuilder) ManageCollaboratorEntity

func (builder *PermissionPublicBuilder) ManageCollaboratorEntity(manageCollaboratorEntity string) *PermissionPublicBuilder

谁可以添加和管理协作者-协作者维度

示例值:collaborator_can_view

func (*PermissionPublicBuilder) SecurityEntity

func (builder *PermissionPublicBuilder) SecurityEntity(securityEntity string) *PermissionPublicBuilder

谁可以创建副本、打印、下载

示例值:anyone_can_view

func (*PermissionPublicBuilder) ShareEntity

func (builder *PermissionPublicBuilder) ShareEntity(shareEntity string) *PermissionPublicBuilder

谁可以添加和管理协作者-组织维度

示例值:anyone

type SecureLabel

type SecureLabel struct {
	Id   *string `json:"id,omitempty"`   // 密级标签 ID
	Name *string `json:"name,omitempty"` // 密级标签名称
}

type SecureLabelBuilder

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

func NewSecureLabelBuilder

func NewSecureLabelBuilder() *SecureLabelBuilder

func (*SecureLabelBuilder) Build

func (builder *SecureLabelBuilder) Build() *SecureLabel

func (*SecureLabelBuilder) Id

func (builder *SecureLabelBuilder) Id(id string) *SecureLabelBuilder

密级标签 ID

示例值:7217780879644737540

func (*SecureLabelBuilder) Name

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

密级标签名称

示例值:L1

type V2

type V2 struct {
	PermissionPublic *permissionPublic // permission.public
}

func New

func New(config *larkcore.Config) *V2

Jump to

Keyboard shortcuts

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