Documentation
¶
Overview ¶
Package v1 provides primitives to interact with the openapi HTTP API.
Code generated by github.com/deepmap/oapi-codegen version v1.14.0 DO NOT EDIT.
Index ¶
- func RegisterHandlers(router EchoRouter, si ServerInterface)
- func RegisterHandlersWithBaseURL(router EchoRouter, si ServerInterface, baseURL string)
- type DeleteSecret204Response
- type DeleteSecret404JSONResponse
- type DeleteSecret500JSONResponse
- type DeleteSecretRequestObject
- type DeleteSecretResponseObject
- type EchoRouter
- type ErrorResponse
- type HealthCheck200JSONResponse
- type HealthCheck503JSONResponse
- type HealthCheckRequestObject
- type HealthCheckResponseObject
- type Key
- type KeyList
- type ListKeys200JSONResponse
- type ListKeys500JSONResponse
- type ListKeysRequestObject
- type ListKeysResponseObject
- type LookupSecret200JSONResponse
- type LookupSecret404JSONResponse
- type LookupSecret500JSONResponse
- type LookupSecretRequestObject
- type LookupSecretResponseObject
- type Secret
- type SecretResponse
- type ServerInterface
- type ServerInterfaceWrapper
- func (w *ServerInterfaceWrapper) DeleteSecret(ctx echo.Context) error
- func (w *ServerInterfaceWrapper) HealthCheck(ctx echo.Context) error
- func (w *ServerInterfaceWrapper) ListKeys(ctx echo.Context) error
- func (w *ServerInterfaceWrapper) LookupSecret(ctx echo.Context) error
- func (w *ServerInterfaceWrapper) StoreSecret(ctx echo.Context) error
- type ServiceStatus
- type ServiceStatusStatus
- type StoreSecret200JSONResponse
- type StoreSecret400JSONResponse
- type StoreSecret409JSONResponse
- type StoreSecret500JSONResponse
- type StoreSecretJSONRequestBody
- type StoreSecretRequest
- type StoreSecretRequestObject
- type StoreSecretResponseObject
- type StrictHandlerFunc
- type StrictMiddlewareFunc
- type StrictServerInterface
- type Wrapper
- func (w Wrapper) DeleteSecret(ctx context.Context, request DeleteSecretRequestObject) (DeleteSecretResponseObject, error)
- func (w Wrapper) HealthCheck(ctx context.Context, _ HealthCheckRequestObject) (HealthCheckResponseObject, error)
- func (w Wrapper) ListKeys(ctx context.Context, request ListKeysRequestObject) (ListKeysResponseObject, error)
- func (w Wrapper) LookupSecret(ctx context.Context, request LookupSecretRequestObject) (LookupSecretResponseObject, error)
- func (w Wrapper) StoreSecret(ctx context.Context, request StoreSecretRequestObject) (StoreSecretResponseObject, error)
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 ¶
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 DeleteSecret204Response ¶
type DeleteSecret204Response struct {
}
func (DeleteSecret204Response) VisitDeleteSecretResponse ¶
func (response DeleteSecret204Response) VisitDeleteSecretResponse(w http.ResponseWriter) error
type DeleteSecret404JSONResponse ¶
type DeleteSecret404JSONResponse ErrorResponse
func (DeleteSecret404JSONResponse) VisitDeleteSecretResponse ¶
func (response DeleteSecret404JSONResponse) VisitDeleteSecretResponse(w http.ResponseWriter) error
type DeleteSecret500JSONResponse ¶
type DeleteSecret500JSONResponse ErrorResponse
func (DeleteSecret500JSONResponse) VisitDeleteSecretResponse ¶
func (response DeleteSecret500JSONResponse) VisitDeleteSecretResponse(w http.ResponseWriter) error
type DeleteSecretRequestObject ¶
type DeleteSecretRequestObject struct {
Key Key `json:"key"`
}
type DeleteSecretResponseObject ¶
type DeleteSecretResponseObject interface {
VisitDeleteSecretResponse(w http.ResponseWriter) error
}
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 {
// Backend The name of the storage backend. This can provide context to the error.
Backend string `json:"backend"`
// Detail A human-readable explanation specific to this occurrence of the problem.
Detail string `json:"detail"`
// Status HTTP status-code
Status int `json:"status"`
// Title A short, human-readable summary of the problem type.
Title string `json:"title"`
}
ErrorResponse The ErrorResponse contains the Problem Details for HTTP APIs as specified in [RFC7807](https://tools.ietf.org/html/rfc7807).
It provides more details about problems occurred in the storage server.
Return values contain the following members: - **title** (string) - A short, human-readable summary of the problem type. - **status** (number) - The HTTP status code generated by the origin server for this occurrence of the problem. - **backend** (string) The name of the storage backend. This can provide context to the error. - **detail** (string) - A human-readable explanation specific to this occurrence of the problem.
type HealthCheck200JSONResponse ¶
type HealthCheck200JSONResponse ServiceStatus
func (HealthCheck200JSONResponse) VisitHealthCheckResponse ¶
func (response HealthCheck200JSONResponse) VisitHealthCheckResponse(w http.ResponseWriter) error
type HealthCheck503JSONResponse ¶
type HealthCheck503JSONResponse ServiceStatus
func (HealthCheck503JSONResponse) VisitHealthCheckResponse ¶
func (response HealthCheck503JSONResponse) VisitHealthCheckResponse(w http.ResponseWriter) error
type HealthCheckRequestObject ¶
type HealthCheckRequestObject struct {
}
type HealthCheckResponseObject ¶
type HealthCheckResponseObject interface {
VisitHealthCheckResponse(w http.ResponseWriter) error
}
type Key ¶
type Key = string
Key The key under which secrets can be stored or retrieved.
The key should be considered opaque and no assumptions should be made about its value or format. Note: When the key is used in the URL path, symbols such as slashes and hash symbols must be escaped.
type KeyList ¶
type KeyList = []Key
KeyList List of keys currently stored in the store. Note: Keys will be in unescaped form. No assumptions should be made about the order of the keys.
type ListKeys200JSONResponse ¶
type ListKeys200JSONResponse KeyList
func (ListKeys200JSONResponse) VisitListKeysResponse ¶
func (response ListKeys200JSONResponse) VisitListKeysResponse(w http.ResponseWriter) error
type ListKeys500JSONResponse ¶
type ListKeys500JSONResponse ErrorResponse
func (ListKeys500JSONResponse) VisitListKeysResponse ¶
func (response ListKeys500JSONResponse) VisitListKeysResponse(w http.ResponseWriter) error
type ListKeysRequestObject ¶
type ListKeysRequestObject struct {
}
type ListKeysResponseObject ¶
type ListKeysResponseObject interface {
VisitListKeysResponse(w http.ResponseWriter) error
}
type LookupSecret200JSONResponse ¶
type LookupSecret200JSONResponse SecretResponse
func (LookupSecret200JSONResponse) VisitLookupSecretResponse ¶
func (response LookupSecret200JSONResponse) VisitLookupSecretResponse(w http.ResponseWriter) error
type LookupSecret404JSONResponse ¶
type LookupSecret404JSONResponse ErrorResponse
func (LookupSecret404JSONResponse) VisitLookupSecretResponse ¶
func (response LookupSecret404JSONResponse) VisitLookupSecretResponse(w http.ResponseWriter) error
type LookupSecret500JSONResponse ¶
type LookupSecret500JSONResponse ErrorResponse
func (LookupSecret500JSONResponse) VisitLookupSecretResponse ¶
func (response LookupSecret500JSONResponse) VisitLookupSecretResponse(w http.ResponseWriter) error
type LookupSecretRequestObject ¶
type LookupSecretRequestObject struct {
Key Key `json:"key"`
}
type LookupSecretResponseObject ¶
type LookupSecretResponseObject interface {
VisitLookupSecretResponse(w http.ResponseWriter) error
}
type SecretResponse ¶
type SecretResponse struct {
// Secret The secret value stored under the provided key.
Secret Secret `json:"secret"`
}
SecretResponse Response object containing the secret value.
type ServerInterface ¶
type ServerInterface interface {
// Health check
// (GET /health)
HealthCheck(ctx echo.Context) error
// List all keys in the store
// (GET /secrets)
ListKeys(ctx echo.Context) error
// Delete the secret for the provided key.
// (DELETE /secrets/{key})
DeleteSecret(ctx echo.Context, key Key) error
// Lookup the secret for the provided key
// (GET /secrets/{key})
LookupSecret(ctx echo.Context, key Key) error
// Store a new secret under the provided key
// (POST /secrets/{key})
StoreSecret(ctx echo.Context, key Key) 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) DeleteSecret ¶
func (w *ServerInterfaceWrapper) DeleteSecret(ctx echo.Context) error
DeleteSecret converts echo context to params.
func (*ServerInterfaceWrapper) HealthCheck ¶
func (w *ServerInterfaceWrapper) HealthCheck(ctx echo.Context) error
HealthCheck converts echo context to params.
func (*ServerInterfaceWrapper) ListKeys ¶
func (w *ServerInterfaceWrapper) ListKeys(ctx echo.Context) error
ListKeys converts echo context to params.
func (*ServerInterfaceWrapper) LookupSecret ¶
func (w *ServerInterfaceWrapper) LookupSecret(ctx echo.Context) error
LookupSecret converts echo context to params.
func (*ServerInterfaceWrapper) StoreSecret ¶
func (w *ServerInterfaceWrapper) StoreSecret(ctx echo.Context) error
StoreSecret converts echo context to params.
type ServiceStatus ¶
type ServiceStatus struct {
// Details Additional details about the service status.
Details *string `json:"details,omitempty"`
// Status Indicates whether the service status is acceptable. Possible values are:
// * **pass**: healthy.
// * **fail**: unhealthy.
// * **warn**: healthy, with some concerns.
Status ServiceStatusStatus `json:"status"`
}
ServiceStatus Response for the health check endpoint.
type ServiceStatusStatus ¶
type ServiceStatusStatus string
ServiceStatusStatus Indicates whether the service status is acceptable. Possible values are: * **pass**: healthy. * **fail**: unhealthy. * **warn**: healthy, with some concerns.
const ( Fail ServiceStatusStatus = "fail" Pass ServiceStatusStatus = "pass" Warn ServiceStatusStatus = "warn" )
Defines values for ServiceStatusStatus.
type StoreSecret200JSONResponse ¶
type StoreSecret200JSONResponse SecretResponse
func (StoreSecret200JSONResponse) VisitStoreSecretResponse ¶
func (response StoreSecret200JSONResponse) VisitStoreSecretResponse(w http.ResponseWriter) error
type StoreSecret400JSONResponse ¶
type StoreSecret400JSONResponse ErrorResponse
func (StoreSecret400JSONResponse) VisitStoreSecretResponse ¶
func (response StoreSecret400JSONResponse) VisitStoreSecretResponse(w http.ResponseWriter) error
type StoreSecret409JSONResponse ¶
type StoreSecret409JSONResponse ErrorResponse
func (StoreSecret409JSONResponse) VisitStoreSecretResponse ¶
func (response StoreSecret409JSONResponse) VisitStoreSecretResponse(w http.ResponseWriter) error
type StoreSecret500JSONResponse ¶
type StoreSecret500JSONResponse ErrorResponse
func (StoreSecret500JSONResponse) VisitStoreSecretResponse ¶
func (response StoreSecret500JSONResponse) VisitStoreSecretResponse(w http.ResponseWriter) error
type StoreSecretJSONRequestBody ¶
type StoreSecretJSONRequestBody = StoreSecretRequest
StoreSecretJSONRequestBody defines body for StoreSecret for application/json ContentType.
type StoreSecretRequest ¶
type StoreSecretRequest struct {
// Secret The secret value stored under the provided key.
Secret Secret `json:"secret"`
}
StoreSecretRequest Request body to store a secret value. The secret value must not be empty.
type StoreSecretRequestObject ¶
type StoreSecretRequestObject struct {
Key Key `json:"key"`
Body *StoreSecretJSONRequestBody
}
type StoreSecretResponseObject ¶
type StoreSecretResponseObject interface {
VisitStoreSecretResponse(w http.ResponseWriter) error
}
type StrictHandlerFunc ¶
type StrictHandlerFunc = strictecho.StrictEchoHandlerFunc
type StrictMiddlewareFunc ¶
type StrictMiddlewareFunc = strictecho.StrictEchoMiddlewareFunc
type StrictServerInterface ¶
type StrictServerInterface interface {
// Health check
// (GET /health)
HealthCheck(ctx context.Context, request HealthCheckRequestObject) (HealthCheckResponseObject, error)
// List all keys in the store
// (GET /secrets)
ListKeys(ctx context.Context, request ListKeysRequestObject) (ListKeysResponseObject, error)
// Delete the secret for the provided key.
// (DELETE /secrets/{key})
DeleteSecret(ctx context.Context, request DeleteSecretRequestObject) (DeleteSecretResponseObject, error)
// Lookup the secret for the provided key
// (GET /secrets/{key})
LookupSecret(ctx context.Context, request LookupSecretRequestObject) (LookupSecretResponseObject, error)
// Store a new secret under the provided key
// (POST /secrets/{key})
StoreSecret(ctx context.Context, request StoreSecretRequestObject) (StoreSecretResponseObject, error)
}
StrictServerInterface represents all server handlers.
type Wrapper ¶
type Wrapper struct {
// contains filtered or unexported fields
}
func NewWrapper ¶
func (Wrapper) DeleteSecret ¶
func (w Wrapper) DeleteSecret(ctx context.Context, request DeleteSecretRequestObject) (DeleteSecretResponseObject, error)
func (Wrapper) HealthCheck ¶
func (w Wrapper) HealthCheck(ctx context.Context, _ HealthCheckRequestObject) (HealthCheckResponseObject, error)
func (Wrapper) ListKeys ¶
func (w Wrapper) ListKeys(ctx context.Context, request ListKeysRequestObject) (ListKeysResponseObject, error)
func (Wrapper) LookupSecret ¶
func (w Wrapper) LookupSecret(ctx context.Context, request LookupSecretRequestObject) (LookupSecretResponseObject, error)
func (Wrapper) StoreSecret ¶
func (w Wrapper) StoreSecret(ctx context.Context, request StoreSecretRequestObject) (StoreSecretResponseObject, error)