model

package
v1.5.1 Latest Latest
Warning

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

Go to latest
Published: Jun 4, 2020 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var CfgPath = ""
View Source
var ErrArgumentError = errors.New("argument error!")
View Source
var ErrFailedCreate = errors.New("failed to create!")
View Source
var ErrFailedCreateData = fmt.Errorf("data:%w", ErrFailedCreate)
View Source
var ErrInternalError = errors.New("internal error!")
View Source
var ErrNameError = fmt.Errorf("name:%w", ErrArgumentError)
View Source
var ErrNotFound = errors.New("not found!")
View Source
var ErrNotFoundData = fmt.Errorf("data:%w", ErrNotFound)
View Source
var ErrSexError = fmt.Errorf("sex:%w", ErrArgumentError)
View Source
var ErrUidError = fmt.Errorf("uid:%w", ErrArgumentError)

Functions

func CheckName

func CheckName(name string) bool

func CheckSex

func CheckSex(sex int64) bool

func CheckSexS

func CheckSexS(sexstr string) (int64, bool)

func CheckUid

func CheckUid(uid int64) bool

func CheckUidS

func CheckUidS(uidstr string) (int64, bool)

func GetRedisKey

func GetRedisKey(uid int64) string

func GetUid

func GetUid() int64

func GetUidMax

func GetUidMax() int64

func InitUidGenerator

func InitUidGenerator()

func SetUidMax

func SetUidMax(max int64)

Types

type PingCount

type PingCount int64

type PingType

type PingType string
const (
	HTTP PingType = "http"
	GRPC PingType = "grpc"
)

type User

type User struct {
	Uid  int64  `redis:"uid"`
	Name string `redis:"name"`
	Sex  int64  `redis:"sex"`
}

Jump to

Keyboard shortcuts

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