competition

package
v0.0.0-...-86e536e Latest Latest
Warning

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

Go to latest
Published: Oct 24, 2018 License: GPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const DeleteCompetitionBadRequestCode int = 400

DeleteCompetitionBadRequestCode is the HTTP code returned for type DeleteCompetitionBadRequest

View Source
const DeleteCompetitionNotFoundCode int = 404

DeleteCompetitionNotFoundCode is the HTTP code returned for type DeleteCompetitionNotFound

View Source
const GetCompetitionByIDBadRequestCode int = 400

GetCompetitionByIDBadRequestCode is the HTTP code returned for type GetCompetitionByIDBadRequest

View Source
const GetCompetitionByIDNotFoundCode int = 404

GetCompetitionByIDNotFoundCode is the HTTP code returned for type GetCompetitionByIDNotFound

View Source
const GetCompetitionByIDOKCode int = 200

GetCompetitionByIDOKCode is the HTTP code returned for type GetCompetitionByIDOK

View Source
const GetCompetitionsHTMLInternalServerErrorCode int = 500

GetCompetitionsHTMLInternalServerErrorCode is the HTTP code returned for type GetCompetitionsHTMLInternalServerError

View Source
const GetCompetitionsHTMLOKCode int = 200

GetCompetitionsHTMLOKCode is the HTTP code returned for type GetCompetitionsHTMLOK

View Source
const GetCompetitionsInternalServerErrorCode int = 500

GetCompetitionsInternalServerErrorCode is the HTTP code returned for type GetCompetitionsInternalServerError

View Source
const GetCompetitionsOKCode int = 200

GetCompetitionsOKCode is the HTTP code returned for type GetCompetitionsOK

View Source
const UpdateCompetitonBadRequestCode int = 400

UpdateCompetitonBadRequestCode is the HTTP code returned for type UpdateCompetitonBadRequest

View Source
const UpdateCompetitonNotFoundCode int = 404

UpdateCompetitonNotFoundCode is the HTTP code returned for type UpdateCompetitonNotFound

Variables

This section is empty.

Functions

This section is empty.

Types

type CreateCompetition

type CreateCompetition struct {
	Context *middleware.Context
	Handler CreateCompetitionHandler
}

CreateCompetition swagger:route POST /ranges/{rangeId}/competition competition createCompetition

Create new competiton

This can only be done by admin. Only id needs to be probided for subobjects (type, category).

func NewCreateCompetition

func NewCreateCompetition(ctx *middleware.Context, handler CreateCompetitionHandler) *CreateCompetition

NewCreateCompetition creates a new http.Handler for the create competition operation

func (*CreateCompetition) ServeHTTP

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

type CreateCompetitionDefault

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

CreateCompetitionDefault successful operation

swagger:response createCompetitionDefault

func NewCreateCompetitionDefault

func NewCreateCompetitionDefault(code int) *CreateCompetitionDefault

NewCreateCompetitionDefault creates CreateCompetitionDefault with default headers values

func (*CreateCompetitionDefault) SetStatusCode

func (o *CreateCompetitionDefault) SetStatusCode(code int)

SetStatusCode sets the status to the create competition default response

func (*CreateCompetitionDefault) WithStatusCode

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

WithStatusCode adds the status to the create competition default response

func (*CreateCompetitionDefault) WriteResponse

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

WriteResponse to the client

type CreateCompetitionHandler

type CreateCompetitionHandler interface {
	Handle(CreateCompetitionParams, *models.Principal) middleware.Responder
}

CreateCompetitionHandler interface for that can handle valid create competition params

type CreateCompetitionHandlerFunc

type CreateCompetitionHandlerFunc func(CreateCompetitionParams, *models.Principal) middleware.Responder

CreateCompetitionHandlerFunc turns a function with the right signature into a create competition handler

func (CreateCompetitionHandlerFunc) Handle

Handle executing the request and returning a response

type CreateCompetitionParams

type CreateCompetitionParams struct {

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

	/*Created competition object
	  Required: true
	  In: body
	*/
	Body *models.Competition
	/*ID of the range the competition is created for
	  Required: true
	  In: path
	*/
	RangeID int64
}

CreateCompetitionParams contains all the bound params for the create competition operation typically these are obtained from a http.Request

swagger:parameters createCompetition

func NewCreateCompetitionParams

func NewCreateCompetitionParams() CreateCompetitionParams

