Documentation
¶
Index ¶
Constants ¶
View Source
const ( IdentityTypeEmail IdentityType = "EMAIL" CredentialTypePassword CredentialType = "PASSWORD" )
View Source
const AccessTokenTableName = "AccessTokens"
View Source
const FileGroupTableName = "FileGroups"
View Source
const FileGroupUserTableName = "FileGroupUsers"
View Source
const FileItemTableName = "FileItems"
View Source
const ShortLinkTableName = "ShortLinks"
View Source
const UserCredentialTableName = "UserCredentials"
View Source
const UserKeyTableName = "UserKeys"
View Source
const UserTableName = "Users"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AccessToken ¶
type AccessToken struct {
BaseModel
UserId uint64 `gorm:"column:userId;not null;index" json:"userId"`
Token string `gorm:"column:token;not null;index" json:"token"`
RefreshToken string `gorm:"column:refreshToken;not null;index" json:"refreshToken"`
TokenExpiredAt time.Time `gorm:"column:tokenExpiredAt;not null" json:"tokenExpiredAt"`
RefreshTokenExpiredAt time.Time `gorm:"column:refreshTokenExpiredAt;not null" json:"refreshTokenExpiredAt"`
User *User `gorm:"foreignKey:userId" json:"user,omitempty"`
}
func (*AccessToken) TableName ¶
func (m *AccessToken) TableName() string
type ArchiveType ¶
type ArchiveType string
const ( ArchiveTypeZIP ArchiveType = "ZIP" ArchiveTypeRAR ArchiveType = "RAR" ArchiveTypeTAR ArchiveType = "TAR" )
type CredentialType ¶
type CredentialType string
type FileGroup ¶
type FileGroup struct {
BaseModel
UserId uint64 `gorm:"column:userId;not null;index" json:"userId"`
TotalFiles int `gorm:"column:totalFiles;index" json:"totalFiles"`
ArchiveType ArchiveType `gorm:"column:archiveType;index" json:"archiveType"`
ArchivePasscode string `gorm:"column:archivePasscode" json:"archivePasscode"`
MaxDownload int `gorm:"column:maxDownload" json:"maxDownload"`
DeleteAtDownloadTimes int `gorm:"column:deleteAtDownloadTimes;index" json:"deleteAtDownloadTimes"`
ExpiredAt *time.Time `gorm:"column:expiredAt;index" json:"expiredAt"`
BundledAt *time.Time `gorm:"column:bundledAt;index" json:"bundledAt"`
User *User `gorm:"foreignKey:userId" json:"user,omitempty"`
FileKey string `gorm:"column:fileKey" json:"fileKey"`
FileItems []FileItem
}
type FileGroupUser ¶
type FileGroupUser struct {
BaseModel
FileGroupId uint64 `gorm:"column:fileGroupId;not null;index" json:"fileGroupId"`
UserId uint64 `gorm:"column:userId;not null;index" json:"userId"`
FileGroup *FileGroup `gorm:"foreignKey:fileGroupId" json:"fileGroup,omitempty"`
User *User `gorm:"foreignKey:userId" json:"useromitempty"`
}
func (*FileGroupUser) TableName ¶
func (m *FileGroupUser) TableName() string
type FileItem ¶
type FileItem struct {
BaseModel
FileGroupId uint64 `gorm:"column:fileGroupId;not null;index" json:"fileGroupId"`
Filename string `gorm:"column:fileName;not null;index" json:"fileName"`
Realname string `gorm:"column:realName;not null;index" json:"realName"`
PreviewAs PreviewAsType `gorm:"column:previewAs;not null;index" json:"previewAs"`
SizeInBytes int64 `gorm:"column:sizeInBytes" json:"sizeInBytes"`
FileGroup *FileGroup `gorm:"foreignKey:fileGroupId" json:"fileGroup,omitempty"`
}
type IdentityType ¶
type IdentityType string
type PreviewAsType ¶
type PreviewAsType string
const ( PreviewAsImage PreviewAsType = "IMAGE" PreviewAsDocument PreviewAsType = "DOCUMENT" PreviewAsAudio PreviewAsType = "AUDIO" PreviewAsVideo PreviewAsType = "VIDEO" PreviewAsArchive PreviewAsType = "ARCHIVE" PreviewAsFont PreviewAsType = "FONT" PreviewAsBinary PreviewAsType = "BINARY" )
type ShortLink ¶
type ShortLink struct {
BaseModel
FileGroupId uint64 `gorm:"column:fileGroupId;not null;index" json:"fileGroupId"`
ShortCode string `gorm:"column:shortCode;unique;not null;index" json:"shortCode"`
PIN string `gorm:"column:pin" json:"pin"`
FileGroup *FileGroup `gorm:"foreignKey:fileGroupId" json:"fileGroup,omitempty"`
}
type User ¶
type UserCredential ¶
type UserCredential struct {
BaseModel
UserId uint64 `gorm:"column:userId;not null;index" json:"userId"`
IdentityType IdentityType `gorm:"column:identityType;not null;index" json:"identityType"`
IdentityValue string `gorm:"column:identityValue;not null" json:"identityValue"`
CredentialType CredentialType `gorm:"column:credentialType;not null;index" json:"credentialType"`
CredentialValue string `gorm:"column:credentialValue;not null" json:"credentialValue"`
IsActive bool `gorm:"column:isActive;default:true;index" json:"isActive"`
User *User `gorm:"foreignKey:userId" json:"user,omitempty"`
}
func (*UserCredential) TableName ¶
func (m *UserCredential) TableName() string
type UserKey ¶
Click to show internal directories.
Click to hide internal directories.