Documentation ¶
Index ¶
- Variables
- type Access
- type Album
- type AlbumId
- type BasicAlbum
- type Browse
- type BrowseHandler
- type ConvertedFile
- type FileId
- type Library
- type Query
- type Search
- type SearchHandler
- type SearchResult
- type SearchResultTrack
- type Thumbnail
- type ThumbnailHandler
- type ThumbnailStore
- type Track
- type TrackHandler
- type TrackId
- type TrackStore
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrForbidden = errors.New("forbidden")
View Source
var ErrNotFound = errors.New("not found")
Functions ¶
This section is empty.
Types ¶
type Album ¶
type Album struct { Id AlbumId `json:"id,omitempty"` Title string `json:"title,omitempty"` Thumbnail *Thumbnail `json:"thumbnail,omitempty"` Access Access `json:"access,omitempty"` // Parents list the parents of this album starting from the one // furthest away from this album. The list of parent albums includes // this particular album. Only fields Id and Title are filled in. Parents []Album `json:"parents,omitempty"` Albums []Album `json:"albums,omitempty"` Tracks []Track `json:"tracks,omitempty"` }
type BasicAlbum ¶
type BrowseHandler ¶
type BrowseHandler struct {
// contains filtered or unexported fields
}
func NewBrowseHandler ¶
func NewBrowseHandler(library Library) *BrowseHandler
type ConvertedFile ¶
type ConvertedFile struct { // Name is just a filename used for mimetype detection. It is here just to // check its extension type basically. Name string // Modtime is used to figure out if the content has changed. Modtime time.Time // Content must be closed by the caller. Content io.ReadSeekCloser }
type SearchHandler ¶
type SearchHandler struct {
// contains filtered or unexported fields
}
func NewSearchHandler ¶
func NewSearchHandler(library Library) *SearchHandler
func (*SearchHandler) Execute ¶
func (h *SearchHandler) Execute(cmd Search) (SearchResult, error)
type SearchResult ¶
type SearchResult struct { Albums []BasicAlbum Tracks []SearchResultTrack }
type SearchResultTrack ¶
type SearchResultTrack struct { Track Track Album BasicAlbum }
type ThumbnailHandler ¶
type ThumbnailHandler struct {
// contains filtered or unexported fields
}
func NewThumbnailHandler ¶
func NewThumbnailHandler(thumbnailStore ThumbnailStore) *ThumbnailHandler
func (*ThumbnailHandler) Execute ¶
func (h *ThumbnailHandler) Execute(ctx context.Context, id string) (ConvertedFile, error)
type ThumbnailStore ¶
type ThumbnailStore interface {
GetConvertedFile(ctx context.Context, id string) (ConvertedFile, error)
}
type TrackHandler ¶
type TrackHandler struct {
// contains filtered or unexported fields
}
func NewTrackHandler ¶
func NewTrackHandler(trackStore TrackStore) *TrackHandler
func (*TrackHandler) Execute ¶
func (h *TrackHandler) Execute(ctx context.Context, id string) (ConvertedFile, error)
type TrackStore ¶
type TrackStore interface {
GetConvertedFile(ctx context.Context, id string) (ConvertedFile, error)
}
Click to show internal directories.
Click to hide internal directories.