ucclient

package
v1.3.1 Latest Latest
Warning

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

Go to latest
Published: Oct 14, 2021 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type UCClient

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

UCClient UC客户端

func NewUCClient

func NewUCClient() *UCClient

NewUCClient 初始化UC客户端

func (*UCClient) FindUsers

func (c *UCClient) FindUsers(ids []string) ([]User, error)

FindUsers 根据用户ID查找用户信息

func (*UCClient) FindUsersByKey

func (c *UCClient) FindUsersByKey(key string) ([]User, error)

FindUsersByKey 根据key查找用户,key可匹配用户名/邮箱/手机号

func (*UCClient) GetUser

func (c *UCClient) GetUser(userID string) (*User, error)

GetUser 获取用户详情

func (*UCClient) InvalidateServerToken

func (c *UCClient) InvalidateServerToken()

InvalidateServerToken 使 server token 失效

func (*UCClient) ListUCAuditsByEventTime

func (c *UCClient) ListUCAuditsByEventTime(ucAuditReq apistructs.UCAuditsListRequest) (*apistructs.UCAuditsListResponse, error)

ListUCAuditsByEventTime 根据时间获取uc的审计事件

func (*UCClient) ListUCAuditsByLastID

func (c *UCClient) ListUCAuditsByLastID(ucAuditReq apistructs.UCAuditsListRequest) (*apistructs.UCAuditsListResponse, error)

ListUCAuditsByLastID 根据lastID获取uc的审计事件

type User

type User struct {
	ID        uint64 `json:"user_id"`
	Name      string `json:"username"`
	Nick      string `json:"nickname"`
	AvatarURL string `json:"avatar_url"`
	Phone     string `json:"phone_number"`
	Email     string `json:"email"`
}

User 用户中心用户数据结构

Jump to

Keyboard shortcuts

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