NewCreateCompetitionParams creates a new CreateCompetitionParams object no default values defined in spec.

func (*CreateCompetitionParams) BindRequest

func (o *CreateCompetitionParams) 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 NewCreateCompetitionParams() beforehand.

type CreateCompetitionURL

type CreateCompetitionURL struct {
	RangeID int64
	// contains filtered or unexported fields
}

CreateCompetitionURL generates an URL for the create competition operation

func (*CreateCompetitionURL) Build

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

Build a url path and query string

func (*CreateCompetitionURL) BuildFull

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

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

func (*CreateCompetitionURL) Must

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

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

func (*CreateCompetitionURL) SetBasePath

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

func (o *CreateCompetitionURL) String() string

String returns the string representation of the path with query string

func (*CreateCompetitionURL) StringFull

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

StringFull returns the string representation of a complete url

func (*CreateCompetitionURL) WithBasePath

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

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 DeleteCompetition

type DeleteCompetition struct {
	Context *middleware.Context
	Handler DeleteCompetitionHandler
}

DeleteCompetition swagger:route DELETE /competitions/{competitionId} competition deleteCompetition

Delete competition

This can only be done by admin.

func NewDeleteCompetition

func NewDeleteCompetition(ctx *middleware.Context, handler DeleteCompetitionHandler) *DeleteCompetition

NewDeleteCompetition creates a new http.Handler for the delete competition operation

func (*DeleteCompetition) ServeHTTP

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

type DeleteCompetitionBadRequest

type DeleteCompetitionBadRequest struct {
}

DeleteCompetitionBadRequest Invalid competition supplied

swagger:response deleteCompetitionBadRequest

func NewDeleteCompetitionBadRequest

func NewDeleteCompetitionBadRequest() *DeleteCompetitionBadRequest

NewDeleteCompetitionBadRequest creates DeleteCompetitionBadRequest with default headers values

func (*DeleteCompetitionBadRequest) WriteResponse

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

WriteResponse to the client

type DeleteCompetitionHandler

type DeleteCompetitionHandler interface {
	Handle(DeleteCompetitionParams, *models.Principal) middleware.Responder
}

DeleteCompetitionHandler interface for that can handle valid delete competition params

type DeleteCompetitionHandlerFunc

type DeleteCompetitionHandlerFunc func(DeleteCompetitionParams, *models.Principal) middleware.Responder

DeleteCompetitionHandlerFunc turns a function with the right signature into a delete competition handler

func (DeleteCompetitionHandlerFunc) Handle

Handle executing the request and returning a response

type DeleteCompetitionNotFound

type DeleteCompetitionNotFound struct {
}

DeleteCompetitionNotFound Competition not found

swagger:response deleteCompetitionNotFound

func NewDeleteCompetitionNotFound

func NewDeleteCompetitionNotFound() *DeleteCompetitionNotFound

NewDeleteCompetitionNotFound creates DeleteCompetitionNotFound with default headers values

func (*DeleteCompetitionNotFound) WriteResponse

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

WriteResponse to the client

type DeleteCompetitionParams

type DeleteCompetitionParams struct {

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

	/*ID of competition to delete
	  Required: true
	  In: path
	*/
	CompetitionID int64
}

DeleteCompetitionParams contains all the bound params for the delete competition operation typically these are obtained from a http.Request

swagger:parameters deleteCompetition

func NewDeleteCompetitionParams

func NewDeleteCompetitionParams() DeleteCompetitionParams

NewDeleteCompetitionParams creates a new DeleteCompetitionParams object no default values defined in spec.

func (*DeleteCompetitionParams) BindRequest

func (o *DeleteCompetitionParams) 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 NewDeleteCompetitionParams() beforehand.

type DeleteCompetitionURL

type DeleteCompetitionURL struct {
	CompetitionID int64
	// contains filtered or unexported fields
}

DeleteCompetitionURL generates an URL for the delete competition operation

func (*DeleteCompetitionURL) Build

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

Build a url path and query string

func (*DeleteCompetitionURL) BuildFull

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

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

func (*DeleteCompetitionURL) Must

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

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

func (*DeleteCompetitionURL) SetBasePath

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

func (o *DeleteCompetitionURL) String() string

String returns the string representation of the path with query string

func (*DeleteCompetitionURL) StringFull

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

StringFull returns the string representation of a complete url

