range_restapi

package
v0.0.0-...-49b4783 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2021 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const RangeSearchBadRequestCode int = 400

RangeSearchBadRequestCode is the HTTP code returned for type RangeSearchBadRequest

View Source
const RangeSearchInternalServerErrorCode int = 500

RangeSearchInternalServerErrorCode is the HTTP code returned for type RangeSearchInternalServerError

View Source
const RangeSearchNotFoundCode int = 404

RangeSearchNotFoundCode is the HTTP code returned for type RangeSearchNotFound

View Source
const RangeSearchOKCode int = 200

RangeSearchOKCode is the HTTP code returned for type RangeSearchOK

Variables

This section is empty.

Functions

This section is empty.

Types

type RangeSearch

type RangeSearch struct {
	Context *middleware.Context
	Handler RangeSearchHandler
}
RangeSearch swagger:route GET /range/{hashPrefix} range rangeSearch

Search password hashes by range.

func NewRangeSearch

func NewRangeSearch(ctx *middleware.Context, handler RangeSearchHandler) *RangeSearch

NewRangeSearch creates a new http.Handler for the range search operation

func (*RangeSearch) ServeHTTP

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

type RangeSearchBadRequest

type RangeSearchBadRequest struct {

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

RangeSearchBadRequest Hash prefix must be exactly 5 characters long.

swagger:response rangeSearchBadRequest

func NewRangeSearchBadRequest

func NewRangeSearchBadRequest() *RangeSearchBadRequest

NewRangeSearchBadRequest creates RangeSearchBadRequest with default headers values

func (*RangeSearchBadRequest) SetPayload

func (o *RangeSearchBadRequest) SetPayload(payload string)

SetPayload sets the payload to the range search bad request response

func (*RangeSearchBadRequest) WithPayload

func (o *RangeSearchBadRequest) WithPayload(payload string) *RangeSearchBadRequest

WithPayload adds the payload to the range search bad request response

func (*RangeSearchBadRequest) WriteResponse

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

WriteResponse to the client

type RangeSearchHandler

type RangeSearchHandler interface {
	Handle(RangeSearchParams) middleware.Responder
}

RangeSearchHandler interface for that can handle valid range search params

type RangeSearchHandlerFunc

type RangeSearchHandlerFunc func(RangeSearchParams) middleware.Responder

RangeSearchHandlerFunc turns a function with the right signature into a range search handler

func (RangeSearchHandlerFunc) Handle

Handle executing the request and returning a response

type RangeSearchInternalServerError

type RangeSearchInternalServerError struct {

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

RangeSearchInternalServerError Server encountered an error.

swagger:response rangeSearchInternalServerError

func NewRangeSearchInternalServerError

func NewRangeSearchInternalServerError() *RangeSearchInternalServerError

NewRangeSearchInternalServerError creates RangeSearchInternalServerError with default headers values

func (*RangeSearchInternalServerError) SetPayload

func (o *RangeSearchInternalServerError) SetPayload(payload string)

SetPayload sets the payload to the range search internal server error response

func (*RangeSearchInternalServerError) WithPayload

WithPayload adds the payload to the range search internal server error response

func (*RangeSearchInternalServerError) WriteResponse

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

WriteResponse to the client

type RangeSearchNotFound

type RangeSearchNotFound struct {
}

RangeSearchNotFound No results found.

swagger:response rangeSearchNotFound

func NewRangeSearchNotFound

func NewRangeSearchNotFound() *RangeSearchNotFound

NewRangeSearchNotFound creates RangeSearchNotFound with default headers values

func (*RangeSearchNotFound) WriteResponse

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

WriteResponse to the client

type RangeSearchOK

type RangeSearchOK struct {

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

RangeSearchOK Request was processed successfully.

swagger:response rangeSearchOK

func NewRangeSearchOK

func NewRangeSearchOK() *RangeSearchOK

NewRangeSearchOK creates RangeSearchOK with default headers values

func (*RangeSearchOK) SetPayload

func (o *RangeSearchOK) SetPayload(payload string)

SetPayload sets the payload to the range search o k response

func (*RangeSearchOK) WithPayload

func (o *RangeSearchOK) WithPayload(payload string) *RangeSearchOK

WithPayload adds the payload to the range search o k response

func (*RangeSearchOK) WriteResponse

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

WriteResponse to the client

type RangeSearchParams

type RangeSearchParams struct {

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

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

RangeSearchParams contains all the bound params for the range search operation typically these are obtained from a http.Request

swagger:parameters rangeSearch

func NewRangeSearchParams

func NewRangeSearchParams() RangeSearchParams

NewRangeSearchParams creates a new RangeSearchParams object

There are no default values defined in the spec.

func (*RangeSearchParams) BindRequest

func (o *RangeSearchParams) 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 NewRangeSearchParams() beforehand.

type RangeSearchURL

type RangeSearchURL struct {
	HashPrefix string
	// contains filtered or unexported fields
}

RangeSearchURL generates an URL for the range search operation

func (*RangeSearchURL) Build

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

Build a url path and query string

func (*RangeSearchURL) BuildFull

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

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

func (*RangeSearchURL) Must

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

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

func (*RangeSearchURL) SetBasePath

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

func (o *RangeSearchURL) String() string

String returns the string representation of the path with query string

func (*RangeSearchURL) StringFull

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

StringFull returns the string representation of a complete url

func (*RangeSearchURL) WithBasePath

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

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