Documentation ¶
Index ¶
- Constants
- type Album
- type AlbumFilter
- type AlbumFilterOrderBy
- type AlbumId
- type AlbumMeta
- type ApiError
- type Artist
- type ArtistFilter
- type ArtistFilterOrderBy
- type ArtistId
- type ArtistMeta
- type ErrorCode
- type FavoritePlaylist
- type FavoritePlaylistFilter
- type FavoritePlaylistId
- type FavoritePlaylistMeta
- type FavoriteSong
- type FavoriteSongFilter
- type FavoriteSongId
- type FavoriteSongMeta
- type FileSyncReport
- type FileSyncSong
- type Playlist
- type PlaylistFilter
- type PlaylistFilterOrderBy
- type PlaylistId
- type PlaylistMeta
- type Song
- type SongBitDepth
- type SongFilter
- type SongFilterFavorite
- type SongFilterOrderBy
- type SongFormat
- type SongId
- type SongMeta
- type SongNew
- type SyncReport
- type Token
- type User
- type UserFilter
- type UserId
- type UserMeta
- type UserMetaComplete
- type Version
Constants ¶
View Source
const ( SongMimeTypeFlac = "audio/flac" SongMimeTypeOgg = "audio/ogg" SongMimeTypeMp3 = "audio/mpeg" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AlbumFilter ¶
type AlbumFilter struct { FromTs *int64 Name *string OrderBy *AlbumFilterOrderBy }
type AlbumFilterOrderBy ¶ added in v0.4.0
type AlbumFilterOrderBy string
const AlbumFilterOrderByName AlbumFilterOrderBy = "name"
type AlbumId ¶ added in v0.2.0
type AlbumId string
var UnknownAlbumId AlbumId = "00000000000000000000000000"
Album
type ApiError ¶
type ApiError struct { ErrorCode ErrorCode `json:"error"` ErrorDescription string `json:"error_description,omitempty"` }
func (*ApiError) Description ¶
type Artist ¶
type Artist struct { Id ArtistId `json:"id"` CreationTs int64 `json:"creationTs"` UpdateTs int64 `json:"updateTs"` ArtistMeta }
type ArtistFilter ¶
type ArtistFilter struct { FromTs *int64 Name *string SongId *SongId OrderBy *ArtistFilterOrderBy }
type ArtistFilterOrderBy ¶ added in v0.4.0
type ArtistFilterOrderBy string
const ArtistFilterOrderByName ArtistFilterOrderBy = "name"
type ArtistId ¶ added in v0.2.0
type ArtistId string
var UnknownArtistId ArtistId = "00000000000000000000000000"
type ArtistMeta ¶
type ArtistMeta struct {
Name string `json:"name"`
}
func (*ArtistMeta) Copy ¶ added in v0.4.0
func (a *ArtistMeta) Copy() *ArtistMeta
type ErrorCode ¶
type ErrorCode string
const ( NotFoundErrorCode ErrorCode = "not_found" NotImplementedErrorCode ErrorCode = "not_implemented" InternalErrorCode ErrorCode = "internal_error" MethodNotAllowedErrorCode ErrorCode = "method_not_allowed" InvalidTokenErrorCode ErrorCode = "invalid_token" InvalideRequestErrorCode ErrorCode = "invalid_request" UnsupportedGrantTypeErrorCode ErrorCode = "unsupported_grant_type" InvalideGrantErrorCode ErrorCode = "invalid_grant" DeleteArtistWithSongsErrorCode ErrorCode = "delete_artist_with_songs" DeleteAlbumWithSongsErrorCode ErrorCode = "delete_album_with_songs" DeleteUserYourselfErrorCode ErrorCode = "delete_user_yourself" CreateNotOwnedPlaylistErrorCode ErrorCode = "create_not_owned_playlist" ForbiddenErrorCode ErrorCode = "forbidden" ObsoleteClientErrorCode ErrorCode = "obsolete_client" // Client Error UnknownErrorCode ErrorCode = "unknown_error" ClientErrorCode ErrorCode = "client_error" )
func (ErrorCode) StatusCode ¶
type FavoritePlaylist ¶
type FavoritePlaylist struct { FavoritePlaylistMeta UpdateTs int64 `json:"updateTs"` }
type FavoritePlaylistFilter ¶
type FavoritePlaylistFilter struct { FromTs *int64 UserId *UserId PlaylistId *PlaylistId }
type FavoritePlaylistId ¶
type FavoritePlaylistId struct { UserId UserId `json:"userId"` PlaylistId PlaylistId `json:"playlistId"` }
type FavoritePlaylistMeta ¶
type FavoritePlaylistMeta struct {
Id FavoritePlaylistId `json:"id"`
}
type FavoriteSong ¶ added in v0.2.0
type FavoriteSong struct { FavoriteSongMeta UpdateTs int64 `json:"updateTs"` }
type FavoriteSongFilter ¶ added in v0.2.0
type FavoriteSongFilter struct {
FromTs *int64
}
type FavoriteSongId ¶ added in v0.2.0
type FavoriteSongMeta ¶ added in v0.2.0
type FavoriteSongMeta struct {
Id FavoriteSongId `json:"id"`
}
type FileSyncReport ¶
type FileSyncReport struct { FileSyncSongs []FileSyncSong `json:"fileSyncSongs"` DeletedSongIds []SongId `json:"deletedSongIds"` Playlists []Playlist `json:"playlists"` DeletedPlaylistIds []PlaylistId `json:"deletedPlaylistIds"` SyncTs int64 `json:"syncTs"` }
type FileSyncSong ¶
type Playlist ¶
type Playlist struct { Id PlaylistId `json:"id"` CreationTs int64 `json:"creationTs"` UpdateTs int64 `json:"updateTs"` ContentUpdateTs int64 `json:"contentUpdateTs"` PlaylistMeta }
type PlaylistFilter ¶
type PlaylistFilter struct { FromTs *int64 FavoriteUserId *UserId FavoriteFromTs *int64 OrderBy *PlaylistFilterOrderBy }
type PlaylistFilterOrderBy ¶ added in v0.4.0
type PlaylistFilterOrderBy string
const PlaylistFilterOrderByName PlaylistFilterOrderBy = "name"
type PlaylistId ¶ added in v0.2.0
type PlaylistId string
const IncomingPlaylistId PlaylistId = "00000000000000000000000000"
type PlaylistMeta ¶
type PlaylistMeta struct { Name string `json:"name"` SongIds []SongId `json:"songIds"` OwnerUserIds []UserId `json:"ownerUserIds"` }
func (*PlaylistMeta) Copy ¶ added in v0.4.0
func (p *PlaylistMeta) Copy() *PlaylistMeta
type SongBitDepth ¶
type SongBitDepth int64
const ( SongBitDepthUnknown SongBitDepth = iota SongBitDepth16 SongBitDepth24 )
func (SongBitDepth) String ¶ added in v0.3.0
func (s SongBitDepth) String() string
type SongFilter ¶
type SongFilter struct { FromTs *int64 AlbumId *AlbumId ArtistId *ArtistId Favorite *SongFilterFavorite OrderBy *SongFilterOrderBy }
type SongFilterFavorite ¶ added in v0.3.0
type SongFilterOrderBy ¶ added in v0.4.0
type SongFilterOrderBy string
const SongFilterOrderByName SongFilterOrderBy = "name"
type SongFormat ¶
type SongFormat int64
const ( SongFormatUnknown SongFormat = iota SongFormatFlac SongFormatMp3 SongFormatOgg )
func (SongFormat) Extension ¶
func (s SongFormat) Extension() string
func (SongFormat) MimeType ¶
func (s SongFormat) MimeType() string
func (SongFormat) String ¶ added in v0.3.0
func (s SongFormat) String() string
type SongMeta ¶
type SongMeta struct { Name string `json:"name"` Format SongFormat `json:"format"` Size int64 `json:"size"` BitDepth SongBitDepth `json:"bitDepth"` PublicationYear *int64 `json:"publicationYear"` AlbumId AlbumId `json:"albumId"` TrackNumber *int64 `json:"trackNumber"` ArtistIds []ArtistId `json:"artistIds"` ExplicitFg bool `json:"explicitFg"` }
type SyncReport ¶
type SyncReport struct { Songs []Song `json:"songs"` DeletedSongIds []SongId `json:"deletedSongIds"` Artists []Artist `json:"artists"` DeletedArtistIds []ArtistId `json:"deletedArtistIds"` Albums []Album `json:"albums"` DeletedAlbumIds []AlbumId `json:"deletedAlbumIds"` Playlists []Playlist `json:"playlists"` DeletedPlaylistIds []PlaylistId `json:"deletedPlaylistIds"` Users []User `json:"users"` DeletedUserIds []UserId `json:"deletedUserIds"` FavoritePlaylists []FavoritePlaylist `json:"favoritePlaylists"` DeletedFavoritePlaylistIds []FavoritePlaylistId `json:"deletedFavoritePlaylistIds"` FavoriteSongs []FavoriteSong `json:"favoriteSongs"` DeletedFavoriteSongIds []FavoriteSongId `json:"deletedFavoriteSongIds"` SyncTs int64 `json:"syncTs"` }
type Token ¶
type Token struct { // AccessToken is the token that authorizes and authenticates // the requests. AccessToken string `json:"access_token"` // TokenType is the type of token. // The Type method returns either this or "Bearer", the default. TokenType string `json:"token_type,omitempty"` UserId UserId `json:"userId"` }
type UserFilter ¶
type UserMeta ¶
type UserMetaComplete ¶
Click to show internal directories.
Click to hide internal directories.