func (*DeleteCompetitionURL) WithBasePath

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

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 GetCompetitionByID

type GetCompetitionByID struct {
	Context *middleware.Context
	Handler GetCompetitionByIDHandler
}

GetCompetitionByID swagger:route GET /competitions/{competitionId} competition getCompetitionById

Find competition by ID

Returns a single competition

func NewGetCompetitionByID

func NewGetCompetitionByID(ctx *middleware.Context, handler GetCompetitionByIDHandler) *GetCompetitionByID

NewGetCompetitionByID creates a new http.Handler for the get competition by Id operation

func (*GetCompetitionByID) ServeHTTP

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

type GetCompetitionByIDBadRequest

type GetCompetitionByIDBadRequest struct {
}

GetCompetitionByIDBadRequest Invalid ID supplied

swagger:response getCompetitionByIdBadRequest

func NewGetCompetitionByIDBadRequest

func NewGetCompetitionByIDBadRequest() *GetCompetitionByIDBadRequest

NewGetCompetitionByIDBadRequest creates GetCompetitionByIDBadRequest with default headers values

func (*GetCompetitionByIDBadRequest) WriteResponse

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

WriteResponse to the client

type GetCompetitionByIDHandler

type GetCompetitionByIDHandler interface {
	Handle(GetCompetitionByIDParams) middleware.Responder
}

GetCompetitionByIDHandler interface for that can handle valid get competition by Id params

type GetCompetitionByIDHandlerFunc

type GetCompetitionByIDHandlerFunc func(GetCompetitionByIDParams) middleware.Responder

GetCompetitionByIDHandlerFunc turns a function with the right signature into a get competition by Id handler

func (GetCompetitionByIDHandlerFunc) Handle

Handle executing the request and returning a response

type GetCompetitionByIDNotFound

