operations

package
v0.0.0-...-50c9e83 Latest Latest
Warning

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

Go to latest
Published: Oct 12, 2023 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const GetUsersStateUIDBadRequestCode int = 400

GetUsersStateUIDBadRequestCode is the HTTP code returned for type GetUsersStateUIDBadRequest

View Source
const GetUsersStateUIDOKCode int = 200

GetUsersStateUIDOKCode is the HTTP code returned for type GetUsersStateUIDOK

Variables

This section is empty.

Functions

This section is empty.

Types

type BaldaGameServerAPI

type BaldaGameServerAPI struct {
	Middleware func(middleware.Builder) http.Handler

	// BasicAuthenticator generates a runtime.Authenticator from the supplied basic auth function.
	// It has a default implementation in the security package, however you can replace it for your particular usage.
	BasicAuthenticator func(security.UserPassAuthentication) runtime.Authenticator

	// APIKeyAuthenticator generates a runtime.Authenticator from the supplied token auth function.
	// It has a default implementation in the security package, however you can replace it for your particular usage.
	APIKeyAuthenticator func(string, string, security.TokenAuthentication) runtime.Authenticator

	// BearerAuthenticator generates a runtime.Authenticator from the supplied bearer token auth function.
	// It has a default implementation in the security package, however you can replace it for your particular usage.
	BearerAuthenticator func(string, security.ScopedTokenAuthentication) runtime.Authenticator

	// JSONConsumer registers a consumer for the following mime types:
	//   - application/json
	JSONConsumer runtime.Consumer

	// JSONProducer registers a producer for the following mime types:
	//   - application/json
	JSONProducer runtime.Producer

	// APIKeyHeaderAuth registers a function that takes a token and returns a principal
	// it performs authentication based on an api key X-API-Key provided in the header
	APIKeyHeaderAuth func(string) (interface{}, error)

	// APIKeyQueryParamAuth registers a function that takes a token and returns a principal
	// it performs authentication based on an api key api_key provided in the query
	APIKeyQueryParamAuth func(string) (interface{}, error)

	// APIAuthorizer provides access control (ACL/RBAC/ABAC) by providing access to the request and authenticated principal
	APIAuthorizer runtime.Authorizer

	// GetUsersStateUIDHandler sets the operation handler for the get users state UID operation
	GetUsersStateUIDHandler GetUsersStateUIDHandler
	// AuthPostAuthHandler sets the operation handler for the post auth operation
	AuthPostAuthHandler auth.PostAuthHandler
	// SignupPostSignupHandler sets the operation handler for the post signup operation
	SignupPostSignupHandler signup.PostSignupHandler

	// ServeError is called when an error is received, there is a default handler
	// but you can set your own with this
	ServeError func(http.ResponseWriter, *http.Request, error)

	// PreServerShutdown is called before the HTTP(S) server is shutdown
	// This allows for custom functions to get executed before the HTTP(S) server stops accepting traffic
	PreServerShutdown func()

	// ServerShutdown is called when the HTTP(S) server is shut down and done
	// handling all active connections and does not accept connections any more
	ServerShutdown func()

	// Custom command line argument groups with their descriptions
	CommandLineOptionsGroups []swag.CommandLineOptionsGroup

	// User defined logger function.
	Logger func(string, ...interface{})
	// contains filtered or unexported fields
}

BaldaGameServerAPI Balda GameServer API methods and models<br> <h3>Headers</h3><br/> <table> <tr><td><b><i>X-API-Key</i></b></td><td>API key is a special token that the client needs to provide when making API calls.</td></tr> <tr><td><b><i>X-API-User</i></b></td><td>User's ID</td></tr> <tr><td><b><i>X-API-Session</i></b></td><td>Session ID</td></tr> </table>

func NewBaldaGameServerAPI

func NewBaldaGameServerAPI(spec *loads.Document) *BaldaGameServerAPI

NewBaldaGameServerAPI creates a new BaldaGameServer instance

func (*BaldaGameServerAPI) AddMiddlewareFor

func (o *BaldaGameServerAPI) AddMiddlewareFor(method, path string, builder middleware.Builder)

AddMiddlewareFor adds a http middleware to existing handler

func (*BaldaGameServerAPI) AuthenticatorsFor

