service

package
v0.0.0-...-69bdcc1 Latest Latest
Warning

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

Go to latest
Published: Sep 23, 2023 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MaxHeaderSize = 5120
)

Variables

This section is empty.

Functions

func CountUser

func CountUser(ctx context.Context, user *dal.QueryUserParam) (int64, error)

func DeleteUser

func DeleteUser(ctx context.Context, user *UserBO) error

func SaveUser

func SaveUser(ctx context.Context, user *UserBO) error

func UpdateLoginIndex

func UpdateLoginIndex(ctx context.Context, user *UserBO) error

func UserBO2DO

func UserBO2DO(user *UserBO) *model.User

Types

type UserBO

type UserBO struct {
	ID       int64  `json:"id,omitempty"`
	Name     string `json:"name,omitempty"`
	Password string `json:"password,omitempty"`
	// Header 很小的头像先放库里存着,有条件再升级
	Header      string    `json:"header,omitempty"`
	Gender      string    `json:"gender,omitempty"`
	Role        string    `json:"role,omitempty"`
	Status      int64     `json:"status,omitempty"`
	Sign        string    `json:"sign,omitempty"`
	AuthVersion int64     `json:"auth_version"`
	UpdatedAt   time.Time `json:"updated_at,omitempty"`
}

func GetUserById

func GetUserById(ctx context.Context, id int64) (*UserBO, error)

func GetUserByName

func GetUserByName(ctx context.Context, name string) (*UserBO, error)

func QueryUser

func QueryUser(ctx context.Context, user *dal.QueryUserParam) ([]*UserBO, error)

func UserDO2BO

func UserDO2BO(user *model.User) *UserBO

func ValidateUser

func ValidateUser(ctx context.Context, tokenStr string) *UserBO

Jump to

Keyboard shortcuts

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