game

package
v0.0.0-...-c761d76 Latest Latest
Warning

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

Go to latest
Published: Oct 2, 2019 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const DestroyDisasterOKCode int = 200

DestroyDisasterOKCode is the HTTP code returned for type DestroyDisasterOK

View Source
const GetGameDescriptionOKCode int = 200

GetGameDescriptionOKCode is the HTTP code returned for type GetGameDescriptionOK

View Source
const GetGameStateOKCode int = 200

GetGameStateOKCode is the HTTP code returned for type GetGameStateOK

View Source
const PauseGameOKCode int = 200

PauseGameOKCode is the HTTP code returned for type PauseGameOK

View Source
const ResumeGameOKCode int = 200

ResumeGameOKCode is the HTTP code returned for type ResumeGameOK

View Source
const StartGameOKCode int = 200

StartGameOKCode is the HTTP code returned for type StartGameOK

Variables

This section is empty.

Functions

This section is empty.

Types

type DestroyDisaster

type DestroyDisaster struct {
	Context *middleware.Context
	Handler DestroyDisasterHandler
}

DestroyDisaster swagger:route POST /game/{game_id}/destroy game destroyDisaster

Destroy disaster on the map

func NewDestroyDisaster

func NewDestroyDisaster(ctx *middleware.Context, handler DestroyDisasterHandler) *DestroyDisaster

NewDestroyDisaster creates a new http.Handler for the destroy disaster operation

func (*DestroyDisaster) ServeHTTP

func (o *DestroyDisaster) ServeHTTP(rw http.ResponseWriter, r *http.Request)

type DestroyDisasterDefault

type DestroyDisasterDefault struct {

	/*
	  In: Body
	*/
	Payload *models.Error `json:"body,omitempty"`
	// contains filtered or unexported fields
}

DestroyDisasterDefault Error

swagger:response destroyDisasterDefault

func NewDestroyDisasterDefault

func NewDestroyDisasterDefault(code int) *DestroyDisasterDefault

NewDestroyDisasterDefault creates DestroyDisasterDefault with default headers values

func (*DestroyDisasterDefault) SetPayload

func (o *DestroyDisasterDefault) SetPayload(payload *models.Error)

SetPayload sets the payload to the destroy disaster default response

func (*DestroyDisasterDefault) SetStatusCode

func (o *DestroyDisasterDefault) SetStatusCode(code int)

SetStatusCode sets the status to the destroy disaster default response

func (*DestroyDisasterDefault) WithPayload

func (o *DestroyDisasterDefault) WithPayload(payload *models.Error) *DestroyDisasterDefault

WithPayload adds the payload to the destroy disaster default response

func (*DestroyDisasterDefault) WithStatusCode

func (o *DestroyDisasterDefault) WithStatusCode(code int) *DestroyDisasterDefault

WithStatusCode adds the status to the destroy disaster default response

func (*DestroyDisasterDefault) WriteResponse

func (o *DestroyDisasterDefault) WriteResponse(rw http.ResponseWriter, producer runtime.Producer)

WriteResponse to the client

type DestroyDisasterHandler

type DestroyDisasterHandler interface {
	Handle(DestroyDisasterParams) middleware.Responder
}

DestroyDisasterHandler interface for that can handle valid destroy disaster params

type DestroyDisasterHandlerFunc

type DestroyDisasterHandlerFunc func(DestroyDisasterParams) middleware.Responder

DestroyDisasterHandlerFunc turns a function with the right signature into a destroy disaster handler

func (DestroyDisasterHandlerFunc) Handle

Handle executing the request and returning a response

type DestroyDisasterOK

type DestroyDisasterOK struct {

	/*
	  In: Body
	*/
	Payload *models.GameState `json:"body,omitempty"`
}

DestroyDisasterOK Destroyed

swagger:response destroyDisasterOK

func NewDestroyDisasterOK

func NewDestroyDisasterOK() *DestroyDisasterOK

NewDestroyDisasterOK creates DestroyDisasterOK with default headers values

func (*DestroyDisasterOK) SetPayload

func (o *DestroyDisasterOK) SetPayload(payload *models.GameState)

SetPayload sets the payload to the destroy disaster o k response

func (*DestroyDisasterOK) WithPayload

func (o *DestroyDisasterOK) WithPayload(payload *models.GameState) *DestroyDisasterOK

