query

package
v0.0.0-...-904661e Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2023 License: BSD-3-Clause Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const PostQueryBadRequestCode int = 400

PostQueryBadRequestCode is the HTTP code returned for type PostQueryBadRequest

View Source
const PostQueryInternalServerErrorCode int = 500

PostQueryInternalServerErrorCode is the HTTP code returned for type PostQueryInternalServerError

View Source
const PostQueryOKCode int = 200

PostQueryOKCode is the HTTP code returned for type PostQueryOK

Variables

This section is empty.

Functions

This section is empty.

Types

type PostQuery

type PostQuery struct {
	Context *middleware.Context
	Handler PostQueryHandler
}
PostQuery swagger:route POST /query query postQuery

Query the database

func NewPostQuery

func NewPostQuery(ctx *middleware.Context, handler PostQueryHandler) *PostQuery

NewPostQuery creates a new http.Handler for the post query operation

func (*PostQuery) ServeHTTP

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

type PostQueryBadRequest

type PostQueryBadRequest struct {

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

PostQueryBadRequest Bad Request.

swagger:response postQueryBadRequest

func NewPostQueryBadRequest

func NewPostQueryBadRequest() *PostQueryBadRequest

NewPostQueryBadRequest creates PostQueryBadRequest with default headers values

func (*PostQueryBadRequest) SetPayload

func (o *PostQueryBadRequest) SetPayload(payload *models.QdbError)

SetPayload sets the payload to the post query bad request response

func (*PostQueryBadRequest) WithPayload

func (o *PostQueryBadRequest) WithPayload(payload *models.QdbError) *PostQueryBadRequest

WithPayload adds the payload to the post query bad request response

func (*PostQueryBadRequest) WriteResponse

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

WriteResponse to the client

type PostQueryHandler

type PostQueryHandler interface {
	Handle(PostQueryParams, *models.Principal) middleware.Responder
}

PostQueryHandler interface for that can handle valid post query params

type PostQueryHandlerFunc

type PostQueryHandlerFunc func(PostQueryParams, *models.Principal) middleware.Responder

PostQueryHandlerFunc turns a function with the right signature into a post query handler

func (PostQueryHandlerFunc) Handle

Handle executing the request and returning a response

type PostQueryInternalServerError

type PostQueryInternalServerError struct {

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

PostQueryInternalServerError Internal Error.

swagger:response postQueryInternalServerError

func NewPostQueryInternalServerError

func NewPostQueryInternalServerError() *PostQueryInternalServerError

NewPostQueryInternalServerError creates PostQueryInternalServerError with default headers values

func (*PostQueryInternalServerError) SetPayload

func (o *PostQueryInternalServerError) SetPayload(payload *models.QdbError)

SetPayload sets the payload to the post query internal server error response

func (*PostQueryInternalServerError) WithPayload

WithPayload adds the payload to the post query internal server error response

func (*PostQueryInternalServerError) WriteResponse

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

WriteResponse to the client

type PostQueryOK

type PostQueryOK struct {

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

PostQueryOK Successful operation

swagger:response postQueryOK

func NewPostQueryOK

func NewPostQueryOK() *PostQueryOK

NewPostQueryOK creates PostQueryOK with default headers values

func (*PostQueryOK) SetPayload

func (o *PostQueryOK) SetPayload(payload *models.QueryResult)

SetPayload sets the payload to the post query o k response

func (*PostQueryOK) WithPayload

func (o *PostQueryOK) WithPayload(payload *models.QueryResult) *PostQueryOK

WithPayload adds the payload to the post query o k response

func (*PostQueryOK) WriteResponse

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

WriteResponse to the client

type PostQueryParams

type PostQueryParams struct {

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

	/*
	  Required: true
	  In: body
	*/
	Query *models.Query
}

PostQueryParams contains all the bound params for the post query operation typically these are obtained from a http.Request

swagger:parameters post-query

func NewPostQueryParams

func NewPostQueryParams() PostQueryParams

NewPostQueryParams creates a new PostQueryParams object

There are no default values defined in the spec.

func (*PostQueryParams) BindRequest

func (o *PostQueryParams) 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 NewPostQueryParams() beforehand.

type PostQueryURL

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

PostQueryURL generates an URL for the post query operation

func (*PostQueryURL) Build

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

Build a url path and query string

func (*PostQueryURL) BuildFull

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

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

func (*PostQueryURL) Must

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

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

func (*PostQueryURL) SetBasePath

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

func (o *PostQueryURL) String() string

String returns the string representation of the path with query string

func (*PostQueryURL) StringFull

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

StringFull returns the string representation of a complete url

func (*PostQueryURL) WithBasePath

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

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