openapi

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Feb 24, 2025 License: BSD-3-Clause Imports: 12 Imported by: 0

Documentation

Overview

Package openapi provides primitives to interact with the openapi HTTP API.

Code generated by github.com/deepmap/oapi-codegen version v1.16.3 DO NOT EDIT.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewDeleteDocumentRequest added in v0.0.3

func NewDeleteDocumentRequest(server string, model string, id string) (*http.Request, error)

NewDeleteDocumentRequest generates requests for DeleteDocument

func NewGetDocumentRequest

func NewGetDocumentRequest(server string, model string, id string) (*http.Request, error)

NewGetDocumentRequest generates requests for GetDocument

func NewPutDocumentRequest

func NewPutDocumentRequest(server string, body PutDocumentJSONRequestBody) (*http.Request, error)

NewPutDocumentRequest calls the generic PutDocument builder with application/json body

func NewPutDocumentRequestWithBody

func NewPutDocumentRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)

NewPutDocumentRequestWithBody generates requests for PutDocument with any type of body

func NewReactorLoopRequest

func NewReactorLoopRequest(server string, body ReactorLoopJSONRequestBody) (*http.Request, error)

NewReactorLoopRequest calls the generic ReactorLoop builder with application/json body

func NewReactorLoopRequestWithBody

func NewReactorLoopRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)

NewReactorLoopRequestWithBody generates requests for ReactorLoop with any type of body

func NewSearchDocumentsRequest

func NewSearchDocumentsRequest(server string, body SearchDocumentsJSONRequestBody) (*http.Request, error)

NewSearchDocumentsRequest calls the generic SearchDocuments builder with application/json body

func NewSearchDocumentsRequestWithBody

func NewSearchDocumentsRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)

NewSearchDocumentsRequestWithBody generates requests for SearchDocuments with any type of body

func RegisterHandlers

func RegisterHandlers(router EchoRouter, si ServerInterface)

RegisterHandlers adds each server route to the EchoRouter.

func RegisterHandlersWithBaseURL

func RegisterHandlersWithBaseURL(router EchoRouter, si ServerInterface, baseURL string)

Registers handlers, and prepends BaseURL to the paths, so that the paths can be served under a prefix.

Types

type Client

type Client struct {
	// The endpoint of the server conforming to this interface, with scheme,
	// https://api.deepmap.com for example. This can contain a path relative
	// to the server, such as https://api.deepmap.com/dev-test, and all the
	// paths in the swagger spec will be appended to the server.
	Server string

	// Doer for performing requests, typically a *http.Client with any
	// customized settings, such as certificate chains.
	Client HttpRequestDoer

	// A list of callbacks for modifying requests which are generated before sending over
	// the network.
	RequestEditors []RequestEditorFn
}

Client which conforms to the OpenAPI3 specification for this service.

func NewClient

func NewClient(server string, opts ...ClientOption) (*Client, error)

Creates a new Client, with reasonable defaults

func (*Client) DeleteDocument added in v0.0.3

func (c *Client) DeleteDocument(ctx context.Context, model string, id string, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) GetDocument

func (c *Client) GetDocument(ctx context.Context, model string, id string, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) PutDocument

func (c *Client) PutDocument(ctx context.Context, body PutDocumentJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) PutDocumentWithBody

func (c *Client) PutDocumentWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) ReactorLoop

func (c *Client) ReactorLoop(ctx context.Context, body ReactorLoopJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) ReactorLoopWithBody

func (c *Client) ReactorLoopWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) SearchDocuments

func (c *Client) SearchDocuments(ctx context.Context, body SearchDocumentsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) SearchDocumentsWithBody

func (c *Client) SearchDocumentsWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

type ClientInterface