type GetCompetitionByIDNotFound struct {

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

GetCompetitionByIDNotFound Shooting range not competition

swagger:response getCompetitionByIdNotFound

func NewGetCompetitionByIDNotFound

func NewGetCompetitionByIDNotFound() *GetCompetitionByIDNotFound

NewGetCompetitionByIDNotFound creates GetCompetitionByIDNotFound with default headers values

func (*GetCompetitionByIDNotFound) SetPayload

func (o *GetCompetitionByIDNotFound) SetPayload(payload *models.APIResponse)

SetPayload sets the payload to the get competition by Id not found response

func (*GetCompetitionByIDNotFound) WithPayload

WithPayload adds the payload to the get competition by Id not found response

func (*GetCompetitionByIDNotFound) WriteResponse

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

WriteResponse to the client

type GetCompetitionByIDOK

type GetCompetitionByIDOK struct {

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

GetCompetitionByIDOK successful operation

swagger:response getCompetitionByIdOK

func NewGetCompetitionByIDOK

func NewGetCompetitionByIDOK() *GetCompetitionByIDOK

NewGetCompetitionByIDOK creates GetCompetitionByIDOK with default headers values

func (*GetCompetitionByIDOK) SetPayload

func (o *GetCompetitionByIDOK) SetPayload(payload *models.Competition)

SetPayload sets the payload to the get competition by Id o k response

func (*GetCompetitionByIDOK) WithPayload

func (o *GetCompetitionByIDOK) WithPayload(payload *models.Competition) *GetCompetitionByIDOK

WithPayload adds the payload to the get competition by Id o k response

func (*GetCompetitionByIDOK) WriteResponse

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

WriteResponse to the client

type GetCompetitionByIDParams

type GetCompetitionByIDParams struct {

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

	/*ID of competition to return
	  Required: true
	  In: path
	*/
	CompetitionID int64
}

GetCompetitionByIDParams contains all the bound params for the get competition by Id operation typically these are obtained from a http.Request

swagger:parameters getCompetitionById

func NewGetCompetitionByIDParams

func NewGetCompetitionByIDParams() GetCompetitionByIDParams

NewGetCompetitionByIDParams creates a new GetCompetitionByIDParams object no default values defined in spec.

func (*GetCompetitionByIDParams) 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 NewGetCompetitionByIDParams() beforehand.

type GetCompetitionByIDURL

type GetCompetitionByIDURL struct {
	CompetitionID int64
	// contains filtered or unexported fields
}

GetCompetitionByIDURL generates an URL for the get competition by Id operation

func (*GetCompetitionByIDURL) Build

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

Build a url path and query string

func (*GetCompetitionByIDURL) BuildFull

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

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

func (*GetCompetitionByIDURL) Must

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

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

func (*GetCompetitionByIDURL) SetBasePath

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

func (o *GetCompetitionByIDURL) String() string

String returns the string representation of the path with query string

func (*GetCompetitionByIDURL) StringFull

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

StringFull returns the string representation of a complete url

func (*GetCompetitionByIDURL) WithBasePath

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

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 GetCompetitions

type GetCompetitions struct {
	Context *middleware.Context
	Handler GetCompetitionsHandler
}

GetCompetitions swagger:route GET /ranges/{rangeId}/competitions competition getCompetitions

List competitions for given shooting

Returns a list of competitions for shooting range

func NewGetCompetitions

func NewGetCompetitions(ctx *middleware.Context, handler GetCompetitionsHandler) *GetCompetitions

NewGetCompetitions creates a new http.Handler for the get competitions operation

func (*GetCompetitions) ServeHTTP

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

type GetCompetitionsHTML

type GetCompetitionsHTML struct {
	Context *middleware.Context
	Handler GetCompetitionsHTMLHandler
}

GetCompetitionsHTML swagger:route GET /ranges/{rangeId}/competitions/html competition getCompetitionsHtml

List competitions for given shooting range as HTML page

Returns a list of competitions for shooting range as HTML page

func NewGetCompetitionsHTML

func NewGetCompetitionsHTML(ctx *middleware.Context, handler GetCompetitionsHTMLHandler) *GetCompetitionsHTML

NewGetCompetitionsHTML creates a new http.Handler for the get competitions Html operation

func (*GetCompetitionsHTML) ServeHTTP

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

type GetCompetitionsHTMLHandler

type GetCompetitionsHTMLHandler interface {
	Handle(GetCompetitionsHTMLParams) middleware.Responder
}

GetCompetitionsHTMLHandler interface for that can handle valid get competitions Html params

type GetCompetitionsHTMLHandlerFunc

type GetCompetitionsHTMLHandlerFunc func(GetCompetitionsHTMLParams) middleware.Responder

GetCompetitionsHTMLHandlerFunc turns a function with the right signature into a get competitions Html handler

func (GetCompetitionsHTMLHandlerFunc) Handle

Handle executing the request and returning a response

type GetCompetitionsHTMLInternalServerError

type GetCompetitionsHTMLInternalServerError struct {

	/*
	  In: Body
	*/
	Payload string `json:"body,omitempty"`
}

GetCompetitionsHTMLInternalServerError Retrieving list of ranges failed

swagger:response getCompetitionsHtmlInternalServerError

func NewGetCompetitionsHTMLInternalServerError

func NewGetCompetitionsHTMLInternalServerError() *GetCompetitionsHTMLInternalServerError

NewGetCompetitionsHTMLInternalServerError creates GetCompetitionsHTMLInternalServerError with default headers values

func (*GetCompetitionsHTMLInternalServerError) SetPayload

func (o *GetCompetitionsHTMLInternalServerError) SetPayload(payload string)

SetPayload sets the payload to the get competitions Html internal server error response

func (*GetCompetitionsHTMLInternalServerError) WithPayload

WithPayload adds the payload to the get competitions Html internal server error response

func (*GetCompetitionsHTMLInternalServerError) WriteResponse

WriteResponse to the client

type GetCompetitionsHTMLOK

type GetCompetitionsHTMLOK struct {

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

GetCompetitionsHTMLOK successful operation

swagger:response getCompetitionsHtmlOK

func NewGetCompetitionsHTMLOK

func NewGetCompetitionsHTMLOK() *GetCompetitionsHTMLOK

NewGetCompetitionsHTMLOK creates GetCompetitionsHTMLOK with default headers values

func (*GetCompetitionsHTMLOK) SetPayload

func (o *GetCompetitionsHTMLOK) SetPayload(payload *models.HTMLResponse)

SetPayload sets the payload to the get competitions Html o k response

func (*GetCompetitionsHTMLOK) WithPayload

WithPayload adds the payload to the get competitions Html o k response

func (*GetCompetitionsHTMLOK) WriteResponse

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

WriteResponse to the client

type GetCompetitionsHTMLParams

type GetCompetitionsHTMLParams struct {

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

	/*Return active only competitions
	  In: query
	  Default: true
	*/
	ActiveOnly *bool
	/*ID of shooting range to read the competitions for
	  Required: true
	  In: path
	*/
	RangeID int64
}

GetCompetitionsHTMLParams contains all the bound params for the get competitions Html operation typically these are obtained from a http.Request

swagger:parameters getCompetitionsHtml

func NewGetCompetitionsHTMLParams

func NewGetCompetitionsHTMLParams() GetCompetitionsHTMLParams

NewGetCompetitionsHTMLParams creates a new GetCompetitionsHTMLParams object with the default values initialized.

func (*GetCompetitionsHTMLParams) 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 NewGetCompetitionsHTMLParams() beforehand.

type GetCompetitionsHTMLURL

type GetCompetitionsHTMLURL struct {
	RangeID int64

	ActiveOnly *bool
	// contains filtered or unexported fields
}

GetCompetitionsHTMLURL generates an URL for the get competitions Html operation

func (*GetCompetitionsHTMLURL) Build

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

Build a url path and query string

func (*GetCompetitionsHTMLURL) BuildFull

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

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

func (*GetCompetitionsHTMLURL) Must

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

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

func (*GetCompetitionsHTMLURL) SetBasePath

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

func (o *GetCompetitionsHTMLURL) String() string

String returns the string representation of the path with query string

func (*GetCompetitionsHTMLURL) StringFull

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

StringFull returns the string representation of a complete url

func (*GetCompetitionsHTMLURL) WithBasePath

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 GetCompetitionsHandler

type GetCompetitionsHandler interface {
	Handle(GetCompetitionsParams) middleware.Responder
}

GetCompetitionsHandler interface for that can handle valid get competitions params

type GetCompetitionsHandlerFunc

type GetCompetitionsHandlerFunc func(GetCompetitionsParams) middleware.Responder

GetCompetitionsHandlerFunc turns a function with the right signature into a get competitions handler

func (GetCompetitionsHandlerFunc) Handle

Handle executing the request and returning a response

type GetCompetitionsInternalServerError

type GetCompetitionsInternalServerError struct {

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

GetCompetitionsInternalServerError Retrieving list of competitions failed

swagger:response getCompetitionsInternalServerError

func NewGetCompetitionsInternalServerError

func NewGetCompetitionsInternalServerError() *GetCompetitionsInternalServerError

NewGetCompetitionsInternalServerError creates GetCompetitionsInternalServerError with default headers values

func (*GetCompetitionsInternalServerError) SetPayload

func (o *GetCompetitionsInternalServerError) SetPayload(payload *models.APIResponse)

SetPayload sets the payload to the get competitions internal server error response

func (*GetCompetitionsInternalServerError) WithPayload

WithPayload adds the payload to the get competitions internal server error response

func (*GetCompetitionsInternalServerError) WriteResponse

WriteResponse to the client

type GetCompetitionsOK

type GetCompetitionsOK struct {

	/*
	  In: Body
	*/
	Payload []*models.Competition `json:"body,omitempty"`
}

GetCompetitionsOK successful operation

swagger:response getCompetitionsOK

func NewGetCompetitionsOK

func NewGetCompetitionsOK() *GetCompetitionsOK

NewGetCompetitionsOK creates GetCompetitionsOK with default headers values

func (*GetCompetitionsOK) SetPayload

func (o *GetCompetitionsOK) SetPayload(payload []*models.Competition)

SetPayload sets the payload to the get competitions o k response

func (*GetCompetitionsOK) WithPayload

func (o *GetCompetitionsOK) WithPayload(payload []*models.Competition) *GetCompetitionsOK

WithPayload adds the payload to the get competitions o k response

func (*GetCompetitionsOK) WriteResponse

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

WriteResponse to the client

type GetCompetitionsParams

type GetCompetitionsParams struct {

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

	/*Return active only competitions
	  In: query
	  Default: true
	*/
	ActiveOnly *bool
	/*ID of shooting range to read the competitions for
	  Required: true
	  In: path
	*/
	RangeID int64
}

GetCompetitionsParams contains all the bound params for the get competitions operation typically these are obtained from a http.Request

swagger:parameters getCompetitions

func NewGetCompetitionsParams

func NewGetCompetitionsParams() GetCompetitionsParams

NewGetCompetitionsParams creates a new GetCompetitionsParams object with the default values initialized.

func (*GetCompetitionsParams) BindRequest

func (o *GetCompetitionsParams) 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 NewGetCompetitionsParams() beforehand.

type GetCompetitionsURL

type GetCompetitionsURL struct {
	RangeID int64

	ActiveOnly *bool
	// contains filtered or unexported fields
}

GetCompetitionsURL generates an URL for the get competitions operation

func (*GetCompetitionsURL) Build

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

Build a url path and query string

func (*GetCompetitionsURL) BuildFull

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

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

func (*GetCompetitionsURL) Must

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

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

func (*GetCompetitionsURL) SetBasePath

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

func (o *GetCompetitionsURL) String() string

String returns the string representation of the path with query string

func (*GetCompetitionsURL) StringFull

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

StringFull returns the string representation of a complete url

func (*GetCompetitionsURL) WithBasePath

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

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 UpdateCompetiton

type UpdateCompetiton struct {
	Context *middleware.Context
	Handler UpdateCompetitonHandler
}

UpdateCompetiton swagger:route PUT /competitions/{competitionId} competition updateCompetiton

Updated competition

This can only be done by admin.

func NewUpdateCompetiton

func NewUpdateCompetiton(ctx *middleware.Context, handler UpdateCompetitonHandler) *UpdateCompetiton

NewUpdateCompetiton creates a new http.Handler for the update competiton operation

func (*UpdateCompetiton) ServeHTTP

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

type UpdateCompetitonBadRequest

type UpdateCompetitonBadRequest struct {
}

UpdateCompetitonBadRequest Invalid competition supplied

swagger:response updateCompetitonBadRequest

func NewUpdateCompetitonBadRequest

func NewUpdateCompetitonBadRequest() *UpdateCompetitonBadRequest

NewUpdateCompetitonBadRequest creates UpdateCompetitonBadRequest with default headers values

func (*UpdateCompetitonBadRequest) WriteResponse

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

WriteResponse to the client

type UpdateCompetitonHandler

type UpdateCompetitonHandler interface {
	Handle(UpdateCompetitonParams, *models.Principal) middleware.Responder
}

UpdateCompetitonHandler interface for that can handle valid update competiton params

type UpdateCompetitonHandlerFunc

type UpdateCompetitonHandlerFunc func(UpdateCompetitonParams, *models.Principal) middleware.Responder

UpdateCompetitonHandlerFunc turns a function with the right signature into a update competiton handler

func (UpdateCompetitonHandlerFunc) Handle

Handle executing the request and returning a response

type UpdateCompetitonNotFound

type UpdateCompetitonNotFound struct {
}

UpdateCompetitonNotFound Competition not found

swagger:response updateCompetitonNotFound

func NewUpdateCompetitonNotFound

func NewUpdateCompetitonNotFound() *UpdateCompetitonNotFound

NewUpdateCompetitonNotFound creates UpdateCompetitonNotFound with default headers values

func (*UpdateCompetitonNotFound) WriteResponse

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

WriteResponse to the client

type UpdateCompetitonParams

type UpdateCompetitonParams struct {

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

	/*Updated competition object
	  Required: true
	  In: body
	*/
	Body *models.Competition
	/*ID of competition to update
	  Required: true
	  In: path
	*/
	CompetitionID int64
}

UpdateCompetitonParams contains all the bound params for the update competiton operation typically these are obtained from a http.Request

swagger:parameters updateCompetiton

func NewUpdateCompetitonParams

func NewUpdateCompetitonParams() UpdateCompetitonParams

NewUpdateCompetitonParams creates a new UpdateCompetitonParams object no default values defined in spec.

func (*UpdateCompetitonParams) BindRequest

func (o *UpdateCompetitonParams) 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 NewUpdateCompetitonParams() beforehand.

type UpdateCompetitonURL

type UpdateCompetitonURL struct {
	CompetitionID int64
	// contains filtered or unexported fields
}

UpdateCompetitonURL generates an URL for the update competiton operation

func (*UpdateCompetitonURL) Build

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

Build a url path and query string

func (*UpdateCompetitonURL) BuildFull

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

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

func (*UpdateCompetitonURL) Must

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

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

func (*UpdateCompetitonURL) SetBasePath

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

func (o *UpdateCompetitonURL) String() string

String returns the string representation of the path with query string

func (*UpdateCompetitonURL) StringFull

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

StringFull returns the string representation of a complete url

func (*UpdateCompetitonURL) WithBasePath

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

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