Documentation ¶
Overview ¶
Package codegen provides primitives to interact with the openapi HTTP API.
Code generated by github.com/deepmap/oapi-codegen version v1.12.4 DO NOT EDIT.
Index ¶
- Constants
- func GetSwagger() (swagger *openapi3.T, err error)
- func PathToRawSpec(pathToFile string) map[string]func() ([]byte, error)
- func RegisterHandlers(router EchoRouter, si ServerInterface)
- func RegisterHandlersWithBaseURL(router EchoRouter, si ServerInterface, baseURL string)
- type BadResponse
- type BaseResponse
- type DeleteEventOK
- type EchoRouter
- type Event
- type EventUuid
- type GetEventsParams
- type OKResponse
- type Property
- type ResponseNotFound
- type Serial
- type ServerInterface
- type ServerInterfaceWrapper
Constants ¶
const (
Access_tokenScopes = "access_token.Scopes"
)
Variables ¶
This section is empty.
Functions ¶
func GetSwagger ¶
GetSwagger returns the Swagger specification corresponding to the generated code in this file. The external references of Swagger specification are resolved. The logic of resolving external references is tightly connected to "import-mapping" feature. Externally referenced files must be embedded in the corresponding golang packages. Urls can be supported but this task was out of the scope.
func PathToRawSpec ¶
Constructs a synthetic filesystem for resolving external references when loading openapi specifications.
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 BaseResponse ¶
type BaseResponse struct { // Message Error message Message *string `json:"message,omitempty"` }
BaseResponse defines model for BaseResponse.
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 Event ¶
type Event struct { // EventUuid UUID of the event EventUuid *openapi_types.UUID `json:"event_uuid,omitempty"` // Name event name Name string `json:"name"` // Properties event properties Properties []Property `json:"properties"` // SourceID associated source id SourceID string `json:"sourceID"` // Timestamp timestamp this event took place Timestamp *time.Time `json:"timestamp,omitempty"` }
Event defines model for Event.
type GetEventsParams ¶
type GetEventsParams struct { // Form Form of the events to get Form *time.Time `form:"form,omitempty" json:"form,omitempty"` }
GetEventsParams defines parameters for GetEvents.
type Property ¶
type Property struct { // Name Name of the property Name *string `json:"name,omitempty"` // Value Value of the property Value *string `json:"value,omitempty"` }
Property defines model for Property.
type ResponseNotFound ¶
type ResponseNotFound = BaseResponse
ResponseNotFound defines model for ResponseNotFound.
type ServerInterface ¶
type ServerInterface interface { // Delete an event // (DELETE /event/local_storage/{serial}) DeleteEventBySerial(ctx echo.Context, serial Serial) error // Delete an event // (DELETE /event/{event_uuid}) DeleteEvent(ctx echo.Context, eventUuid EventUuid) error // Get all events // (GET /events) GetEvents(ctx echo.Context, params GetEventsParams) error }
ServerInterface represents all server handlers.
type ServerInterfaceWrapper ¶
type ServerInterfaceWrapper struct {
Handler ServerInterface
}
ServerInterfaceWrapper converts echo contexts to parameters.
func (*ServerInterfaceWrapper) DeleteEvent ¶
func (w *ServerInterfaceWrapper) DeleteEvent(ctx echo.Context) error
DeleteEvent converts echo context to params.
func (*ServerInterfaceWrapper) DeleteEventBySerial ¶
func (w *ServerInterfaceWrapper) DeleteEventBySerial(ctx echo.Context) error
DeleteEventBySerial converts echo context to params.
func (*ServerInterfaceWrapper) GetEvents ¶
func (w *ServerInterfaceWrapper) GetEvents(ctx echo.Context) error
GetEvents converts echo context to params.