type ClientInterface interface {
	// PutDocumentWithBody request with any body
	PutDocumentWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	PutDocument(ctx context.Context, body PutDocumentJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// SearchDocumentsWithBody request with any body
	SearchDocumentsWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	SearchDocuments(ctx context.Context, body SearchDocumentsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// ReactorLoopWithBody request with any body
	ReactorLoopWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	ReactorLoop(ctx context.Context, body ReactorLoopJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// DeleteDocument request
	DeleteDocument(ctx context.Context, model string, id string, reqEditors ...RequestEditorFn) (*http.Response, error)

	// GetDocument request
	GetDocument(ctx context.Context, model string, id string, reqEditors ...RequestEditorFn) (*http.Response, error)
}

The interface specification for the client above.

type ClientOption

type ClientOption func(*Client) error

ClientOption allows setting custom parameters during construction

func WithBaseURL

func WithBaseURL(baseURL string) ClientOption

WithBaseURL overrides the baseURL.

func WithHTTPClient

func WithHTTPClient(doer HttpRequestDoer) ClientOption

WithHTTPClient allows overriding the default Doer, which is automatically created using http.Client. This is useful for tests.

func WithRequestEditorFn

func WithRequestEditorFn(fn RequestEditorFn) ClientOption

WithRequestEditorFn allows setting up a callback function, which will be called right before sending the request. This can be used to mutate the request.

type ClientWithResponses

type ClientWithResponses struct {
	ClientInterface
}

ClientWithResponses builds on ClientInterface to offer response payloads

func NewClientWithResponses

func NewClientWithResponses(server string, opts ...ClientOption) (*ClientWithResponses, error)

NewClientWithResponses creates a new ClientWithResponses, which wraps Client with return type handling

func (*ClientWithResponses) DeleteDocumentWithResponse added in v0.0.3

func (c *ClientWithResponses) DeleteDocumentWithResponse(ctx context.Context, model string, id string, reqEditors ...RequestEditorFn) (*DeleteDocumentResponse, error)

DeleteDocumentWithResponse request returning *DeleteDocumentResponse

func (*ClientWithResponses) GetDocumentWithResponse

func (c *ClientWithResponses) GetDocumentWithResponse(ctx context.Context, model string, id string, reqEditors ...RequestEditorFn) (*GetDocumentResponse, error)

GetDocumentWithResponse request returning *GetDocumentResponse

func (*ClientWithResponses) PutDocumentWithBodyWithResponse

func (c *ClientWithResponses) PutDocumentWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PutDocumentResponse, error)

PutDocumentWithBodyWithResponse request with arbitrary body returning *PutDocumentResponse

func (*ClientWithResponses) PutDocumentWithResponse

func (c *ClientWithResponses) PutDocumentWithResponse(ctx context.Context, body PutDocumentJSONRequestBody, reqEditors ...RequestEditorFn) (*PutDocumentResponse, error)

func (*ClientWithResponses) ReactorLoopWithBodyWithResponse

func (c *ClientWithResponses) ReactorLoopWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*ReactorLoopResponse, error)

ReactorLoopWithBodyWithResponse request with arbitrary body returning *ReactorLoopResponse

func (*ClientWithResponses) ReactorLoopWithResponse

func (c *ClientWithResponses) ReactorLoopWithResponse(ctx context.Context, body ReactorLoopJSONRequestBody, reqEditors ...RequestEditorFn) (*ReactorLoopResponse, error)

func (*ClientWithResponses) SearchDocumentsWithBodyWithResponse

func (c *ClientWithResponses) SearchDocumentsWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*SearchDocumentsResponse, error)

SearchDocumentsWithBodyWithResponse request with arbitrary body returning *SearchDocumentsResponse

func (*ClientWithResponses) SearchDocumentsWithResponse

func (c *ClientWithResponses) SearchDocumentsWithResponse(ctx context.Context, body SearchDocumentsJSONRequestBody, reqEditors ...RequestEditorFn) (*SearchDocumentsResponse, error)

type ClientWithResponsesInterface

