Documentation
¶
Index ¶
- Variables
- type API
- type Artist
- type ArtistAlias
- type ArtistResponse
- type ArtistsResponse
- type BaseArtist
- type BaseReleaseGroup
- type BaseUser
- type BlogEntriesResponse
- type BlogEntry
- type BlogEntryResponse
- type Cache
- func (c Cache) RefreshFormats(db db.BoilingDB) error
- func (c Cache) RefreshLeechTypes(db db.BoilingDB) error
- func (c Cache) RefreshMedia(db db.BoilingDB) error
- func (c Cache) RefreshPrivileges(db db.BoilingDB) error
- func (c Cache) RefreshReleaseGroupTypes(db db.BoilingDB) error
- func (c Cache) RefreshReleaseProperties(db db.BoilingDB) error
- func (c Cache) RefreshReleaseRoles(db db.BoilingDB) error
- type FormatsResponse
- type LeechTypesResponse
- type LoginResponse
- type LookupTable
- type MediaResponse
- type PrivilegesResponse
- type Release
- type ReleaseGroup
- type ReleaseGroupResponse
- type ReleaseGroupTypesResponse
- type ReleasePropertiesResponse
- type ReleaseResponse
- type ReleaseRolesResponse
- type Response
- type RoledArtist
- type RoledReleaseGroup
- type SyncedLookupTable
- func (s *SyncedLookupTable) Has(ss string) bool
- func (s *SyncedLookupTable) HasReverse(i int) bool
- func (s *SyncedLookupTable) Keys() []string
- func (s *SyncedLookupTable) LookUp(ss string) (int, error)
- func (s *SyncedLookupTable) MustLookUp(ss string) int
- func (s *SyncedLookupTable) MustReverseLookUp(i int) string
- func (s *SyncedLookupTable) ReverseLookUp(i int) (string, error)
- type TagsResponse
- type User
- type UserResponse
Constants ¶
This section is empty.
Variables ¶
Functions ¶
This section is empty.
Types ¶
type API ¶
type API struct {
// contains filtered or unexported fields
}
type Artist ¶
type Artist struct {
ID int `json:"id"`
Name string `json:"name"`
Aliases []ArtistAlias `json:"aliases,omitempty"`
ReleaseGroups []RoledReleaseGroup `json:"release_groups,omitempty"`
Added time.Time `json:"added"`
AddedBy BaseUser `json:"added_by"`
Bio *string `json:"bio,omitempty"`
Tags []string `json:"tags,omitempty"`
}
type ArtistAlias ¶
type BaseReleaseGroup ¶
type BlogEntry ¶
type Cache ¶
type Cache struct {
// contains filtered or unexported fields
}
func (Cache) RefreshReleaseGroupTypes ¶
func (Cache) RefreshReleaseProperties ¶
type LeechTypesResponse ¶
type LeechTypesResponse struct {
LeechTypes []string `json:"leech_types"`
}
type LoginResponse ¶
type LookupTable ¶
type LookupTable struct {
// contains filtered or unexported fields
}
func BuildLookupTable ¶
func BuildLookupTable(m map[int]string) LookupTable
func (LookupTable) Has ¶
func (l LookupTable) Has(s string) bool
func (LookupTable) HasReverse ¶
func (l LookupTable) HasReverse(i int) bool
func (LookupTable) Keys ¶
func (l LookupTable) Keys() []string
func (LookupTable) LookUp ¶
func (l LookupTable) LookUp(s string) (int, error)
func (LookupTable) ReverseLookUp ¶
func (l LookupTable) ReverseLookUp(i int) (string, error)
type PrivilegesResponse ¶
type PrivilegesResponse struct {
Privileges []string `json:"privileges"`
}
type Release ¶
type Release struct {
ID int `json:"id"`
ReleaseGroup ReleaseGroup `json:"release_group"`
Edition *string `json:"edition,omitempty"`
Medium string `json:"medium"`
ReleaseDate time.Time `json:"release_date"`
CatalogueNumber *string `json:"catalogue_number,omitempty"`
//RecordLabel RecordLabel
//Torrents []Torrent
Added time.Time `json:"added"`
AddedBy BaseUser `json:"added_by"`
Original bool `json:"original"`
Tags []string `json:"tags,omitempty"`
// Properties lists "official" properties of releases, for example
// "LossyMasterApproved", to be set by trusted users or staff.
Properties map[string]string `json:"properties"`
}
type ReleaseGroup ¶
type ReleaseGroup struct {
ID int `json:"id"`
Name string `json:"name"` // Album title
Artists []RoledArtist `json:"artists"`
ReleaseDate time.Time `json:"release_date"`
Added time.Time `json:"added"`
AddedBy BaseUser `json:"added_by"`
Type string `json:"type"` // Album/EP
Releases []Release `json:"releases,omitempty"` // individual releases
Tags []string `json:"tags,omitempty"`
}
type ReleaseGroupResponse ¶
type ReleaseGroupResponse struct {
ReleaseGroup ReleaseGroup `json:"release_group"`
}
type ReleaseGroupTypesResponse ¶
type ReleaseGroupTypesResponse struct {
ReleaseGroupTypes []string `json:"release_group_types"`
}
type ReleasePropertiesResponse ¶
type ReleasePropertiesResponse struct {
ReleaseProperties []string `json:"release_properties"`
}
type ReleaseRolesResponse ¶
type ReleaseRolesResponse struct {
ReleaseRoles []string `json:"release_roles"`
}
type Response ¶
type RoledArtist ¶
type RoledArtist struct {
Role string `json:"role"`
Artist BaseArtist `json:"artist"`
}
type RoledReleaseGroup ¶
type RoledReleaseGroup struct {
Role string `json:"role"`
ReleaseGroup BaseReleaseGroup `json:"release_group"`
}
type SyncedLookupTable ¶
func (*SyncedLookupTable) Has ¶
func (s *SyncedLookupTable) Has(ss string) bool
func (*SyncedLookupTable) HasReverse ¶
func (s *SyncedLookupTable) HasReverse(i int) bool
func (*SyncedLookupTable) Keys ¶
func (s *SyncedLookupTable) Keys() []string
func (*SyncedLookupTable) LookUp ¶
func (s *SyncedLookupTable) LookUp(ss string) (int, error)
func (*SyncedLookupTable) MustLookUp ¶
func (s *SyncedLookupTable) MustLookUp(ss string) int
func (*SyncedLookupTable) MustReverseLookUp ¶
func (s *SyncedLookupTable) MustReverseLookUp(i int) string
func (*SyncedLookupTable) ReverseLookUp ¶
func (s *SyncedLookupTable) ReverseLookUp(i int) (string, error)
type User ¶
type User struct {
ID int `json:"id"`
Username string `json:"username"`
Email string `json:"email,omitempty"`
PasswordHash string `json:"password_hash,omitempty"`
Bio *string `json:"bio,omitempty"`
Enabled bool `json:"enabled"`
CanLogin bool `json:"can_login,omitempty"`
JoinedAt time.Time `json:"joined_at"`
LastLogin *time.Time `json:"last_login,omitempty"`
LastAccess *time.Time `json:"last_access,omitempty"`
Uploaded int64 `json:"uploaded"`
Downloaded int64 `json:"downloaded"`
}
Source Files
¶
- api.go
- artist.go
- blog.go
- cache.go
- cache_handlers.go
- fields.go
- login.go
- lookup_table.go
- middleware.go
- release.go
- release_group.go
- signup.go
- user.go
- util.go
Click to show internal directories.
Click to hide internal directories.