user

package
v0.0.0-...-7604275 Latest Latest
Warning

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

Go to latest
Published: Dec 11, 2022 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	GenderMale   = "1"
	GenderFemale = "2"
)

Variables

Functions

func ConvertUserToProtoUser

func ConvertUserToProtoUser(user User) *proto_build.User

func GetProtoUser

func GetProtoUser(db *gorm.DB, nickName string, password string) (*proto_build.User, error)

func GetProtoUserByUserId

func GetProtoUserByUserId(db *gorm.DB, userId uint64) (*proto_build.User, error)

func QueryProtoUser

func QueryProtoUser(db *gorm.DB, keyword string, page uint64, pageSize uint64) ([]*proto_build.User, *proto_build.Pager, error)

func UpdateUserAvatar

func UpdateUserAvatar(db *gorm.DB, userId uint64, avatarUrl string) error

func UpdateUserPassword

func UpdateUserPassword(db *gorm.DB, userId uint64, password string) error

Types

type User

type User model.User

func CreateUser

func CreateUser(db *gorm.DB, nickName string, password string, gender string, avatarUrl string, extra string) (*User, error)

Jump to

Keyboard shortcuts

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