WithPayload adds the payload to the destroy disaster o k response

func (*DestroyDisasterOK) WriteResponse

func (o *DestroyDisasterOK) WriteResponse(rw http.ResponseWriter, producer runtime.Producer)

WriteResponse to the client

type DestroyDisasterParams

type DestroyDisasterParams struct {

	// HTTP Request Object
	HTTPRequest *http.Request `json:"-"`

	/*
	  Required: true
	  In: path
	*/
	GameID string
	/*
	  Required: true
	  In: body
	*/
	Goal *models.Point
}

DestroyDisasterParams contains all the bound params for the destroy disaster operation typically these are obtained from a http.Request

swagger:parameters destroyDisaster

func NewDestroyDisasterParams

func NewDestroyDisasterParams() DestroyDisasterParams

NewDestroyDisasterParams creates a new DestroyDisasterParams object no default values defined in spec.

func (*DestroyDisasterParams) BindRequest

func (o *DestroyDisasterParams) BindRequest(r *http.Request, route *middleware.MatchedRoute) error

BindRequest both binds and validates a request, it assumes that complex things implement a Validatable(strfmt.Registry) error interface for simple values it will use straight method calls.

To ensure default values, the struct must have been initialized with NewDestroyDisasterParams() beforehand.

type DestroyDisasterURL

type DestroyDisasterURL struct {
	GameID string
	// contains filtered or unexported fields
}

DestroyDisasterURL generates an URL for the destroy disaster operation

func (*DestroyDisasterURL) Build

func (o *DestroyDisasterURL) Build() (*url.URL, error)

Build a url path and query string

func (*DestroyDisasterURL) BuildFull

func (o *DestroyDisasterURL) BuildFull(scheme, host string) (*url.URL, error)

BuildFull builds a full url with scheme, host, path and query string

func (*DestroyDisasterURL) Must

func (o *DestroyDisasterURL) Must(u *url.URL, err error) *url.URL

Must is a helper function to panic when the url builder returns an error

func (*DestroyDisasterURL) SetBasePath

func (o *DestroyDisasterURL) SetBasePath(bp string)

SetBasePath sets the base path for this url builder, only required when it's different from the base path specified in the swagger spec. When the value of the base path is an empty string

func (*DestroyDisasterURL) String

func (o *DestroyDisasterURL) String() string

String returns the string representation of the path with query string

func (*DestroyDisasterURL) StringFull

func (o *DestroyDisasterURL) StringFull(scheme, host string) string

StringFull returns the string representation of a complete url

func (*DestroyDisasterURL) WithBasePath

func (o *DestroyDisasterURL) WithBasePath(bp string) *DestroyDisasterURL

WithBasePath sets the base path for this url builder, only required when it's different from the base path specified in the swagger spec. When the value of the base path is an empty string

type GetGameDescription

type GetGameDescription struct {
	Context *middleware.Context
	Handler GetGameDescriptionHandler
}

GetGameDescription swagger:route GET /game/{game_id} game getGameDescription

Get game description

func NewGetGameDescription

func NewGetGameDescription(ctx *middleware.Context, handler GetGameDescriptionHandler) *GetGameDescription

NewGetGameDescription creates a new http.Handler for the get game description operation

func (*GetGameDescription) ServeHTTP

func (o *GetGameDescription) ServeHTTP(rw http.ResponseWriter, r *http.Request)

type GetGameDescriptionDefault

type GetGameDescriptionDefault struct {

	/*
	  In: Body
	*/
	Payload *models.Error `json:"body,omitempty"`
	// contains filtered or unexported fields
}

GetGameDescriptionDefault Error

swagger:response getGameDescriptionDefault

func NewGetGameDescriptionDefault

func NewGetGameDescriptionDefault(code int) *GetGameDescriptionDefault

NewGetGameDescriptionDefault creates GetGameDescriptionDefault with default headers values

func (*GetGameDescriptionDefault) SetPayload

func (o *GetGameDescriptionDefault) SetPayload(payload *models.Error)

SetPayload sets the payload to the get game description default response

func (*GetGameDescriptionDefault) SetStatusCode

func (o *GetGameDescriptionDefault) SetStatusCode(code int)

SetStatusCode sets the status to the get game description default response

