Documentation ¶
Index ¶
- Constants
- Variables
- func RoleRight(m *ice.Message, userrole string, keys ...string) bool
- func SessCheck(m *ice.Message, sessid string)
- func SessCreate(m *ice.Message, username string) string
- func SessIsCli(m *ice.Message) bool
- func TOTP_GET(key string, num int, per int64) string
- func UserLogin(m *ice.Message, username, password string) bool
- func UserNick(m *ice.Message, username interface{}) (nick string)
- func UserRole(m *ice.Message, username interface{}) (role string)
- func UserRoot(m *ice.Message)
- func UserZone(m *ice.Message, username interface{}) (zone string)
Constants ¶
View Source
const ( ROOT = "root" TECH = "tech" VOID = "void" )
View Source
const ( BLACK = "black" WHITE = "white" RIGHT = "right" )
View Source
const ( IP = "ip" UA = "ua" )
View Source
const ( LOGIN = "login" LOGOUT = "logout" )
View Source
const ( SECRET = "secret" PERIOD = "period" NUMBER = "number" )
View Source
const ( AVATAR = "avatar" GENDER = "gender" MOBILE = "mobile" EMAIL = "email" CITY = "city" COUNTRY = "country" PROVINCE = "province" LANGUAGE = "language" BACKGROUND = "background" )
View Source
const ( USERZONE = "userzone" USERNICK = "usernick" USERROLE = "userrole" USERNAME = "username" PASSWORD = "password" )
View Source
const ( USER_CREATE = "user.create" USER_REMOVE = "user.remove" )
View Source
const AAA = "aaa"
View Source
const (
INVITE = "invite"
)
View Source
const ROLE = "role"
View Source
const SESS = "sess"
View Source
const (
SESS_CREATE = "sess.create"
)
View Source
const TOTP = "totp"
View Source
const USER = "user"
Variables ¶
View Source
var Index = &ice.Context{Name: AAA, Help: "认证模块", Commands: map[string]*ice.Command{ ice.CTX_INIT: {Hand: func(m *ice.Message, c *ice.Context, cmd string, arg ...string) { m.Rich(ROLE, nil, kit.Dict(kit.MDB_NAME, VOID, WHITE, kit.Dict(), BLACK, kit.Dict())) m.Rich(ROLE, nil, kit.Dict(kit.MDB_NAME, TECH, BLACK, kit.Dict(), WHITE, kit.Dict())) m.Load() m.Cmd(mdb.SEARCH, mdb.CREATE, USER, m.Prefix(USER)) }}, ice.CTX_EXIT: {Hand: func(m *ice.Message, c *ice.Context, cmd string, arg ...string) { m.Save() }}, }}
Functions ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.