api

package
v0.12.0 Latest Latest
Warning

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

Go to latest
Published: Feb 11, 2023 License: AGPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const GetResultInternalServerErrorCode int = 500

GetResultInternalServerErrorCode is the HTTP code returned for type GetResultInternalServerError

View Source
const GetResultOKCode int = 200

GetResultOKCode is the HTTP code returned for type GetResultOK

View Source
const GetResultsInternalServerErrorCode int = 500

GetResultsInternalServerErrorCode is the HTTP code returned for type GetResultsInternalServerError

View Source
const GetResultsOKCode int = 200

GetResultsOKCode is the HTTP code returned for type GetResultsOK

Variables

This section is empty.

Functions

This section is empty.

Types

type GetResult

type GetResult struct {
	Context *middleware.Context
	Handler GetResultHandler
}
GetResult swagger:route GET /v1/results/{resultId} api getResult

ACRCloud result

Use this endpoint to fetch information on an exact entry.

func NewGetResult

func NewGetResult(ctx *middleware.Context, handler GetResultHandler) *GetResult

NewGetResult creates a new http.Handler for the get result operation

func (*GetResult) ServeHTTP

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

type GetResultHandler

type GetResultHandler interface {
	Handle(GetResultParams) middleware.Responder
}

GetResultHandler interface for that can handle valid get result params

type GetResultHandlerFunc

type GetResultHandlerFunc func(GetResultParams) middleware.Responder

GetResultHandlerFunc turns a function with the right signature into a get result handler

func (GetResultHandlerFunc) Handle

Handle executing the request and returning a response

type GetResultInternalServerError

type GetResultInternalServerError struct {
}

GetResultInternalServerError Server Error

swagger:response getResultInternalServerError

func NewGetResultInternalServerError

func NewGetResultInternalServerError() *GetResultInternalServerError

NewGetResultInternalServerError creates GetResultInternalServerError with default headers values

func (*GetResultInternalServerError) WriteResponse

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

WriteResponse to the client

type GetResultOK

type GetResultOK struct {

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

GetResultOK Returns single result

swagger:response getResultOK

func NewGetResultOK

func NewGetResultOK() *GetResultOK

NewGetResultOK creates GetResultOK with default headers values

func (*GetResultOK) SetPayload

func (o *GetResultOK) SetPayload(payload *models.Result)

SetPayload sets the payload to the get result o k response

func (*GetResultOK) WithPayload

func (o *GetResultOK) WithPayload(payload *models.Result) *GetResultOK

WithPayload adds the payload to the get result o k response

func (*GetResultOK) WriteResponse

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

WriteResponse to the client

type GetResultParams

type GetResultParams struct {

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

	/*
	  In: header
	*/
	XRequestID *string
	/*
	  Required: true
	  In: path
	*/
	ResultID int64
}

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

swagger:parameters getResult

func NewGetResultParams

func NewGetResultParams() GetResultParams

NewGetResultParams creates a new GetResultParams object

There are no default values defined in the spec.

func (*GetResultParams) BindRequest

func (o *GetResultParams) 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 NewGetResultParams() beforehand.

type GetResultURL

type GetResultURL struct {
	ResultID int64
	// contains filtered or unexported fields
}

GetResultURL generates an URL for the get result operation

func (*GetResultURL) Build

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

Build a url path and query string

func (*GetResultURL) BuildFull

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

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

func (*GetResultURL) Must

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

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

func (*GetResultURL) SetBasePath

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

func (o *GetResultURL) String() string

String returns the string representation of the path with query string

func (*GetResultURL) StringFull

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

StringFull returns the string representation of a complete url

func (*GetResultURL) WithBasePath

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

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 GetResults

type GetResults struct {
	Context *middleware.Context
	Handler GetResultsHandler
}
GetResults swagger:route GET /v1/results api getResults

Get ACRCloud Results

This is endpoint is useful for looking into and exporting the dataset.

func NewGetResults

func NewGetResults(ctx *middleware.Context, handler GetResultsHandler) *GetResults

NewGetResults creates a new http.Handler for the get results operation

func (*GetResults) ServeHTTP

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

type GetResultsHandler

type GetResultsHandler interface {
	Handle(GetResultsParams) middleware.Responder
}

GetResultsHandler interface for that can handle valid get results params

type GetResultsHandlerFunc

type GetResultsHandlerFunc func(GetResultsParams) middleware.Responder

GetResultsHandlerFunc turns a function with the right signature into a get results handler

func (GetResultsHandlerFunc) Handle

Handle executing the request and returning a response

type GetResultsInternalServerError

type GetResultsInternalServerError struct {
}

GetResultsInternalServerError Server Error

swagger:response getResultsInternalServerError

func NewGetResultsInternalServerError

func NewGetResultsInternalServerError() *GetResultsInternalServerError

NewGetResultsInternalServerError creates GetResultsInternalServerError with default headers values

func (*GetResultsInternalServerError) WriteResponse

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

WriteResponse to the client

type GetResultsOK

type GetResultsOK struct {

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

GetResultsOK Returns array of results

swagger:response getResultsOK

func NewGetResultsOK

func NewGetResultsOK() *GetResultsOK

NewGetResultsOK creates GetResultsOK with default headers values

func (*GetResultsOK) SetPayload

func (o *GetResultsOK) SetPayload(payload []*models.Result)

SetPayload sets the payload to the get results o k response

func (*GetResultsOK) WithPayload

func (o *GetResultsOK) WithPayload(payload []*models.Result) *GetResultsOK

WithPayload adds the payload to the get results o k response

func (*GetResultsOK) WriteResponse

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

WriteResponse to the client

type GetResultsParams

type GetResultsParams struct {

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

	/*
	  In: header
	*/
	XRequestID *string
	/*
	  In: query
	*/
	From *strfmt.DateTime
	/*The numbers of items to return.
	  Minimum: 1
	  In: query
	  Default: 20
	*/
	Limit *int64
	/*The number of items to skip before starting to collect the result set.
	  Minimum: 0
	  In: query
	  Default: 0
	*/
	Offset *int64
	/*
	  In: query
	*/
	To *strfmt.DateTime
}

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

swagger:parameters getResults

func NewGetResultsParams

func NewGetResultsParams() GetResultsParams

NewGetResultsParams creates a new GetResultsParams object with the default values initialized.

func (*GetResultsParams) BindRequest

func (o *GetResultsParams) 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 NewGetResultsParams() beforehand.

type GetResultsURL

type GetResultsURL struct {
	From   *strfmt.DateTime
	Limit  *int64
	Offset *int64
	To     *strfmt.DateTime
	// contains filtered or unexported fields
}

GetResultsURL generates an URL for the get results operation

func (*GetResultsURL) Build

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

Build a url path and query string

func (*GetResultsURL) BuildFull

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

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

func (*GetResultsURL) Must

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

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

func (*GetResultsURL) SetBasePath

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

func (o *GetResultsURL) String() string

String returns the string representation of the path with query string

func (*GetResultsURL) StringFull

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

StringFull returns the string representation of a complete url

func (*GetResultsURL) WithBasePath

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

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