larkpassport

package
v3.4.7 Latest Latest
Warning

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

Go to latest
Published: Jan 16, 2025 License: MIT Imports: 4 Imported by: 6

Documentation

Index

Constants

View Source
const (
	KiteUserID          = 1 // UserID
	KiteIdpCredentialID = 2 // IdpCredentialID
	KiteSessionUUID     = 3 // Session 标识符

)
View Source
const (
	UserIdTypeOpenId  = "open_id"  // open_id
	UserIdTypeUnionId = "union_id" // union_id
	UserIdTypeUserId  = "user_id"  // user_id
)
View Source
const (
	UserIdTypeQuerySessionOpenId  = "open_id"  // 用户的 open id
	UserIdTypeQuerySessionUnionId = "union_id" // 用户的 union id
	UserIdTypeQuerySessionUserId  = "user_id"  // 用户的 user id
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Credentials

type Credentials struct {
	Email *string `json:"email,omitempty"` // 邮箱

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

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

type CredentialsBuilder

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

func NewCredentialsBuilder

func NewCredentialsBuilder() *CredentialsBuilder

func (*CredentialsBuilder) Build

func (builder *CredentialsBuilder) Build() *Credentials

func (*CredentialsBuilder) Email

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

邮箱

示例值:q*****@qq.com

func (*CredentialsBuilder) Mobile

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

手机号

示例值:186*****01

func (*CredentialsBuilder) UserId

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

用户id

示例值:

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 Device added in v3.2.5

type Device struct {
	DeviceId *string `json:"device_id,omitempty"` // 当前设备ID

	LegacyDeviceId *string `json:"legacy_device_id,omitempty"` // 历史使用的设备ID
}

type DeviceBuilder added in v3.2.5

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

func NewDeviceBuilder added in v3.2.5

func NewDeviceBuilder() *DeviceBuilder

func (*DeviceBuilder) Build added in v3.2.5

func (builder *DeviceBuilder) Build() *Device

func (*DeviceBuilder) DeviceId added in v3.2.5

func (builder *DeviceBuilder) DeviceId(deviceId string) *DeviceBuilder

当前设备ID

示例值:1234

func (*DeviceBuilder) LegacyDeviceId added in v3.2.5

func (builder *DeviceBuilder) LegacyDeviceId(legacyDeviceId string) *DeviceBuilder

历史使用的设备ID

示例值:4567

type IdpCredential

type IdpCredential struct {
}

type IdpCredentialId

type IdpCredentialId struct {
	IdpCredentialId *string `json:"idp_credential_id,omitempty"` // idp侧租户唯一标识
}

type IdpCredentialIdBuilder

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

func NewIdpCredentialIdBuilder

func NewIdpCredentialIdBuilder() *IdpCredentialIdBuilder

func (*IdpCredentialIdBuilder) Build

func (builder *IdpCredentialIdBuilder) Build() *IdpCredentialId

func (*IdpCredentialIdBuilder) IdpCredentialId

func (builder *IdpCredentialIdBuilder) IdpCredentialId(idpCredentialId string) *IdpCredentialIdBuilder

idp侧租户唯一标识

示例值:

type LogoutSessionPathReqBodyBuilder added in v3.3.7

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

func NewLogoutSessionPathReqBodyBuilder added in v3.3.7

func NewLogoutSessionPathReqBodyBuilder() *LogoutSessionPathReqBodyBuilder

func (*LogoutSessionPathReqBodyBuilder) Build added in v3.3.7

func (*LogoutSessionPathReqBodyBuilder) IdpCredentialId added in v3.3.7

func (builder *LogoutSessionPathReqBodyBuilder) IdpCredentialId(idpCredentialId string) *LogoutSessionPathReqBodyBuilder

idp 侧的唯一标识

示例值:1

func (*LogoutSessionPathReqBodyBuilder) LogoutReason added in v3.3.7

func (builder *LogoutSessionPathReqBodyBuilder) LogoutReason(logoutReason int) *LogoutSessionPathReqBodyBuilder

登出原因

示例值:34: 修改密码;35: 登陆态失效;36: 密码过期

func (*LogoutSessionPathReqBodyBuilder) LogoutType added in v3.3.7

func (builder *LogoutSessionPathReqBodyBuilder) LogoutType(logoutType int) *LogoutSessionPathReqBodyBuilder

登出的方式

示例值:1

func (*LogoutSessionPathReqBodyBuilder) Sid added in v3.3.7

需要精确登出的 session 标识符

示例值:AAAAAAAAAANll6nQoIAAFA==

func (*LogoutSessionPathReqBodyBuilder) TerminalType added in v3.3.7

func (builder *LogoutSessionPathReqBodyBuilder) TerminalType(terminalType []int) *LogoutSessionPathReqBodyBuilder

登出的客户端类型,默认全部登出,1-桌面端,2-网页端,3-安卓移动端,4-Apple移动端 5-服务端 6-旧版小程序端 8-其他移动端

示例值:

func (*LogoutSessionPathReqBodyBuilder) UserId added in v3.3.7

user_id

示例值:1

type LogoutSessionReq added in v3.3.7

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

type LogoutSessionReqBody added in v3.3.7

type LogoutSessionReqBody struct {
	IdpCredentialId *string `json:"idp_credential_id,omitempty"` // idp 侧的唯一标识

	LogoutType *int `json:"logout_type,omitempty"` // 登出的方式

	TerminalType []int `json:"terminal_type,omitempty"` // 登出的客户端类型,默认全部登出,1-桌面端,2-网页端,3-安卓移动端,4-Apple移动端 5-服务端 6-旧版小程序端 8-其他移动端

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

	LogoutReason *int `json:"logout_reason,omitempty"` // 登出原因

	Sid *string `json:"sid,omitempty"` // 需要精确登出的 session 标识符
}

type LogoutSessionReqBodyBuilder added in v3.3.7

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

func NewLogoutSessionReqBodyBuilder added in v3.3.7

func NewLogoutSessionReqBodyBuilder() *LogoutSessionReqBodyBuilder

func (*LogoutSessionReqBodyBuilder) Build added in v3.3.7

func (*LogoutSessionReqBodyBuilder) IdpCredentialId added in v3.3.7

func (builder *LogoutSessionReqBodyBuilder) IdpCredentialId(idpCredentialId string) *LogoutSessionReqBodyBuilder

idp 侧的唯一标识

示例值:1

func (*LogoutSessionReqBodyBuilder) LogoutReason added in v3.3.7

func (builder *LogoutSessionReqBodyBuilder) LogoutReason(logoutReason int) *LogoutSessionReqBodyBuilder

登出原因

示例值:34: 修改密码;35: 登陆态失效;36: 密码过期

func (*LogoutSessionReqBodyBuilder) LogoutType added in v3.3.7

func (builder *LogoutSessionReqBodyBuilder) LogoutType(logoutType int) *LogoutSessionReqBodyBuilder

登出的方式

示例值:1

func (*LogoutSessionReqBodyBuilder) Sid added in v3.3.7

需要精确登出的 session 标识符

示例值:AAAAAAAAAANll6nQoIAAFA==

func (*LogoutSessionReqBodyBuilder) TerminalType added in v3.3.7

func (builder *LogoutSessionReqBodyBuilder) TerminalType(terminalType []int) *LogoutSessionReqBodyBuilder

登出的客户端类型,默认全部登出,1-桌面端,2-网页端,3-安卓移动端,4-Apple移动端 5-服务端 6-旧版小程序端 8-其他移动端

示例值:

func (*LogoutSessionReqBodyBuilder) UserId added in v3.3.7

user_id

示例值:1

type LogoutSessionReqBuilder added in v3.3.7

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

func NewLogoutSessionReqBuilder added in v3.3.7

func NewLogoutSessionReqBuilder() *LogoutSessionReqBuilder

func (*LogoutSessionReqBuilder) Body added in v3.3.7

func (*LogoutSessionReqBuilder) Build added in v3.3.7

func (builder *LogoutSessionReqBuilder) Build() *LogoutSessionReq

func (*LogoutSessionReqBuilder) UserIdType added in v3.3.7

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

user_id_type

示例值:open_id

type LogoutSessionResp added in v3.3.7

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

func (*LogoutSessionResp) Success added in v3.3.7

func (resp *LogoutSessionResp) Success() bool

type MaskSession

type MaskSession struct {
	CreateTime *string `json:"create_time,omitempty"` // 创建时间

	TerminalType *int `json:"terminal_type,omitempty"` // 客户端类型

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

	Sid *string `json:"sid,omitempty"` // 需要登出的 session 标识符
}

type MaskSessionBuilder

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

func NewMaskSessionBuilder

func NewMaskSessionBuilder() *MaskSessionBuilder

func (*MaskSessionBuilder) Build

func (builder *MaskSessionBuilder) Build() *MaskSession

func (*MaskSessionBuilder) CreateTime

func (builder *MaskSessionBuilder) CreateTime(createTime string) *MaskSessionBuilder

创建时间

示例值:1724233829

func (*MaskSessionBuilder) Sid added in v3.3.5

func (builder *MaskSessionBuilder) Sid(sid string) *MaskSessionBuilder

需要登出的 session 标识符

示例值:AAAAAAAAAANll6nQoIAAFA==

func (*MaskSessionBuilder) TerminalType

func (builder *MaskSessionBuilder) TerminalType(terminalType int) *MaskSessionBuilder

客户端类型

示例值:2

func (*MaskSessionBuilder) UserId

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

用户ID

示例值:ou_7dab8a3d3cdcc9da365777c7ad535d62

type QuerySessionPathReqBodyBuilder

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

func NewQuerySessionPathReqBodyBuilder

func NewQuerySessionPathReqBodyBuilder() *QuerySessionPathReqBodyBuilder

func (*QuerySessionPathReqBodyBuilder) Build

func (*QuerySessionPathReqBodyBuilder) UserIds

用户 ID

示例值:["47f621ff"]

type QuerySessionReq

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

type QuerySessionReqBody

type QuerySessionReqBody struct {
	UserIds []string `json:"user_ids,omitempty"` // 用户 ID
}

type QuerySessionReqBodyBuilder

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

func NewQuerySessionReqBodyBuilder

func NewQuerySessionReqBodyBuilder() *QuerySessionReqBodyBuilder

func (*QuerySessionReqBodyBuilder) Build

func (*QuerySessionReqBodyBuilder) UserIds

func (builder *QuerySessionReqBodyBuilder) UserIds(userIds []string) *QuerySessionReqBodyBuilder

用户 ID

示例值:["47f621ff"]

type QuerySessionReqBuilder

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

func NewQuerySessionReqBuilder

func NewQuerySessionReqBuilder() *QuerySessionReqBuilder

func (*QuerySessionReqBuilder) Body

该接口用于查询用户的登录信息

func (*QuerySessionReqBuilder) Build

func (builder *QuerySessionReqBuilder) Build() *QuerySessionReq

func (*QuerySessionReqBuilder) UserIdType

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

用户id类型

示例值:open_id

type QuerySessionResp

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

func (*QuerySessionResp) Success

func (resp *QuerySessionResp) Success() bool

type QuerySessionRespData

type QuerySessionRespData struct {
	MaskSessions []*MaskSession `json:"mask_sessions,omitempty"` // 用户登录信息
}

type V1 added in v3.1.0

type V1 struct {
	Session *session // 登录态
}

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