Documentation ¶
Index ¶
Constants ¶
View Source
const ( FolderTypeHotlink = "hotlink" FolderTypeBrowsable = "browsable" FolderTypeImageGallery = "gallery" FolderTypeVideoPlayer = "player" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Conn ¶
Conn maintains a connection to the database.
type Folder ¶
type Folder struct { ID int64 `gorm:"primaryKey" json:"id"` UUID string `gorm:"not null" json:"uuid"` Name string `gorm:"not null" json:"name"` Description string `gorm:"not null" json:"description"` CreatedAt time.Time `gorm:"not null" json:"created_at"` Type string `gorm:"not null" json:"type"` }
Folder corresponds to a folder on disk.
type User ¶
type User struct { ID int64 `gorm:"primaryKey" json:"id"` Email string `gorm:"not null;uniqueIndex" json:"email"` Password string `gorm:"not null" json:"-"` }
User corresponds to a user that can login to the admin page.
func (*User) Authenticate ¶
Authenticate compares the provided password to the one stored in the database. An error is returned if the values do not match.
func (*User) SetPassword ¶
SetPassword salts and hashes the user's password. It does not store the new value in the database.
Click to show internal directories.
Click to hide internal directories.