Documentation ¶
Index ¶
- func DelPassword(db orm.Ormer, user string) error
- func DelUser(db orm.Ormer, name string) error
- func GetDBPath() (string, error)
- func PKCS5Padding(origData []byte, blockSize int) []byte
- func PKCS5UnPadding(origData []byte) []byte
- func SetUsedAmount(db orm.Ormer, user string, service *parser.Service, ...) error
- func SetUserPassword(db orm.Ormer, user string, password string) error
- type UsedAmount
- type User
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DelPassword ¶
DelPassword 将指定user的password设置为null
func PKCS5Padding ¶
PKCS5Padding 将数据填充至合适的大小,以便加密算法处理
Types ¶
type UsedAmount ¶
type UsedAmount struct { Id int `orm:"auto"` Service string `orm:"size(50)"` Total int Upload int Download int Date time.Time `orm:"type(date)"` User *User `orm:"rel(fk);on_delete(cascade)"` }
用户的每日的流量使用记录,以service进行区分
func GetRecentUsedAmount ¶
GetRecentUsedAmount 返回date开始最近maxDays天的使用量数据 如果数量不足5天,则以最早一天的数据进行复制补足
Click to show internal directories.
Click to hide internal directories.