latch

package
v0.0.0-...-1953697 Latest Latest
Warning

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

Go to latest
Published: Sep 15, 2025 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const CreateLatchOKCode int = 200

CreateLatchOKCode is the HTTP code returned for type CreateLatchOK

Variables

This section is empty.

Functions

This section is empty.

Types

type CreateLatch

type CreateLatch struct {
	Context *middleware.Context
	Handler CreateLatchHandler
}
CreateLatch swagger:route POST /latches latch createLatch

CreateLatch create latch API

func NewCreateLatch

func NewCreateLatch(ctx *middleware.Context, handler CreateLatchHandler) *CreateLatch

NewCreateLatch creates a new http.Handler for the create latch operation

func (*CreateLatch) ServeHTTP

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

type CreateLatchDefault

type CreateLatchDefault struct {

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

CreateLatchDefault generic error response

swagger:response createLatchDefault

func NewCreateLatchDefault

func NewCreateLatchDefault(code int) *CreateLatchDefault

NewCreateLatchDefault creates CreateLatchDefault with default headers values

func (*CreateLatchDefault) SetPayload

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

SetPayload sets the payload to the create latch default response

func (*CreateLatchDefault) SetStatusCode

func (o *CreateLatchDefault) SetStatusCode(code int)

SetStatusCode sets the status to the create latch default response

func (*CreateLatchDefault) WithPayload

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

WithPayload adds the payload to the create latch default response

func (*CreateLatchDefault) WithStatusCode

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

WithStatusCode adds the status to the create latch default response

func (*CreateLatchDefault) WriteResponse

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

WriteResponse to the client

type CreateLatchHandler

type CreateLatchHandler interface {
	Handle(CreateLatchParams) middleware.Responder
}

CreateLatchHandler interface for that can handle valid create latch params

type CreateLatchHandlerFunc

type CreateLatchHandlerFunc func(CreateLatchParams) middleware.Responder

CreateLatchHandlerFunc turns a function with the right signature into a create latch handler

func (CreateLatchHandlerFunc) Handle

Handle executing the request and returning a response

type CreateLatchOK

type CreateLatchOK struct {

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

CreateLatchOK returns the created latch

swagger:response createLatchOK

func NewCreateLatchOK

func NewCreateLatchOK() *CreateLatchOK

NewCreateLatchOK creates CreateLatchOK with default headers values

func (*CreateLatchOK) SetPayload

func (o *CreateLatchOK) SetPayload(payload *models.Flag)

SetPayload sets the payload to the create latch o k response

func (*CreateLatchOK) WithPayload

func (o *CreateLatchOK) WithPayload(payload *models.Flag) *CreateLatchOK

WithPayload adds the payload to the create latch o k response

func (*CreateLatchOK) WriteResponse

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

WriteResponse to the client

type CreateLatchParams

type CreateLatchParams struct {

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

	/*create a Latch
	  Required: true
	  In: body
	*/
	Body *models.CreateFlagRequest
}

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

swagger:parameters createLatch

func NewCreateLatchParams

func NewCreateLatchParams() CreateLatchParams

NewCreateLatchParams creates a new CreateLatchParams object

There are no default values defined in the spec.

func (*CreateLatchParams) BindRequest

func (o *CreateLatchParams) 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 NewCreateLatchParams() beforehand.

type CreateLatchURL

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

CreateLatchURL generates an URL for the create latch operation

func (*CreateLatchURL) Build

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

Build a url path and query string

func (*CreateLatchURL) BuildFull

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

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

func (*CreateLatchURL) Must

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

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

func (*CreateLatchURL) SetBasePath

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

func (o *CreateLatchURL) String() string

String returns the string representation of the path with query string

func (*CreateLatchURL) StringFull

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

StringFull returns the string representation of a complete url

func (*CreateLatchURL) WithBasePath

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

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