Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetExtension ¶
Types ¶
type AuthConfig ¶
type AuthConfig struct {
Enabled bool `yaml:"authentication" json:"authentication"`
}
func NewAuthConfig ¶
func NewAuthConfig(enabled bool) AuthConfig
type Config ¶
type Config struct {
App AppConfig `yaml:"server" json:"server"`
Storage StorageConfig `yaml:"storage" json:"storage"`
Auth AuthConfig `yaml:"auth" json:"auth"`
Logging LoggingConfig `yaml:"logging" json:"logging"`
}
func (*Config) ApplyOverrides ¶
type File ¶
type File struct {
ID uuid.UUID `json:"id"`
FolderID *uuid.UUID `json:"folder_id,omitempty"`
Name string `json:"name"`
Path string `json:"path"`
Size int64 `json:"size"`
Pin *string `json:"pin,omitempty"`
Extension string `json:"extension"`
MIMEType string `json:"mime_type"`
ModTime time.Time `json:"mod_time"`
CreatedAt time.Time `json:"created_at"`
}
type Folder ¶
type Folder struct {
ID uuid.UUID `json:"id" form:"id"`
Name string `json:"name" form:"name"`
Path string
PinCode *string `json:"pin_code,omitempty" form:"pin_code"`
CreatedAt time.Time `json:"created_at" form:"created_at"`
Size int64 `json:"size" form:"size"`
ParentID *uuid.UUID `json:"parent_id,omitempty" form:"parent_id"`
SubFolder []Folder `json:"folders" form:"folders"`
Files []File `json:"files" form:"files"`
}
type LoggingConfig ¶
type LoggingConfig struct {
Enabled bool `yaml:"logging" json:"logging"`
Level string `yaml:"logging_level" json:"logging_level"`
}
func NewLoggingConfig ¶
func NewLoggingConfig(enabled bool, level string) LoggingConfig
type StorageConfig ¶
type StorageConfig struct {
BasePath string `yaml:"base_path" json:"base_path"`
MaxFileSize int64 `yaml:"max_size" json:"max_size"`
}
func NewStorageConfig ¶
func NewStorageConfig(basePath string, maxFileSize int64) StorageConfig
type User ¶
type User struct {
ID uuid.UUID `gorm:"type:uuid;default:gen_random_uuid();primaryKey"`
UserName string `gorm:"column:username;unique;not null"`
Email string `gorm:"column:email;unique;not null"`
PasswordHash string `gorm:"column:password_hash;not null"`
CreatedAt time.Time `gorm:"column:created_at"`
}
Click to show internal directories.
Click to hide internal directories.