Documentation
¶
Overview ¶
Package gen provides primitives to interact with the openapi HTTP API.
Code generated by github.com/oapi-codegen/oapi-codegen/v2 version v2.5.1 DO NOT EDIT.
Package gen contains generated code for the facts API.
Index ¶
- Constants
- func RegisterHandlers(router EchoRouter, si ServerInterface)
- func RegisterHandlersWithBaseURL(router EchoRouter, si ServerInterface, baseURL string)
- type EchoRouter
- type FactKeyEntry
- type FactKeysResponse
- type GetFactKeys200JSONResponse
- type GetFactKeys401JSONResponse
- type GetFactKeys403JSONResponse
- type GetFactKeys500JSONResponse
- type GetFactKeysRequestObject
- type GetFactKeysResponseObject
- type ServerInterface
- type ServerInterfaceWrapper
- type StrictHandlerFunc
- type StrictMiddlewareFunc
- type StrictServerInterface
Constants ¶
const (
BearerAuthScopes = "BearerAuth.Scopes"
)
Variables ¶
This section is empty.
Functions ¶
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 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 FactKeyEntry ¶
type FactKeyEntry struct {
// Builtin Whether this is a built-in fact key.
Builtin *bool `json:"builtin,omitempty"`
// Description Human-readable description of the fact.
Description *string `json:"description,omitempty"`
// Key The fact key (e.g. "interface.primary").
Key string `json:"key"`
}
FactKeyEntry defines model for FactKeyEntry.
type FactKeysResponse ¶
type FactKeysResponse struct {
// Keys Available fact keys for @fact. references.
Keys []FactKeyEntry `json:"keys"`
}
FactKeysResponse defines model for FactKeysResponse.
type GetFactKeys200JSONResponse ¶
type GetFactKeys200JSONResponse FactKeysResponse
func (GetFactKeys200JSONResponse) VisitGetFactKeysResponse ¶
func (response GetFactKeys200JSONResponse) VisitGetFactKeysResponse(w http.ResponseWriter) error
type GetFactKeys401JSONResponse ¶
type GetFactKeys401JSONResponse externalRef0.ErrorResponse
func (GetFactKeys401JSONResponse) VisitGetFactKeysResponse ¶
func (response GetFactKeys401JSONResponse) VisitGetFactKeysResponse(w http.ResponseWriter) error
type GetFactKeys403JSONResponse ¶
type GetFactKeys403JSONResponse externalRef0.ErrorResponse
func (GetFactKeys403JSONResponse) VisitGetFactKeysResponse ¶
func (response GetFactKeys403JSONResponse) VisitGetFactKeysResponse(w http.ResponseWriter) error
type GetFactKeys500JSONResponse ¶
type GetFactKeys500JSONResponse externalRef0.ErrorResponse
func (GetFactKeys500JSONResponse) VisitGetFactKeysResponse ¶
func (response GetFactKeys500JSONResponse) VisitGetFactKeysResponse(w http.ResponseWriter) error
type GetFactKeysRequestObject ¶
type GetFactKeysRequestObject struct {
}
type GetFactKeysResponseObject ¶
type GetFactKeysResponseObject interface {
VisitGetFactKeysResponse(w http.ResponseWriter) error
}
type ServerInterface ¶
type ServerInterface interface {
// List available fact keys
// (GET /api/facts/keys)
GetFactKeys(ctx echo.Context) 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) GetFactKeys ¶
func (w *ServerInterfaceWrapper) GetFactKeys(ctx echo.Context) error
GetFactKeys converts echo context to params.
type StrictHandlerFunc ¶
type StrictHandlerFunc = strictecho.StrictEchoHandlerFunc
type StrictMiddlewareFunc ¶
type StrictMiddlewareFunc = strictecho.StrictEchoMiddlewareFunc
type StrictServerInterface ¶
type StrictServerInterface interface {
// List available fact keys
// (GET /api/facts/keys)
GetFactKeys(ctx context.Context, request GetFactKeysRequestObject) (GetFactKeysResponseObject, error)
}
StrictServerInterface represents all server handlers.