Documentation ¶
Index ¶
- type APIToken
- type Artist
- type ArtistAlias
- type BlogEntry
- type BoilingDB
- type Boolean
- type ColumnSelector
- type DB
- func (db *DB) AddReleaseProperty(key string) error
- func (db *DB) AutocompleteArtistTags(s string) ([]string, error)
- func (db *DB) AutocompleteArtists(s string) ([]Artist, error)
- func (db *DB) AutocompleteRecordLabels(s string) ([]RecordLabel, error)
- func (db *DB) AutocompleteReleaseGroupTags(s string) ([]string, error)
- func (db *DB) AutocompleteReleaseGroups(s string) ([]ReleaseGroup, error)
- func (db *DB) AutocompleteReleaseTags(s string) ([]string, error)
- func (db *DB) Close() error
- func (db *DB) DeleteBlogEntry(id int) error
- func (db *DB) DeleteRelease(id int) error
- func (db *DB) DeleteTorrent(id int) error
- func (db *DB) GenerateNewPasskeyForUser(id int) (string, error)
- func (db *DB) GetAllFormats() (map[int]Format, error)
- func (db *DB) GetAllLeechTypes() (map[int]string, error)
- func (db *DB) GetAllMedia() (map[int]string, error)
- func (db *DB) GetAllPasskeysForUser(id int) ([]Passkey, error)
- func (db *DB) GetAllPrivileges() (map[int]string, error)
- func (db *DB) GetAllReleaseGroupRoles() (map[int]string, error)
- func (db *DB) GetAllReleaseGroupTypes() (map[int]string, error)
- func (db *DB) GetAllReleaseProperties() (map[int]string, error)
- func (db *DB) GetArtist(id int) (*Artist, error)
- func (db *DB) GetBlogEntries(limit, offset int) ([]BlogEntry, error)
- func (db *DB) GetBlogEntry(id int) (*BlogEntry, error)
- func (db *DB) GetPasskeyForUser(id int) (*Passkey, error)
- func (db *DB) GetRecordLabel(id int) (*RecordLabel, error)
- func (db *DB) GetRelease(id int) (*Release, error)
- func (db *DB) GetReleaseGroup(id int) (*ReleaseGroup, error)
- func (db *DB) GetToken(token string) (*APIToken, error)
- func (db *DB) GetTorrent(id int) (*Torrent, error)
- func (db *DB) GetUser(id int) (*User, error)
- func (db *DB) InsertArtist(artist *Artist) error
- func (db *DB) InsertBlogEntry(post *BlogEntry) error
- func (db *DB) InsertRecordLabel(label *RecordLabel) error
- func (db *DB) InsertRelease(release *Release) error
- func (db *DB) InsertReleaseGroup(group *ReleaseGroup) error
- func (db *DB) InsertTokenForUser(u User) (*APIToken, error)
- func (db *DB) InsertTorrent(torrent *Torrent) error
- func (db *DB) LoginAndGetUser(username, password string) (*User, error)
- func (db *DB) PopulateReleaseGroups(artist *Artist) error
- func (db *DB) PopulateReleases(group *ReleaseGroup) error
- func (db *DB) PopulateTorrents(release *Release) error
- func (db *DB) PopulateUserPrivileges(u *User) error
- func (db *DB) SearchReleaseGroups(q *Query, offset, limit int) ([]ReleaseGroup, error)
- func (db *DB) SetReleaseProperty(id int, k, v string) error
- func (db *DB) SignUpUser(username, password, email string) error
- func (db *DB) UpdateBlogEntry(post BlogEntry) error
- func (db *DB) UpdateUserAddPrivileges(id int, privileges []int) error
- func (db *DB) UpdateUserDeltaUpDown(id, deltaUp, deltaDown int) error
- func (db *DB) UpdateUserSetLastAccess(id int, lastAccess time.Time) error
- func (db *DB) UpdateUserSetLastLogin(id int, lastLogin time.Time) error
- type Format
- type Passkey
- type Query
- type RecordLabel
- type Release
- type ReleaseGroup
- type RoledArtist
- type RoledReleaseGroup
- type Sorter
- type Torrent
- type User
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Artist ¶
type Artist struct { ID int Name string Aliases []ArtistAlias ReleaseGroups []RoledReleaseGroup Added time.Time AddedBy User Bio sql.NullString Tags []string }
type BoilingDB ¶
type BoilingDB interface { Close() error SignUpUser(username, password, email string) error LoginAndGetUser(username, password string) (*User, error) GetUser(id int) (*User, error) UpdateUserDeltaUpDown(id, deltaUp, deltaDown int) error UpdateUserSetLastAccess(id int, lastAccess time.Time) error UpdateUserSetLastLogin(id int, lastLogin time.Time) error UpdateUserAddPrivileges(id int, privileges []int) error PopulateUserPrivileges(u *User) error GetPasskeyForUser(id int) (*Passkey, error) GetAllPasskeysForUser(id int) ([]Passkey, error) GenerateNewPasskeyForUser(id int) (string, error) InsertTokenForUser(u User) (*APIToken, error) GetToken(token string) (*APIToken, error) InsertBlogEntry(post *BlogEntry) error GetBlogEntry(id int) (*BlogEntry, error) UpdateBlogEntry(post BlogEntry) error DeleteBlogEntry(id int) error GetBlogEntries(limit, offset int) ([]BlogEntry, error) AutocompleteArtists(s string) ([]Artist, error) AutocompleteArtistTags(s string) ([]string, error) GetArtist(id int) (*Artist, error) PopulateReleaseGroups(artist *Artist) error InsertArtist(artist *Artist) error GetAllPrivileges() (map[int]string, error) GetAllFormats() (map[int]Format, error) GetAllMedia() (map[int]string, error) GetAllReleaseGroupRoles() (map[int]string, error) GetAllLeechTypes() (map[int]string, error) GetAllReleaseProperties() (map[int]string, error) AddReleaseProperty(key string) error AutocompleteRecordLabels(s string) ([]RecordLabel, error) GetRecordLabel(id int) (*RecordLabel, error) InsertRecordLabel(label *RecordLabel) error AutocompleteReleaseTags(s string) ([]string, error) InsertRelease(release *Release) error SetReleaseProperty(id int, k, v string) error GetRelease(id int) (*Release, error) DeleteRelease(id int) error PopulateTorrents(release *Release) error AutocompleteReleaseGroups(s string) ([]ReleaseGroup, error) AutocompleteReleaseGroupTags(s string) ([]string, error) GetAllReleaseGroupTypes() (map[int]string, error) GetReleaseGroup(id int) (*ReleaseGroup, error) InsertReleaseGroup(group *ReleaseGroup) error PopulateReleases(group *ReleaseGroup) error SearchReleaseGroups(q *Query, offset, limit int) ([]ReleaseGroup, error) }
type Boolean ¶
type Boolean interface {
// contains filtered or unexported methods
}
func Eq ¶
func Eq(column ColumnSelector, v interface{}) Boolean
func Neq ¶
func Neq(column ColumnSelector, v interface{}) Boolean
type ColumnSelector ¶
type ColumnSelector interface {
// contains filtered or unexported methods
}
func ReleaseGroupAddedSelector ¶
func ReleaseGroupAddedSelector() ColumnSelector
func ReleaseGroupReleaseDateSelector ¶
func ReleaseGroupReleaseDateSelector() ColumnSelector
func ReleaseGroupTypeSelector ¶
func ReleaseGroupTypeSelector() ColumnSelector
type DB ¶
type DB struct {
// contains filtered or unexported fields
}
func (*DB) AddReleaseProperty ¶
func (*DB) AutocompleteArtistTags ¶
func (*DB) AutocompleteRecordLabels ¶
func (db *DB) AutocompleteRecordLabels(s string) ([]RecordLabel, error)
func (*DB) AutocompleteReleaseGroupTags ¶
func (*DB) AutocompleteReleaseGroups ¶
func (db *DB) AutocompleteReleaseGroups(s string) ([]ReleaseGroup, error)
func (*DB) AutocompleteReleaseTags ¶
func (*DB) DeleteBlogEntry ¶
func (*DB) DeleteRelease ¶
func (*DB) DeleteTorrent ¶
func (*DB) GenerateNewPasskeyForUser ¶
func (*DB) GetAllReleaseGroupRoles ¶
func (*DB) GetAllReleaseGroupTypes ¶
func (*DB) GetAllReleaseProperties ¶
func (*DB) GetRecordLabel ¶
func (db *DB) GetRecordLabel(id int) (*RecordLabel, error)
func (*DB) GetReleaseGroup ¶
func (db *DB) GetReleaseGroup(id int) (*ReleaseGroup, error)
func (*DB) InsertArtist ¶
func (*DB) InsertBlogEntry ¶
func (*DB) InsertRecordLabel ¶
func (db *DB) InsertRecordLabel(label *RecordLabel) error
func (*DB) InsertRelease ¶
func (*DB) InsertReleaseGroup ¶
func (db *DB) InsertReleaseGroup(group *ReleaseGroup) error
func (*DB) InsertTorrent ¶
func (*DB) LoginAndGetUser ¶
func (*DB) PopulateReleaseGroups ¶
func (*DB) PopulateReleases ¶
func (db *DB) PopulateReleases(group *ReleaseGroup) error
func (*DB) PopulateTorrents ¶
func (*DB) PopulateUserPrivileges ¶
func (*DB) SearchReleaseGroups ¶
func (db *DB) SearchReleaseGroups(q *Query, offset, limit int) ([]ReleaseGroup, error)
func (*DB) SignUpUser ¶
func (*DB) UpdateBlogEntry ¶
func (*DB) UpdateUserAddPrivileges ¶
func (*DB) UpdateUserDeltaUpDown ¶
func (*DB) UpdateUserSetLastAccess ¶
type RecordLabel ¶
type Release ¶
type Release struct { ID int ReleaseGroup ReleaseGroup Edition sql.NullString Medium int ReleaseDate time.Time CatalogueNumber sql.NullString RecordLabel RecordLabel Torrents []Torrent Added time.Time AddedBy User Original bool Tags []string // Properties lists "official" properties of releases, for example // "LossyMasterApproved", to be set by trusted users or staff. Properties map[string]string }
type ReleaseGroup ¶
type RoledArtist ¶
type RoledReleaseGroup ¶
type RoledReleaseGroup struct { Role int ReleaseGroup ReleaseGroup }
type Sorter ¶
type Sorter interface {
// contains filtered or unexported methods
}
func SortAscending ¶
func SortAscending(column ColumnSelector) Sorter
func SortDescending ¶
func SortDescending(column ColumnSelector) Sorter
Click to show internal directories.
Click to hide internal directories.