Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Allocation ¶
type Allocation struct {
UserID string `gorm:"priamry_key,size:32"`
ServerID string `gorm:"priamry_key"`
Port int `gorm:"not null,index"`
Password string `gorm:"not null"`
}
func (Allocation) TableName ¶
func (Allocation) TableName() string
type FlowRecord ¶
type FlowRecord struct {
UserID string `gorm:"priamry_key"`
ServerID string `gorm:"priamry_key"`
// Port is omitted since one user cannot have multiple ports on a server
StartTime int64 `gorm:"priamry_key"`
Flow int64 `gorm:"not null"`
}
func (FlowRecord) TableName ¶
func (FlowRecord) TableName() string
type User ¶
type User struct {
ID string `gorm:"priamry_key,size:32"`
Email string `gorm:"not null"`
Group string `gorm:"not null,DEFAULT:'default'"`
Time int64 `gorm:"not null,DEFAULT:current_timestamp"`
// These fields do not conform with 3NF but for performance just keep them here.
// Remember to update them once Group is changed.
QuotaFlow int64 `gorm:"not null"`
Expired int64 `gorm:"not null"`
Disabled bool `gorm:"not null"`
}
type VerifyCode ¶
type VerifyCode struct {
Email string `gorm:"priamry_key"`
Code string `gorm:"not null"`
Time int64 `gorm:"not null,DEFAULT:current_timestamp"`
}
func (VerifyCode) TableName ¶
func (VerifyCode) TableName() string
Click to show internal directories.
Click to hide internal directories.