func (o *BaldaGameServerAPI) AuthenticatorsFor(schemes map[string]spec.SecurityScheme) map[string]runtime.Authenticator

AuthenticatorsFor gets the authenticators for the specified security schemes

func (*BaldaGameServerAPI) Authorizer

func (o *BaldaGameServerAPI) Authorizer() runtime.Authorizer

Authorizer returns the registered authorizer

func (*BaldaGameServerAPI) ConsumersFor

func (o *BaldaGameServerAPI) ConsumersFor(mediaTypes []string) map[string]runtime.Consumer

ConsumersFor gets the consumers for the specified media types. MIME type parameters are ignored here.

func (*BaldaGameServerAPI) Context

func (o *BaldaGameServerAPI) Context() *middleware.Context

Context returns the middleware context for the balda game server API

func (*BaldaGameServerAPI) DefaultConsumes

func (o *BaldaGameServerAPI) DefaultConsumes() string

DefaultConsumes returns the default consumes media type

func (*BaldaGameServerAPI) DefaultProduces

func (o *BaldaGameServerAPI) DefaultProduces() string

DefaultProduces returns the default produces media type

func (*BaldaGameServerAPI) Formats

func (o *BaldaGameServerAPI) Formats() strfmt.Registry

Formats returns the registered string formats

func (*BaldaGameServerAPI) HandlerFor

func (o *BaldaGameServerAPI) HandlerFor(method, path string) (http.Handler, bool)

HandlerFor gets a http.Handler for the provided operation method and path

func (*BaldaGameServerAPI) Init

func (o *BaldaGameServerAPI) Init()

Init allows you to just initialize the handler cache, you can then recompose the middleware as you see fit

func (*BaldaGameServerAPI) ProducersFor

func (o *BaldaGameServerAPI) ProducersFor(mediaTypes []string) map[string]runtime.Producer

ProducersFor gets the producers for the specified media types. MIME type parameters are ignored here.

func (*BaldaGameServerAPI) RegisterConsumer

func (o *BaldaGameServerAPI) RegisterConsumer(mediaType string, consumer runtime.Consumer)

RegisterConsumer allows you to add (or override) a consumer for a media type.

func (*BaldaGameServerAPI) RegisterFormat

func (o *BaldaGameServerAPI) RegisterFormat(name string, format strfmt.Format, validator strfmt.Validator)

RegisterFormat registers a custom format validator

func (*BaldaGameServerAPI) RegisterProducer

func (o *BaldaGameServerAPI) RegisterProducer(mediaType string, producer runtime.Producer)

RegisterProducer allows you to add (or override) a producer for a media type.

func (*BaldaGameServerAPI) Serve

func (o *BaldaGameServerAPI) Serve(builder middleware.Builder) http.Handler

Serve creates a http handler to serve the API over HTTP can be used directly in http.ListenAndServe(":8000", api.Serve(nil))

func (*BaldaGameServerAPI) ServeErrorFor

func (o *BaldaGameServerAPI) ServeErrorFor(operationID string) func(http.ResponseWriter, *http.Request, error)

ServeErrorFor gets a error handler for a given operation id

func (*BaldaGameServerAPI) SetDefaultConsumes

func (o *BaldaGameServerAPI) SetDefaultConsumes(mediaType string)

SetDefaultConsumes returns the default consumes media type

func (*BaldaGameServerAPI) SetDefaultProduces

func (o *BaldaGameServerAPI) SetDefaultProduces(mediaType string)

SetDefaultProduces sets the default produces media type

func (*BaldaGameServerAPI) SetSpec

func (o *BaldaGameServerAPI) SetSpec(spec *loads.Document)

SetSpec sets a spec that will be served for the clients.

func (*BaldaGameServerAPI) UseRedoc

func (o *BaldaGameServerAPI) UseRedoc()

UseRedoc for documentation at /docs

func (*BaldaGameServerAPI) UseSwaggerUI

func (o *BaldaGameServerAPI) UseSwaggerUI()

UseSwaggerUI for documentation at /docs

func (*BaldaGameServerAPI) Validate

func (o *BaldaGameServerAPI) Validate() error

Validate validates the registrations in the BaldaGameServerAPI

type GetUsersStateUID

