artistDeliveryHttp

package
v0.0.0-...-704a905 Latest Latest
Warning

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

Go to latest
Published: Jun 3, 2022 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Handler

type Handler struct {
	UserUseCase   user_domain.UserUseCase
	ArtistUseCase ArtistUseCase.ArtistUseCase
	TrackUseCase  TrackUseCase.TrackUseCase
}

func (Handler) AddToFavorites

func (h Handler) AddToFavorites(ctx echo.Context) error

AddToFavorites godoc @Summary AddToFavorites @Description add to favorite @Tags artist @Accept application/json @Produce application/json @Param artistId body structs.ArtistIdWrapper true "artistId" @Success 200 {object} webUtils.Success @Failure 400 {object} webUtils.Error "Data is invalid" @Failure 405 {object} webUtils.Error "Method is not allowed" @Router /api/v1/artists/favorites [post]

func (Handler) Create

func (h Handler) Create(ctx echo.Context) error

Create godoc @Summary Create @Description creating new artist @Tags artist @Accept application/json @Produce application/json @Param Artist body artistProto.Artist true "params of new artist. Id will be set automatically." @Success 200 {object} webUtils.Success @Failure 400 {object} webUtils.Error "Data is invalid" @Failure 405 {object} webUtils.Error "Method is not allowed" @Router /api/v1/artists/ [post]

func (Handler) Delete

func (h Handler) Delete(ctx echo.Context) error

Delete godoc @Summary Delete @Description deleting artist by id @Tags artist @Accept application/json @Produce application/json @Param id path integer true "id of artist which need to be deleted" @Success 200 {object} webUtils.Success @Failure 400 {object} webUtils.Error "Data is invalid" @Failure 405 {object} webUtils.Error "Method is not allowed" @Router /api/v1/artists/{id} [delete]

func (Handler) Get

func (h Handler) Get(ctx echo.Context) error

Get godoc @Summary Get @Description getting artist by id @Tags artist @Accept application/json @Produce application/json @Param id path integer true "id of artist which need to be getted" @Success 200 {object} webUtils.Success @Failure 400 {object} webUtils.Error "Data is invalid" @Failure 405 {object} webUtils.Error "Method is not allowed" @Router /api/v1/artists/{id} [get]

func (Handler) GetAll

func (h Handler) GetAll(ctx echo.Context) error

GetAll godoc @Summary GetAll @Description getting all artists @Tags artist @Accept application/json @Produce application/json @Success 200 {object} webUtils.Success @Failure 400 {object} webUtils.Error "Data is invalid" @Failure 405 {object} webUtils.Error "Method is not allowed" @Router /api/v1/artists/ [get]

func (Handler) GetFavorites

func (h Handler) GetFavorites(ctx echo.Context) error

GetFavorites godoc @Summary GetFavorites @Description getting favorites artist @Tags artist @Accept application/json @Produce application/json @Success 200 {object} webUtils.Success @Failure 400 {object} webUtils.Error "Data is invalid" @Failure 405 {object} webUtils.Error "Method is not allowed" @Router /api/v1/artists/favorites [get]

func (Handler) GetPopular

func (h Handler) GetPopular(ctx echo.Context) error

GetPopular godoc @Summary GetPopular @Description getting top20 popular artists @Tags artist @Accept application/json @Produce application/json @Success 200 {object} webUtils.Success @Failure 400 {object} webUtils.Error "Data is invalid" @Failure 405 {object} webUtils.Error "Method is not allowed" @Router /api/v1/artists/popular [get]

func (Handler) Like

func (h Handler) Like(ctx echo.Context) error

Like godoc @Summary Like @Description like artist by id @Tags artist @Accept application/json @Produce application/json @Param id path integer true "id of artist which need to be liked" @Success 200 {object} webUtils.Success @Failure 400 {object} webUtils.Error "Data is invalid" @Failure 405 {object} webUtils.Error "Method is not allowed" @Router /api/v1/artists/like/{id} [put]

func (Handler) LikeCheckByUser

func (h Handler) LikeCheckByUser(ctx echo.Context) error

LikeCheckByUser godoc @Summary LikeCheckByUser @Description LikeCheckByUser @Tags artist @Accept application/json @Produce application/json @Param id path integer true "id of artist which need to check for like" @Success 200 {object} webUtils.Success @Failure 400 {object} webUtils.Error "Data is invalid" @Failure 405 {object} webUtils.Error "Method is not allowed" @Router /api/v1/artists/like/{id} [get]

func (Handler) RemoveFromFavorites

func (h Handler) RemoveFromFavorites(ctx echo.Context) error

RemoveFromFavorites godoc @Summary RemoveFromFavorites @Description remove from favorites @Tags artist @Accept application/json @Produce application/json @Param id path integer true "artistId" @Success 200 {object} webUtils.Success @Failure 400 {object} webUtils.Error "Data is invalid" @Failure 405 {object} webUtils.Error "Method is not allowed" @Router /api/v1/artists/favorites/{id} [delete]

func (Handler) Update

func (h Handler) Update(ctx echo.Context) error

Update godoc @Summary Update @Description updating artist by id @Tags artist @Accept application/json @Produce application/json @Param Artist body artistProto.Artist true "id of updating artist and params of it." @Success 200 {object} webUtils.Success @Failure 400 {object} webUtils.Error "Data is invalid" @Failure 405 {object} webUtils.Error "Method is not allowed" @Router /api/v1/artists/ [put]

Jump to

Keyboard shortcuts

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