Documentation
¶
Index ¶
Constants ¶
View Source
const TableNameDeleteQueue = "pikpak_delete_queue"
View Source
const TableNameFile = "pikpak_file"
View Source
const TableNameMasterAccount = "pikpak_master_account"
View Source
const TableNameRedeemCode = "pikpak_redeem_code"
View Source
const TableNameToken = "pikpak_token"
View Source
const TableNameUser = "pikpak_user"
View Source
const TableNameWorkerAccount = "pikpak_worker_account"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DeleteQueue ¶
type DeleteQueue struct {
WorkerUserID string `gorm:"column:worker_user_id;primaryKey" json:"worker_user_id"`
OriginalLinkHash string `gorm:"column:original_link_hash;primaryKey" json:"original_link_hash"`
Status string `gorm:"column:status;not null" json:"status"`
CreatedAt time.Time `gorm:"column:created_at;not null;default:CURRENT_TIMESTAMP" json:"created_at"`
NextTrigger time.Time `gorm:"column:next_trigger;not null;default:CURRENT_TIMESTAMP" json:"next_trigger"`
Ext string `gorm:"column:ext" json:"ext"`
}
DeleteQueue mapped from table <pikpak_delete_queue>
func (*DeleteQueue) TableName ¶
func (*DeleteQueue) TableName() string
TableName DeleteQueue's table name
type File ¶
type File struct {
AutoID int64 `gorm:"column:auto_id;primaryKey;autoIncrement:true" json:"auto_id"`
MasterUserID string `gorm:"column:master_user_id;not null" json:"master_user_id"`
WorkerUserID string `gorm:"column:worker_user_id;not null" json:"worker_user_id"`
FileID string `gorm:"column:file_id;not null" json:"file_id"`
TaskID string `gorm:"column:task_id;not null" json:"task_id"`
Status string `gorm:"column:status;not null" json:"status"`
IsDir bool `gorm:"column:is_dir;not null" json:"is_dir"`
Size int64 `gorm:"column:size;not null" json:"size"`
Name string `gorm:"column:name;not null" json:"name"`
CreatedAt time.Time `gorm:"column:created_at;not null;default:CURRENT_TIMESTAMP" json:"created_at"`
UpdatedAt time.Time `gorm:"column:updated_at;not null;default:CURRENT_TIMESTAMP" json:"updated_at"`
OriginalLinkHash string `gorm:"column:original_link_hash;not null" json:"original_link_hash"`
Error string `gorm:"column:error" json:"error"`
}
File mapped from table <pikpak_file>
type MasterAccount ¶
type MasterAccount struct {
UserID string `gorm:"column:user_id;primaryKey" json:"user_id"`
Email string `gorm:"column:email;not null" json:"email"`
Password string `gorm:"column:password;not null" json:"password"`
CreatedAt time.Time `gorm:"column:created_at;not null;default:CURRENT_TIMESTAMP" json:"created_at"`
UpdatedAt time.Time `gorm:"column:updated_at;not null;default:CURRENT_TIMESTAMP" json:"updated_at"`
}
MasterAccount mapped from table <pikpak_master_account>
func (*MasterAccount) TableName ¶
func (*MasterAccount) TableName() string
TableName MasterAccount's table name
type RedeemCode ¶ added in v0.3.0
type RedeemCode struct {
AutoID int64 `gorm:"column:auto_id;primaryKey;autoIncrement:true" json:"auto_id"`
Code string `gorm:"column:code;not null" json:"code"`
Status string `gorm:"column:status;not null;default:NOT_USED;comment:NOT_USED, USED, INVALID" json:"status"`
UsedUserID string `gorm:"column:used_user_id" json:"used_user_id"`
CreatedAt time.Time `gorm:"column:created_at;not null;default:CURRENT_TIMESTAMP" json:"created_at"`
UpdatedAt time.Time `gorm:"column:updated_at;not null;default:CURRENT_TIMESTAMP" json:"updated_at"`
Error string `gorm:"column:error" json:"error"`
}
RedeemCode mapped from table <pikpak_redeem_code>
func (*RedeemCode) TableName ¶ added in v0.3.0
func (*RedeemCode) TableName() string
TableName RedeemCode's table name
type SharedLink ¶
type SharedLink struct {
}
SharedLink mapped from table <pikpak_shared_link>
func (*SharedLink) TableName ¶
func (*SharedLink) TableName() string
TableName SharedLink's table name
type Token ¶
type Token struct {
UserID string `gorm:"column:user_id;primaryKey" json:"user_id"`
AccessToken string `gorm:"column:access_token;not null" json:"access_token"`
RefreshToken string `gorm:"column:refresh_token;not null" json:"refresh_token"`
Expiration time.Time `gorm:"column:expiration;not null" json:"expiration"`
CreatedAt time.Time `gorm:"column:created_at;not null;default:CURRENT_TIMESTAMP" json:"created_at"`
}
Token mapped from table <pikpak_token>
type User ¶
type User struct {
ID int32 `gorm:"column:id;primaryKey" json:"id"`
Name string `gorm:"column:name;not null" json:"name"`
PasswordHash string `gorm:"column:password_hash;not null" json:"password_hash"`
Email string `gorm:"column:email;not null" json:"email"`
CreatedAt time.Time `gorm:"column:created_at;not null;default:CURRENT_TIMESTAMP" json:"created_at"`
UpdatedAt time.Time `gorm:"column:updated_at;not null;default:CURRENT_TIMESTAMP" json:"updated_at"`
}
User mapped from table <pikpak_user>
type WorkerAccount ¶
type WorkerAccount struct {
UserID string `gorm:"column:user_id;primaryKey" json:"user_id"`
MasterUserID string `gorm:"column:master_user_id;not null" json:"master_user_id"`
Email string `gorm:"column:email;not null" json:"email"`
Password string `gorm:"column:password;not null" json:"password"`
UsedSize int64 `gorm:"column:used_size;not null" json:"used_size"`
LimitSize int64 `gorm:"column:limit_size;not null" json:"limit_size"`
PremiumExpiration time.Time `gorm:"column:premium_expiration;not null;default:2000-01-01 00:00:00" json:"premium_expiration"`
CreatedAt time.Time `gorm:"column:created_at;not null;default:CURRENT_TIMESTAMP" json:"created_at"`
UpdatedAt time.Time `gorm:"column:updated_at;not null;default:CURRENT_TIMESTAMP" json:"updated_at"`
InvalidUntil time.Time `gorm:"column:invalid_until;not null;default:2000-01-01 00:00:00" json:"invalid_until"`
}
WorkerAccount mapped from table <pikpak_worker_account>
func (*WorkerAccount) TableName ¶
func (*WorkerAccount) TableName() string
TableName WorkerAccount's table name
Click to show internal directories.
Click to hide internal directories.