Documentation
¶
Overview ¶
Package api provides primitives to interact with the openapi HTTP API.
Code generated by github.com/oapi-codegen/oapi-codegen/v2 version v2.4.1 DO NOT EDIT.
Package api provides primitives to interact with the openapi HTTP API.
Code generated by github.com/oapi-codegen/oapi-codegen/v2 version v2.4.1 DO NOT EDIT.
Package api provides primitives to interact with the openapi HTTP API.
Code generated by github.com/oapi-codegen/oapi-codegen/v2 version v2.4.1 DO NOT EDIT.
Index ¶
- func NewCreateGameRequest(server string, body CreateGameJSONRequestBody) (*http.Request, error)
- func NewCreateGameRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
- func NewCreatePlayerRequest(server string, body CreatePlayerJSONRequestBody) (*http.Request, error)
- func NewCreatePlayerRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
- func NewCreateSeasonRequest(server string, body CreateSeasonJSONRequestBody) (*http.Request, error)
- func NewCreateSeasonRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
- func NewCreateTeamRequest(server string, body CreateTeamJSONRequestBody) (*http.Request, error)
- func NewCreateTeamRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
- func NewGetGameByIDRequest(server string, id int64) (*http.Request, error)
- func NewGetGamesRequest(server string, params *GetGamesParams) (*http.Request, error)
- func NewGetPlayerByIDRequest(server string, id int64) (*http.Request, error)
- func NewGetPlayersRequest(server string, params *GetPlayersParams) (*http.Request, error)
- func NewGetSeasonByIDRequest(server string, id int64) (*http.Request, error)
- func NewGetSeasonsRequest(server string, params *GetSeasonsParams) (*http.Request, error)
- func NewGetTeamByIDRequest(server string, id int64) (*http.Request, error)
- func NewGetTeamsRequest(server string, params *GetTeamsParams) (*http.Request, error)
- func NewUpdateGameRequest(server string, id int64, body UpdateGameJSONRequestBody) (*http.Request, error)
- func NewUpdateGameRequestWithBody(server string, id int64, contentType string, body io.Reader) (*http.Request, error)
- func NewUpdatePlayerRequest(server string, id int64, body UpdatePlayerJSONRequestBody) (*http.Request, error)
- func NewUpdatePlayerRequestWithBody(server string, id int64, contentType string, body io.Reader) (*http.Request, error)
- func NewUpdateSeasonRequest(server string, id int64, body UpdateSeasonJSONRequestBody) (*http.Request, error)
- func NewUpdateSeasonRequestWithBody(server string, id int64, contentType string, body io.Reader) (*http.Request, error)
- func NewUpdateTeamRequest(server string, id int64, body UpdateTeamJSONRequestBody) (*http.Request, error)
- func NewUpdateTeamRequestWithBody(server string, id int64, contentType string, body io.Reader) (*http.Request, error)
- func RegisterHandlers(router *mux.Router, si ServerInterface, opts ...ServerOption)
- func RegisterUnauthedHandlers(router *mux.Router, si ServerInterface, opts ...ServerOption)
- type Client
- func (c *Client) CreateGame(ctx context.Context, body CreateGameJSONRequestBody, ...) (*http.Response, error)
- func (c *Client) CreateGameWithBody(ctx context.Context, contentType string, body io.Reader, ...) (*http.Response, error)
- func (c *Client) CreatePlayer(ctx context.Context, body CreatePlayerJSONRequestBody, ...) (*http.Response, error)
- func (c *Client) CreatePlayerWithBody(ctx context.Context, contentType string, body io.Reader, ...) (*http.Response, error)
- func (c *Client) CreateSeason(ctx context.Context, body CreateSeasonJSONRequestBody, ...) (*http.Response, error)
- func (c *Client) CreateSeasonWithBody(ctx context.Context, contentType string, body io.Reader, ...) (*http.Response, error)
- func (c *Client) CreateTeam(ctx context.Context, body CreateTeamJSONRequestBody, ...) (*http.Response, error)
- func (c *Client) CreateTeamWithBody(ctx context.Context, contentType string, body io.Reader, ...) (*http.Response, error)
- func (c *Client) GetGameByID(ctx context.Context, id int64, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) GetGames(ctx context.Context, params *GetGamesParams, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) GetPlayerByID(ctx context.Context, id int64, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) GetPlayers(ctx context.Context, params *GetPlayersParams, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) GetSeasonByID(ctx context.Context, id int64, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) GetSeasons(ctx context.Context, params *GetSeasonsParams, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) GetTeamByID(ctx context.Context, id int64, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) GetTeams(ctx context.Context, params *GetTeamsParams, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) UpdateGame(ctx context.Context, id int64, body UpdateGameJSONRequestBody, ...) (*http.Response, error)
- func (c *Client) UpdateGameWithBody(ctx context.Context, id int64, contentType string, body io.Reader, ...) (*http.Response, error)
- func (c *Client) UpdatePlayer(ctx context.Context, id int64, body UpdatePlayerJSONRequestBody, ...) (*http.Response, error)
- func (c *Client) UpdatePlayerWithBody(ctx context.Context, id int64, contentType string, body io.Reader, ...) (*http.Response, error)
- func (c *Client) UpdateSeason(ctx context.Context, id int64, body UpdateSeasonJSONRequestBody, ...) (*http.Response, error)
- func (c *Client) UpdateSeasonWithBody(ctx context.Context, id int64, contentType string, body io.Reader, ...) (*http.Response, error)
- func (c *Client) UpdateTeam(ctx context.Context, id int64, body UpdateTeamJSONRequestBody, ...) (*http.Response, error)
- func (c *Client) UpdateTeamWithBody(ctx context.Context, id int64, contentType string, body io.Reader, ...) (*http.Response, error)
- type ClientInterface
- type ClientOption
- type ClientWithResponses
- func (c *ClientWithResponses) CreateGameWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, ...) (*CreateGameResponse, error)
- func (c *ClientWithResponses) CreateGameWithResponse(ctx context.Context, body CreateGameJSONRequestBody, ...) (*CreateGameResponse, error)
- func (c *ClientWithResponses) CreatePlayerWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, ...) (*CreatePlayerResponse, error)
- func (c *ClientWithResponses) CreatePlayerWithResponse(ctx context.Context, body CreatePlayerJSONRequestBody, ...) (*CreatePlayerResponse, error)
- func (c *ClientWithResponses) CreateSeasonWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, ...) (*CreateSeasonResponse, error)
- func (c *ClientWithResponses) CreateSeasonWithResponse(ctx context.Context, body CreateSeasonJSONRequestBody, ...) (*CreateSeasonResponse, error)
- func (c *ClientWithResponses) CreateTeamWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, ...) (*CreateTeamResponse, error)
- func (c *ClientWithResponses) CreateTeamWithResponse(ctx context.Context, body CreateTeamJSONRequestBody, ...) (*CreateTeamResponse, error)
- func (c *ClientWithResponses) GetGameByIDWithResponse(ctx context.Context, id int64, reqEditors ...RequestEditorFn) (*GetGameByIDResponse, error)
- func (c *ClientWithResponses) GetGamesWithResponse(ctx context.Context, params *GetGamesParams, reqEditors ...RequestEditorFn) (*GetGamesResponse, error)
- func (c *ClientWithResponses) GetPlayerByIDWithResponse(ctx context.Context, id int64, reqEditors ...RequestEditorFn) (*GetPlayerByIDResponse, error)
- func (c *ClientWithResponses) GetPlayersWithResponse(ctx context.Context, params *GetPlayersParams, reqEditors ...RequestEditorFn) (*GetPlayersResponse, error)
- func (c *ClientWithResponses) GetSeasonByIDWithResponse(ctx context.Context, id int64, reqEditors ...RequestEditorFn) (*GetSeasonByIDResponse, error)
- func (c *ClientWithResponses) GetSeasonsWithResponse(ctx context.Context, params *GetSeasonsParams, reqEditors ...RequestEditorFn) (*GetSeasonsResponse, error)
- func (c *ClientWithResponses) GetTeamByIDWithResponse(ctx context.Context, id int64, reqEditors ...RequestEditorFn) (*GetTeamByIDResponse, error)
- func (c *ClientWithResponses) GetTeamsWithResponse(ctx context.Context, params *GetTeamsParams, reqEditors ...RequestEditorFn) (*GetTeamsResponse, error)
- func (c *ClientWithResponses) UpdateGameWithBodyWithResponse(ctx context.Context, id int64, contentType string, body io.Reader, ...) (*UpdateGameResponse, error)
- func (c *ClientWithResponses) UpdateGameWithResponse(ctx context.Context, id int64, body UpdateGameJSONRequestBody, ...) (*UpdateGameResponse, error)
- func (c *ClientWithResponses) UpdatePlayerWithBodyWithResponse(ctx context.Context, id int64, contentType string, body io.Reader, ...) (*UpdatePlayerResponse, error)
- func (c *ClientWithResponses) UpdatePlayerWithResponse(ctx context.Context, id int64, body UpdatePlayerJSONRequestBody, ...) (*UpdatePlayerResponse, error)
- func (c *ClientWithResponses) UpdateSeasonWithBodyWithResponse(ctx context.Context, id int64, contentType string, body io.Reader, ...) (*UpdateSeasonResponse, error)
- func (c *ClientWithResponses) UpdateSeasonWithResponse(ctx context.Context, id int64, body UpdateSeasonJSONRequestBody, ...) (*UpdateSeasonResponse, error)
- func (c *ClientWithResponses) UpdateTeamWithBodyWithResponse(ctx context.Context, id int64, contentType string, body io.Reader, ...) (*UpdateTeamResponse, error)
- func (c *ClientWithResponses) UpdateTeamWithResponse(ctx context.Context, id int64, body UpdateTeamJSONRequestBody, ...) (*UpdateTeamResponse, error)
- type ClientWithResponsesInterface
- type CreateGameJSONBody
- type CreateGameJSONRequestBody
- type CreateGameResponse
- type CreatePlayerJSONBody
- type CreatePlayerJSONRequestBody
- type CreatePlayerResponse
- type CreateSeasonJSONBody
- type CreateSeasonJSONRequestBody
- type CreateSeasonResponse
- type CreateTeamJSONBody
- type CreateTeamJSONRequestBody
- type CreateTeamResponse
- type ErrorHandlerFunc
- type Game
- type GamePartnership
- type GameTeam
- type GamesResponse
- type GetGameByIDResponse
- type GetGamesParams
- type GetGamesParamsSortDir
- type GetGamesResponse
- type GetPlayerByIDResponse
- type GetPlayersParams
- type GetPlayersParamsSortDir
- type GetPlayersResponse
- type GetSeasonByIDResponse
- type GetSeasonsParams
- type GetSeasonsParamsSortDir
- type GetSeasonsResponse
- type GetTeamByIDResponse
- type GetTeamsParams
- type GetTeamsParamsSortDir
- type GetTeamsResponse
- type HttpRequestDoer
- type InvalidParamFormatError
- type MetricsMiddlewareFunc
- type Partnership
- type Player
- type PlayersResponse
- type QueryDate
- type QueryDateMax
- type QueryDateMin
- type QueryName
- type QuerySeason
- type QueryTeam
- type QueryYear
- type RateLimiterFunc
- type RequestEditorFn
- type RequiredHeaderError
- type RequiredParamError
- type Scores
- type Season
- type SeasonsResponse
- type ServerInterface
- type ServerInterfaceWrapper
- func (siw *ServerInterfaceWrapper) CreateGame(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) CreatePlayer(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) CreateSeason(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) CreateTeam(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) GetGameByID(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) GetGames(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) GetPlayerByID(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) GetPlayers(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) GetSeasonByID(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) GetSeasons(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) GetTeamByID(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) GetTeams(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) UpdateGame(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) UpdatePlayer(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) UpdateSeason(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) UpdateTeam(w http.ResponseWriter, r *http.Request)
- type ServerOption
- type Team
- type TeamsResponse
- type TooManyValuesForParamError
- type UnescapedCookieParamError
- type UnmarshalingParamError
- type UpdateGameJSONBody
- type UpdateGameJSONRequestBody
- type UpdateGameResponse
- type UpdatePlayerJSONBody
- type UpdatePlayerJSONRequestBody
- type UpdatePlayerResponse
- type UpdateSeasonJSONBody
- type UpdateSeasonJSONRequestBody
- type UpdateSeasonResponse
- type UpdateTeamJSONBody
- type UpdateTeamJSONRequestBody
- type UpdateTeamResponse
- type WinningTeam
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewCreateGameRequest ¶
func NewCreateGameRequest(server string, body CreateGameJSONRequestBody) (*http.Request, error)
NewCreateGameRequest calls the generic CreateGame builder with application/json body
func NewCreateGameRequestWithBody ¶
func NewCreateGameRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
NewCreateGameRequestWithBody generates requests for CreateGame with any type of body
func NewCreatePlayerRequest ¶
func NewCreatePlayerRequest(server string, body CreatePlayerJSONRequestBody) (*http.Request, error)
NewCreatePlayerRequest calls the generic CreatePlayer builder with application/json body
func NewCreatePlayerRequestWithBody ¶
func NewCreatePlayerRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
NewCreatePlayerRequestWithBody generates requests for CreatePlayer with any type of body
func NewCreateSeasonRequest ¶
func NewCreateSeasonRequest(server string, body CreateSeasonJSONRequestBody) (*http.Request, error)
NewCreateSeasonRequest calls the generic CreateSeason builder with application/json body
func NewCreateSeasonRequestWithBody ¶
func NewCreateSeasonRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
NewCreateSeasonRequestWithBody generates requests for CreateSeason with any type of body
func NewCreateTeamRequest ¶
func NewCreateTeamRequest(server string, body CreateTeamJSONRequestBody) (*http.Request, error)
NewCreateTeamRequest calls the generic CreateTeam builder with application/json body
func NewCreateTeamRequestWithBody ¶
func NewCreateTeamRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
NewCreateTeamRequestWithBody generates requests for CreateTeam with any type of body
func NewGetGameByIDRequest ¶
NewGetGameByIDRequest generates requests for GetGameByID
func NewGetGamesRequest ¶
func NewGetGamesRequest(server string, params *GetGamesParams) (*http.Request, error)
NewGetGamesRequest generates requests for GetGames
func NewGetPlayerByIDRequest ¶
NewGetPlayerByIDRequest generates requests for GetPlayerByID
func NewGetPlayersRequest ¶
func NewGetPlayersRequest(server string, params *GetPlayersParams) (*http.Request, error)
NewGetPlayersRequest generates requests for GetPlayers
func NewGetSeasonByIDRequest ¶
NewGetSeasonByIDRequest generates requests for GetSeasonByID
func NewGetSeasonsRequest ¶
func NewGetSeasonsRequest(server string, params *GetSeasonsParams) (*http.Request, error)
NewGetSeasonsRequest generates requests for GetSeasons
func NewGetTeamByIDRequest ¶
NewGetTeamByIDRequest generates requests for GetTeamByID
func NewGetTeamsRequest ¶
func NewGetTeamsRequest(server string, params *GetTeamsParams) (*http.Request, error)
NewGetTeamsRequest generates requests for GetTeams
func NewUpdateGameRequest ¶
func NewUpdateGameRequest(server string, id int64, body UpdateGameJSONRequestBody) (*http.Request, error)
NewUpdateGameRequest calls the generic UpdateGame builder with application/json body
func NewUpdateGameRequestWithBody ¶
func NewUpdateGameRequestWithBody(server string, id int64, contentType string, body io.Reader) (*http.Request, error)
NewUpdateGameRequestWithBody generates requests for UpdateGame with any type of body
func NewUpdatePlayerRequest ¶
func NewUpdatePlayerRequest(server string, id int64, body UpdatePlayerJSONRequestBody) (*http.Request, error)
NewUpdatePlayerRequest calls the generic UpdatePlayer builder with application/json body
func NewUpdatePlayerRequestWithBody ¶
func NewUpdatePlayerRequestWithBody(server string, id int64, contentType string, body io.Reader) (*http.Request, error)
NewUpdatePlayerRequestWithBody generates requests for UpdatePlayer with any type of body
func NewUpdateSeasonRequest ¶
func NewUpdateSeasonRequest(server string, id int64, body UpdateSeasonJSONRequestBody) (*http.Request, error)
NewUpdateSeasonRequest calls the generic UpdateSeason builder with application/json body
func NewUpdateSeasonRequestWithBody ¶
func NewUpdateSeasonRequestWithBody(server string, id int64, contentType string, body io.Reader) (*http.Request, error)
NewUpdateSeasonRequestWithBody generates requests for UpdateSeason with any type of body
func NewUpdateTeamRequest ¶
func NewUpdateTeamRequest(server string, id int64, body UpdateTeamJSONRequestBody) (*http.Request, error)
NewUpdateTeamRequest calls the generic UpdateTeam builder with application/json body
func NewUpdateTeamRequestWithBody ¶
func NewUpdateTeamRequestWithBody(server string, id int64, contentType string, body io.Reader) (*http.Request, error)
NewUpdateTeamRequestWithBody generates requests for UpdateTeam with any type of body
func RegisterHandlers ¶
func RegisterHandlers(router *mux.Router, si ServerInterface, opts ...ServerOption)
RegisterHandlers registers the api handlers.
func RegisterUnauthedHandlers ¶
func RegisterUnauthedHandlers(router *mux.Router, si ServerInterface, opts ...ServerOption)
RegisterUnauthedHandlers registers any api handlers which do not have any authentication on them. Most services will not have any.
Types ¶
type Client ¶
type Client struct {
// The endpoint of the server conforming to this interface, with scheme,
// https://api.deepmap.com for example. This can contain a path relative
// to the server, such as https://api.deepmap.com/dev-test, and all the
// paths in the swagger spec will be appended to the server.
Server string
// Doer for performing requests, typically a *http.Client with any
// customized settings, such as certificate chains.
Client HttpRequestDoer
// A list of callbacks for modifying requests which are generated before sending over
// the network.
RequestEditors []RequestEditorFn
}
Client which conforms to the OpenAPI3 specification for this service.
func NewClient ¶
func NewClient(server string, opts ...ClientOption) (*Client, error)
Creates a new Client, with reasonable defaults
func (*Client) CreateGame ¶
func (c *Client) CreateGame(ctx context.Context, body CreateGameJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) CreateGameWithBody ¶
func (*Client) CreatePlayer ¶
func (c *Client) CreatePlayer(ctx context.Context, body CreatePlayerJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) CreatePlayerWithBody ¶
func (*Client) CreateSeason ¶
func (c *Client) CreateSeason(ctx context.Context, body CreateSeasonJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) CreateSeasonWithBody ¶
func (*Client) CreateTeam ¶
func (c *Client) CreateTeam(ctx context.Context, body CreateTeamJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) CreateTeamWithBody ¶
func (*Client) GetGameByID ¶
func (*Client) GetGames ¶
func (c *Client) GetGames(ctx context.Context, params *GetGamesParams, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) GetPlayerByID ¶
func (*Client) GetPlayers ¶
func (c *Client) GetPlayers(ctx context.Context, params *GetPlayersParams, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) GetSeasonByID ¶
func (*Client) GetSeasons ¶
func (c *Client) GetSeasons(ctx context.Context, params *GetSeasonsParams, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) GetTeamByID ¶
func (*Client) GetTeams ¶
func (c *Client) GetTeams(ctx context.Context, params *GetTeamsParams, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) UpdateGame ¶
func (c *Client) UpdateGame(ctx context.Context, id int64, body UpdateGameJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) UpdateGameWithBody ¶
func (*Client) UpdatePlayer ¶
func (c *Client) UpdatePlayer(ctx context.Context, id int64, body UpdatePlayerJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) UpdatePlayerWithBody ¶
func (*Client) UpdateSeason ¶
func (c *Client) UpdateSeason(ctx context.Context, id int64, body UpdateSeasonJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) UpdateSeasonWithBody ¶
func (*Client) UpdateTeam ¶
func (c *Client) UpdateTeam(ctx context.Context, id int64, body UpdateTeamJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
type ClientInterface ¶
type ClientInterface interface {
// GetGames request
GetGames(ctx context.Context, params *GetGamesParams, reqEditors ...RequestEditorFn) (*http.Response, error)
// CreateGameWithBody request with any body
CreateGameWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
CreateGame(ctx context.Context, body CreateGameJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
// GetGameByID request
GetGameByID(ctx context.Context, id int64, reqEditors ...RequestEditorFn) (*http.Response, error)
// UpdateGameWithBody request with any body
UpdateGameWithBody(ctx context.Context, id int64, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
UpdateGame(ctx context.Context, id int64, body UpdateGameJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
// GetPlayers request
GetPlayers(ctx context.Context, params *GetPlayersParams, reqEditors ...RequestEditorFn) (*http.Response, error)
// CreatePlayerWithBody request with any body
CreatePlayerWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
CreatePlayer(ctx context.Context, body CreatePlayerJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
// GetPlayerByID request
GetPlayerByID(ctx context.Context, id int64, reqEditors ...RequestEditorFn) (*http.Response, error)
// UpdatePlayerWithBody request with any body
UpdatePlayerWithBody(ctx context.Context, id int64, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
UpdatePlayer(ctx context.Context, id int64, body UpdatePlayerJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
// GetSeasons request
GetSeasons(ctx context.Context, params *GetSeasonsParams, reqEditors ...RequestEditorFn) (*http.Response, error)
// CreateSeasonWithBody request with any body
CreateSeasonWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
CreateSeason(ctx context.Context, body CreateSeasonJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
// GetSeasonByID request
GetSeasonByID(ctx context.Context, id int64, reqEditors ...RequestEditorFn) (*http.Response, error)
// UpdateSeasonWithBody request with any body
UpdateSeasonWithBody(ctx context.Context, id int64, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
UpdateSeason(ctx context.Context, id int64, body UpdateSeasonJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
// GetTeams request
GetTeams(ctx context.Context, params *GetTeamsParams, reqEditors ...RequestEditorFn) (*http.Response, error)
// CreateTeamWithBody request with any body
CreateTeamWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
CreateTeam(ctx context.Context, body CreateTeamJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
// GetTeamByID request
GetTeamByID(ctx context.Context, id int64, reqEditors ...RequestEditorFn) (*http.Response, error)
// UpdateTeamWithBody request with any body
UpdateTeamWithBody(ctx context.Context, id int64, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
UpdateTeam(ctx context.Context, id int64, body UpdateTeamJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
}
The interface specification for the client above.
type ClientOption ¶
ClientOption allows setting custom parameters during construction
func WithHTTPClient ¶
func WithHTTPClient(doer HttpRequestDoer) ClientOption
WithHTTPClient allows overriding the default Doer, which is automatically created using http.Client. This is useful for tests.
func WithRequestEditorFn ¶
func WithRequestEditorFn(fn RequestEditorFn) ClientOption
WithRequestEditorFn allows setting up a callback function, which will be called right before sending the request. This can be used to mutate the request.
type ClientWithResponses ¶
type ClientWithResponses struct {
ClientInterface
}
ClientWithResponses builds on ClientInterface to offer response payloads
func NewClientWithResponses ¶
func NewClientWithResponses(server string, opts ...ClientOption) (*ClientWithResponses, error)
NewClientWithResponses creates a new ClientWithResponses, which wraps Client with return type handling
func (*ClientWithResponses) CreateGameWithBodyWithResponse ¶
func (c *ClientWithResponses) CreateGameWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateGameResponse, error)
CreateGameWithBodyWithResponse request with arbitrary body returning *CreateGameResponse
func (*ClientWithResponses) CreateGameWithResponse ¶
func (c *ClientWithResponses) CreateGameWithResponse(ctx context.Context, body CreateGameJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateGameResponse, error)
func (*ClientWithResponses) CreatePlayerWithBodyWithResponse ¶
func (c *ClientWithResponses) CreatePlayerWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreatePlayerResponse, error)
CreatePlayerWithBodyWithResponse request with arbitrary body returning *CreatePlayerResponse
func (*ClientWithResponses) CreatePlayerWithResponse ¶
func (c *ClientWithResponses) CreatePlayerWithResponse(ctx context.Context, body CreatePlayerJSONRequestBody, reqEditors ...RequestEditorFn) (*CreatePlayerResponse, error)
func (*ClientWithResponses) CreateSeasonWithBodyWithResponse ¶
func (c *ClientWithResponses) CreateSeasonWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateSeasonResponse, error)
CreateSeasonWithBodyWithResponse request with arbitrary body returning *CreateSeasonResponse
func (*ClientWithResponses) CreateSeasonWithResponse ¶
func (c *ClientWithResponses) CreateSeasonWithResponse(ctx context.Context, body CreateSeasonJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateSeasonResponse, error)
func (*ClientWithResponses) CreateTeamWithBodyWithResponse ¶
func (c *ClientWithResponses) CreateTeamWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateTeamResponse, error)
CreateTeamWithBodyWithResponse request with arbitrary body returning *CreateTeamResponse
func (*ClientWithResponses) CreateTeamWithResponse ¶
func (c *ClientWithResponses) CreateTeamWithResponse(ctx context.Context, body CreateTeamJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateTeamResponse, error)
func (*ClientWithResponses) GetGameByIDWithResponse ¶
func (c *ClientWithResponses) GetGameByIDWithResponse(ctx context.Context, id int64, reqEditors ...RequestEditorFn) (*GetGameByIDResponse, error)
GetGameByIDWithResponse request returning *GetGameByIDResponse
func (*ClientWithResponses) GetGamesWithResponse ¶
func (c *ClientWithResponses) GetGamesWithResponse(ctx context.Context, params *GetGamesParams, reqEditors ...RequestEditorFn) (*GetGamesResponse, error)
GetGamesWithResponse request returning *GetGamesResponse
func (*ClientWithResponses) GetPlayerByIDWithResponse ¶
func (c *ClientWithResponses) GetPlayerByIDWithResponse(ctx context.Context, id int64, reqEditors ...RequestEditorFn) (*GetPlayerByIDResponse, error)
GetPlayerByIDWithResponse request returning *GetPlayerByIDResponse
func (*ClientWithResponses) GetPlayersWithResponse ¶
func (c *ClientWithResponses) GetPlayersWithResponse(ctx context.Context, params *GetPlayersParams, reqEditors ...RequestEditorFn) (*GetPlayersResponse, error)
GetPlayersWithResponse request returning *GetPlayersResponse
func (*ClientWithResponses) GetSeasonByIDWithResponse ¶
func (c *ClientWithResponses) GetSeasonByIDWithResponse(ctx context.Context, id int64, reqEditors ...RequestEditorFn) (*GetSeasonByIDResponse, error)
GetSeasonByIDWithResponse request returning *GetSeasonByIDResponse
func (*ClientWithResponses) GetSeasonsWithResponse ¶
func (c *ClientWithResponses) GetSeasonsWithResponse(ctx context.Context, params *GetSeasonsParams, reqEditors ...RequestEditorFn) (*GetSeasonsResponse, error)
GetSeasonsWithResponse request returning *GetSeasonsResponse
func (*ClientWithResponses) GetTeamByIDWithResponse ¶
func (c *ClientWithResponses) GetTeamByIDWithResponse(ctx context.Context, id int64, reqEditors ...RequestEditorFn) (*GetTeamByIDResponse, error)
GetTeamByIDWithResponse request returning *GetTeamByIDResponse
func (*ClientWithResponses) GetTeamsWithResponse ¶
func (c *ClientWithResponses) GetTeamsWithResponse(ctx context.Context, params *GetTeamsParams, reqEditors ...RequestEditorFn) (*GetTeamsResponse, error)
GetTeamsWithResponse request returning *GetTeamsResponse
func (*ClientWithResponses) UpdateGameWithBodyWithResponse ¶
func (c *ClientWithResponses) UpdateGameWithBodyWithResponse(ctx context.Context, id int64, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateGameResponse, error)
UpdateGameWithBodyWithResponse request with arbitrary body returning *UpdateGameResponse
func (*ClientWithResponses) UpdateGameWithResponse ¶
func (c *ClientWithResponses) UpdateGameWithResponse(ctx context.Context, id int64, body UpdateGameJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateGameResponse, error)
func (*ClientWithResponses) UpdatePlayerWithBodyWithResponse ¶
func (c *ClientWithResponses) UpdatePlayerWithBodyWithResponse(ctx context.Context, id int64, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdatePlayerResponse, error)
UpdatePlayerWithBodyWithResponse request with arbitrary body returning *UpdatePlayerResponse
func (*ClientWithResponses) UpdatePlayerWithResponse ¶
func (c *ClientWithResponses) UpdatePlayerWithResponse(ctx context.Context, id int64, body UpdatePlayerJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdatePlayerResponse, error)
func (*ClientWithResponses) UpdateSeasonWithBodyWithResponse ¶
func (c *ClientWithResponses) UpdateSeasonWithBodyWithResponse(ctx context.Context, id int64, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateSeasonResponse, error)
UpdateSeasonWithBodyWithResponse request with arbitrary body returning *UpdateSeasonResponse
func (*ClientWithResponses) UpdateSeasonWithResponse ¶
func (c *ClientWithResponses) UpdateSeasonWithResponse(ctx context.Context, id int64, body UpdateSeasonJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateSeasonResponse, error)
func (*ClientWithResponses) UpdateTeamWithBodyWithResponse ¶
func (c *ClientWithResponses) UpdateTeamWithBodyWithResponse(ctx context.Context, id int64, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateTeamResponse, error)
UpdateTeamWithBodyWithResponse request with arbitrary body returning *UpdateTeamResponse
func (*ClientWithResponses) UpdateTeamWithResponse ¶
func (c *ClientWithResponses) UpdateTeamWithResponse(ctx context.Context, id int64, body UpdateTeamJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateTeamResponse, error)
type ClientWithResponsesInterface ¶
type ClientWithResponsesInterface interface {
// GetGamesWithResponse request
GetGamesWithResponse(ctx context.Context, params *GetGamesParams, reqEditors ...RequestEditorFn) (*GetGamesResponse, error)
// CreateGameWithBodyWithResponse request with any body
CreateGameWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateGameResponse, error)
CreateGameWithResponse(ctx context.Context, body CreateGameJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateGameResponse, error)
// GetGameByIDWithResponse request
GetGameByIDWithResponse(ctx context.Context, id int64, reqEditors ...RequestEditorFn) (*GetGameByIDResponse, error)
// UpdateGameWithBodyWithResponse request with any body
UpdateGameWithBodyWithResponse(ctx context.Context, id int64, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateGameResponse, error)
UpdateGameWithResponse(ctx context.Context, id int64, body UpdateGameJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateGameResponse, error)
// GetPlayersWithResponse request
GetPlayersWithResponse(ctx context.Context, params *GetPlayersParams, reqEditors ...RequestEditorFn) (*GetPlayersResponse, error)
// CreatePlayerWithBodyWithResponse request with any body
CreatePlayerWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreatePlayerResponse, error)
CreatePlayerWithResponse(ctx context.Context, body CreatePlayerJSONRequestBody, reqEditors ...RequestEditorFn) (*CreatePlayerResponse, error)
// GetPlayerByIDWithResponse request
GetPlayerByIDWithResponse(ctx context.Context, id int64, reqEditors ...RequestEditorFn) (*GetPlayerByIDResponse, error)
// UpdatePlayerWithBodyWithResponse request with any body
UpdatePlayerWithBodyWithResponse(ctx context.Context, id int64, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdatePlayerResponse, error)
UpdatePlayerWithResponse(ctx context.Context, id int64, body UpdatePlayerJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdatePlayerResponse, error)
// GetSeasonsWithResponse request
GetSeasonsWithResponse(ctx context.Context, params *GetSeasonsParams, reqEditors ...RequestEditorFn) (*GetSeasonsResponse, error)
// CreateSeasonWithBodyWithResponse request with any body
CreateSeasonWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateSeasonResponse, error)
CreateSeasonWithResponse(ctx context.Context, body CreateSeasonJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateSeasonResponse, error)
// GetSeasonByIDWithResponse request
GetSeasonByIDWithResponse(ctx context.Context, id int64, reqEditors ...RequestEditorFn) (*GetSeasonByIDResponse, error)
// UpdateSeasonWithBodyWithResponse request with any body
UpdateSeasonWithBodyWithResponse(ctx context.Context, id int64, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateSeasonResponse, error)
UpdateSeasonWithResponse(ctx context.Context, id int64, body UpdateSeasonJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateSeasonResponse, error)
// GetTeamsWithResponse request
GetTeamsWithResponse(ctx context.Context, params *GetTeamsParams, reqEditors ...RequestEditorFn) (*GetTeamsResponse, error)
// CreateTeamWithBodyWithResponse request with any body
CreateTeamWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateTeamResponse, error)
CreateTeamWithResponse(ctx context.Context, body CreateTeamJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateTeamResponse, error)
// GetTeamByIDWithResponse request
GetTeamByIDWithResponse(ctx context.Context, id int64, reqEditors ...RequestEditorFn) (*GetTeamByIDResponse, error)
// UpdateTeamWithBodyWithResponse request with any body
UpdateTeamWithBodyWithResponse(ctx context.Context, id int64, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateTeamResponse, error)
UpdateTeamWithResponse(ctx context.Context, id int64, body UpdateTeamJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateTeamResponse, error)
}
ClientWithResponsesInterface is the interface specification for the client with responses above.
type CreateGameJSONBody ¶
type CreateGameJSONBody = Game
Temporary inclusion of type alias for backwards compatibility
type CreateGameJSONRequestBody ¶
type CreateGameJSONRequestBody = Game
CreateGameJSONRequestBody defines body for CreateGame for application/json ContentType.
type CreateGameResponse ¶
type CreateGameResponse struct {
Body []byte
HTTPResponse *http.Response
JSON201 *externalRef1.Message
JSON400 *externalRef1.ErrorMessage
JSON500 *externalRef1.ErrorMessage
}
func ParseCreateGameResponse ¶
func ParseCreateGameResponse(rsp *http.Response) (*CreateGameResponse, error)
ParseCreateGameResponse parses an HTTP response from a CreateGameWithResponse call
func (CreateGameResponse) Status ¶
func (r CreateGameResponse) Status() string
Status returns HTTPResponse.Status
func (CreateGameResponse) StatusCode ¶
func (r CreateGameResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type CreatePlayerJSONBody ¶
type CreatePlayerJSONBody = Player
Temporary inclusion of type alias for backwards compatibility
type CreatePlayerJSONRequestBody ¶
type CreatePlayerJSONRequestBody = Player
CreatePlayerJSONRequestBody defines body for CreatePlayer for application/json ContentType.
type CreatePlayerResponse ¶
type CreatePlayerResponse struct {
Body []byte
HTTPResponse *http.Response
JSON201 *Player
JSON400 *externalRef1.ErrorMessage
JSON500 *externalRef1.ErrorMessage
}
func ParseCreatePlayerResponse ¶
func ParseCreatePlayerResponse(rsp *http.Response) (*CreatePlayerResponse, error)
ParseCreatePlayerResponse parses an HTTP response from a CreatePlayerWithResponse call
func (CreatePlayerResponse) Status ¶
func (r CreatePlayerResponse) Status() string
Status returns HTTPResponse.Status
func (CreatePlayerResponse) StatusCode ¶
func (r CreatePlayerResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type CreateSeasonJSONBody ¶
type CreateSeasonJSONBody = Season
Temporary inclusion of type alias for backwards compatibility
type CreateSeasonJSONRequestBody ¶
type CreateSeasonJSONRequestBody = Season
CreateSeasonJSONRequestBody defines body for CreateSeason for application/json ContentType.
type CreateSeasonResponse ¶
type CreateSeasonResponse struct {
Body []byte
HTTPResponse *http.Response
JSON201 *Season
JSON400 *externalRef1.ErrorMessage
JSON500 *externalRef1.ErrorMessage
}
func ParseCreateSeasonResponse ¶
func ParseCreateSeasonResponse(rsp *http.Response) (*CreateSeasonResponse, error)
ParseCreateSeasonResponse parses an HTTP response from a CreateSeasonWithResponse call
func (CreateSeasonResponse) Status ¶
func (r CreateSeasonResponse) Status() string
Status returns HTTPResponse.Status
func (CreateSeasonResponse) StatusCode ¶
func (r CreateSeasonResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type CreateTeamJSONBody ¶
type CreateTeamJSONBody = Team
Temporary inclusion of type alias for backwards compatibility
type CreateTeamJSONRequestBody ¶
type CreateTeamJSONRequestBody = Team
CreateTeamJSONRequestBody defines body for CreateTeam for application/json ContentType.
type CreateTeamResponse ¶
type CreateTeamResponse struct {
Body []byte
HTTPResponse *http.Response
JSON201 *Team
JSON400 *externalRef1.ErrorMessage
JSON500 *externalRef1.ErrorMessage
}
func ParseCreateTeamResponse ¶
func ParseCreateTeamResponse(rsp *http.Response) (*CreateTeamResponse, error)
ParseCreateTeamResponse parses an HTTP response from a CreateTeamWithResponse call
func (CreateTeamResponse) Status ¶
func (r CreateTeamResponse) Status() string
Status returns HTTPResponse.Status
func (CreateTeamResponse) StatusCode ¶
func (r CreateTeamResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type ErrorHandlerFunc ¶
type ErrorHandlerFunc = func(http.ResponseWriter, *http.Request, error)
type Game ¶
type Game struct {
AwayTeam *GamePartnership `json:"away_team,omitempty"`
HomeTeam *GamePartnership `json:"home_team,omitempty"`
Id *int64 `json:"id,omitempty"`
MatchDate *string `json:"match_date,omitempty"`
Season *Season `json:"season,omitempty"`
WinningTeam *WinningTeam `json:"winning_team,omitempty"`
}
Game defines the model for game.
type GamePartnership ¶
type GamePartnership struct {
Partnership *Partnership `json:"partnership,omitempty"`
Scores *Scores `json:"scores,omitempty"`
}
GamePartnership defines the model for game_partnership.
type GameTeam ¶
type GameTeam struct {
AwayTeam *string `json:"away_team,omitempty"`
HomeTeam *string `json:"home_team,omitempty"`
Id *int64 `json:"id,omitempty"`
MatchDate *string `json:"match_date,omitempty"`
Season *Season `json:"season,omitempty"`
WinningTeam *WinningTeam `json:"winning_team,omitempty"`
}
GameTeam defines the model for game_team.
type GamesResponse ¶
GamesResponse defines the model for games_response.
type GetGameByIDResponse ¶
type GetGameByIDResponse struct {
Body []byte
HTTPResponse *http.Response
JSON200 *Game
JSON400 *externalRef1.ErrorMessage
JSON404 *externalRef1.Message
JSON500 *externalRef1.ErrorMessage
}
func ParseGetGameByIDResponse ¶
func ParseGetGameByIDResponse(rsp *http.Response) (*GetGameByIDResponse, error)
ParseGetGameByIDResponse parses an HTTP response from a GetGameByIDWithResponse call
func (GetGameByIDResponse) Status ¶
func (r GetGameByIDResponse) Status() string
Status returns HTTPResponse.Status
func (GetGameByIDResponse) StatusCode ¶
func (r GetGameByIDResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type GetGamesParams ¶
type GetGamesParams struct {
// Limit Report type
Limit *externalRef0.LimitParam `form:"limit,omitempty" json:"limit,omitempty"`
// LastVal Pagination details, last value of the sort column on the previous page.
LastVal *externalRef0.LastValue `form:"last_val,omitempty" json:"last_val,omitempty"`
// LastId Pagination details, last value of the id column on the previous page.
LastId *externalRef0.LastId `form:"last_id,omitempty" json:"last_id,omitempty"`
// SortBy Pagination details, sort column, if empty uses the id column.
SortBy *externalRef0.SortBy `form:"sort_by,omitempty" json:"sort_by,omitempty"`
// SortDir Pagination details, sorting order.
SortDir *GetGamesParamsSortDir `form:"sort_dir,omitempty" json:"sort_dir,omitempty"`
// Date The date to filter by
Date *QueryDate `form:"date,omitempty" json:"date,omitempty"`
// DateMin The minimum date to filter by
DateMin *QueryDateMin `form:"date_min,omitempty" json:"date_min,omitempty"`
// DateMax The maximum date to filter by
DateMax *QueryDateMax `form:"date_max,omitempty" json:"date_max,omitempty"`
// Season The season to filter by
Season *QuerySeason `form:"season,omitempty" json:"season,omitempty"`
// Team The team to filter by
Team *QueryTeam `form:"team,omitempty" json:"team,omitempty"`
}
GetGamesParams defines parameters for GetGames.
type GetGamesParamsSortDir ¶
type GetGamesParamsSortDir string
GetGamesParamsSortDir defines parameters for GetGames.
type GetGamesResponse ¶
type GetGamesResponse struct {
Body []byte
HTTPResponse *http.Response
JSON200 *GamesResponse
JSON400 *externalRef1.ErrorMessage
JSON500 *externalRef1.ErrorMessage
}
func ParseGetGamesResponse ¶
func ParseGetGamesResponse(rsp *http.Response) (*GetGamesResponse, error)
ParseGetGamesResponse parses an HTTP response from a GetGamesWithResponse call
func (GetGamesResponse) Status ¶
func (r GetGamesResponse) Status() string
Status returns HTTPResponse.Status
func (GetGamesResponse) StatusCode ¶
func (r GetGamesResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type GetPlayerByIDResponse ¶
type GetPlayerByIDResponse struct {
Body []byte
HTTPResponse *http.Response
JSON200 *Player
JSON400 *externalRef1.ErrorMessage
JSON404 *externalRef1.Message
JSON500 *externalRef1.ErrorMessage
}
func ParseGetPlayerByIDResponse ¶
func ParseGetPlayerByIDResponse(rsp *http.Response) (*GetPlayerByIDResponse, error)
ParseGetPlayerByIDResponse parses an HTTP response from a GetPlayerByIDWithResponse call
func (GetPlayerByIDResponse) Status ¶
func (r GetPlayerByIDResponse) Status() string
Status returns HTTPResponse.Status
func (GetPlayerByIDResponse) StatusCode ¶
func (r GetPlayerByIDResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type GetPlayersParams ¶
type GetPlayersParams struct {
// Limit Report type
Limit *externalRef0.LimitParam `form:"limit,omitempty" json:"limit,omitempty"`
// LastVal Pagination details, last value of the sort column on the previous page.
LastVal *externalRef0.LastValue `form:"last_val,omitempty" json:"last_val,omitempty"`
// LastId Pagination details, last value of the id column on the previous page.
LastId *externalRef0.LastId `form:"last_id,omitempty" json:"last_id,omitempty"`
// SortBy Pagination details, sort column, if empty uses the id column.
SortBy *externalRef0.SortBy `form:"sort_by,omitempty" json:"sort_by,omitempty"`
// SortDir Pagination details, sorting order.
SortDir *GetPlayersParamsSortDir `form:"sort_dir,omitempty" json:"sort_dir,omitempty"`
// Name The name to filter by
Name *QueryName `form:"name,omitempty" json:"name,omitempty"`
// Year The year of the season
Year *QueryYear `form:"year,omitempty" json:"year,omitempty"`
}
GetPlayersParams defines parameters for GetPlayers.
type GetPlayersParamsSortDir ¶
type GetPlayersParamsSortDir string
GetPlayersParamsSortDir defines parameters for GetPlayers.
type GetPlayersResponse ¶
type GetPlayersResponse struct {
Body []byte
HTTPResponse *http.Response
JSON200 *PlayersResponse
JSON400 *externalRef1.ErrorMessage
JSON500 *externalRef1.ErrorMessage
}
func ParseGetPlayersResponse ¶
func ParseGetPlayersResponse(rsp *http.Response) (*GetPlayersResponse, error)
ParseGetPlayersResponse parses an HTTP response from a GetPlayersWithResponse call
func (GetPlayersResponse) Status ¶
func (r GetPlayersResponse) Status() string
Status returns HTTPResponse.Status
func (GetPlayersResponse) StatusCode ¶
func (r GetPlayersResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type GetSeasonByIDResponse ¶
type GetSeasonByIDResponse struct {
Body []byte
HTTPResponse *http.Response
JSON200 *Season
JSON400 *externalRef1.ErrorMessage
JSON404 *externalRef1.Message
JSON500 *externalRef1.ErrorMessage
}
func ParseGetSeasonByIDResponse ¶
func ParseGetSeasonByIDResponse(rsp *http.Response) (*GetSeasonByIDResponse, error)
ParseGetSeasonByIDResponse parses an HTTP response from a GetSeasonByIDWithResponse call
func (GetSeasonByIDResponse) Status ¶
func (r GetSeasonByIDResponse) Status() string
Status returns HTTPResponse.Status
func (GetSeasonByIDResponse) StatusCode ¶
func (r GetSeasonByIDResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type GetSeasonsParams ¶
type GetSeasonsParams struct {
// Limit Report type
Limit *externalRef0.LimitParam `form:"limit,omitempty" json:"limit,omitempty"`
// LastVal Pagination details, last value of the sort column on the previous page.
LastVal *externalRef0.LastValue `form:"last_val,omitempty" json:"last_val,omitempty"`
// LastId Pagination details, last value of the id column on the previous page.
LastId *externalRef0.LastId `form:"last_id,omitempty" json:"last_id,omitempty"`
// SortBy Pagination details, sort column, if empty uses the id column.
SortBy *externalRef0.SortBy `form:"sort_by,omitempty" json:"sort_by,omitempty"`
// SortDir Pagination details, sorting order.
SortDir *GetSeasonsParamsSortDir `form:"sort_dir,omitempty" json:"sort_dir,omitempty"`
// Name The name to filter by
Name *QueryName `form:"name,omitempty" json:"name,omitempty"`
}
GetSeasonsParams defines parameters for GetSeasons.
type GetSeasonsParamsSortDir ¶
type GetSeasonsParamsSortDir string
GetSeasonsParamsSortDir defines parameters for GetSeasons.
type GetSeasonsResponse ¶
type GetSeasonsResponse struct {
Body []byte
HTTPResponse *http.Response
JSON200 *SeasonsResponse
JSON400 *externalRef1.ErrorMessage
JSON500 *externalRef1.ErrorMessage
}
func ParseGetSeasonsResponse ¶
func ParseGetSeasonsResponse(rsp *http.Response) (*GetSeasonsResponse, error)
ParseGetSeasonsResponse parses an HTTP response from a GetSeasonsWithResponse call
func (GetSeasonsResponse) Status ¶
func (r GetSeasonsResponse) Status() string
Status returns HTTPResponse.Status
func (GetSeasonsResponse) StatusCode ¶
func (r GetSeasonsResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type GetTeamByIDResponse ¶
type GetTeamByIDResponse struct {
Body []byte
HTTPResponse *http.Response
JSON200 *Team
JSON400 *externalRef1.ErrorMessage
JSON404 *externalRef1.Message
JSON500 *externalRef1.ErrorMessage
}
func ParseGetTeamByIDResponse ¶
func ParseGetTeamByIDResponse(rsp *http.Response) (*GetTeamByIDResponse, error)
ParseGetTeamByIDResponse parses an HTTP response from a GetTeamByIDWithResponse call
func (GetTeamByIDResponse) Status ¶
func (r GetTeamByIDResponse) Status() string
Status returns HTTPResponse.Status
func (GetTeamByIDResponse) StatusCode ¶
func (r GetTeamByIDResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type GetTeamsParams ¶
type GetTeamsParams struct {
// Limit Report type
Limit *externalRef0.LimitParam `form:"limit,omitempty" json:"limit,omitempty"`
// LastVal Pagination details, last value of the sort column on the previous page.
LastVal *externalRef0.LastValue `form:"last_val,omitempty" json:"last_val,omitempty"`
// LastId Pagination details, last value of the id column on the previous page.
LastId *externalRef0.LastId `form:"last_id,omitempty" json:"last_id,omitempty"`
// SortBy Pagination details, sort column, if empty uses the id column.
SortBy *externalRef0.SortBy `form:"sort_by,omitempty" json:"sort_by,omitempty"`
// SortDir Pagination details, sorting order.
SortDir *GetTeamsParamsSortDir `form:"sort_dir,omitempty" json:"sort_dir,omitempty"`
// Name The name to filter by
Name *QueryName `form:"name,omitempty" json:"name,omitempty"`
}
GetTeamsParams defines parameters for GetTeams.
type GetTeamsParamsSortDir ¶
type GetTeamsParamsSortDir string
GetTeamsParamsSortDir defines parameters for GetTeams.
type GetTeamsResponse ¶
type GetTeamsResponse struct {
Body []byte
HTTPResponse *http.Response
JSON200 *TeamsResponse
JSON400 *externalRef1.ErrorMessage
JSON500 *externalRef1.ErrorMessage
}
func ParseGetTeamsResponse ¶
func ParseGetTeamsResponse(rsp *http.Response) (*GetTeamsResponse, error)
ParseGetTeamsResponse parses an HTTP response from a GetTeamsWithResponse call
func (GetTeamsResponse) Status ¶
func (r GetTeamsResponse) Status() string
Status returns HTTPResponse.Status
func (GetTeamsResponse) StatusCode ¶
func (r GetTeamsResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type HttpRequestDoer ¶
Doer performs HTTP requests.
The standard http.Client implements this interface.
type InvalidParamFormatError ¶
func (*InvalidParamFormatError) Error ¶
func (e *InvalidParamFormatError) Error() string
func (*InvalidParamFormatError) Unwrap ¶
func (e *InvalidParamFormatError) Unwrap() error
type MetricsMiddlewareFunc ¶
type MetricsMiddlewareFunc = http.HandlerFunc
type Partnership ¶
type Partnership struct {
PlayerA *Player `json:"player_a,omitempty"`
PlayerB *Player `json:"player_b,omitempty"`
Team *Team `json:"team,omitempty"`
}
Partnership defines the model for partnership.
type Player ¶
type Player struct {
DateOfBirth *openapi_types.Date `json:"date_of_birth,omitempty"`
Email *openapi_types.Email `json:"email,omitempty"`
FirstName *string `json:"first_name,omitempty"`
Id *int64 `json:"id,omitempty"`
LastName *string `json:"last_name,omitempty"`
}
Player defines the model for player.
type PlayersResponse ¶
PlayersResponse defines the model for players_response.
type QueryDateMax ¶
type QueryDateMax = openapi_types.Date
QueryDateMax defines the model for query_date_max.
type QueryDateMin ¶
type QueryDateMin = openapi_types.Date
QueryDateMin defines the model for query_date_min.
type RateLimiterFunc ¶
type RateLimiterFunc = func(http.ResponseWriter, *http.Request) error
type RequestEditorFn ¶
RequestEditorFn is the function signature for the RequestEditor callback function
type RequiredHeaderError ¶
func (*RequiredHeaderError) Error ¶
func (e *RequiredHeaderError) Error() string
func (*RequiredHeaderError) Unwrap ¶
func (e *RequiredHeaderError) Unwrap() error
type RequiredParamError ¶
type RequiredParamError struct {
ParamName string
}
func (*RequiredParamError) Error ¶
func (e *RequiredParamError) Error() string
type Scores ¶
type Scores struct {
FirstSet int64 `json:"first_set"`
SecondSet int64 `json:"second_set"`
ThirdSet *int64 `json:"third_set,omitempty"`
}
Scores defines the model for scores.
type SeasonsResponse ¶
SeasonsResponse defines the model for seasons_response.
type ServerInterface ¶
type ServerInterface interface {
// Get all games
// (GET /games)
GetGames(w http.ResponseWriter, r *http.Request, params GetGamesParams)
// Create a game
// (POST /games)
CreateGame(w http.ResponseWriter, r *http.Request, body0 *CreateGameJSONBody)
// Get a game by ID
// (GET /games/{id})
GetGameByID(w http.ResponseWriter, r *http.Request, id int64)
// Update a game
// (PATCH /games/{id})
UpdateGame(w http.ResponseWriter, r *http.Request, id int64, body0 *UpdateGameJSONBody)
// Get all players
// (GET /players)
GetPlayers(w http.ResponseWriter, r *http.Request, params GetPlayersParams)
// Create a player
// (POST /players)
CreatePlayer(w http.ResponseWriter, r *http.Request, body0 *CreatePlayerJSONBody)
// Get a player by ID
// (GET /players/{id})
GetPlayerByID(w http.ResponseWriter, r *http.Request, id int64)
// Update a player
// (PATCH /players/{id})
UpdatePlayer(w http.ResponseWriter, r *http.Request, id int64, body0 *UpdatePlayerJSONBody)
// Get all seasons
// (GET /seasons)
GetSeasons(w http.ResponseWriter, r *http.Request, params GetSeasonsParams)
// Create a season
// (POST /seasons)
CreateSeason(w http.ResponseWriter, r *http.Request, body0 *CreateSeasonJSONBody)
// Get a season by ID
// (GET /seasons/{id})
GetSeasonByID(w http.ResponseWriter, r *http.Request, id int64)
// Update a season
// (PATCH /seasons/{id})
UpdateSeason(w http.ResponseWriter, r *http.Request, id int64, body0 *UpdateSeasonJSONBody)
// Get all teams
// (GET /teams)
GetTeams(w http.ResponseWriter, r *http.Request, params GetTeamsParams)
// Create a team
// (POST /teams)
CreateTeam(w http.ResponseWriter, r *http.Request, body0 *CreateTeamJSONBody)
// Get a team by ID
// (GET /teams/{id})
GetTeamByID(w http.ResponseWriter, r *http.Request, id int64)
// Update a team
// (PATCH /teams/{id})
UpdateTeam(w http.ResponseWriter, r *http.Request, id int64, body0 *UpdateTeamJSONBody)
}
ServerInterface represents all server handlers.
type ServerInterfaceWrapper ¶
type ServerInterfaceWrapper struct {
// contains filtered or unexported fields
}
ServerInterfaceWrapper converts contexts to parameters.
func (*ServerInterfaceWrapper) CreateGame ¶
func (siw *ServerInterfaceWrapper) CreateGame(w http.ResponseWriter, r *http.Request)
CreateGame operation middleware
func (*ServerInterfaceWrapper) CreatePlayer ¶
func (siw *ServerInterfaceWrapper) CreatePlayer(w http.ResponseWriter, r *http.Request)
CreatePlayer operation middleware
func (*ServerInterfaceWrapper) CreateSeason ¶
func (siw *ServerInterfaceWrapper) CreateSeason(w http.ResponseWriter, r *http.Request)
CreateSeason operation middleware
func (*ServerInterfaceWrapper) CreateTeam ¶
func (siw *ServerInterfaceWrapper) CreateTeam(w http.ResponseWriter, r *http.Request)
CreateTeam operation middleware
func (*ServerInterfaceWrapper) GetGameByID ¶
func (siw *ServerInterfaceWrapper) GetGameByID(w http.ResponseWriter, r *http.Request)
GetGameByID operation middleware
func (*ServerInterfaceWrapper) GetGames ¶
func (siw *ServerInterfaceWrapper) GetGames(w http.ResponseWriter, r *http.Request)
GetGames operation middleware
func (*ServerInterfaceWrapper) GetPlayerByID ¶
func (siw *ServerInterfaceWrapper) GetPlayerByID(w http.ResponseWriter, r *http.Request)
GetPlayerByID operation middleware
func (*ServerInterfaceWrapper) GetPlayers ¶
func (siw *ServerInterfaceWrapper) GetPlayers(w http.ResponseWriter, r *http.Request)
GetPlayers operation middleware
func (*ServerInterfaceWrapper) GetSeasonByID ¶
func (siw *ServerInterfaceWrapper) GetSeasonByID(w http.ResponseWriter, r *http.Request)
GetSeasonByID operation middleware
func (*ServerInterfaceWrapper) GetSeasons ¶
func (siw *ServerInterfaceWrapper) GetSeasons(w http.ResponseWriter, r *http.Request)
GetSeasons operation middleware
func (*ServerInterfaceWrapper) GetTeamByID ¶
func (siw *ServerInterfaceWrapper) GetTeamByID(w http.ResponseWriter, r *http.Request)
GetTeamByID operation middleware
func (*ServerInterfaceWrapper) GetTeams ¶
func (siw *ServerInterfaceWrapper) GetTeams(w http.ResponseWriter, r *http.Request)
GetTeams operation middleware
func (*ServerInterfaceWrapper) UpdateGame ¶
func (siw *ServerInterfaceWrapper) UpdateGame(w http.ResponseWriter, r *http.Request)
UpdateGame operation middleware
func (*ServerInterfaceWrapper) UpdatePlayer ¶
func (siw *ServerInterfaceWrapper) UpdatePlayer(w http.ResponseWriter, r *http.Request)
UpdatePlayer operation middleware
func (*ServerInterfaceWrapper) UpdateSeason ¶
func (siw *ServerInterfaceWrapper) UpdateSeason(w http.ResponseWriter, r *http.Request)
UpdateSeason operation middleware
func (*ServerInterfaceWrapper) UpdateTeam ¶
func (siw *ServerInterfaceWrapper) UpdateTeam(w http.ResponseWriter, r *http.Request)
UpdateTeam operation middleware
type ServerOption ¶
type ServerOption func(s *ServerInterfaceWrapper)
ServerOption represents an optional feature applied to the server.
func WithAuthorization ¶
func WithAuthorization(authz ServerInterface) ServerOption
WithAuthorization applies the passed authorization middleware to the server.
func WithErrorHandlerFunc ¶
func WithErrorHandlerFunc(errorHandlerFunc ErrorHandlerFunc) ServerOption
WithErrorHandlerFunc sets the error handler function for the server.
func WithMetricsMiddleware ¶
func WithMetricsMiddleware(middleware MetricsMiddlewareFunc) ServerOption
WithMetricsMiddleware applies the metrics middleware to the server.
func WithRateLimiter ¶
func WithRateLimiter(rateLimiter RateLimiterFunc) ServerOption
WithRateLimiter applies the rate limiter middleware to routes with x-global-rate-limit.
type Team ¶
type Team struct {
ContactEmail *openapi_types.Email `json:"contact_email,omitempty"`
ContactPhone *string `json:"contact_phone,omitempty"`
Id *int64 `json:"id,omitempty"`
Name *string `json:"name,omitempty"`
}
Team defines the model for team.
type TeamsResponse ¶
TeamsResponse defines the model for teams_response.
type TooManyValuesForParamError ¶
func (*TooManyValuesForParamError) Error ¶
func (e *TooManyValuesForParamError) Error() string
type UnescapedCookieParamError ¶
func (*UnescapedCookieParamError) Error ¶
func (e *UnescapedCookieParamError) Error() string
func (*UnescapedCookieParamError) Unwrap ¶
func (e *UnescapedCookieParamError) Unwrap() error
type UnmarshalingParamError ¶
func (*UnmarshalingParamError) Error ¶
func (e *UnmarshalingParamError) Error() string
func (*UnmarshalingParamError) Unwrap ¶
func (e *UnmarshalingParamError) Unwrap() error
type UpdateGameJSONBody ¶
type UpdateGameJSONBody = Game
Temporary inclusion of type alias for backwards compatibility
type UpdateGameJSONRequestBody ¶
type UpdateGameJSONRequestBody = Game
UpdateGameJSONRequestBody defines body for UpdateGame for application/json ContentType.
type UpdateGameResponse ¶
type UpdateGameResponse struct {
Body []byte
HTTPResponse *http.Response
JSON200 *Game
JSON400 *externalRef1.ErrorMessage
JSON404 *externalRef1.Message
JSON500 *externalRef1.ErrorMessage
}
func ParseUpdateGameResponse ¶
func ParseUpdateGameResponse(rsp *http.Response) (*UpdateGameResponse, error)
ParseUpdateGameResponse parses an HTTP response from a UpdateGameWithResponse call
func (UpdateGameResponse) Status ¶
func (r UpdateGameResponse) Status() string
Status returns HTTPResponse.Status
func (UpdateGameResponse) StatusCode ¶
func (r UpdateGameResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type UpdatePlayerJSONBody ¶
type UpdatePlayerJSONBody = Player
Temporary inclusion of type alias for backwards compatibility
type UpdatePlayerJSONRequestBody ¶
type UpdatePlayerJSONRequestBody = Player
UpdatePlayerJSONRequestBody defines body for UpdatePlayer for application/json ContentType.
type UpdatePlayerResponse ¶
type UpdatePlayerResponse struct {
Body []byte
HTTPResponse *http.Response
JSON200 *Player
JSON400 *externalRef1.ErrorMessage
JSON404 *externalRef1.Message
JSON500 *externalRef1.ErrorMessage
}
func ParseUpdatePlayerResponse ¶
func ParseUpdatePlayerResponse(rsp *http.Response) (*UpdatePlayerResponse, error)
ParseUpdatePlayerResponse parses an HTTP response from a UpdatePlayerWithResponse call
func (UpdatePlayerResponse) Status ¶
func (r UpdatePlayerResponse) Status() string
Status returns HTTPResponse.Status
func (UpdatePlayerResponse) StatusCode ¶
func (r UpdatePlayerResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type UpdateSeasonJSONBody ¶
type UpdateSeasonJSONBody = Season
Temporary inclusion of type alias for backwards compatibility
type UpdateSeasonJSONRequestBody ¶
type UpdateSeasonJSONRequestBody = Season
UpdateSeasonJSONRequestBody defines body for UpdateSeason for application/json ContentType.
type UpdateSeasonResponse ¶
type UpdateSeasonResponse struct {
Body []byte
HTTPResponse *http.Response
JSON200 *Season
JSON400 *externalRef1.ErrorMessage
JSON404 *externalRef1.Message
JSON500 *externalRef1.ErrorMessage
}
func ParseUpdateSeasonResponse ¶
func ParseUpdateSeasonResponse(rsp *http.Response) (*UpdateSeasonResponse, error)
ParseUpdateSeasonResponse parses an HTTP response from a UpdateSeasonWithResponse call
func (UpdateSeasonResponse) Status ¶
func (r UpdateSeasonResponse) Status() string
Status returns HTTPResponse.Status
func (UpdateSeasonResponse) StatusCode ¶
func (r UpdateSeasonResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type UpdateTeamJSONBody ¶
type UpdateTeamJSONBody = Team
Temporary inclusion of type alias for backwards compatibility
type UpdateTeamJSONRequestBody ¶
type UpdateTeamJSONRequestBody = Team
UpdateTeamJSONRequestBody defines body for UpdateTeam for application/json ContentType.
type UpdateTeamResponse ¶
type UpdateTeamResponse struct {
Body []byte
HTTPResponse *http.Response
JSON200 *Team
JSON400 *externalRef1.ErrorMessage
JSON404 *externalRef1.Message
JSON500 *externalRef1.ErrorMessage
}
func ParseUpdateTeamResponse ¶
func ParseUpdateTeamResponse(rsp *http.Response) (*UpdateTeamResponse, error)
ParseUpdateTeamResponse parses an HTTP response from a UpdateTeamWithResponse call
func (UpdateTeamResponse) Status ¶
func (r UpdateTeamResponse) Status() string
Status returns HTTPResponse.Status
func (UpdateTeamResponse) StatusCode ¶
func (r UpdateTeamResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type WinningTeam ¶
type WinningTeam = string
WinningTeam defines the model for winning_team.
const ( WinningTeam_away WinningTeam = "away" WinningTeam_home WinningTeam = "home" )
List of WinningTeam