func (*GetGameDescriptionDefault) WithPayload

WithPayload adds the payload to the get game description default response

func (*GetGameDescriptionDefault) WithStatusCode

func (o *GetGameDescriptionDefault) WithStatusCode(code int) *GetGameDescriptionDefault

WithStatusCode adds the status to the get game description default response

func (*GetGameDescriptionDefault) WriteResponse

func (o *GetGameDescriptionDefault) WriteResponse(rw http.ResponseWriter, producer runtime.Producer)

WriteResponse to the client

type GetGameDescriptionHandler

type GetGameDescriptionHandler interface {
	Handle(GetGameDescriptionParams) middleware.Responder
}

GetGameDescriptionHandler interface for that can handle valid get game description params

type GetGameDescriptionHandlerFunc

type GetGameDescriptionHandlerFunc func(GetGameDescriptionParams) middleware.Responder

GetGameDescriptionHandlerFunc turns a function with the right signature into a get game description handler

func (GetGameDescriptionHandlerFunc) Handle

Handle executing the request and returning a response

type GetGameDescriptionOK

type GetGameDescriptionOK struct {

	/*
	  In: Body
	*/
	Payload *models.GameDescription `json:"body,omitempty"`
}

GetGameDescriptionOK Description

swagger:response getGameDescriptionOK

func NewGetGameDescriptionOK

func NewGetGameDescriptionOK() *GetGameDescriptionOK

NewGetGameDescriptionOK creates GetGameDescriptionOK with default headers values

func (*GetGameDescriptionOK) SetPayload

func (o *GetGameDescriptionOK) SetPayload(payload *models.GameDescription)

SetPayload sets the payload to the get game description o k response

func (*GetGameDescriptionOK) WithPayload

WithPayload adds the payload to the get game description o k response

func (*GetGameDescriptionOK) WriteResponse

func (o *GetGameDescriptionOK) WriteResponse(rw http.ResponseWriter, producer runtime.Producer)

WriteResponse to the client

type GetGameDescriptionParams

type GetGameDescriptionParams struct {

	// HTTP Request Object
	HTTPRequest *http.Request `json:"-"`

	/*
	  Required: true
	  In: path
	*/
	GameID string
}

GetGameDescriptionParams contains all the bound params for the get game description operation typically these are obtained from a http.Request

swagger:parameters getGameDescription

func NewGetGameDescriptionParams

func NewGetGameDescriptionParams() GetGameDescriptionParams

NewGetGameDescriptionParams creates a new GetGameDescriptionParams object no default values defined in spec.

func (*GetGameDescriptionParams) BindRequest

BindRequest both binds and validates a request, it assumes that complex things implement a Validatable(strfmt.Registry) error interface for simple values it will use straight method calls.

To ensure default values, the struct must have been initialized with NewGetGameDescriptionParams() beforehand.

type GetGameDescriptionURL

type GetGameDescriptionURL struct {
	GameID string
	// contains filtered or unexported fields
}

GetGameDescriptionURL generates an URL for the get game description operation

func (*GetGameDescriptionURL) Build

func (o *GetGameDescriptionURL) Build() (*url.URL, error)

Build a url path and query string

func (*GetGameDescriptionURL) BuildFull

func (o *GetGameDescriptionURL) BuildFull(scheme, host string) (*url.URL, error)

BuildFull builds a full url with scheme, host, path and query string

func (*GetGameDescriptionURL) Must

func (o *GetGameDescriptionURL) Must(u *url.URL, err error) *url.URL

Must is a helper function to panic when the url builder returns an error

func (*GetGameDescriptionURL) SetBasePath

func (o *GetGameDescriptionURL) SetBasePath(bp string)

SetBasePath sets the base path for this url builder, only required when it's different from the base path specified in the swagger spec. When the value of the base path is an empty string

func (*GetGameDescriptionURL) String

func (o *GetGameDescriptionURL) String() string

String returns the string representation of the path with query string

func (*GetGameDescriptionURL) StringFull

func (o *GetGameDescriptionURL) StringFull(scheme, host string) string

StringFull returns the string representation of a complete url

func (*GetGameDescriptionURL) WithBasePath

func (o *GetGameDescriptionURL) WithBasePath(bp string) *GetGameDescriptionURL

WithBasePath sets the base path for this url builder, only required when it's different from the base path specified in the swagger spec. When the value of the base path is an empty string

