Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type API ¶
type API struct {
// contains filtered or unexported fields
}
func (*API) GetSeasons ¶
swagger:route GET /seasons season getSeasons Get all seasons.
responses:
200: body:GetSeasonsResp 500: Error
func (*API) PostSeason ¶
swagger:route POST /season season postSeason
Add a new season.
responses:
200: body:PostSeasonResp 400: body:Error 500: body:Error
type GetSeasonsResp ¶
type GetSeasonsResp struct {
Data []Season `json:"data"`
}
swagger:model GetSeasonsResp
type PostSeasonInput ¶
type PostSeasonInput struct { // in:body Body struct { // required: true Name string `json:"name" binding:"required,min=5,ascii"` // required: true StartDate handlers.Date `json:"startDate" binding:"required"` // required: true EndDate handlers.Date `json:"endDate" binding:"required,gtfield=StartDate"` ByeWeeks []handlers.Date `json:"byeWeeks" binding:"unique"` } }
swagger:parameters postSeason
type PostSeasonResp ¶
type PostSeasonResp struct {
Data Season `json:"data"`
}
swagger:model PostSeasonResp
type PutSeasonInput ¶
type PutSeasonInput struct { // in:path ID uuid.UUID // in:body Body struct { // required: true Name string `json:"name" binding:"required,min=5,ascii"` // required: true StartDate handlers.Date `json:"startDate" binding:"required"` // required: true EndDate handlers.Date `json:"endDate" binding:"required,gtfield=StartDate"` ByeWeeks []handlers.Date `json:"byeWeeks" binding:"unique"` } }
swagger:parameters putSeason
type PutSeasonResp ¶
type PutSeasonResp struct {
Data Season `json:"data"`
}
swagger:model PutSeasonResp
type Season ¶
type Season struct { ID string `json:"id"` Name string `json:"name"` StartDate string `json:"startDate"` EndDate string `json:"endDate"` ByeWeeks []string `json:"byeWeeks,omitempty"` }
swagger:model Season
type SeasonDB ¶
type SeasonDB interface { AddSeason(ctx context.Context, season model.Season) (*model.Season, error) UpdateSeason(ctx context.Context, id uuid.UUID, updates db.UpdateSeasonInput) (*model.Season, error) GetAllSeasons(ctx context.Context) ([]model.Season, error) GetSeason(ctx context.Context, id uuid.UUID) (*model.Season, error) }
Click to show internal directories.
Click to hide internal directories.