type ClientWithResponsesInterface interface {
	// PutDocumentWithBodyWithResponse request with any body
	PutDocumentWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PutDocumentResponse, error)

	PutDocumentWithResponse(ctx context.Context, body PutDocumentJSONRequestBody, reqEditors ...RequestEditorFn) (*PutDocumentResponse, error)

	// SearchDocumentsWithBodyWithResponse request with any body
	SearchDocumentsWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*SearchDocumentsResponse, error)

	SearchDocumentsWithResponse(ctx context.Context, body SearchDocumentsJSONRequestBody, reqEditors ...RequestEditorFn) (*SearchDocumentsResponse, error)

	// ReactorLoopWithBodyWithResponse request with any body
	ReactorLoopWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*ReactorLoopResponse, error)

	ReactorLoopWithResponse(ctx context.Context, body ReactorLoopJSONRequestBody, reqEditors ...RequestEditorFn) (*ReactorLoopResponse, error)

	// DeleteDocumentWithResponse request
	DeleteDocumentWithResponse(ctx context.Context, model string, id string, reqEditors ...RequestEditorFn) (*DeleteDocumentResponse, error)

	// GetDocumentWithResponse request
	GetDocumentWithResponse(ctx context.Context, model string, id string, reqEditors ...RequestEditorFn) (*GetDocumentResponse, error)
}

ClientWithResponsesInterface is the interface specification for the client with responses above.

type DeleteDocument200Response added in v0.0.3

type DeleteDocument200Response struct {
}

func (DeleteDocument200Response) VisitDeleteDocumentResponse added in v0.0.3

func (response DeleteDocument200Response) VisitDeleteDocumentResponse(w http.ResponseWriter) error

type DeleteDocument400JSONResponse added in v0.0.4

type DeleteDocument400JSONResponse ErrorResponse

func (DeleteDocument400JSONResponse) VisitDeleteDocumentResponse added in v0.0.4

func (response DeleteDocument400JSONResponse) VisitDeleteDocumentResponse(w http.ResponseWriter) error

type DeleteDocument404Response added in v0.0.3

type DeleteDocument404Response struct {
}

func (DeleteDocument404Response) VisitDeleteDocumentResponse added in v0.0.3

func (response DeleteDocument404Response) VisitDeleteDocumentResponse(w http.ResponseWriter) error

type DeleteDocumentRequestObject added in v0.0.3

type DeleteDocumentRequestObject struct {
	Model string `json:"model"`
	Id    string `json:"id"`
}

type DeleteDocumentResponse added in v0.0.3

type DeleteDocumentResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON400      *ErrorResponse
}

func ParseDeleteDocumentResponse added in v0.0.3

func ParseDeleteDocumentResponse(rsp *http.Response) (*DeleteDocumentResponse, error)

ParseDeleteDocumentResponse parses an HTTP response from a DeleteDocumentWithResponse call

func (DeleteDocumentResponse) Status added in v0.0.3

func (r DeleteDocumentResponse) Status() string

Status returns HTTPResponse.Status

func (DeleteDocumentResponse) StatusCode added in v0.0.3