type GetGameState

type GetGameState struct {
	Context *middleware.Context
	Handler GetGameStateHandler
}

GetGameState swagger:route GET /game/{game_id}/state game getGameState

Get state of the game

func NewGetGameState

func NewGetGameState(ctx *middleware.Context, handler GetGameStateHandler) *GetGameState

NewGetGameState creates a new http.Handler for the get game state operation

func (*GetGameState) ServeHTTP

func (o *GetGameState) ServeHTTP(rw http.ResponseWriter, r *http.Request)

type GetGameStateDefault

type GetGameStateDefault struct {

	/*
	  In: Body
	*/
	Payload *models.Error `json:"body,omitempty"`
	// contains filtered or unexported fields
}

GetGameStateDefault Error

swagger:response getGameStateDefault

func NewGetGameStateDefault

func NewGetGameStateDefault(code int) *GetGameStateDefault

NewGetGameStateDefault creates GetGameStateDefault with default headers values

func (*GetGameStateDefault) SetPayload

func (o *GetGameStateDefault) SetPayload(payload *models.Error)

SetPayload sets the payload to the get game state default response

func (*GetGameStateDefault) SetStatusCode

func (o *GetGameStateDefault) SetStatusCode(code int)

SetStatusCode sets the status to the get game state default response

func (*GetGameStateDefault) WithPayload

func (o *GetGameStateDefault) WithPayload(payload *models.Error) *GetGameStateDefault

WithPayload adds the payload to the get game state default response

func (*GetGameStateDefault) WithStatusCode

func (o *GetGameStateDefault) WithStatusCode(code int) *GetGameStateDefault

WithStatusCode adds the status to the get game state default response

func (*GetGameStateDefault) WriteResponse

func (o *GetGameStateDefault) WriteResponse(rw http.ResponseWriter, producer runtime.Producer)

WriteResponse to the client

type GetGameStateHandler

type GetGameStateHandler interface {
	Handle(GetGameStateParams) middleware.Responder
}

GetGameStateHandler interface for that can handle valid get game state params

type GetGameStateHandlerFunc

type GetGameStateHandlerFunc func(GetGameStateParams) middleware.Responder

GetGameStateHandlerFunc turns a function with the right signature into a get game state handler

func (GetGameStateHandlerFunc) Handle

Handle executing the request and returning a response

type GetGameStateOK

type GetGameStateOK struct {

	/*
	  In: Body
	*/
	Payload *models.GameState `json:"body,omitempty"`
}

GetGameStateOK Game state

swagger:response getGameStateOK

func NewGetGameStateOK

func NewGetGameStateOK() *GetGameStateOK

NewGetGameStateOK creates GetGameStateOK with default headers values

func (*GetGameStateOK) SetPayload

func (o *GetGameStateOK) SetPayload(payload *models.GameState)

SetPayload sets the payload to the get game state o k response

func (*GetGameStateOK) WithPayload

func (o *GetGameStateOK) WithPayload(payload *models.GameState) *GetGameStateOK

WithPayload adds the payload to the get game state o k response

func (*GetGameStateOK) WriteResponse

func (o *GetGameStateOK) WriteResponse(rw http.ResponseWriter, producer runtime.Producer)

WriteResponse to the client

type GetGameStateParams

type GetGameStateParams struct {

	// HTTP Request Object
	HTTPRequest *http.Request `json:"-"`

	/*
	  Required: true
	  In: path
	*/
	GameID string
}

GetGameStateParams contains all the bound params for the get game state operation typically these are obtained from a http.Request

swagger:parameters getGameState

func NewGetGameStateParams

func NewGetGameStateParams() GetGameStateParams

NewGetGameStateParams creates a new GetGameStateParams object no default values defined in spec.

func (*GetGameStateParams) BindRequest

func (o *GetGameStateParams) BindRequest(r *http.Request, route *middleware.MatchedRoute) error

BindRequest both binds and validates a request, it assumes that complex things implement a Validatable(strfmt.Registry) error interface for simple values it will use straight method calls.

To ensure default values, the struct must have been initialized with NewGetGameStateParams() beforehand.

type GetGameStateURL

type GetGameStateURL struct {
	GameID string
	// contains filtered or unexported fields
}

