albumDeliveryHttp

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: 13 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
	AlbumUseCase AlbumUseCase.AlbumUseCase
}

func (Handler) AddToFavorites

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

AddToFavorites godoc @Summary AddToFavorites @Description add to favorite @Tags album @Accept application/json @Produce application/json @Param albumId body structs.AlbumIdWrapper true "albumId" @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/albums/favorites [post]

func (Handler) Create

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

Create godoc @Summary Create @Description creating new album @Tags album @Accept application/json @Produce application/json @Param Album body albumProto.Album true "params of new album. 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/albums/ [post]

func (Handler) CreateCover

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

CreateCover godoc @Summary Create @Description creating new albumCover @Tags albumCover @Accept application/json @Produce application/json @Param Album body albumProto.AlbumCover true "params of new album cover. 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/albumCovers/ [post]

func (Handler) Delete

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

Delete godoc @Summary Delete @Description deleting album by id @Tags album @Accept application/json @Produce application/json @Param id path integer true "id of album 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/albums/{id} [delete]

func (Handler) DeleteCover

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

DeleteCover godoc @Summary Delete @Description deleting album cover by id @Tags albumCover @Accept application/json @Produce application/json @Param id path integer true "id of album cover 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/albumCovers/{id} [delete]

func (Handler) Get

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

Get godoc @Summary Get @Description getting album by id @Tags album @Accept application/json @Produce application/json @Param id path integer true "id of album 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/albums/{id} [get]

func (Handler) GetAll

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

GetAll godoc @Summary GetAll @Description getting all albums @Tags album @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/albums/ [get]

func (Handler) GetAllCovers

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

GetAllCovers godoc @Summary GetAll @Description getting all albums cover @Tags albumCover @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/albumCovers/ [get]

func (Handler) GetCover

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

GetCover godoc @Summary Get @Description getting album cover by id @Tags albumCover @Accept application/json @Produce application/json @Param id path integer true "id of album cover 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/albumCovers/{id} [get]

func (Handler) GetFavorites

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

GetFavorites godoc @Summary GetFavorites @Description getting favorites albums @Tags album @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/albums/favorites [get]

func (Handler) GetPopular

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

GetPopular godoc @Summary GetPopular @Description getting top20 popular albums @Tags album @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/albums/popular [get]

func (Handler) GetPopularOfWeek

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

GetPopularOfWeek godoc @Summary GetPopularOfTheWeek @Description getting top20 popular albums of the week @Tags album @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/albums/popular/week [get]

func (Handler) Like

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

Like godoc @Summary Like @Description like album by id @Tags album @Accept application/json @Produce application/json @Param id path integer true "id of album 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/albums/like/{id} [put]

func (Handler) LikeCheckByUser

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

LikeCheckByUser godoc @Summary LikeCheckByUser @Description LikeCheckByUser @Tags album @Accept application/json @Produce application/json @Param id path integer true "id of album 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/albums/like/{id} [get]

func (Handler) RemoveFromFavorites

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

RemoveFromFavorites godoc @Summary RemoveFromFavorites @Description remove from favorites @Tags album @Accept application/json @Produce application/json @Param id path integer true "albumId" @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/albums/favorites/{id} [delete]

func (Handler) Update

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

Update godoc @Summary Update @Description updating album by id @Tags albumCover @Accept application/json @Produce application/json @Param Album body albumProto.Album true "id of updating album 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/albums/ [put]

func (Handler) UpdateCover

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

UpdateCover godoc @Summary Update @Description updating album cover by id @Tags albumCover @Accept application/json @Produce application/json @Param AlbumCover body albumProto.AlbumCover true "id of updating album cover 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/albumCovers/ [put]

Jump to

Keyboard shortcuts

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