http

package
v0.0.0-...-faa9808 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewBattleHTTPHandler

func NewBattleHTTPHandler(svc domain.IPokewarService, router *gin.RouterGroup)

func NewMonsterHTTPHandler

func NewMonsterHTTPHandler(svc domain.IPokewarService, router *gin.RouterGroup)

func NewRankHTTPHandler

func NewRankHTTPHandler(svc domain.IPokewarService, router *gin.RouterGroup)

Types

type BattleHTTPHandler

type BattleHTTPHandler struct {
	Svc domain.IPokewarService
}

func (*BattleHTTPHandler) Fetch

func (handler *BattleHTTPHandler) Fetch(ctx *gin.Context)

Fetch godoc @Schemes @Summary Battle List @Description Get Battle List. @Tags Battles @Accept json @Produce json @Param limit query string false "data limit" @Param offset query string false "data offset" @Success 200 {object} utils.SuccessRespond{data=[]domain.Battle} "BASIC RESPOND" @Success 200 {object} utils.SuccessRespondWithPagination{data=[]domain.Battle} "PAGINATION RESPOND" @Failure 404 {object} utils.ErrorRespond "NOT FOUND" @Failure 500 {object} utils.ErrorRespond "INTERNAL SERVER ERROR RESPOND" @Router /api/v1/battles [GET]

type MonsterHTTPHandler

type MonsterHTTPHandler struct {
	Svc domain.IPokewarService
}

func (*MonsterHTTPHandler) Fetch

func (handler *MonsterHTTPHandler) Fetch(ctx *gin.Context)

Fetch godoc @Schemes @Summary Monster List @Description Get Monster List. @Tags Monsters @Accept json @Produce json @Param limit query string false "data limit" @Param offset query string false "data offset" @Success 200 {object} utils.SuccessRespond{data=[]domain.Monster} "BASIC RESPOND" @Success 200 {object} utils.SuccessRespondWithPagination{data=[]domain.Monster} "PAGINATION RESPOND" @Failure 404 {object} utils.ErrorRespond "NOT FOUND" @Failure 500 {object} utils.ErrorRespond "INTERNAL SERVER ERROR RESPOND" @Router /api/v1/monsters [GET]

func (*MonsterHTTPHandler) Sync

func (handler *MonsterHTTPHandler) Sync(ctx *gin.Context)

Sync godoc @Schemes @Summary Sync Local Monster @Description Get Monster From Pokeapi and Sync with Local Data. @Tags Monsters @Accept json @Produce json @Success 200 {object} utils.SuccessRespond{data=[]domain.Monster} "BASIC RESPOND" @Failure 404 {object} utils.ErrorRespond "NOT FOUND" @Failure 500 {object} utils.ErrorRespond "INTERNAL SERVER ERROR RESPOND" @Router /api/v1/monsters/sync [GET]

type RankHTTPHandler

type RankHTTPHandler struct {
	Svc domain.IPokewarService
}

func (*RankHTTPHandler) Fetch

func (handler *RankHTTPHandler) Fetch(ctx *gin.Context)

Fetch godoc @Schemes @Summary Rank List @Description Get Rank List. @Tags Ranks @Accept json @Produce json @Param limit query string false "data limit" @Param offset query string false "data offset" @Success 200 {object} utils.SuccessRespond{data=[]domain.Rank} "BASIC RESPOND" @Success 200 {object} utils.SuccessRespondWithPagination{data=[]domain.Rank} "PAGINATION RESPOND" @Failure 404 {object} utils.ErrorRespond "NOT FOUND" @Failure 500 {object} utils.ErrorRespond "INTERNAL SERVER ERROR RESPOND" @Router /api/v1/ranks [GET]

Jump to

Keyboard shortcuts

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