GetGameStateURL generates an URL for the get game state operation

func (*GetGameStateURL) Build

func (o *GetGameStateURL) Build() (*url.URL, error)

Build a url path and query string

func (*GetGameStateURL) BuildFull

func (o *GetGameStateURL) BuildFull(scheme, host string) (*url.URL, error)

BuildFull builds a full url with scheme, host, path and query string

func (*GetGameStateURL) Must

func (o *GetGameStateURL) Must(u *url.URL, err error) *url.URL

Must is a helper function to panic when the url builder returns an error

func (*GetGameStateURL) SetBasePath

func (o *GetGameStateURL) SetBasePath(bp string)

SetBasePath sets the base path for this url builder, only required when it's different from the base path specified in the swagger spec. When the value of the base path is an empty string

func (*GetGameStateURL) String

func (o *GetGameStateURL) String() string

String returns the string representation of the path with query string

func (*GetGameStateURL) StringFull

func (o *GetGameStateURL) StringFull(scheme, host string) string

StringFull returns the string representation of a complete url

func (*GetGameStateURL) WithBasePath

func (o *GetGameStateURL) WithBasePath(bp string) *GetGameStateURL

WithBasePath sets the base path for this url builder, only required when it's different from the base path specified in the swagger spec. When the value of the base path is an empty string

type PauseGame

type PauseGame struct {
	Context *middleware.Context
	Handler PauseGameHandler
}

PauseGame swagger:route POST /game/{game_id}/pause game pauseGame

Pause the game

func NewPauseGame

func NewPauseGame(ctx *middleware.Context, handler PauseGameHandler) *PauseGame

NewPauseGame creates a new http.Handler for the pause game operation

func (*PauseGame) ServeHTTP

func (o *PauseGame) ServeHTTP(rw http.ResponseWriter, r *http.Request)

type PauseGameDefault

type PauseGameDefault struct {

	/*
	  In: Body
	*/
	Payload *models.Error `json:"body,omitempty"`
	// contains filtered or unexported fields
}

PauseGameDefault Error

swagger:response pauseGameDefault

func NewPauseGameDefault

func NewPauseGameDefault(code int) *PauseGameDefault

NewPauseGameDefault creates PauseGameDefault with default headers values

func (*PauseGameDefault) SetPayload

func (o *PauseGameDefault) SetPayload(payload *models.Error)

SetPayload sets the payload to the pause game default response

func (*PauseGameDefault) SetStatusCode

func (o *PauseGameDefault) SetStatusCode(code int)

SetStatusCode sets the status to the pause game default response

func (*PauseGameDefault) WithPayload

func (o *PauseGameDefault) WithPayload(payload *models.Error) *PauseGameDefault

WithPayload adds the payload to the pause game default response

func (*PauseGameDefault) WithStatusCode

func (o *PauseGameDefault) WithStatusCode(code int) *PauseGameDefault

WithStatusCode adds the status to the pause game default response

func (*PauseGameDefault) WriteResponse

func (o *PauseGameDefault) WriteResponse(rw http.ResponseWriter, producer runtime.Producer)

WriteResponse to the client

type PauseGameHandler

type PauseGameHandler interface {
	Handle(PauseGameParams) middleware.Responder
}

PauseGameHandler interface for that can handle valid pause game params

type PauseGameHandlerFunc

type PauseGameHandlerFunc func(PauseGameParams) middleware.Responder

PauseGameHandlerFunc turns a function with the right signature into a pause game handler

func (PauseGameHandlerFunc) Handle

Handle executing the request and returning a response

type PauseGameOK

type PauseGameOK struct {

	/*
	  In: Body
	*/
	Payload *models.GameDescription `json:"body,omitempty"`
}

PauseGameOK Paused

swagger:response pauseGameOK

func NewPauseGameOK

func NewPauseGameOK() *PauseGameOK

NewPauseGameOK creates PauseGameOK with default headers values

func (*PauseGameOK) SetPayload

func (o *PauseGameOK) SetPayload(payload *models.GameDescription)

SetPayload sets the payload to the pause game o k response

func (*PauseGameOK) WithPayload

func (o *PauseGameOK) WithPayload(payload *models.GameDescription) *PauseGameOK

WithPayload adds the payload to the pause game o k response

func (*PauseGameOK) WriteResponse

