Documentation ¶
Overview ¶
Package api provides primitives to interact with the openapi HTTP API.
Code generated by github.com/deepmap/oapi-codegen/v2 version v2.0.0 DO NOT EDIT.
Index ¶
- func GetSwagger() (swagger *openapi3.T, err error)
- func Handler(si ServerInterface) http.Handler
- func HandlerFromMux(si ServerInterface, r *mux.Router) http.Handler
- func HandlerFromMuxWithBaseURL(si ServerInterface, r *mux.Router, baseURL string) http.Handler
- func HandlerWithOptions(si ServerInterface, options GorillaServerOptions) http.Handler
- func PathToRawSpec(pathToFile string) map[string]func() ([]byte, error)
- type GetV1ConfigNamespaceName200JSONResponse
- type GetV1ConfigNamespaceName400JSONResponse
- type GetV1ConfigNamespaceName500JSONResponse
- type GetV1ConfigNamespaceNameParams
- type GetV1ConfigNamespaceNameRequestObject
- type GetV1ConfigNamespaceNameResponseObject
- type GorillaServerOptions
- type InvalidParamFormatError
- type ListV1Configs200JSONResponse
- type ListV1Configs500JSONResponse
- type ListV1ConfigsNamespace200JSONResponse
- type ListV1ConfigsNamespace400JSONResponse
- type ListV1ConfigsNamespace500JSONResponse
- type ListV1ConfigsNamespaceParams
- type ListV1ConfigsNamespaceRequestObject
- type ListV1ConfigsNamespaceResponseObject
- type ListV1ConfigsParams
- type ListV1ConfigsRequestObject
- type ListV1ConfigsResponseObject
- type MiddlewareFunc
- type RequiredHeaderError
- type RequiredParamError
- type ServerInterface
- type ServerInterfaceWrapper
- type StrictHTTPServerOptions
- type StrictHandlerFunc
- type StrictMiddlewareFunc
- type StrictServerInterface
- type TooManyValuesForParamError
- type UnescapedCookieParamError
- type UnmarshalingParamError
- type V1Config
- type V1ConfigList
- type V1Error
Constants ¶
This section is empty.
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 Handler ¶
func Handler(si ServerInterface) http.Handler
Handler creates http.Handler with routing matching OpenAPI spec.
func HandlerFromMux ¶
func HandlerFromMux(si ServerInterface, r *mux.Router) http.Handler
HandlerFromMux creates http.Handler with routing matching OpenAPI spec based on the provided mux.
func HandlerWithOptions ¶
func HandlerWithOptions(si ServerInterface, options GorillaServerOptions) http.Handler
HandlerWithOptions creates http.Handler with additional options
Types ¶
type GetV1ConfigNamespaceName200JSONResponse ¶ added in v0.17.1
type GetV1ConfigNamespaceName200JSONResponse V1Config
func (GetV1ConfigNamespaceName200JSONResponse) VisitGetV1ConfigNamespaceNameResponse ¶ added in v0.17.1
func (response GetV1ConfigNamespaceName200JSONResponse) VisitGetV1ConfigNamespaceNameResponse(w http.ResponseWriter) error
type GetV1ConfigNamespaceName400JSONResponse ¶ added in v0.17.1
type GetV1ConfigNamespaceName400JSONResponse V1Error
func (GetV1ConfigNamespaceName400JSONResponse) VisitGetV1ConfigNamespaceNameResponse ¶ added in v0.17.1
func (response GetV1ConfigNamespaceName400JSONResponse) VisitGetV1ConfigNamespaceNameResponse(w http.ResponseWriter) error
type GetV1ConfigNamespaceName500JSONResponse ¶ added in v0.17.1
type GetV1ConfigNamespaceName500JSONResponse V1Error
func (GetV1ConfigNamespaceName500JSONResponse) VisitGetV1ConfigNamespaceNameResponse ¶ added in v0.17.1
func (response GetV1ConfigNamespaceName500JSONResponse) VisitGetV1ConfigNamespaceNameResponse(w http.ResponseWriter) error
type GetV1ConfigNamespaceNameParams ¶
type GetV1ConfigNamespaceNameParams struct { // Watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Watch *bool `form:"watch,omitempty" json:"watch,omitempty"` // Node Name of the node the client runs on. Node *string `form:"node,omitempty" json:"node,omitempty"` }
GetV1ConfigNamespaceNameParams defines parameters for GetV1ConfigNamespaceName.
type GetV1ConfigNamespaceNameRequestObject ¶ added in v0.17.1
type GetV1ConfigNamespaceNameRequestObject struct { Namespace string `json:"namespace"` Name string `json:"name"` Params GetV1ConfigNamespaceNameParams }
type GetV1ConfigNamespaceNameResponseObject ¶ added in v0.17.1
type GetV1ConfigNamespaceNameResponseObject interface {
VisitGetV1ConfigNamespaceNameResponse(w http.ResponseWriter) error
}
type GorillaServerOptions ¶
type GorillaServerOptions struct { BaseURL string BaseRouter *mux.Router Middlewares []MiddlewareFunc ErrorHandlerFunc func(w http.ResponseWriter, r *http.Request, err error) }
type InvalidParamFormatError ¶
func (*InvalidParamFormatError) Error ¶
func (e *InvalidParamFormatError) Error() string
func (*InvalidParamFormatError) Unwrap ¶
func (e *InvalidParamFormatError) Unwrap() error
type ListV1Configs200JSONResponse ¶ added in v0.17.1
type ListV1Configs200JSONResponse V1ConfigList
func (ListV1Configs200JSONResponse) VisitListV1ConfigsResponse ¶ added in v0.17.1
func (response ListV1Configs200JSONResponse) VisitListV1ConfigsResponse(w http.ResponseWriter) error
type ListV1Configs500JSONResponse ¶ added in v0.17.1
type ListV1Configs500JSONResponse V1Error
func (ListV1Configs500JSONResponse) VisitListV1ConfigsResponse ¶ added in v0.17.1
func (response ListV1Configs500JSONResponse) VisitListV1ConfigsResponse(w http.ResponseWriter) error
type ListV1ConfigsNamespace200JSONResponse ¶ added in v0.17.1
type ListV1ConfigsNamespace200JSONResponse V1ConfigList
func (ListV1ConfigsNamespace200JSONResponse) VisitListV1ConfigsNamespaceResponse ¶ added in v0.17.1
func (response ListV1ConfigsNamespace200JSONResponse) VisitListV1ConfigsNamespaceResponse(w http.ResponseWriter) error
type ListV1ConfigsNamespace400JSONResponse ¶ added in v0.17.1
type ListV1ConfigsNamespace400JSONResponse V1Error
func (ListV1ConfigsNamespace400JSONResponse) VisitListV1ConfigsNamespaceResponse ¶ added in v0.17.1
func (response ListV1ConfigsNamespace400JSONResponse) VisitListV1ConfigsNamespaceResponse(w http.ResponseWriter) error
type ListV1ConfigsNamespace500JSONResponse ¶ added in v0.17.1
type ListV1ConfigsNamespace500JSONResponse V1Error
func (ListV1ConfigsNamespace500JSONResponse) VisitListV1ConfigsNamespaceResponse ¶ added in v0.17.1
func (response ListV1ConfigsNamespace500JSONResponse) VisitListV1ConfigsNamespaceResponse(w http.ResponseWriter) error
type ListV1ConfigsNamespaceParams ¶
type ListV1ConfigsNamespaceParams struct { // Watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Watch *bool `form:"watch,omitempty" json:"watch,omitempty"` }
ListV1ConfigsNamespaceParams defines parameters for ListV1ConfigsNamespace.
type ListV1ConfigsNamespaceRequestObject ¶ added in v0.17.1
type ListV1ConfigsNamespaceRequestObject struct { Namespace string `json:"namespace"` Params ListV1ConfigsNamespaceParams }
type ListV1ConfigsNamespaceResponseObject ¶ added in v0.17.1
type ListV1ConfigsNamespaceResponseObject interface {
VisitListV1ConfigsNamespaceResponse(w http.ResponseWriter) error
}
type ListV1ConfigsParams ¶
type ListV1ConfigsParams struct { // Watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Watch *bool `form:"watch,omitempty" json:"watch,omitempty"` }
ListV1ConfigsParams defines parameters for ListV1Configs.
type ListV1ConfigsRequestObject ¶ added in v0.17.1
type ListV1ConfigsRequestObject struct {
Params ListV1ConfigsParams
}
type ListV1ConfigsResponseObject ¶ added in v0.17.1
type ListV1ConfigsResponseObject interface {
VisitListV1ConfigsResponse(w http.ResponseWriter) error
}
type RequiredHeaderError ¶
func (*RequiredHeaderError) Error ¶
func (e *RequiredHeaderError) Error() string
func (*RequiredHeaderError) Unwrap ¶
func (e *RequiredHeaderError) Unwrap() error
type RequiredParamError ¶
type RequiredParamError struct {
ParamName string
}
func (*RequiredParamError) Error ¶
func (e *RequiredParamError) Error() string
type ServerInterface ¶
type ServerInterface interface { // (GET /api/v1/configs) ListV1Configs(w http.ResponseWriter, r *http.Request, params ListV1ConfigsParams) // (GET /api/v1/configs/{namespace}) ListV1ConfigsNamespace(w http.ResponseWriter, r *http.Request, namespace string, params ListV1ConfigsNamespaceParams) // (GET /api/v1/configs/{namespace}/{name}) GetV1ConfigNamespaceName(w http.ResponseWriter, r *http.Request, namespace string, name string, params GetV1ConfigNamespaceNameParams) }
ServerInterface represents all server handlers.
func NewStrictHandler ¶ added in v0.17.1
func NewStrictHandler(ssi StrictServerInterface, middlewares []StrictMiddlewareFunc) ServerInterface
func NewStrictHandlerWithOptions ¶ added in v0.17.1
func NewStrictHandlerWithOptions(ssi StrictServerInterface, middlewares []StrictMiddlewareFunc, options StrictHTTPServerOptions) ServerInterface
type ServerInterfaceWrapper ¶
type ServerInterfaceWrapper struct { Handler ServerInterface HandlerMiddlewares []MiddlewareFunc ErrorHandlerFunc func(w http.ResponseWriter, r *http.Request, err error) }
ServerInterfaceWrapper converts contexts to parameters.
func (*ServerInterfaceWrapper) GetV1ConfigNamespaceName ¶
func (siw *ServerInterfaceWrapper) GetV1ConfigNamespaceName(w http.ResponseWriter, r *http.Request)
GetV1ConfigNamespaceName operation middleware
func (*ServerInterfaceWrapper) ListV1Configs ¶
func (siw *ServerInterfaceWrapper) ListV1Configs(w http.ResponseWriter, r *http.Request)
ListV1Configs operation middleware
func (*ServerInterfaceWrapper) ListV1ConfigsNamespace ¶
func (siw *ServerInterfaceWrapper) ListV1ConfigsNamespace(w http.ResponseWriter, r *http.Request)
ListV1ConfigsNamespace operation middleware
type StrictHTTPServerOptions ¶ added in v0.17.1
type StrictHTTPServerOptions struct { RequestErrorHandlerFunc func(w http.ResponseWriter, r *http.Request, err error) ResponseErrorHandlerFunc func(w http.ResponseWriter, r *http.Request, err error) }
type StrictHandlerFunc ¶ added in v0.17.1
type StrictHandlerFunc = strictnethttp.StrictHttpHandlerFunc
type StrictMiddlewareFunc ¶ added in v0.17.1
type StrictMiddlewareFunc = strictnethttp.StrictHttpMiddlewareFunc
type StrictServerInterface ¶ added in v0.17.1
type StrictServerInterface interface { // (GET /api/v1/configs) ListV1Configs(ctx context.Context, request ListV1ConfigsRequestObject) (ListV1ConfigsResponseObject, error) // (GET /api/v1/configs/{namespace}) ListV1ConfigsNamespace(ctx context.Context, request ListV1ConfigsNamespaceRequestObject) (ListV1ConfigsNamespaceResponseObject, error) // (GET /api/v1/configs/{namespace}/{name}) GetV1ConfigNamespaceName(ctx context.Context, request GetV1ConfigNamespaceNameRequestObject) (GetV1ConfigNamespaceNameResponseObject, error) }
StrictServerInterface represents all server handlers.
type TooManyValuesForParamError ¶
func (*TooManyValuesForParamError) Error ¶
func (e *TooManyValuesForParamError) Error() string
type UnescapedCookieParamError ¶
func (*UnescapedCookieParamError) Error ¶
func (e *UnescapedCookieParamError) Error() string
func (*UnescapedCookieParamError) Unwrap ¶
func (e *UnescapedCookieParamError) Unwrap() error
type UnmarshalingParamError ¶
func (*UnmarshalingParamError) Error ¶
func (e *UnmarshalingParamError) Error() string
func (*UnmarshalingParamError) Unwrap ¶
func (e *UnmarshalingParamError) Unwrap() error
type V1Config ¶
type V1Config = stunnerv1.StunnerConfig
V1Config Config provides a STUNner config. Schema is defined in https://github.com/l7mp/stunner/tree/main/pkg/apis/v1
type V1ConfigList ¶ added in v0.17.1
type V1ConfigList struct { // Items Items is the list of Config objects in the list. Items []V1Config `json:"items"` // Version version defines the versioned schema of this object. Version string `json:"version"` }
V1ConfigList ConfigList is a list of Configs.