Documentation
¶
Index ¶
- func ConvertURL(c *fiber.Ctx, path string) string
- func InstallAlbumHandlers(router *fiber.App, apiConfig *ApiConfig)
- func InstallArtistHandlers(router *fiber.App, apiConfig *ApiConfig)
- func InstallTrackHandlers(router *fiber.App, apiConfig *ApiConfig)
- type ApiConfig
- func (api *ApiConfig) HandleGetAlbumById(c *fiber.Ctx) error
- func (api *ApiConfig) HandleGetAlbumTracksById(c *fiber.Ctx) error
- func (api *ApiConfig) HandleGetAlbums(c *fiber.Ctx) error
- func (api *ApiConfig) HandleGetArtistAlbumsById(c *fiber.Ctx) error
- func (api *ApiConfig) HandleGetArtistById(c *fiber.Ctx) error
- func (api *ApiConfig) HandleGetArtists(c *fiber.Ctx) error
- func (api *ApiConfig) HandleGetTrackById(c *fiber.Ctx) error
- func (api *ApiConfig) HandleGetTracks(c *fiber.Ctx) error
- func (api *ApiConfig) HandlePostAlbum(c *fiber.Ctx) error
- func (api *ApiConfig) HandlePostArtist(c *fiber.Ctx) error
- func (api *ApiConfig) HandlePostTrack(c *fiber.Ctx) error
- func (apiConfig *ApiConfig) HandlerCreateQueueFromAlbum(c *fiber.Ctx) error
- type CreateAlbumBody
- type CreateArtistBody
- type CreateTrackBody
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func InstallAlbumHandlers ¶ added in v0.2.0
func InstallArtistHandlers ¶ added in v0.2.0
func InstallTrackHandlers ¶ added in v0.2.0
Types ¶
type ApiConfig ¶
type ApiConfig struct {
// contains filtered or unexported fields
}
func (*ApiConfig) HandleGetAlbumById ¶ added in v0.2.0
HandleGetAlbumById godoc
@Summary Get album by id
@Description Get album by id
@Tags albums
@Produce json
@Param id path string true "Album Id"
@Success 200 {object} types.ApiResponse[types.ApiGetAlbumByIdData]
@Failure 400 {object} types.ApiError
@Failure 404 {object} types.ApiError
@Failure 500 {object} types.ApiError
@Router /albums/{id} [get]
func (*ApiConfig) HandleGetAlbumTracksById ¶ added in v0.2.0
HandleGetAlbumTracksById godoc
@Summary Get all tracks from album
@Description Get all tracks from album
@Tags albums
@Produce json
@Param id path string true "Artist Id"
@Success 200 {object} types.ApiResponse[types.ApiGetAlbumTracksByIdData]
@Failure 400 {object} types.ApiError
@Failure 500 {object} types.ApiError
@Router /albums/{id}/tracks [get]
func (*ApiConfig) HandleGetAlbums ¶ added in v0.2.0
HandleGetAlbums godoc
@Summary Get all albums
@Description Get all albums
@Tags albums
@Produce json
@Success 200 {object} types.ApiResponse[types.ApiGetAlbumsData]
@Failure 400 {object} types.ApiError
@Failure 500 {object} types.ApiError
@Router /albums [get]
func (*ApiConfig) HandleGetArtistAlbumsById ¶ added in v0.2.0
HandleGetArtistAlbumsById godoc
@Summary Get all albums by artist
@Description Get all albums by artist
@Tags artists
@Produce json
@Param id path string true "Artist Id"
@Success 200 {object} types.ApiResponse[types.ApiGetArtistAlbumsByIdData]
@Failure 400 {object} types.ApiError
@Failure 500 {object} types.ApiError
@Router /artists/{id}/albums [get]
func (*ApiConfig) HandleGetArtistById ¶ added in v0.2.0
HandleGetArtistById godoc
@Summary Get artist by id
@Description Get artist by id
@Tags artists
@Produce json
@Param id path string true "Artist Id"
@Success 200 {object} types.ApiResponse[types.ApiGetArtistByIdData]
@Failure 400 {object} types.ApiError
@Failure 404 {object} types.ApiError
@Failure 500 {object} types.ApiError
@Router /artists/{id} [get]
func (*ApiConfig) HandleGetArtists ¶ added in v0.2.0
HandleGetArtists godoc
@Summary Get all artists
@Description Get all artists
@Tags artists
@Produce json
@Success 200 {object} types.ApiResponse[types.ApiGetArtistsData]
@Failure 400 {object} types.ApiError
@Failure 500 {object} types.ApiError
@Router /artists [get]
func (*ApiConfig) HandleGetTrackById ¶ added in v0.2.0
HandleGetTrackById godoc
@Summary Get track by id
@Description Get track by id
@Tags tracks
@Produce json
@Param id path string true "Track Id"
@Success 200 {object} types.ApiResponse[types.ApiGetTrackByIdData]
@Failure 400 {object} types.ApiError
@Failure 404 {object} types.ApiError
@Failure 500 {object} types.ApiError
@Router /tracks/{id} [get]
func (*ApiConfig) HandleGetTracks ¶ added in v0.2.0
HandleGetTracks godoc
@Summary Get all tracks
@Description Get all tracks
@Tags tracks
@Produce json
@Success 200 {object} types.ApiResponse[types.ApiGetTracksData]
@Failure 400 {object} types.ApiError
@Failure 500 {object} types.ApiError
@Router /tracks [get]
func (*ApiConfig) HandlePostAlbum ¶ added in v0.2.0
HandlePostAlbum godoc
@Summary Create new album
@Description Create new album
@Tags albums
@Accept mpfd
@Produce json
@Param name formData string true "Album name"
@Param artistId formData string true "Artist Id"
@Success 200 {object} types.ApiResponse[types.ApiPostAlbumData]
@Failure 400 {object} types.ApiError
@Failure 500 {object} types.ApiError
@Router /albums [post]
func (*ApiConfig) HandlePostArtist ¶ added in v0.2.0
HandlePostArtist godoc
@Summary Create new artist
@Description Create new artist
@Tags artists
@Accept mpfd
@Produce json
@Param name formData string true "Artist name"
@Success 200 {object} types.ApiResponse[types.ApiPostArtistData]
@Failure 400 {object} types.ApiError
@Failure 500 {object} types.ApiError
@Router /artists [post]
func (*ApiConfig) HandlePostTrack ¶ added in v0.2.0
HandlePostTrack godoc
@Summary Create new track
@Description Create new track
@Tags tracks
@Accept mpfd
@Produce json
@Param name formData string true "Track name"
@Param number formData string true "Track number"
@Param albumId formData string true "Album Id"
@Param artistId formData string true "Artist Id"
@Param bestQualityFile formData file true "Best Quality File"
@Param mobileQualityFile formData file true "Mobile Quality File"
@Param coverArt formData file true "Cover Art"
@Success 200 {object} types.ApiResponse[types.ApiPostTrackData]
@Failure 400 {object} types.ApiError
@Failure 500 {object} types.ApiError
@Router /tracks [post]
type CreateAlbumBody ¶
type CreateArtistBody ¶
type CreateArtistBody struct {
Name string `json:"name" form:"name" validate:"required"`
}
Click to show internal directories.
Click to hide internal directories.