Documentation ¶
Index ¶
Constants ¶
View Source
const ( // FullMsg 登录数量已满 FullMsg = "full" // FreeMsg 登录数量未满 FreeMsg = "free" // NoLimitMsg 没有登录限制 NoLimitMsg = "no limit" )
View Source
const ( PrivateUser // 1 表示只允许一个登录地 )
账户类型,PrivateUser的同时登录地限制为1,而SharedUser则没有限制
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ReqUser ¶
type ReqUser struct { Location string // contains filtered or unexported fields }
ReqUser 请求登录使用的临时用户
func ParseReqUser ¶
ParseReqUser 通过字符串创建ReqUser
type ValidUser ¶
type ValidUser struct {
// contains filtered or unexported fields
}
ValidUser 提供基本和轻量的账户系统 必须使用 ParseValidUser 函数进行构造
func ParseValidUser ¶
ParseValidUser 通过格式化的字符串构造新的ValidUser 标准格式化字符串为 id:password:speedlimit:logincount
func (*ValidUser) SpeedLimiter ¶
SpeedLimiter 该用户的速度控制器
Click to show internal directories.
Click to hide internal directories.