func (r DeleteDocumentResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type DeleteDocumentResponseObject added in v0.0.3

type DeleteDocumentResponseObject interface {
	VisitDeleteDocumentResponse(w http.ResponseWriter) error
}

type Document

type Document struct {
	History *History                `json:"history,omitempty"`
	Id      string                  `json:"id"`
	Model   string                  `json:"model"`
	Status  *map[string]interface{} `json:"status,omitempty"`
	Val     *map[string]interface{} `json:"val,omitempty"`
	Version *uint64                 `json:"version,omitempty"`
}

Document defines model for Document.

type EchoRouter

type EchoRouter interface {
	CONNECT(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route
	DELETE(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route
	GET(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route
	HEAD(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route
	OPTIONS(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route
	PATCH(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route
	POST(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route
	PUT(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route
	TRACE(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route
}

This is a simple interface which specifies echo.Route addition functions which are present on both echo.Echo and echo.Group, since we want to allow using either of them for path registration

type ErrorResponse

type ErrorResponse struct {
	Message *string `json:"message,omitempty"`
}

ErrorResponse defines model for ErrorResponse.

type Filter

type Filter struct {
	Equal   *interface{} `json:"equal,omitempty"`
	Greater *interface{} `json:"greater,omitempty"`
	Key     string       `json:"key"`
	Less    *interface{} `json:"less,omitempty"`
}

Filter defines model for Filter.

type GetDocument200JSONResponse

type GetDocument200JSONResponse Document

func (GetDocument200JSONResponse) VisitGetDocumentResponse

func (response GetDocument200JSONResponse) VisitGetDocumentResponse(w http.ResponseWriter) error

type GetDocumentRequestObject

type GetDocumentRequestObject struct {
	Model string `json:"model"`
	Id    string `json:"id"`
}

type GetDocumentResponse

type GetDocumentResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *Document
}

func ParseGetDocumentResponse

func ParseGetDocumentResponse(rsp *http.Response) (*GetDocumentResponse, error)

ParseGetDocumentResponse parses an HTTP response from a GetDocumentWithResponse call

func (GetDocumentResponse) Status

func (r GetDocumentResponse) Status() string

Status returns HTTPResponse.Status

func (GetDocumentResponse) StatusCode

func (r GetDocumentResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type GetDocumentResponseObject

type GetDocumentResponseObject interface {
	VisitGetDocumentResponse(w http.ResponseWriter) error
}

type History

type History struct {
	Created *time.Time `json:"created,omitempty"`
	Updated *time.Time `json:"updated,omitempty"`
}

History defines model for History.

type HttpRequestDoer

type HttpRequestDoer interface {
	Do(req *http.Request) (*http.Response, error)
}

Doer performs HTTP requests.

The standard http.Client implements this interface.

type PutDocument200JSONResponse

type PutDocument200JSONResponse PutDocumentOK

func (PutDocument200JSONResponse) VisitPutDocumentResponse

func (response PutDocument200JSONResponse) VisitPutDocumentResponse(w http.ResponseWriter) error

type PutDocument400JSONResponse

type PutDocument400JSONResponse ErrorResponse

func (PutDocument400JSONResponse) VisitPutDocumentResponse

func (response PutDocument400JSONResponse) VisitPutDocumentResponse(w http.ResponseWriter) error

type PutDocument409JSONResponse added in v0.0.4

type PutDocument409JSONResponse ErrorResponse

func (PutDocument409JSONResponse) VisitPutDocumentResponse added in v0.0.4

func (response PutDocument409JSONResponse) VisitPutDocumentResponse(w http.ResponseWriter) error

type PutDocumentJSONRequestBody

type PutDocumentJSONRequestBody = Document

PutDocumentJSONRequestBody defines body for PutDocument for application/json ContentType.

type PutDocumentOK

type PutDocumentOK struct {
	Path string `json:"path"`
}

PutDocumentOK defines model for PutDocumentOK.

type PutDocumentRequestObject

type PutDocumentRequestObject struct {
	Body *PutDocumentJSONRequestBody
}

type PutDocumentResponse

type PutDocumentResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *PutDocumentOK
	JSON400      *ErrorResponse
	JSON409      *ErrorResponse
}

func ParsePutDocumentResponse

func ParsePutDocumentResponse(rsp *http.Response) (*PutDocumentResponse, error)

ParsePutDocumentResponse parses an HTTP response from a PutDocumentWithResponse call

func (PutDocumentResponse) Status

func (r PutDocumentResponse) Status() string

Status returns HTTPResponse.Status

func (PutDocumentResponse) StatusCode

func (r PutDocumentResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type PutDocumentResponseObject

type PutDocumentResponseObject interface {
	VisitPutDocumentResponse(w http.ResponseWriter) error
}

type ReactorActivation

type ReactorActivation struct {
	Id      string `json:"id"`
	Model   string `json:"model"`
	Version uint64 `json:"version"`
}

ReactorActivation defines model for ReactorActivation.

type ReactorDone

type ReactorDone = map[string]interface{}

ReactorDone defines model for ReactorDone.

type ReactorIn

type ReactorIn struct {
	Done    *ReactorDone    `json:"done,omitempty"`
	Start   *ReactorStart   `json:"start,omitempty"`
	Working *ReactorWorking `json:"working,omitempty"`
}

ReactorIn defines model for ReactorIn.

type ReactorLoop200JSONResponse

type ReactorLoop200JSONResponse ReactorOut

func (ReactorLoop200JSONResponse) VisitReactorLoopResponse

func (response ReactorLoop200JSONResponse) VisitReactorLoopResponse(w http.ResponseWriter) error

type ReactorLoopJSONRequestBody

type ReactorLoopJSONRequestBody = ReactorIn

ReactorLoopJSONRequestBody defines body for ReactorLoop for application/json ContentType.

type ReactorLoopRequestObject

type ReactorLoopRequestObject struct {
	Body *ReactorLoopJSONRequestBody
}

type ReactorLoopResponse

type ReactorLoopResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *ReactorOut
}

func ParseReactorLoopResponse

func ParseReactorLoopResponse(rsp *http.Response) (*ReactorLoopResponse, error)

ParseReactorLoopResponse parses an HTTP response from a ReactorLoopWithResponse call

func (ReactorLoopResponse) Status

func (r ReactorLoopResponse) Status() string

Status returns HTTPResponse.Status

func (ReactorLoopResponse) StatusCode

func (r ReactorLoopResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type ReactorLoopResponseObject

type ReactorLoopResponseObject interface {
	VisitReactorLoopResponse(w http.ResponseWriter) error
}

type ReactorOut

type ReactorOut struct {
	Activation *ReactorActivation `json:"activation,omitempty"`
}

ReactorOut defines model for ReactorOut.

type ReactorStart

type ReactorStart struct {
	Id string `json:"id"`
}

ReactorStart defines model for ReactorStart.

type ReactorWorking

type ReactorWorking = map[string]interface{}

ReactorWorking defines model for ReactorWorking.

type RequestEditorFn

type RequestEditorFn func(ctx context.Context, req *http.Request) error

RequestEditorFn is the function signature for the RequestEditor callback function

type SearchDocuments200JSONResponse

type SearchDocuments200JSONResponse SearchResponse

func (SearchDocuments200JSONResponse) VisitSearchDocumentsResponse

func (response SearchDocuments200JSONResponse) VisitSearchDocumentsResponse(w http.ResponseWriter) error

type SearchDocuments400JSONResponse added in v0.0.4

type SearchDocuments400JSONResponse ErrorResponse

func (SearchDocuments400JSONResponse) VisitSearchDocumentsResponse added in v0.0.4

func (response SearchDocuments400JSONResponse) VisitSearchDocumentsResponse(w http.ResponseWriter) error

type SearchDocumentsJSONRequestBody

type SearchDocumentsJSONRequestBody = SearchRequest

SearchDocumentsJSONRequestBody defines body for SearchDocuments for application/json ContentType.

type SearchDocumentsRequestObject

type SearchDocumentsRequestObject struct {
	JSONBody *SearchDocumentsJSONRequestBody
	Body     io.Reader
}

type SearchDocumentsResponse

type SearchDocumentsResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *SearchResponse
	JSON400      *ErrorResponse
}

func ParseSearchDocumentsResponse

func ParseSearchDocumentsResponse(rsp *http.Response) (*SearchDocumentsResponse, error)

ParseSearchDocumentsResponse parses an HTTP response from a SearchDocumentsWithResponse call

func (SearchDocumentsResponse) Status

func (r SearchDocumentsResponse) Status() string

Status returns HTTPResponse.Status

func (SearchDocumentsResponse) StatusCode

func (r SearchDocumentsResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type SearchDocumentsResponseObject

type SearchDocumentsResponseObject interface {
	VisitSearchDocumentsResponse(w http.ResponseWriter) error
}

type SearchRequest

type SearchRequest struct {
	Cursor  *string   `json:"cursor,omitempty"`
	Filters *[]Filter `json:"filters,omitempty"`

	// Full If true, return full documents instead of just the ids
	Full  *bool            `json:"full,omitempty"`
	Limit *int             `json:"limit,omitempty"`
	Links *[]SearchRequest `json:"links,omitempty"`
	Model string           `json:"model"`
}

SearchRequest defines model for SearchRequest.

type SearchResponse

type SearchResponse struct {
	Cursor    *string    `json:"cursor,omitempty"`
	Documents []Document `json:"documents"`
}

SearchResponse defines model for SearchResponse.

type ServerInterface

type ServerInterface interface {
	// Create or update a document
	// (POST /v1)
	PutDocument(ctx echo.Context) error
	// Search for documents
	// (POST /v1/q)
	SearchDocuments(ctx echo.Context) error
	// Bidirectional streaming for reactor operations
	// (GET /v1/reactor)
	ReactorLoop(ctx echo.Context) error
	// Delete a document by model and ID
	// (DELETE /v1/{model}/{id})
	DeleteDocument(ctx echo.Context, model string, id string) error
	// Get a document by model and ID
	// (GET /v1/{model}/{id})
	GetDocument(ctx echo.Context, model string, id string) error
}

ServerInterface represents all server handlers.

func NewStrictHandler

func NewStrictHandler(ssi StrictServerInterface, middlewares []StrictMiddlewareFunc) ServerInterface

type ServerInterfaceWrapper

type ServerInterfaceWrapper struct {
	Handler ServerInterface
}

ServerInterfaceWrapper converts echo contexts to parameters.

func (*ServerInterfaceWrapper) DeleteDocument added in v0.0.3

func (w *ServerInterfaceWrapper) DeleteDocument(ctx echo.Context) error

DeleteDocument converts echo context to params.

func (*ServerInterfaceWrapper) GetDocument

func (w *ServerInterfaceWrapper) GetDocument(ctx echo.Context) error

GetDocument converts echo context to params.

func (*ServerInterfaceWrapper) PutDocument

func (w *ServerInterfaceWrapper) PutDocument(ctx echo.Context) error

PutDocument converts echo context to params.

func (*ServerInterfaceWrapper) ReactorLoop

func (w *ServerInterfaceWrapper) ReactorLoop(ctx echo.Context) error

ReactorLoop converts echo context to params.

func (*ServerInterfaceWrapper) SearchDocuments

func (w *ServerInterfaceWrapper) SearchDocuments(ctx echo.Context) error

SearchDocuments converts echo context to params.

type StrictHandlerFunc

type StrictHandlerFunc = strictecho.StrictEchoHandlerFunc

type StrictMiddlewareFunc

type StrictMiddlewareFunc = strictecho.StrictEchoMiddlewareFunc

type StrictServerInterface

type StrictServerInterface interface {
	// Create or update a document
	// (POST /v1)
	PutDocument(ctx context.Context, request PutDocumentRequestObject) (PutDocumentResponseObject, error)
	// Search for documents
	// (POST /v1/q)
	SearchDocuments(ctx context.Context, request SearchDocumentsRequestObject) (SearchDocumentsResponseObject, error)
	// Bidirectional streaming for reactor operations
	// (GET /v1/reactor)
	ReactorLoop(ctx context.Context, request ReactorLoopRequestObject) (ReactorLoopResponseObject, error)
	// Delete a document by model and ID
	// (DELETE /v1/{model}/{id})
	DeleteDocument(ctx context.Context, request DeleteDocumentRequestObject) (DeleteDocumentResponseObject, error)
	// Get a document by model and ID
	// (GET /v1/{model}/{id})
	GetDocument(ctx context.Context, request GetDocumentRequestObject) (GetDocumentResponseObject, error)
}

StrictServerInterface represents all server handlers.

type ValidationRequest

type ValidationRequest struct {
	Current *Document `json:"current,omitempty"`
	Pending *Document `json:"pending,omitempty"`
}

ValidationRequest defines model for ValidationRequest.

type ValidationResponse

type ValidationResponse struct {
	Reject *struct {
		Message *string `json:"message,omitempty"`
	} `json:"reject,omitempty"`
}

ValidationResponse defines model for ValidationResponse.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL