Documentation ¶
Index ¶
- func EncodeError(w io.Writer, format, msg string, code SubsonicError) error
- type Album
- type AlbumList2
- type AlbumWithSongs
- type Artist
- type ArtistRef
- type Artists
- type Error
- type Genre
- type GenreRef
- type Genres
- type Index
- type License
- type Line
- type ListenBrainzConfig
- type LyricsList
- type NowPlaying
- type NowPlayingEntry
- type OpenSubsonicExtension
- type OpenSubsonicExtensions
- type Playlist
- type Playlists
- type RandomSongs
- type RecordLabel
- type ReplayGain
- type Response
- type ScanStatus
- type SearchResult3
- type Song
- type StructuredLyrics
- type SubsonicError
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EncodeError ¶
func EncodeError(w io.Writer, format, msg string, code SubsonicError) error
Types ¶
type Album ¶
type Album struct { ID string `xml:"id,attr,omitempty" json:"id"` Created time.Time `xml:"created,attr,omitempty" json:"created,omitempty"` ArtistID *string `xml:"artistId,attr,omitempty" json:"artistId,omitempty"` Artist *string `xml:"artist,attr,omitempty" json:"artist,omitempty"` Artists []*ArtistRef `xml:"artists,omitempty" json:"artists,omitempty"` CoverArt *string `xml:"coverArt,attr,omitempty" json:"coverArt,omitempty"` Title string `xml:"title,attr" json:"title"` Name string `xml:"name,attr" json:"name"` SongCount int `xml:"songCount,attr" json:"songCount"` Duration int `xml:"duration,attr" json:"duration"` Genre *string `xml:"genre,attr,omitempty" json:"genre,omitempty"` Genres []*GenreRef `xml:"genres,omitempty" json:"genres,omitempty"` Year *int `xml:"year,attr,omitempty" json:"year,omitempty"` Starred *time.Time `xml:"starred,attr,omitempty" json:"starred,omitempty"` UserRating *int `xml:"userRating,attr,omitempty" json:"userRating,omitempty"` AverageRating *float64 `xml:"averageRating,attr,omitempty" json:"averageRating,omitempty"` IsDir bool `xml:"isDir,attr" json:"isDir"` Type string `xml:"type,attr" json:"type"` MediaType string `xml:"mediaType,attr" json:"mediaType"` MusicBrainzID *string `xml:"musicBrainzId,attr,omitempty" json:"musicBrainzId,omitempty"` RecordLabels []*RecordLabel `xml:"recordLabels,omitempty" json:"recordLabels,omitempty"` ReleaseTypes []string `xml:"releaseTypes,omitempty" json:"releaseTypes,omitempty"` IsCompilation *bool `xml:"isCompilation,attr,omitempty" json:"isCompilation,omitempty"` }
type AlbumList2 ¶
type AlbumList2 struct {
Albums []*Album `xml:"album" json:"album"`
}
type AlbumWithSongs ¶
type Artist ¶
type Artist struct { ID string `xml:"id,attr,omitempty" json:"id"` Name string `xml:"name,attr" json:"name"` CoverArt *string `xml:"coverArt,attr,omitempty" json:"coverArt,omitempty"` AlbumCount *int `xml:"albumCount,attr,omitempty" json:"albumCount,omitempty"` Starred *time.Time `xml:"starred,attr,omitempty" json:"starred,omitempty"` MusicBrainzID *string `xml:"musicBrainzID,omitempty" json:"musicBrainzID,omitempty"` UserRating *int `xml:"userRating,attr,omitempty" json:"userRating,omitempty"` AverageRating *float64 `xml:"averageRating,attr,omitempty" json:"averageRating,omitempty"` Albums []*Album `xml:"album,omitempty" json:"album,omitempty"` }
type Error ¶
type Error struct { Code SubsonicError `xml:"code,attr" json:"code"` Message string `xml:"message,attr" json:"message"` }
type ListenBrainzConfig ¶
type ListenBrainzConfig struct {
ListenBrainzUsername *string `xml:"listenBrainzUsername,attr" json:"listenBrainzUsername"`
}
type LyricsList ¶
type LyricsList struct {
StructuredLyrics []*StructuredLyrics `xml:"structuredLyrics" json:"structuredLyrics"`
}
type NowPlaying ¶
type NowPlaying struct {
Entries []*NowPlayingEntry `xml:"entry" json:"entry"`
}
type NowPlayingEntry ¶
type OpenSubsonicExtension ¶
type OpenSubsonicExtensions ¶
type OpenSubsonicExtensions []OpenSubsonicExtension
type Playlist ¶
type Playlist struct { ID string `xml:"id,attr" json:"id"` Name string `xml:"name,attr" json:"name"` Comment *string `xml:"comment,attr,omitempty" json:"comment,omitempty"` Owner string `xml:"owner,attr" json:"owner,omitempty"` Public bool `xml:"public,attr" json:"public"` SongCount int `xml:"songCount,attr" json:"songCount"` Duration int `xml:"duration,attr" json:"duration"` Created time.Time `xml:"created,attr" json:"created"` Changed time.Time `xml:"changed,attr" json:"changed"` CoverArt *string `xml:"coverArt,attr,omitempty" json:"coverArt,omitempty"` Entry *[]*Song `xml:"entry,omitempty" json:"entry,omitempty"` }
type RandomSongs ¶
type RandomSongs struct {
Songs []*Song `xml:"song" json:"song"`
}
type RecordLabel ¶
type RecordLabel struct {
Name string `xml:"name,attr" json:"name"`
}
type ReplayGain ¶
type ReplayGain struct { TrackGain *float32 `xml:"trackGain,attr,omitempty" json:"trackGain,omitempty"` AlbumGain *float32 `xml:"albumGain,attr,omitempty" json:"albumGain,omitempty"` TrackPeak *float32 `xml:"trackPeak,attr,omitempty" json:"trackPeak,omitempty"` AlbumPeak *float32 `xml:"albumPeak,attr,omitempty" json:"albumPeak,omitempty"` BaseGain *float32 `xml:"baseGain,attr,omitempty" json:"baseGain,omitempty"` FallbackGain *float32 `xml:"fallbackGain,attr,omitempty" json:"fallbackGain,omitempty"` }
type Response ¶
type Response struct { Status status `xml:"status,attr" json:"status"` Version string `xml:"version,attr" json:"version"` XMLNS string `xml:"xmlns,attr" json:"-"` Type string `xml:"type,attr" json:"type"` ServerVersion string `xml:"serverVersion,attr" json:"serverVersion"` OpenSubsonic bool `xml:"openSubsonic,attr" json:"openSubsonic"` Crossonic bool `xml:"crossonic,attr" json:"crossonic"` // Subsonic Error *Error `xml:"error,omitempty" json:"error,omitempty"` OpenSubsonicExtensions *OpenSubsonicExtensions `xml:"openSubsonicExtensions,omitempty" json:"openSubsonicExtensions,omitempty"` License *License `xml:"license,omitempty" json:"license,omitempty"` ScanStatus *ScanStatus `xml:"scanStatus,omitempty" json:"scanStatus,omitempty"` Genres *Genres `xml:"genres,omitempty" json:"genres,omitempty"` Artists *Artists `xml:"artists,omitempty" json:"artists,omitempty"` AlbumList2 *AlbumList2 `xml:"albumList2,omitempty" json:"albumList2,omitempty"` RandomSongs *RandomSongs `xml:"randomSongs,omitempty" json:"randomSongs,omitempty"` Album *AlbumWithSongs `xml:"album,omitempty" json:"album,omitempty"` Artist *Artist `xml:"artist,omitempty" json:"artist,omitempty"` NowPlaying *NowPlaying `xml:"nowPlaying,omitempty" json:"nowPlaying,omitempty"` SearchResult3 *SearchResult3 `xml:"searchResult3,omitempty" json:"searchResult3,omitempty"` LyricsList *LyricsList `xml:"lyricsList,omitempty" json:"lyricsList,omitempty"` Playlists *Playlists `xml:"playlists,omitempty" json:"playlists,omitempty"` Playlist *Playlist `xml:"playlist,omitempty" json:"playlist,omitempty"` // Crossonic ListenBrainzConfig *ListenBrainzConfig `xml:"listenBrainzConfig,omitempty" json:"listenBrainzConfig,omitempty"` }
type ScanStatus ¶
type SearchResult3 ¶
type Song ¶
type Song struct { ID string `xml:"id,attr" json:"id"` IsDir bool `xml:"isDir,attr" json:"isDir"` Title string `xml:"title,attr" json:"title"` Album *string `xml:"album,attr,omitempty" json:"album,omitempty"` Artist *string `xml:"artist,attr,omitempty" json:"artist,omitempty"` Track *int `xml:"track,attr,omitempty" json:"track,omitempty"` Year *int `xml:"year,attr,omitempty" json:"year,omitempty"` Genre *string `xml:"genre,attr,omitempty" json:"genre,omitempty"` CoverArt *string `xml:"coverArt,attr,omitempty" json:"coverArt,omitempty"` Size int64 `xml:"size,attr" json:"size"` ContentType string `xml:"contentType,attr" json:"contentType"` Suffix string `xml:"suffix,attr" json:"suffix"` Duration int `xml:"duration,attr" json:"duration"` BitRate int `xml:"bitRate,attr" json:"bitRate"` SamplingRate int `xml:"samplingRate,attr" json:"samplingRate"` ChannelCount int `xml:"channelCount,attr" json:"channelCount"` UserRating *int `xml:"userRating,attr,omitempty" json:"userRating,omitempty"` AverageRating *float64 `xml:"averageRating,attr,omitempty" json:"averageRating,omitempty"` PlayCount *int `xml:"playCount,attr,omitempty" json:"playCount,omitempty"` DiscNumber *int `xml:"discNumber,attr,omitempty" json:"discNumber,omitempty"` Created time.Time `xml:"created,attr" json:"created"` Starred *time.Time `xml:"starred,attr,omitempty" json:"starred,omitempty"` AlbumID *string `xml:"albumId,attr,omitempty" json:"albumId,omitempty"` ArtistID *string `xml:"artistId,attr,omitempty" json:"artistId,omitempty"` Type string `xml:"type,attr" json:"type"` MediaType string `xml:"mediaType,attr" json:"mediaType"` Played *time.Time `xml:"played,attr,omitempty" json:"played,omitempty"` BPM *int `xml:"bpm,attr,omitempty" json:"bpm,omitempty"` MusicBrainzID *string `xml:"musicBrainzId,attr,omitempty" json:"musicBrainzId,omitempty"` Genres []*GenreRef `xml:"genres,omitempty" json:"genres,omitempty"` Artists []*ArtistRef `xml:"artists,omitempty" json:"artists,omitempty"` AlbumArtists []*ArtistRef `xml:"albumArtists,omitempty" json:"albumArtists,omitempty"` ReplayGain *ReplayGain `xml:"replayGain,omitempty" json:"replayGain,omitempty"` }
type StructuredLyrics ¶
type StructuredLyrics struct { Lang string `xml:"lang" json:"lang"` Synced bool `xml:"synced" json:"synced"` DisplayArtist string `xml:"displayArtist,omitempty" json:"displayArtist,omitempty"` DisplayTitle string `xml:"displayTitle,omitempty" json:"displayTitle,omitempty"` Offset int `xml:"offset,omitempty" json:"offset,omitempty"` Line []*Line `xml:"line" json:"line"` }
type SubsonicError ¶
type SubsonicError int
const ( SubsonicErrorGeneric SubsonicError = 0 SubsonicErrorRequiredParameterMissing SubsonicError = 10 SubsonicErrorIncompatibleSubsonicRestProtocolVersionClientMustUpgrade SubsonicError = 20 SubsonicErrorIncompatibleSubsonicRestProtocolVersionServerMustUpgrade SubsonicError = 30 SubsonicErrorWrongUsernameOrPassword SubsonicError = 40 SubsonicErrorTokenAuthenticationNotSupported SubsonicError = 41 SubsonicErrorUserNotAuthorized SubsonicError = 50 SubsonicErrorTrialOver SubsonicError = 60 SubsonicErrorNotFound SubsonicError = 70 )
Click to show internal directories.
Click to hide internal directories.