uc

package
v1.2.1 Latest Latest
Warning

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

Go to latest
Published: Aug 20, 2021 License: AGPL-3.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FindUserById

func FindUserById(id string) (*apistructs.UserInfoDto, error)

func FindUserByIdWithDesensitize

func FindUserByIdWithDesensitize(id string) (*apistructs.UserInfoDto, error)

func GetToken

func GetToken(forceRefresh bool) (string, error)

Types

type Token

type Token struct {
	AccessToken string `json:"access_token"`
	ExpiresIn   int64  `json:"expires_in"`
	ExpiresAt   int64  `json:"expire_at"`
}

type UserInfo

type UserInfo struct {
	Name      string      `json:"name,omitempty"`
	Username  string      `json:"username,omitempty"`
	Nickname  string      `json:"nickname,omitempty"`
	AvatarUrl string      `json:"avatar_url,omitempty"`
	UserId    interface{} `json:"user_id,omitempty"`
}

func ListUserByIds

func ListUserByIds(userIds []string) ([]UserInfo, error)

userIds like user_id:12345, ... TODO 等 uc 2.0 支持。 目前未支持

func (*UserInfo) Convert

func (u *UserInfo) Convert() (string, error)

Deprecated

func (*UserInfo) UserName

func (u *UserInfo) UserName() string

Deprecated

type UserInfoDto

type UserInfoDto struct {
	AvatarUrl string      `json:"avatarUrl,omitempty"`
	Email     string      `json:"email,omitempty"`
	UserId    interface{} `json:"id,omitempty"`
	NickName  string      `json:"nickName,omitempty"`
	Phone     string      `json:"phone,omitempty"`
	RealName  string      `json:"realName,omitempty"`
	Username  string      `json:"username,omitempty"`
}

uc 2.0

func (*UserInfoDto) Convert

func (u *UserInfoDto) Convert() (string, error)

func (*UserInfoDto) GetUsername

func (u *UserInfoDto) GetUsername() string

Jump to

Keyboard shortcuts

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