type GetUsersStateUID struct {
	Context *middleware.Context
	Handler GetUsersStateUIDHandler
}
GetUsersStateUID swagger:route GET /users/state/{uid} getUsersStateUid

GetUsersStateUID get users state UID API

func NewGetUsersStateUID

func NewGetUsersStateUID(ctx *middleware.Context, handler GetUsersStateUIDHandler) *GetUsersStateUID

NewGetUsersStateUID creates a new http.Handler for the get users state UID operation

func (*GetUsersStateUID) ServeHTTP

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

type GetUsersStateUIDBadRequest

type GetUsersStateUIDBadRequest struct {

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

GetUsersStateUIDBadRequest Error when get user state

swagger:response getUsersStateUidBadRequest

func NewGetUsersStateUIDBadRequest

func NewGetUsersStateUIDBadRequest() *GetUsersStateUIDBadRequest

NewGetUsersStateUIDBadRequest creates GetUsersStateUIDBadRequest with default headers values

func (*GetUsersStateUIDBadRequest) SetPayload

func (o *GetUsersStateUIDBadRequest) SetPayload(payload *models.ErrorResponse)

SetPayload sets the payload to the get users state Uid bad request response

func (*GetUsersStateUIDBadRequest) WithPayload

WithPayload adds the payload to the get users state Uid bad request response

func (*GetUsersStateUIDBadRequest) WriteResponse

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

WriteResponse to the client

type GetUsersStateUIDHandler

type GetUsersStateUIDHandler interface {
	Handle(GetUsersStateUIDParams) middleware.Responder
}

GetUsersStateUIDHandler interface for that can handle valid get users state UID params

type GetUsersStateUIDHandlerFunc

type GetUsersStateUIDHandlerFunc func(GetUsersStateUIDParams) middleware.Responder

GetUsersStateUIDHandlerFunc turns a function with the right signature into a get users state UID handler

func (GetUsersStateUIDHandlerFunc) Handle

Handle executing the request and returning a response

type GetUsersStateUIDOK

type GetUsersStateUIDOK struct {

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

GetUsersStateUIDOK OK

swagger:response getUsersStateUidOK

func NewGetUsersStateUIDOK

func NewGetUsersStateUIDOK() *GetUsersStateUIDOK

NewGetUsersStateUIDOK creates GetUsersStateUIDOK with default headers values

func (*GetUsersStateUIDOK) SetPayload

func (o *GetUsersStateUIDOK) SetPayload(payload *models.UserState)

SetPayload sets the payload to the get users state Uid o k response

func (*GetUsersStateUIDOK) WithPayload

func (o *GetUsersStateUIDOK) WithPayload(payload *models.UserState) *GetUsersStateUIDOK

WithPayload adds the payload to the get users state Uid o k response

func (*GetUsersStateUIDOK) WriteResponse

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

WriteResponse to the client

type GetUsersStateUIDParams

type GetUsersStateUIDParams struct {

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

	/*User ID
	  Required: true
	  In: path
	*/
	UID int64
}

GetUsersStateUIDParams contains all the bound params for the get users state UID operation typically these are obtained from a http.Request

swagger:parameters GetUsersStateUID

func NewGetUsersStateUIDParams

func NewGetUsersStateUIDParams() GetUsersStateUIDParams

NewGetUsersStateUIDParams creates a new GetUsersStateUIDParams object

There are no default values defined in the spec.

func (*GetUsersStateUIDParams) BindRequest

func (o *GetUsersStateUIDParams) 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 NewGetUsersStateUIDParams() beforehand.

type GetUsersStateUIDURL

type GetUsersStateUIDURL struct {
	UID int64
	// contains filtered or unexported fields
}

GetUsersStateUIDURL generates an URL for the get users state UID operation

func (*GetUsersStateUIDURL) Build

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

Build a url path and query string

func (*GetUsersStateUIDURL) BuildFull

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

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

func (*GetUsersStateUIDURL) Must

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

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

func (*GetUsersStateUIDURL) SetBasePath

func (o *GetUsersStateUIDURL) 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 (*GetUsersStateUIDURL) String

func (o *GetUsersStateUIDURL) String() string

String returns the string representation of the path with query string

func (*GetUsersStateUIDURL) StringFull

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

StringFull returns the string representation of a complete url

func (*GetUsersStateUIDURL) WithBasePath

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

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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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