aaa

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Aug 5, 2022 License: MIT Imports: 14 Imported by: 16

Documentation

Index

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 (
	CHECK  = "check"
	GRANT  = "grant"
	LOGIN  = "login"
	LOGOUT = "logout"
	SESSID = "sessid"
)
View Source
const (
	SECRET = "secret"
	PERIOD = "period"
	NUMBER = "number"

	TOKEN = "token"
)
View Source
const (
	BACKGROUND = "background"

	AVATAR = "avatar"
	GENDER = "gender"
	MOBILE = "mobile"
	EMAIL  = "email"

	CITY     = "city"
	COUNTRY  = "country"
	LANGUAGE = "language"
	PROVINCE = "province"
)
View Source
const (
	USERROLE = "userrole"
	USERNAME = "username"
	PASSWORD = "password"
	USERNICK = "usernick"
	USERZONE = "userzone"

	USER_CREATE = "user.create"

	INVITE = "invite"
)
View Source
const AAA = "aaa"
View Source
const ROLE = "role"
View Source
const (
	RSA = "rsa"
)
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: "认证模块"}

Functions

func Right(m *ice.Message, arg ...ice.Any) bool

func RoleRight

func RoleRight(m *ice.Message, userrole string, arg ...string) bool

func SessCheck

func SessCheck(m *ice.Message, sessid string) bool

func SessCreate

func SessCreate(m *ice.Message, username string) string

func TOTP_GET

func TOTP_GET(key string, num int, per int64) string

func UserInfo added in v1.2.9

func UserInfo(m *ice.Message, name ice.Any, key, meta string) (value string)

func UserLogin

func UserLogin(m *ice.Message, username, password string) bool

func UserLogout added in v1.3.0

func UserLogout(m *ice.Message)

func UserNick

func UserNick(m *ice.Message, username ice.Any) (nick string)

func UserRole

func UserRole(m *ice.Message, username ice.Any) (role string)

func UserRoot

func UserRoot(m *ice.Message, arg ...string) *ice.Message

func UserZone

func UserZone(m *ice.Message, username ice.Any) (zone string)

Types

This section is empty.

Jump to

Keyboard shortcuts

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