Documentation ¶
Index ¶
- Constants
- Variables
- type Album
- type ApiError
- type ApiResponse
- type Artist
- type Body
- type Change
- type DeletePlaylistItemsByIdBody
- type Error
- type ErrorList
- type ExportPlaylist
- type ExportTrack
- type ExportUser
- type GetAlbumById
- type GetAlbumTracksById
- type GetAlbums
- type GetArtistAlbumsById
- type GetArtistById
- type GetArtists
- type GetAuthMe
- type GetPlaylistById
- type GetPlaylists
- type GetSync
- type GetSystemInfo
- type GetTags
- type GetTrackById
- type GetTracks
- type Map
- type Playlist
- type PostAuthSignin
- type PostAuthSigninBody
- type PostAuthSignup
- type PostAuthSignupBody
- type PostPlaylist
- type PostPlaylistBody
- type PostPlaylistItemsByIdBody
- type PostPlaylistsItemMoveByIdBody
- type PostQueue
- type PostSystemExport
- type PostSystemSetupBody
- type Tag
- type Track
- type WorkDir
Constants ¶
View Source
const ( StatusSuccess = "success" StatusError = "error" )
Variables ¶
View Source
var ( ErrNoArtist = NewApiError(http.StatusNotFound, "Artist not found") ErrNoAlbum = NewApiError(http.StatusNotFound, "Album not found") ErrNoTrack = NewApiError(http.StatusNotFound, "Track not found") ErrNoPlaylist = NewApiError(http.StatusNotFound, "Playlist not found") ErrNoTag = NewApiError(http.StatusNotFound, "Tag not found") ErrNoGenre = NewApiError(http.StatusNotFound, "Genre not found") ErrInvalidAuthHeader = NewApiError(http.StatusUnauthorized, "Invalid Auth Header") ErrInvalidToken = NewApiError(http.StatusUnauthorized, "Invalid Token") ErrIncorrectCreds = NewApiError(http.StatusUnauthorized, "Incorrect credentials") ErrEmptyBody = NewApiError(http.StatusBadRequest, "Expected body not to be empty") )
Functions ¶
This section is empty.
Types ¶
type ApiError ¶
type ApiResponse ¶
type ApiResponse struct { Status string `json:"status"` Data any `json:"data,omitempty"` Error *ApiError `json:"error,omitempty"` }
func NewApiSuccessResponse ¶ added in v0.6.0
func NewApiSuccessResponse(data any) ApiResponse
type DeletePlaylistItemsByIdBody ¶ added in v0.10.0
type DeletePlaylistItemsByIdBody struct {
TrackIndices []int `json:"trackIndices"`
}
func (DeletePlaylistItemsByIdBody) Schema ¶ added in v0.13.0
func (b DeletePlaylistItemsByIdBody) Schema() jio.Schema
type ExportPlaylist ¶ added in v0.12.0
type ExportPlaylist struct { Name string `json:"name"` Tracks []ExportTrack `json:"tracks"` }
type ExportTrack ¶ added in v0.12.0
type ExportUser ¶ added in v0.12.0
type ExportUser struct { Username string `json:"username"` Playlists []ExportPlaylist `json:"playlists"` }
type GetAlbumById ¶ added in v0.6.0
type GetAlbumById struct {
Album
}
type GetAlbumTracksById ¶ added in v0.6.0
type GetAlbumTracksById struct {
Tracks []Track `json:"tracks"`
}
type GetArtistAlbumsById ¶ added in v0.6.0
type GetArtistAlbumsById struct {
Albums []Album `json:"albums"`
}
type GetArtistById ¶ added in v0.6.0
type GetArtistById struct {
Artist
}
type GetArtists ¶ added in v0.6.0
type GetArtists struct {
Artists []Artist `json:"artists"`
}
type GetPlaylistById ¶ added in v0.10.0
type GetPlaylists ¶ added in v0.10.0
type GetPlaylists struct {
Playlists []Playlist `json:"playlists"`
}
type GetSystemInfo ¶ added in v0.10.0
type GetTrackById ¶ added in v0.6.0
type GetTrackById struct {
Track
}
type PostAuthSignin ¶ added in v0.10.0
type PostAuthSignin struct {
Token string `json:"token"`
}
type PostAuthSigninBody ¶ added in v0.10.0
type PostAuthSigninBody struct { Username string `json:"username"` Password string `json:"password"` }
func (PostAuthSigninBody) Schema ¶ added in v0.13.0
func (b PostAuthSigninBody) Schema() jio.Schema
type PostAuthSignup ¶ added in v0.10.0
type PostAuthSignupBody ¶ added in v0.10.0
type PostAuthSignupBody struct { Username string `json:"username"` Password string `json:"password"` PasswordConfirm string `json:"passwordConfirm"` }
func (PostAuthSignupBody) Schema ¶ added in v0.13.0
func (b PostAuthSignupBody) Schema() jio.Schema
type PostPlaylist ¶ added in v0.10.0
type PostPlaylist struct {
Playlist
}
type PostPlaylistBody ¶ added in v0.10.0
type PostPlaylistBody struct {
Name string `json:"name"`
}
func (PostPlaylistBody) Schema ¶ added in v0.13.0
func (b PostPlaylistBody) Schema() jio.Schema
type PostPlaylistItemsByIdBody ¶ added in v0.10.0
type PostPlaylistItemsByIdBody struct {
Tracks []string `json:"tracks"`
}
func (PostPlaylistItemsByIdBody) Schema ¶ added in v0.13.0
func (b PostPlaylistItemsByIdBody) Schema() jio.Schema
type PostPlaylistsItemMoveByIdBody ¶ added in v0.10.0
type PostPlaylistsItemMoveByIdBody struct { TrackId string `json:"trackId"` ToIndex int `json:"toIndex"` }
func (PostPlaylistsItemMoveByIdBody) Schema ¶ added in v0.13.0
func (b PostPlaylistsItemMoveByIdBody) Schema() jio.Schema
type PostSystemExport ¶ added in v0.12.0
type PostSystemExport struct {
Users []ExportUser `json:"users"`
}
type PostSystemSetupBody ¶ added in v0.10.0
type PostSystemSetupBody struct { Username string `json:"username"` Password string `json:"password"` PasswordConfirm string `json:"passwordConfirm"` }
func (PostSystemSetupBody) Schema ¶ added in v0.13.0
func (b PostSystemSetupBody) Schema() jio.Schema
type Track ¶ added in v0.9.0
type Track struct { Id string `json:"id"` Number int `json:"number"` Name string `json:"name"` CoverArt string `json:"coverArt"` Duration int `json:"duration"` BestQualityFile string `json:"bestQualityFile"` MobileQualityFile string `json:"mobileQualityFile"` AlbumId string `json:"albumId"` ArtistId string `json:"artistId"` AlbumName string `json:"albumName"` ArtistName string `json:"artistName"` Tags []string `json:"tags"` Genres []string `json:"genres"` }
type WorkDir ¶ added in v0.3.0
type WorkDir string
func (WorkDir) DatabaseFile ¶ added in v0.10.0
func (WorkDir) MobileTracksDir ¶ added in v0.3.0
func (WorkDir) OriginalTracksDir ¶ added in v0.3.0
Click to show internal directories.
Click to hide internal directories.