func (o *PauseGameOK) WriteResponse(rw http.ResponseWriter, producer runtime.Producer)

WriteResponse to the client

type PauseGameParams

type PauseGameParams struct {

	// HTTP Request Object
	HTTPRequest *http.Request `json:"-"`

	/*
	  Required: true
	  In: path
	*/
	GameID string
}

PauseGameParams contains all the bound params for the pause game operation typically these are obtained from a http.Request

swagger:parameters pauseGame

func NewPauseGameParams

func NewPauseGameParams() PauseGameParams

NewPauseGameParams creates a new PauseGameParams object no default values defined in spec.

func (*PauseGameParams) BindRequest

func (o *PauseGameParams) BindRequest(r *http.Request, route *middleware.MatchedRoute) error

BindRequest both binds and validates a request, it assumes that complex things implement a Validatable(strfmt.Registry) error interface for simple values it will use straight method calls.

To ensure default values, the struct must have been initialized with NewPauseGameParams() beforehand.

type PauseGameURL

type PauseGameURL struct {
	GameID string
	// contains filtered or unexported fields
}

PauseGameURL generates an URL for the pause game operation

func (*PauseGameURL) Build

func (o *PauseGameURL) Build() (*url.URL, error)

Build a url path and query string

func (*PauseGameURL) BuildFull

func (o *PauseGameURL) BuildFull(scheme, host string) (*url.URL, error)

BuildFull builds a full url with scheme, host, path and query string

func (*PauseGameURL) Must

func (o *PauseGameURL) Must(u *url.URL, err error) *url.URL

Must is a helper function to panic when the url builder returns an error

func (*PauseGameURL) SetBasePath

func (o *PauseGameURL) SetBasePath(bp string)

SetBasePath sets the base path for this url builder, only required when it's different from the base path specified in the swagger spec. When the value of the base path is an empty string

func (*PauseGameURL) String

func (o *PauseGameURL) String() string

String returns the string representation of the path with query string

func (*PauseGameURL) StringFull

func (o *PauseGameURL) StringFull(scheme, host string) string

StringFull returns the string representation of a complete url

func (*PauseGameURL) WithBasePath

func (o *PauseGameURL) WithBasePath(bp string) *PauseGameURL

WithBasePath sets the base path for this url builder, only required when it's different from the base path specified in the swagger spec. When the value of the base path is an empty string

type ResumeGame

type ResumeGame struct {
	Context *middleware.Context
	Handler ResumeGameHandler
}

ResumeGame swagger:route POST /game/{game_id}/resume game resumeGame

Resume the game

func NewResumeGame

func NewResumeGame(ctx *middleware.Context, handler ResumeGameHandler) *ResumeGame

NewResumeGame creates a new http.Handler for the resume game operation

func (*ResumeGame) ServeHTTP

func (o *ResumeGame) ServeHTTP(rw http.ResponseWriter, r *http.Request)

type ResumeGameDefault

type ResumeGameDefault struct {

	/*
	  In: Body
	*/
	Payload *models.Error `json:"body,omitempty"`
	// contains filtered or unexported fields
}

ResumeGameDefault Error

swagger:response resumeGameDefault

func NewResumeGameDefault

func NewResumeGameDefault(code int) *ResumeGameDefault

NewResumeGameDefault creates ResumeGameDefault with default headers values

func (*ResumeGameDefault) SetPayload

func (o *ResumeGameDefault) SetPayload(payload *models.Error)

SetPayload sets the payload to the resume game default response

func (*ResumeGameDefault) SetStatusCode

func (o *ResumeGameDefault) SetStatusCode(code int)

SetStatusCode sets the status to the resume game default response

func (*ResumeGameDefault) WithPayload

func (o *ResumeGameDefault) WithPayload(payload *models.Error) *ResumeGameDefault

WithPayload adds the payload to the resume game default response

func (*ResumeGameDefault) WithStatusCode

func (o *ResumeGameDefault) WithStatusCode(code int) *ResumeGameDefault

WithStatusCode adds the status to the resume game default response

func (*ResumeGameDefault) WriteResponse

func (o *ResumeGameDefault) WriteResponse(rw http.ResponseWriter, producer runtime.Producer)

WriteResponse to the client

type ResumeGameHandler

type ResumeGameHandler interface {
	Handle(ResumeGameParams) middleware.Responder
}

