domain

package
v0.0.0-...-054b70b Latest Latest
Warning

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

Go to latest
Published: Jul 31, 2021 License: GPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ZXW_SESSION_TOKEN_PREFIX          = "ZST:"
	ZXW_SESSION_BIND_USER_PREFIX      = "ZSBU:"
	ZXW_SESSION_USER_PREFIX           = "ZSU:"
	ZXW_SESSION_USER_MAX_TOKEN_PREFIX = "ZXWUserMaxToken"
)
View Source
const (
	NoneScope uint64 = iota
	AdminScope
)
View Source
const (
	NonoAuth int = iota
	AuthPwd
	AuthCode
	AuthThirdparty
)
View Source
const (
	LoginTypeWeb int = iota
	LoginTypeApp
	LoginTypeWx
	LoginTypeAlipay
	LoginApplet
)

Variables

View Source
var (
	ERR_TOKEN_INVALID                  = errors.New("token is invalid!")
	ZXW_SESSION_USER_MAX_TOKEN_DEFAULT = 10
)
View Source
var (
	RedisSessionTimeoutWeb    = 30 * time.Minute
	RedisSessionTimeoutApp    = 24 * time.Hour
	RedisSessionTimeoutApplet = 7 * 24 * time.Hour
	RedisSessionTimeoutWx     = 5 * 52 * 168 * time.Hour
)

Functions

This section is empty.

Types

type Filed

type Filed struct {
	Condition string      `json:"condition"`
	Key       string      `json:"key"`
	Value     interface{} `json:"value"`
}

Filed 查询字段结构体

type Relate

type Relate struct {
	Value string
	Func  interface{}
}
type Search struct {
	Fields    []*Filed  `json:"fields"`
	Relations []*Relate `json:"relations"`
	OrderBy   string    `json:"order_by"`
	Sort      string    `json:"sort"`
	Limit     int       `json:"limit"`
	Offset    int       `json:"offset"`
}

Search 查询参数结构体

type SumRes

type SumRes struct {
	Total int64 `json:"total"`
}

type UserCredentials

type UserCredentials struct {
	UserId       string `json:"user_id" redis:"user_id"`
	LoginType    int    `json:"login_type" redis:"login_type"`
	AuthType     int    `json:"auth_type" redis:"auth_type"`
	CreationDate int64  `json:"creation_data" redis:"creation_data"`
	ExpiresIn    int    `json:"expires_in" redis:"expires_in"`
	Scope        uint64 `json:"scope" redis:"scope"`
	Token        string `json:"token" redis:"token"`
}

Jump to

Keyboard shortcuts

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