larkauthen

package
v3.4.6-beta.0 Latest Latest
Warning

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

Go to latest
Published: Dec 26, 2024 License: MIT Imports: 3 Imported by: 14

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CreateAccessTokenPathReqBodyBuilder

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

func NewCreateAccessTokenPathReqBodyBuilder

func NewCreateAccessTokenPathReqBodyBuilder() *CreateAccessTokenPathReqBodyBuilder

func (*CreateAccessTokenPathReqBodyBuilder) Build

func (*CreateAccessTokenPathReqBodyBuilder) Code

登录预授权码,调用[获取登录预授权码](https://open.feishu.cn/document/ukTMukTMukTM/ukzN4UjL5cDO14SO3gTN)接口获取

示例值:xMSldislSkdK

func (*CreateAccessTokenPathReqBodyBuilder) GrantType

授权类型,**固定值**

示例值:authorization_code

type CreateAccessTokenReq

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

type CreateAccessTokenReqBody

type CreateAccessTokenReqBody struct {
	GrantType *string `json:"grant_type,omitempty"` // 授权类型,**固定值**

	Code *string `json:"code,omitempty"` // 登录预授权码,调用[获取登录预授权码](https://open.feishu.cn/document/ukTMukTMukTM/ukzN4UjL5cDO14SO3gTN)接口获取
}

type CreateAccessTokenReqBodyBuilder

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

func NewCreateAccessTokenReqBodyBuilder

func NewCreateAccessTokenReqBodyBuilder() *CreateAccessTokenReqBodyBuilder

func (*CreateAccessTokenReqBodyBuilder) Build

func (*CreateAccessTokenReqBodyBuilder) Code

登录预授权码,调用[获取登录预授权码](https://open.feishu.cn/document/ukTMukTMukTM/ukzN4UjL5cDO14SO3gTN)接口获取

示例值:xMSldislSkdK

func (*CreateAccessTokenReqBodyBuilder) GrantType

授权类型,**固定值**

示例值:authorization_code

type CreateAccessTokenReqBuilder

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

func NewCreateAccessTokenReqBuilder

func NewCreateAccessTokenReqBuilder() *CreateAccessTokenReqBuilder

func (*CreateAccessTokenReqBuilder) Body

func (*CreateAccessTokenReqBuilder) Build

type CreateAccessTokenResp

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

func (*CreateAccessTokenResp) Success

func (resp *CreateAccessTokenResp) Success() bool

type CreateAccessTokenRespData

type CreateAccessTokenRespData struct {
	AccessToken *string `json:"access_token,omitempty"` // user_access_token,用于获取用户资源

	TokenType *string `json:"token_type,omitempty"` // token 类型

	ExpiresIn *int `json:"expires_in,omitempty"` // `access_token`的有效期,单位: 秒

	Name *string `json:"name,omitempty"` // 用户姓名

	EnName *string `json:"en_name,omitempty"` // 用户英文名称

	AvatarUrl *string `json:"avatar_url,omitempty"` // 用户头像

	AvatarThumb *string `json:"avatar_thumb,omitempty"` // 用户头像 72x72

	AvatarMiddle *string `json:"avatar_middle,omitempty"` // 用户头像 240x240

	AvatarBig *string `json:"avatar_big,omitempty"` // 用户头像 640x640

	OpenId *string `json:"open_id,omitempty"` // 用户在应用内的唯一标识

	UnionId *string `json:"union_id,omitempty"` // 用户统一ID

	Email *string `json:"email,omitempty"` // 用户邮箱

	EnterpriseEmail *string `json:"enterprise_email,omitempty"` // 企业邮箱,请先确保已在管理后台启用飞书邮箱服务

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

	Mobile *string `json:"mobile,omitempty"` // 用户手机号

	TenantKey *string `json:"tenant_key,omitempty"` // 当前企业标识

	RefreshExpiresIn *int `json:"refresh_expires_in,omitempty"` // `refresh_token` 的有效期,单位: 秒

	RefreshToken *string `json:"refresh_token,omitempty"` // 刷新用户 `access_token` 时使用的 token

	Sid *string `json:"sid,omitempty"` // 用户当前登录态session的唯一标识,为空则不返回
}

type CreateOidcAccessTokenPathReqBodyBuilder added in v3.0.30

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

func NewCreateOidcAccessTokenPathReqBodyBuilder added in v3.0.30

func NewCreateOidcAccessTokenPathReqBodyBuilder() *CreateOidcAccessTokenPathReqBodyBuilder

func (*CreateOidcAccessTokenPathReqBodyBuilder) Build added in v3.0.30

func (*CreateOidcAccessTokenPathReqBodyBuilder) Code added in v3.0.30

登录预授权码

示例值:xMSldislSkdK

func (*CreateOidcAccessTokenPathReqBodyBuilder) GrantType added in v3.0.30

授权类型,**固定值**

示例值:authorization_code

type CreateOidcAccessTokenReq added in v3.0.30

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

type CreateOidcAccessTokenReqBody added in v3.0.30

type CreateOidcAccessTokenReqBody struct {
	GrantType *string `json:"grant_type,omitempty"` // 授权类型,**固定值**

	Code *string `json:"code,omitempty"` // 登录预授权码
}

type CreateOidcAccessTokenReqBodyBuilder added in v3.0.30

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

func NewCreateOidcAccessTokenReqBodyBuilder added in v3.0.30

func NewCreateOidcAccessTokenReqBodyBuilder() *CreateOidcAccessTokenReqBodyBuilder

func (*CreateOidcAccessTokenReqBodyBuilder) Build added in v3.0.30

func (*CreateOidcAccessTokenReqBodyBuilder) Code added in v3.0.30

登录预授权码

示例值:xMSldislSkdK

func (*CreateOidcAccessTokenReqBodyBuilder) GrantType added in v3.0.30

授权类型,**固定值**

示例值:authorization_code

type CreateOidcAccessTokenReqBuilder added in v3.0.30

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

func NewCreateOidcAccessTokenReqBuilder added in v3.0.30

func NewCreateOidcAccessTokenReqBuilder() *CreateOidcAccessTokenReqBuilder

func (*CreateOidcAccessTokenReqBuilder) Body added in v3.0.30

func (*CreateOidcAccessTokenReqBuilder) Build added in v3.0.30

type CreateOidcAccessTokenResp added in v3.0.30

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

func (*CreateOidcAccessTokenResp) Success added in v3.0.30

func (resp *CreateOidcAccessTokenResp) Success() bool

type CreateOidcAccessTokenRespData added in v3.0.30

type CreateOidcAccessTokenRespData struct {
	AccessToken *string `json:"access_token,omitempty"` // user_access_token,用于获取用户资源和访问某些open api

	RefreshToken *string `json:"refresh_token,omitempty"` // 刷新用户 `access_token` 时使用的 token

	TokenType *string `json:"token_type,omitempty"` // token 类型,固定值

	ExpiresIn *int `json:"expires_in,omitempty"` // `access_token`的有效期,单位: 秒,一般是两个小时左右,需要以返回结果为准

	RefreshExpiresIn *int `json:"refresh_expires_in,omitempty"` // `refresh_token` 的有效期,单位: 秒,一般是30天左右,需要以返回结果为准

	Scope *string `json:"scope,omitempty"` // 用户授予app的权限全集
}

type CreateOidcRefreshAccessTokenPathReqBodyBuilder added in v3.0.30

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

func NewCreateOidcRefreshAccessTokenPathReqBodyBuilder added in v3.0.30

func NewCreateOidcRefreshAccessTokenPathReqBodyBuilder() *CreateOidcRefreshAccessTokenPathReqBodyBuilder

func (*CreateOidcRefreshAccessTokenPathReqBodyBuilder) Build added in v3.0.30

func (*CreateOidcRefreshAccessTokenPathReqBodyBuilder) GrantType added in v3.0.30

授权类型,**固定值**:

示例值:refresh_token

func (*CreateOidcRefreshAccessTokenPathReqBodyBuilder) RefreshToken added in v3.0.30

刷新 `user_access_token` 需要的凭证<br>获取user_access_token`接口和本接口均返回 `refresh_token`,**每次请求,请注意使用最新获取到的`refresh_token`**

示例值:ur-oQ0mMq6MCcueAv0pwx2fQQhxqv__CbLu6G8ySFwafeKww2Def2BJdOkW3.9gCFM.LBQgFri901QaqeuL

type CreateOidcRefreshAccessTokenReq added in v3.0.30

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

type CreateOidcRefreshAccessTokenReqBody added in v3.0.30

type CreateOidcRefreshAccessTokenReqBody struct {
	GrantType *string `json:"grant_type,omitempty"` // 授权类型,**固定值**:

	RefreshToken *string `json:"refresh_token,omitempty"` // 刷新 `user_access_token` 需要的凭证<br>获取user_access_token`接口和本接口均返回 `refresh_token`,**每次请求,请注意使用最新获取到的`refresh_token`**
}

type CreateOidcRefreshAccessTokenReqBodyBuilder added in v3.0.30

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

func NewCreateOidcRefreshAccessTokenReqBodyBuilder added in v3.0.30

func NewCreateOidcRefreshAccessTokenReqBodyBuilder() *CreateOidcRefreshAccessTokenReqBodyBuilder

func (*CreateOidcRefreshAccessTokenReqBodyBuilder) Build added in v3.0.30

func (*CreateOidcRefreshAccessTokenReqBodyBuilder) GrantType added in v3.0.30

授权类型,**固定值**:

示例值:refresh_token

func (*CreateOidcRefreshAccessTokenReqBodyBuilder) RefreshToken added in v3.0.30

刷新 `user_access_token` 需要的凭证<br>获取user_access_token`接口和本接口均返回 `refresh_token`,**每次请求,请注意使用最新获取到的`refresh_token`**

示例值:ur-oQ0mMq6MCcueAv0pwx2fQQhxqv__CbLu6G8ySFwafeKww2Def2BJdOkW3.9gCFM.LBQgFri901QaqeuL

type CreateOidcRefreshAccessTokenReqBuilder added in v3.0.30

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

func NewCreateOidcRefreshAccessTokenReqBuilder added in v3.0.30

func NewCreateOidcRefreshAccessTokenReqBuilder() *CreateOidcRefreshAccessTokenReqBuilder

func (*CreateOidcRefreshAccessTokenReqBuilder) Body added in v3.0.30

func (*CreateOidcRefreshAccessTokenReqBuilder) Build added in v3.0.30

type CreateOidcRefreshAccessTokenResp added in v3.0.30

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

func (*CreateOidcRefreshAccessTokenResp) Success added in v3.0.30

func (resp *CreateOidcRefreshAccessTokenResp) Success() bool

type CreateOidcRefreshAccessTokenRespData added in v3.0.30

type CreateOidcRefreshAccessTokenRespData struct {
	AccessToken *string `json:"access_token,omitempty"` // user_access_token,用于获取用户资源和访问某些open api

	RefreshToken *string `json:"refresh_token,omitempty"` // 刷新用户 `access_token` 时使用的 token

	TokenType *string `json:"token_type,omitempty"` // token 类型,固定值

	ExpiresIn *int `json:"expires_in,omitempty"` // `access_token`的有效期,单位: 秒,一般是两个小时左右,需要以返回结果为准

	RefreshExpiresIn *int `json:"refresh_expires_in,omitempty"` // `refresh_token` 的有效期,单位: 秒,一般是30天左右,需要以返回结果为准

	Scope *string `json:"scope,omitempty"` // 用户授予app的权限全集
}

type CreateRefreshAccessTokenPathReqBodyBuilder

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

func NewCreateRefreshAccessTokenPathReqBodyBuilder

func NewCreateRefreshAccessTokenPathReqBodyBuilder() *CreateRefreshAccessTokenPathReqBodyBuilder

func (*CreateRefreshAccessTokenPathReqBodyBuilder) Build

func (*CreateRefreshAccessTokenPathReqBodyBuilder) GrantType

授权类型,**固定值**:

示例值:refresh_token

func (*CreateRefreshAccessTokenPathReqBodyBuilder) RefreshToken

刷新 `user_access_token` 需要的凭证<br>获取user_access_token`接口和本接口均返回 `refresh_token`,**每次请求,请注意使用最新获取到的`refresh_token`**

示例值:ur-oQ0mMq6MCcueAv0pwx2fQQhxqv__CbLu6G8ySFwafeKww2Def2BJdOkW3.9gCFM.LBQgFri901QaqeuL

type CreateRefreshAccessTokenReq

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

type CreateRefreshAccessTokenReqBody

type CreateRefreshAccessTokenReqBody struct {
	GrantType *string `json:"grant_type,omitempty"` // 授权类型,**固定值**:

	RefreshToken *string `json:"refresh_token,omitempty"` // 刷新 `user_access_token` 需要的凭证<br>获取user_access_token`接口和本接口均返回 `refresh_token`,**每次请求,请注意使用最新获取到的`refresh_token`**
}

type CreateRefreshAccessTokenReqBodyBuilder

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

func NewCreateRefreshAccessTokenReqBodyBuilder

func NewCreateRefreshAccessTokenReqBodyBuilder() *CreateRefreshAccessTokenReqBodyBuilder

func (*CreateRefreshAccessTokenReqBodyBuilder) Build

func (*CreateRefreshAccessTokenReqBodyBuilder) GrantType

授权类型,**固定值**:

示例值:refresh_token

func (*CreateRefreshAccessTokenReqBodyBuilder) RefreshToken

刷新 `user_access_token` 需要的凭证<br>获取user_access_token`接口和本接口均返回 `refresh_token`,**每次请求,请注意使用最新获取到的`refresh_token`**

示例值:ur-oQ0mMq6MCcueAv0pwx2fQQhxqv__CbLu6G8ySFwafeKww2Def2BJdOkW3.9gCFM.LBQgFri901QaqeuL

type CreateRefreshAccessTokenReqBuilder

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

func NewCreateRefreshAccessTokenReqBuilder

func NewCreateRefreshAccessTokenReqBuilder() *CreateRefreshAccessTokenReqBuilder

func (*CreateRefreshAccessTokenReqBuilder) Body

func (*CreateRefreshAccessTokenReqBuilder) Build

type CreateRefreshAccessTokenResp

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

func (*CreateRefreshAccessTokenResp) Success

func (resp *CreateRefreshAccessTokenResp) Success() bool

type CreateRefreshAccessTokenRespData

type CreateRefreshAccessTokenRespData struct {
	AccessToken *string `json:"access_token,omitempty"` // user_access_token,用于获取用户资源

	TokenType *string `json:"token_type,omitempty"` // token 类型

	ExpiresIn *int `json:"expires_in,omitempty"` // `access_token`的有效期,单位: 秒

	Name *string `json:"name,omitempty"` // 用户姓名

	EnName *string `json:"en_name,omitempty"` // 用户英文名称

	AvatarUrl *string `json:"avatar_url,omitempty"` // 用户头像

	AvatarThumb *string `json:"avatar_thumb,omitempty"` // 用户头像 72x72

	AvatarMiddle *string `json:"avatar_middle,omitempty"` // 用户头像 240x240

	AvatarBig *string `json:"avatar_big,omitempty"` // 用户头像 640x640

	OpenId *string `json:"open_id,omitempty"` // 用户在应用内的唯一标识

	UnionId *string `json:"union_id,omitempty"` // 用户统一ID

	Email *string `json:"email,omitempty"` // 用户邮箱

	EnterpriseEmail *string `json:"enterprise_email,omitempty"` // 企业邮箱,请先确保已在管理后台启用飞书邮箱服务

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

	Mobile *string `json:"mobile,omitempty"` // 用户手机号

	TenantKey *string `json:"tenant_key,omitempty"` // 当前企业标识

	RefreshExpiresIn *int `json:"refresh_expires_in,omitempty"` // `refresh_token` 的有效期,单位: 秒

	RefreshToken *string `json:"refresh_token,omitempty"` // 刷新用户 `access_token` 时使用的 token

	Sid *string `json:"sid,omitempty"` // 用户当前登录态session的唯一标识,为空则不返回
}

type DepartmentId added in v3.0.29

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

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

type DepartmentIdBuilder added in v3.0.29

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

func NewDepartmentIdBuilder added in v3.0.29

func NewDepartmentIdBuilder() *DepartmentIdBuilder

func (*DepartmentIdBuilder) Build added in v3.0.29

func (builder *DepartmentIdBuilder) Build() *DepartmentId

func (*DepartmentIdBuilder) DepartmentId added in v3.0.29

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

示例值:

func (*DepartmentIdBuilder) OpenDepartmentId added in v3.0.29

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

示例值:

type GetUserInfoResp

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

func (*GetUserInfoResp) Success

func (resp *GetUserInfoResp) Success() bool

type GetUserInfoRespData

type GetUserInfoRespData struct {
	Name *string `json:"name,omitempty"` // 用户姓名

	EnName *string `json:"en_name,omitempty"` // 用户英文名称

	AvatarUrl *string `json:"avatar_url,omitempty"` // 用户头像

	AvatarThumb *string `json:"avatar_thumb,omitempty"` // 用户头像 72x72

	AvatarMiddle *string `json:"avatar_middle,omitempty"` // 用户头像 240x240

	AvatarBig *string `json:"avatar_big,omitempty"` // 用户头像 640x640

	OpenId *string `json:"open_id,omitempty"` // 用户在应用内的唯一标识

	UnionId *string `json:"union_id,omitempty"` // 用户统一ID

	Email *string `json:"email,omitempty"` // 用户邮箱

	EnterpriseEmail *string `json:"enterprise_email,omitempty"` // 企业邮箱,请先确保已在管理后台启用飞书邮箱服务

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

	Mobile *string `json:"mobile,omitempty"` // 用户手机号

	TenantKey *string `json:"tenant_key,omitempty"` // 当前企业标识

	EmployeeNo *string `json:"employee_no,omitempty"` // 用户工号
}

type TokenInfo added in v3.0.27

type TokenInfo struct {
	AccessToken *string `json:"access_token,omitempty"` // user_access_token,用于获取用户资源和访问某些open api

	RefreshToken *string `json:"refresh_token,omitempty"` // 刷新用户 `access_token` 时使用的 token

	TokenType *string `json:"token_type,omitempty"` // token 类型,固定值

	ExpiresIn *int `json:"expires_in,omitempty"` // `access_token`的有效期,单位: 秒,一般是两个小时左右,需要以返回结果为准

	RefreshExpiresIn *int `json:"refresh_expires_in,omitempty"` // `refresh_token` 的有效期,单位: 秒,一般是30天左右,需要以返回结果为准

	Scope *string `json:"scope,omitempty"` // 用户授予app的权限全集
}

type TokenInfoBuilder added in v3.0.27

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

func NewTokenInfoBuilder added in v3.0.27

func NewTokenInfoBuilder() *TokenInfoBuilder

func (*TokenInfoBuilder) AccessToken added in v3.0.27

func (builder *TokenInfoBuilder) AccessToken(accessToken string) *TokenInfoBuilder

user_access_token,用于获取用户资源和访问某些open api

示例值:u-5Dak9ZAxJ9tFUn8MaTD_BFM51FNdg5xzO0y010000HWb

func (*TokenInfoBuilder) Build added in v3.0.27

func (builder *TokenInfoBuilder) Build() *TokenInfo

func (*TokenInfoBuilder) ExpiresIn added in v3.0.27

func (builder *TokenInfoBuilder) ExpiresIn(expiresIn int) *TokenInfoBuilder

`access_token`的有效期,单位: 秒,一般是两个小时左右,需要以返回结果为准

示例值:7199

func (*TokenInfoBuilder) RefreshExpiresIn added in v3.0.27

func (builder *TokenInfoBuilder) RefreshExpiresIn(refreshExpiresIn int) *TokenInfoBuilder

`refresh_token` 的有效期,单位: 秒,一般是30天左右,需要以返回结果为准

示例值:2591999

func (*TokenInfoBuilder) RefreshToken added in v3.0.27

func (builder *TokenInfoBuilder) RefreshToken(refreshToken string) *TokenInfoBuilder

刷新用户 `access_token` 时使用的 token

示例值:ur-6EyFQZyplb9URrOx5NtT_HM53zrJg59HXwy040400G.e

func (*TokenInfoBuilder) Scope added in v3.0.27

func (builder *TokenInfoBuilder) Scope(scope string) *TokenInfoBuilder

用户授予app的权限全集

示例值:auth:user.id:read bitable:app

func (*TokenInfoBuilder) TokenType added in v3.0.27

func (builder *TokenInfoBuilder) TokenType(tokenType string) *TokenInfoBuilder

token 类型,固定值

示例值:Bearer

type UserAccessTokenInfo

type UserAccessTokenInfo struct {
	AccessToken *string `json:"access_token,omitempty"` // user_access_token,用于获取用户资源

	TokenType *string `json:"token_type,omitempty"` // token 类型

	ExpiresIn *int `json:"expires_in,omitempty"` // `access_token`的有效期,单位: 秒

	Name *string `json:"name,omitempty"` // 用户姓名

	EnName *string `json:"en_name,omitempty"` // 用户英文名称

	AvatarUrl *string `json:"avatar_url,omitempty"` // 用户头像

	AvatarThumb *string `json:"avatar_thumb,omitempty"` // 用户头像 72x72

	AvatarMiddle *string `json:"avatar_middle,omitempty"` // 用户头像 240x240

	AvatarBig *string `json:"avatar_big,omitempty"` // 用户头像 640x640

	OpenId *string `json:"open_id,omitempty"` // 用户在应用内的唯一标识

	UnionId *string `json:"union_id,omitempty"` // 用户统一ID

	Email *string `json:"email,omitempty"` // 用户邮箱

	EnterpriseEmail *string `json:"enterprise_email,omitempty"` // 企业邮箱,请先确保已在管理后台启用飞书邮箱服务

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

	Mobile *string `json:"mobile,omitempty"` // 用户手机号

	TenantKey *string `json:"tenant_key,omitempty"` // 当前企业标识

	RefreshExpiresIn *int `json:"refresh_expires_in,omitempty"` // `refresh_token` 的有效期,单位: 秒

	RefreshToken *string `json:"refresh_token,omitempty"` // 刷新用户 `access_token` 时使用的 token

	Sid *string `json:"sid,omitempty"` // 用户当前登录态session的唯一标识,为空则不返回
}

type UserAccessTokenInfoBuilder

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

func NewUserAccessTokenInfoBuilder

func NewUserAccessTokenInfoBuilder() *UserAccessTokenInfoBuilder

func (*UserAccessTokenInfoBuilder) AccessToken

func (builder *UserAccessTokenInfoBuilder) AccessToken(accessToken string) *UserAccessTokenInfoBuilder

user_access_token,用于获取用户资源

示例值:

func (*UserAccessTokenInfoBuilder) AvatarBig

func (builder *UserAccessTokenInfoBuilder) AvatarBig(avatarBig string) *UserAccessTokenInfoBuilder

用户头像 640x640

示例值:

func (*UserAccessTokenInfoBuilder) AvatarMiddle

func (builder *UserAccessTokenInfoBuilder) AvatarMiddle(avatarMiddle string) *UserAccessTokenInfoBuilder

用户头像 240x240

示例值:

func (*UserAccessTokenInfoBuilder) AvatarThumb

func (builder *UserAccessTokenInfoBuilder) AvatarThumb(avatarThumb string) *UserAccessTokenInfoBuilder

用户头像 72x72

示例值:

func (*UserAccessTokenInfoBuilder) AvatarUrl

func (builder *UserAccessTokenInfoBuilder) AvatarUrl(avatarUrl string) *UserAccessTokenInfoBuilder

用户头像

示例值:

func (*UserAccessTokenInfoBuilder) Build

func (*UserAccessTokenInfoBuilder) Email

用户邮箱

示例值:

func (*UserAccessTokenInfoBuilder) EnName

用户英文名称

示例值:

func (*UserAccessTokenInfoBuilder) EnterpriseEmail

func (builder *UserAccessTokenInfoBuilder) EnterpriseEmail(enterpriseEmail string) *UserAccessTokenInfoBuilder

企业邮箱,请先确保已在管理后台启用飞书邮箱服务

示例值:

func (*UserAccessTokenInfoBuilder) ExpiresIn

func (builder *UserAccessTokenInfoBuilder) ExpiresIn(expiresIn int) *UserAccessTokenInfoBuilder

`access_token`的有效期,单位: 秒

示例值:

func (*UserAccessTokenInfoBuilder) Mobile

用户手机号

示例值:

func (*UserAccessTokenInfoBuilder) Name

用户姓名

示例值:

func (*UserAccessTokenInfoBuilder) OpenId

用户在应用内的唯一标识

示例值:

func (*UserAccessTokenInfoBuilder) RefreshExpiresIn

func (builder *UserAccessTokenInfoBuilder) RefreshExpiresIn(refreshExpiresIn int) *UserAccessTokenInfoBuilder

`refresh_token` 的有效期,单位: 秒

示例值:

func (*UserAccessTokenInfoBuilder) RefreshToken

func (builder *UserAccessTokenInfoBuilder) RefreshToken(refreshToken string) *UserAccessTokenInfoBuilder

刷新用户 `access_token` 时使用的 token

示例值:

func (*UserAccessTokenInfoBuilder) Sid

用户当前登录态session的唯一标识,为空则不返回

示例值:

func (*UserAccessTokenInfoBuilder) TenantKey

func (builder *UserAccessTokenInfoBuilder) TenantKey(tenantKey string) *UserAccessTokenInfoBuilder

当前企业标识

示例值:

func (*UserAccessTokenInfoBuilder) TokenType

func (builder *UserAccessTokenInfoBuilder) TokenType(tokenType string) *UserAccessTokenInfoBuilder

token 类型

示例值:

func (*UserAccessTokenInfoBuilder) UnionId

用户统一ID

示例值:

func (*UserAccessTokenInfoBuilder) UserId

用户 user_id

示例值:

type UserInfo

type UserInfo struct {
	Name *string `json:"name,omitempty"` // 用户姓名

	EnName *string `json:"en_name,omitempty"` // 用户英文名称

	AvatarUrl *string `json:"avatar_url,omitempty"` // 用户头像

	AvatarThumb *string `json:"avatar_thumb,omitempty"` // 用户头像 72x72

	AvatarMiddle *string `json:"avatar_middle,omitempty"` // 用户头像 240x240

	AvatarBig *string `json:"avatar_big,omitempty"` // 用户头像 640x640

	OpenId *string `json:"open_id,omitempty"` // 用户在应用内的唯一标识

	UnionId *string `json:"union_id,omitempty"` // 用户统一ID

	Email *string `json:"email,omitempty"` // 用户邮箱

	EnterpriseEmail *string `json:"enterprise_email,omitempty"` // 企业邮箱,请先确保已在管理后台启用飞书邮箱服务

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

	Mobile *string `json:"mobile,omitempty"` // 用户手机号

	TenantKey *string `json:"tenant_key,omitempty"` // 当前企业标识

	EmployeeNo *string `json:"employee_no,omitempty"` // 用户工号
}

type UserInfoBuilder

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

func NewUserInfoBuilder

func NewUserInfoBuilder() *UserInfoBuilder

func (*UserInfoBuilder) AvatarBig

func (builder *UserInfoBuilder) AvatarBig(avatarBig string) *UserInfoBuilder

用户头像 640x640

示例值:www.feishu.cn/avatar/icon

func (*UserInfoBuilder) AvatarMiddle

func (builder *UserInfoBuilder) AvatarMiddle(avatarMiddle string) *UserInfoBuilder

用户头像 240x240

示例值:www.feishu.cn/avatar/icon

func (*UserInfoBuilder) AvatarThumb

func (builder *UserInfoBuilder) AvatarThumb(avatarThumb string) *UserInfoBuilder

用户头像 72x72

示例值:www.feishu.cn/avatar/icon

func (*UserInfoBuilder) AvatarUrl

func (builder *UserInfoBuilder) AvatarUrl(avatarUrl string) *UserInfoBuilder

用户头像

示例值:www.feishu.cn/avatar/icon

func (*UserInfoBuilder) Build

func (builder *UserInfoBuilder) Build() *UserInfo

func (*UserInfoBuilder) Email

func (builder *UserInfoBuilder) Email(email string) *UserInfoBuilder

用户邮箱

示例值:zhangsan@feishu.cn

func (*UserInfoBuilder) EmployeeNo

func (builder *UserInfoBuilder) EmployeeNo(employeeNo string) *UserInfoBuilder

用户工号

示例值:111222333

func (*UserInfoBuilder) EnName

func (builder *UserInfoBuilder) EnName(enName string) *UserInfoBuilder

用户英文名称

示例值:zhangsan

func (*UserInfoBuilder) EnterpriseEmail

func (builder *UserInfoBuilder) EnterpriseEmail(enterpriseEmail string) *UserInfoBuilder

企业邮箱,请先确保已在管理后台启用飞书邮箱服务

示例值:zhangsan@feishu.cn

func (*UserInfoBuilder) Mobile

func (builder *UserInfoBuilder) Mobile(mobile string) *UserInfoBuilder

用户手机号

示例值:+86130002883xx

func (*UserInfoBuilder) Name

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

用户姓名

示例值:zhangsan

func (*UserInfoBuilder) OpenId

func (builder *UserInfoBuilder) OpenId(openId string) *UserInfoBuilder

用户在应用内的唯一标识

示例值:ou-caecc734c2e3328a62489fe0648c4b98779515d3

func (*UserInfoBuilder) TenantKey

func (builder *UserInfoBuilder) TenantKey(tenantKey string) *UserInfoBuilder

当前企业标识

示例值:736588c92lxf175d

func (*UserInfoBuilder) UnionId

func (builder *UserInfoBuilder) UnionId(unionId string) *UserInfoBuilder

用户统一ID

示例值:on-d89jhsdhjsajkda7828enjdj328ydhhw3u43yjhdj

func (*UserInfoBuilder) UserId

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

用户 user_id

示例值:5d9bdxxx

type V1 added in v3.1.0

type V1 struct {
	AccessToken            *accessToken            // access_token
	OidcAccessToken        *oidcAccessToken        // oidc.access_token
	OidcRefreshAccessToken *oidcRefreshAccessToken // oidc.refresh_access_token
	RefreshAccessToken     *refreshAccessToken     // refresh_access_token
	UserInfo               *userInfo               // user_info
}

func New added in v3.1.0

func New(config *larkcore.Config) *V1

Jump to

Keyboard shortcuts

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