model

package
v1.6.0-alpha Latest Latest
Warning

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

Go to latest
Published: Jul 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 added in v1.1.0

func CheckName(name string) bool

func CheckSex added in v1.1.0

func CheckSex(sex int64) bool

func CheckSexS added in v1.1.0

func CheckSexS(sexstr string) (int64, bool)

func CheckUid added in v1.1.0

func CheckUid(uid int64) bool

func CheckUidS added in v1.1.0

func CheckUidS(uidstr string) (int64, bool)

func GetRedisKey

func GetRedisKey(uid int64) string

func GetUid added in v1.1.0

func GetUid() int64

func GetUidMax added in v1.1.0

func GetUidMax() int64

func InitUidGenerator added in v1.1.0

func InitUidGenerator()

func SetUidMax added in v1.1.0

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