Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrInvalidMac = errors.New("Mac mismatch")
View Source
var ErrUserNotActive = errors.New("User is not active")
View Source
var ErrUserNotFound = errors.New("User does not exist in db")
View Source
var PutUint16 = binary.BigEndian.PutUint16
View Source
var PutUint32 = binary.BigEndian.PutUint32
View Source
var PutUint64 = binary.BigEndian.PutUint64
View Source
var Uint32 = binary.BigEndian.Uint32
View Source
var Uint64 = binary.BigEndian.Uint64
Functions ¶
This section is empty.
Types ¶
type User ¶
type User struct { *UserInfo // contains filtered or unexported fields }
func (*User) DelSession ¶
type UserInfo ¶
type UserInfo struct { UID []byte // ALL of the following fields have to be accessed atomically SessionsCap uint32 UpRate int64 DownRate int64 UpCredit int64 DownCredit int64 ExpiryTime int64 }
for the ease of using json package
type Userpanel ¶
type Userpanel struct {
// contains filtered or unexported fields
}
func MakeUserpanel ¶
func (*Userpanel) GetAndActivateAdminUser ¶
func (*Userpanel) GetAndActivateUser ¶
GetUser is used to retrieve a user if s/he is active, or to retrieve the user's info from the db and mark it as an active user
func (*Userpanel) MakeController ¶
Click to show internal directories.
Click to hide internal directories.