Documentation ¶
Overview ¶
Package api provides primitives to interact the openapi HTTP API.
Code generated by github.com/deepmap/oapi-codegen DO NOT EDIT.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterHandlers ¶
func RegisterHandlers(router EchoRouter, si ServerInterface)
RegisterHandlers adds each server route to the EchoRouter.
func RegisterHandlersWithBaseURL ¶ added in v0.16.0
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 EchoRouter ¶ added in v0.14.0
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 Event ¶
type Event struct { // V4 UUID assigned by Corda to a record ConsentId *string `json:"consentId,omitempty"` // error reason in case of a functional error Error *string `json:"error,omitempty"` // ID calculated by crypto using BSN and private key of initiatorLegalEntity ExternalId string `json:"externalId"` // Generic identifier used for representing BSN, agbcode, etc. It's always constructed as an URN followed by a double colon (:) and then the identifying value of the given URN InitiatorLegalEntity Identifier `json:"initiatorLegalEntity"` Name string `json:"name"` // NewConsentRequestState JSON as accepted by consent-bridge (:ref:`nuts-consent-bridge-api`) Payload string `json:"payload"` // 0 to X RetryCount int `json:"retryCount"` // V4 UUID assigned by Corda to a transaction TransactionId *string `json:"transactionId,omitempty"` // V4 UUID Uuid string `json:"uuid"` }
Event defines model for Event.
type EventListResponse ¶
type EventListResponse struct {
Events *[]Event `json:"events,omitempty"`
}
EventListResponse defines model for EventListResponse.
type ServerInterface ¶
type ServerInterface interface { // Return all events currently in store // (GET /events) List(ctx echo.Context) error // Find a specific event by its externalId // (GET /events/by_external_id/{external_id}) GetEventByExternalId(ctx echo.Context, externalId string) error // Find a specific event // (GET /events/{uuid}) GetEvent(ctx echo.Context, uuid string) error }
ServerInterface represents all server handlers.
type ServerInterfaceWrapper ¶
type ServerInterfaceWrapper struct {
Handler ServerInterface
}
ServerInterfaceWrapper converts echo contexts to parameters.
func (*ServerInterfaceWrapper) GetEvent ¶
func (w *ServerInterfaceWrapper) GetEvent(ctx echo.Context) error
GetEvent converts echo context to params.
func (*ServerInterfaceWrapper) GetEventByExternalId ¶
func (w *ServerInterfaceWrapper) GetEventByExternalId(ctx echo.Context) error
GetEventByExternalId converts echo context to params.
func (*ServerInterfaceWrapper) List ¶
func (w *ServerInterfaceWrapper) List(ctx echo.Context) error
List converts echo context to params.
type Wrapper ¶
type Wrapper struct {
Eo *pkg.EventOctopus
}
Wrapper connects the EventOctopus with the API.
func (Wrapper) GetEventByExternalId ¶
GetEventByExternalId returns a specific event by its externalId