v1

package
v0.0.0-...-c820190 Latest Latest
Warning

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

Go to latest
Published: Jun 25, 2023 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type UserDTO

type UserDTO struct {
	ID        int32     `json:"id"`
	Mobile    string    `json:"mobile"`
	NickName  string    `json:"nick_name"`
	Birthday  time.Time `gorm:"type:datetime"`
	Gender    string    `json:"gender"`
	Role      int32     `json:"role"`
	PassWord  string    `json:"password"`
	Token     string    `json:"token"`
	ExpiresAt int64     `json:"expires_at"`
}

type UserSrv

type UserSrv interface {
	MobileLogin(ctx context.Context, mobile, password string) (*UserDTO, error)
	Register(ctx context.Context, userDTO *UserDTO, codes string) (*UserDTO, error)
	Update(ctx context.Context, userDTO *UserDTO) error
	Get(ctx context.Context, userID int32) (*UserDTO, error)
	GetByMobile(ctx context.Context, mobile string) (*UserDTO, error)
	CheckPassWord(ctx context.Context, password, EncryptedPassword string) (bool, error)
}

func NewUser

func NewUser(data data.DataFactory, jwtOpts *options.JwtOptions) UserSrv

Jump to

Keyboard shortcuts

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