demo

package
v0.1.5 Latest Latest
Warning

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

Go to latest
Published: Feb 13, 2023 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var CHARS = []string{"a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z",
	"A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z",
	"1", "2", "3", "4", "5", "6", "7", "8", "9", "0"}
View Source
var UserID uint32

Functions

func RandAllString

func RandAllString(lenNum int) string

func SetTimerTask

func SetTimerTask()

func SetUserW

func SetUserW()

func StartSvc

func StartSvc()

func StopSvc

func StopSvc()

Types

type User

type User struct {
	ID           uint32
	UserName     string
	P            string
	NickName     string
	Sex          user.UserSex
	RegisterTime time.Time
	Picture      string
	PictureNum   int
	Token        string
}

type UserMap

type UserMap map[uint32]*User
var UserDB UserMap

func (*UserMap) NexUserID

func (u *UserMap) NexUserID() uint32

type UserMapName

type UserMapName map[string]uint32
var UserDBName UserMapName

type UserServerGRPC

type UserServerGRPC struct {
	user.UnimplementedUserServer
}

func (*UserServerGRPC) Cancellation

func (*UserServerGRPC) GetUserList

func (*UserServerGRPC) Login

func (u *UserServerGRPC) Login(ctx context.Context, req *user.LoginReq) (*user.LoginResp, error)

func (*UserServerGRPC) RegisterUser

func (*UserServerGRPC) UploadImg

func (u *UserServerGRPC) UploadImg(ctx context.Context, req *user.UploadImgReq) (*user.UploadImgResp, error)

func (*UserServerGRPC) UserInfo

func (u *UserServerGRPC) UserInfo(ctx context.Context, req *user.UserInfoReq) (*user.UserInfoResp, error)

type UserSimple

type UserSimple struct {
	ID           uint32
	UserName     string
	Sex          user.UserSex
	RegisterTime time.Time
	G            int
	T            int
	A            int
	W            int
}

type UserSortW

type UserSortW Users
var UserList UserSortW

func (UserSortW) Len

func (u UserSortW) Len() int

func (UserSortW) Less

func (u UserSortW) Less(i, j int) bool

func (UserSortW) Swap

func (u UserSortW) Swap(i, j int)

type Users

type Users []*UserSimple

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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