consts

package
v0.0.0-...-cc65f9c Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const HeaderAuthorizationAdminKey = "X-AACMS-Authorization"

HeaderAuthorizationAdminKey header管理后台鉴权key

View Source
const HeaderAuthorizationKey = "X-ACMS-Authorization"

HeaderAuthorizationKey header普通鉴权key

View Source
const LoginErrorCount = 5

LoginErrorCount 登录错误次数

View Source
const PageSize = 20

PageSize 每页默认长度

Variables

This section is empty.

Functions

This section is empty.

Types

type Activate

type Activate int

Activate 激活

const (
	// Activated 激活
	Activated Activate = 1
	// UnActivated 未激活
	UnActivated Activate = -1
)

func NewActivate

func NewActivate(val string) Activate

NewActivate 创建

func (Activate) MarshalText

func (a Activate) MarshalText() ([]byte, error)

MarshalText json格式返回

func (Activate) Str

func (a Activate) Str() string

Str 返回值

type Forbidden

type Forbidden int

Forbidden 禁用状态

const (
	// Available 可用
	Available Forbidden = 1
	// UnAvailable 不可用
	UnAvailable Forbidden = -1
)

func NewForbidden

func NewForbidden(val string) Forbidden

NewForbidden 创建

func (Forbidden) MarshalText

func (f Forbidden) MarshalText() ([]byte, error)

MarshalText json格式返回

func (Forbidden) Str

func (f Forbidden) Str() string

Str 返回值

type Gender

type Gender int

Gender 性别

const (
	// Unknown 未知
	Unknown Gender = iota
	// Male 男
	Male
	// Female 女
	Female
)

func NewGender

func NewGender(val string) Gender

NewGender 性别

func (Gender) MarshalText

func (g Gender) MarshalText() ([]byte, error)

MarshalText json格式返回

func (Gender) Str

func (g Gender) Str() string

Str 返回值

type Mode

type Mode int

Mode 注册方式

const (
	// Name 用户名
	Name Mode = 1
	// Email 邮箱
	Email Mode = 2
	// Mobile 手机号
	Mobile Mode = 3
	// Third 第三方
	Third Mode = 4
)

type Query

type Query struct {
	Page  int `form:"page"`
	Limit int `form:"limit"`
}

Query 查询

type Status

type Status int

Status 数据逻辑状态

const (
	// Normal 正常
	Normal Status = 1
	// Delete 删除
	Delete Status = -1
)

func (Status) MarshalText

func (st Status) MarshalText() ([]byte, error)

MarshalText json格式返回

func (Status) Str

func (st Status) Str() string

Str 返回值

func (Status) Val

func (st Status) Val() int

Val 实际值

Jump to

Keyboard shortcuts

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