ResumeGameHandler interface for that can handle valid resume game params

type ResumeGameHandlerFunc

type ResumeGameHandlerFunc func(ResumeGameParams) middleware.Responder

ResumeGameHandlerFunc turns a function with the right signature into a resume game handler

func (ResumeGameHandlerFunc) Handle

Handle executing the request and returning a response

type ResumeGameOK

type ResumeGameOK struct {

	/*
	  In: Body
	*/
	Payload *models.GameDescription `json:"body,omitempty"`
}

ResumeGameOK Resumed

swagger:response resumeGameOK

func NewResumeGameOK

func NewResumeGameOK() *ResumeGameOK

NewResumeGameOK creates ResumeGameOK with default headers values

func (*ResumeGameOK) SetPayload

func (o *ResumeGameOK) SetPayload(payload *models.GameDescription)

SetPayload sets the payload to the resume game o k response

func (*ResumeGameOK) WithPayload

func (o *ResumeGameOK) WithPayload(payload *models.GameDescription) *ResumeGameOK

WithPayload adds the payload to the resume game o k response

func (*ResumeGameOK) WriteResponse

func (o *ResumeGameOK) WriteResponse(rw http.ResponseWriter, producer runtime.Producer)

WriteResponse to the client

type ResumeGameParams

type ResumeGameParams struct {

	// HTTP Request Object
	HTTPRequest *http.Request `json:"-"`

	/*
	  Required: true
	  In: path
	*/
	GameID string
}

ResumeGameParams contains all the bound params for the resume game operation typically these are obtained from a http.Request

swagger:parameters resumeGame

func NewResumeGameParams

func NewResumeGameParams() ResumeGameParams

NewResumeGameParams creates a new ResumeGameParams object no default values defined in spec.

func (*ResumeGameParams) BindRequest

func (o *ResumeGameParams) BindRequest(r *http.Request, route *middleware.MatchedRoute) error

BindRequest both binds and validates a request, it assumes that complex things implement a Validatable(strfmt.Registry) error interface for simple values it will use straight method calls.

To ensure default values, the struct must have been initialized with NewResumeGameParams() beforehand.

type ResumeGameURL

type ResumeGameURL struct {
	GameID string
	// contains filtered or unexported fields
}

ResumeGameURL generates an URL for the resume game operation

func (*ResumeGameURL) Build

func (o *ResumeGameURL) Build() (*url.URL, error)

Build a url path and query string

func (*ResumeGameURL) BuildFull

func (o *ResumeGameURL) BuildFull(scheme, host string) (*url.URL, error)

BuildFull builds a full url with scheme, host, path and query string

func (*ResumeGameURL) Must

func (o *ResumeGameURL) Must(u *url.URL, err error) *url.URL

Must is a helper function to panic when the url builder returns an error

func (*ResumeGameURL) SetBasePath

func (o *ResumeGameURL) SetBasePath(bp string)

SetBasePath sets the base path for this url builder, only required when it's different from the base path specified in the swagger spec. When the value of the base path is an empty string

func (*ResumeGameURL) String

func (o *ResumeGameURL) String() string

String returns the string representation of the path with query string

func (*ResumeGameURL) StringFull

func (o *ResumeGameURL) StringFull(scheme, host string) string

StringFull returns the string representation of a complete url

func (*ResumeGameURL) WithBasePath

func (o *ResumeGameURL) WithBasePath(bp string) *ResumeGameURL

WithBasePath sets the base path for this url builder, only required when it's different from the base path specified in the swagger spec. When the value of the base path is an empty string

type StartGame

type StartGame struct {
	Context *middleware.Context
	Handler StartGameHandler
}

StartGame swagger:route POST /game game startGame

Start the game

func NewStartGame

func NewStartGame(ctx *middleware.Context, handler StartGameHandler) *StartGame

NewStartGame creates a new http.Handler for the start game operation

func (*StartGame) ServeHTTP

func (o *StartGame) ServeHTTP(rw http.ResponseWriter, r *http.Request)

type StartGameDefault

type StartGameDefault struct {

	/*
	  In: Body
	*/
	Payload *models.Error `json:"body,omitempty"`
	// contains filtered or unexported fields
}

StartGameDefault Error

swagger:response startGameDefault

func NewStartGameDefault

