handlers

package
v2.0.0-...-5625d32 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 20, 2024 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConvertURL

func ConvertURL(c *fiber.Ctx, path string) string

Types

type ApiConfig

type ApiConfig struct {
	// contains filtered or unexported fields
}

func New

func New(db *pgxpool.Pool, queries *database.Queries, workDir string) ApiConfig

func (*ApiConfig) HandlerCreateAlbum

func (api *ApiConfig) HandlerCreateAlbum(c *fiber.Ctx) error

func (*ApiConfig) HandlerCreateArtist

func (api *ApiConfig) HandlerCreateArtist(c *fiber.Ctx) error

func (*ApiConfig) HandlerCreateQueueFromAlbum

func (apiConfig *ApiConfig) HandlerCreateQueueFromAlbum(c *fiber.Ctx) error

func (*ApiConfig) HandlerCreateTrack

func (api *ApiConfig) HandlerCreateTrack(c *fiber.Ctx) error

func (*ApiConfig) HandlerGetAlbum

func (apiConfig *ApiConfig) HandlerGetAlbum(c *fiber.Ctx) error

func (*ApiConfig) HandlerGetAllAlbums

func (apiConfig *ApiConfig) HandlerGetAllAlbums(c *fiber.Ctx) error

func (*ApiConfig) HandlerGetAllArtists

func (apiConfig *ApiConfig) HandlerGetAllArtists(c *fiber.Ctx) error

func (*ApiConfig) HandlerGetAllTracks

func (apiConfig *ApiConfig) HandlerGetAllTracks(c *fiber.Ctx) error

func (*ApiConfig) HandlerGetArtist

func (apiConfig *ApiConfig) HandlerGetArtist(c *fiber.Ctx) error

func (*ApiConfig) HandlerGetTrack

func (apiConfig *ApiConfig) HandlerGetTrack(c *fiber.Ctx) error

type CreateAlbumBody

type CreateAlbumBody struct {
	Name   string `json:"name" form:"name" validate:"required"`
	Artist string `json:"artist" form:"artist" validate:"required"`
}

type CreateArtistBody

type CreateArtistBody struct {
	Name string `json:"name" form:"name" validate:"required"`
}

type CreateTrackBody

type CreateTrackBody struct {
	Name   string `json:"name" form:"name" validate:"required"`
	Number int    `json:"number" form:"number" validate:"required"`
	Album  string `json:"album" form:"album" validate:"required"`
	Artist string `json:"artist" form:"artist" validate:"required"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL