service

package
v0.0.0-...-5a65518 Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2024 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Init

func Init()

Types

type UserLoginDataCache

type UserLoginDataCache struct {
	*UserLoginRes
	LoginTime    int64  `json:"loginTime"` //登录时间
	ClientType   string `json:"clientType"`
	LoginTimeout int64  `json:"loginTimeout"` //登录过期时间
}

type UserLoginReq

type UserLoginReq struct {
	Phone string `json:"phone"`
	Code  string `json:"code"`
}

type UserLoginRes

type UserLoginRes struct {
	UserId   int64  `json:"userId"`
	Phone    string `json:"phone"`
	UserName string `json:"userName"`
	Token    string `json:"token"`
}

type UserLoginService

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

func NewUserLoginService

func NewUserLoginService(ctx *context.Context) *UserLoginService

func (*UserLoginService) GetUserLoginInfoByTokenFromCache

func (s *UserLoginService) GetUserLoginInfoByTokenFromCache(token string) (*UserLoginDataCache, error)

func (*UserLoginService) UserLogin

func (s *UserLoginService) UserLogin(req *UserLoginReq) (res *UserLoginRes, err error)

type UserService

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

func NewUserService

func NewUserService(ctx *context.Context) *UserService

func (*UserService) GetUser

func (u *UserService) GetUser(id int64) (res *model.User)

Jump to

Keyboard shortcuts

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