func NewStartGameDefault(code int) *StartGameDefault

NewStartGameDefault creates StartGameDefault with default headers values

func (*StartGameDefault) SetPayload

func (o *StartGameDefault) SetPayload(payload *models.Error)

SetPayload sets the payload to the start game default response

func (*StartGameDefault) SetStatusCode

func (o *StartGameDefault) SetStatusCode(code int)

SetStatusCode sets the status to the start game default response

func (*StartGameDefault) WithPayload

func (o *StartGameDefault) WithPayload(payload *models.Error) *StartGameDefault

WithPayload adds the payload to the start game default response

func (*StartGameDefault) WithStatusCode

func (o *StartGameDefault) WithStatusCode(code int) *StartGameDefault

WithStatusCode adds the status to the start game default response

func (*StartGameDefault) WriteResponse

func (o *StartGameDefault) WriteResponse(rw http.ResponseWriter, producer runtime.Producer)

WriteResponse to the client

type StartGameHandler

type StartGameHandler interface {
	Handle(StartGameParams) middleware.Responder
}

StartGameHandler interface for that can handle valid start game params

type StartGameHandlerFunc

type StartGameHandlerFunc func(StartGameParams) middleware.Responder

StartGameHandlerFunc turns a function with the right signature into a start game handler

func (StartGameHandlerFunc) Handle

Handle executing the request and returning a response

type StartGameOK

type StartGameOK struct {

	/*
	  In: Body
	*/
	Payload *models.GameDescription `json:"body,omitempty"`
}

StartGameOK Game started

swagger:response startGameOK

func NewStartGameOK

func NewStartGameOK() *StartGameOK

NewStartGameOK creates StartGameOK with default headers values

func (*StartGameOK) SetPayload

func (o *StartGameOK) SetPayload(payload *models.GameDescription)

SetPayload sets the payload to the start game o k response

func (*StartGameOK) WithPayload

func (o *StartGameOK) WithPayload(payload *models.GameDescription) *StartGameOK

WithPayload adds the payload to the start game o k response

func (*StartGameOK) WriteResponse

func (o *StartGameOK) WriteResponse(rw http.ResponseWriter, producer runtime.Producer)

WriteResponse to the client

type StartGameParams

type StartGameParams struct {

	// HTTP Request Object
	HTTPRequest *http.Request `json:"-"`
}

StartGameParams contains all the bound params for the start game operation typically these are obtained from a http.Request

swagger:parameters startGame

func NewStartGameParams

func NewStartGameParams() StartGameParams

NewStartGameParams creates a new StartGameParams object no default values defined in spec.

func (*StartGameParams) BindRequest

func (o *StartGameParams) BindRequest(r *http.Request, route *middleware.MatchedRoute) error

BindRequest both binds and validates a request, it assumes that complex things implement a Validatable(strfmt.Registry) error interface for simple values it will use straight method calls.

To ensure default values, the struct must have been initialized with NewStartGameParams() beforehand.

type StartGameURL

type StartGameURL struct {
	// contains filtered or unexported fields
}

StartGameURL generates an URL for the start game operation

func (*StartGameURL) Build

func (o *StartGameURL) Build() (*url.URL, error)

Build a url path and query string

func (*StartGameURL) BuildFull

func (o *StartGameURL) BuildFull(scheme, host string) (*url.URL, error)

BuildFull builds a full url with scheme, host, path and query string

func (*StartGameURL) Must

func (o *StartGameURL) Must(u *url.URL, err error) *url.URL

Must is a helper function to panic when the url builder returns an error

func (*StartGameURL) SetBasePath

func (o *StartGameURL) SetBasePath(bp string)

SetBasePath sets the base path for this url builder, only required when it's different from the base path specified in the swagger spec. When the value of the base path is an empty string

func (*StartGameURL) String

func (o *StartGameURL) String() string

String returns the string representation of the path with query string

func (*StartGameURL) StringFull

func (o *StartGameURL) StringFull(scheme, host string) string

StringFull returns the string representation of a complete url

func (*StartGameURL) WithBasePath

func (o *StartGameURL) WithBasePath(bp string) *StartGameURL

WithBasePath sets the base path for this url builder, only required when it's different from the base path specified in the swagger spec. When the value of the base path is an empty string

Jump to

Keyboard shortcuts

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