Documentation ¶
Overview ¶
Package v1 provides primitives to interact with the openapi HTTP API.
Code generated by github.com/deepmap/oapi-codegen version v1.11.0 DO NOT EDIT.
Index ¶
- 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 Cluster
- type EchoRouter
- type PostClustersAddJSONBody
- type PostClustersAddJSONRequestBody
- type PostSgwAddJSONBody
- type PostSgwAddJSONRequestBody
- type ServerInterface
- type ServerInterfaceWrapper
- type Sgw
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 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 Cluster ¶
type Cluster struct { CouchbaseConfig struct { ManagementPort *float32 `json:"managementPort,omitempty"` Password string `json:"password"` UseTLS *bool `json:"useTLS,omitempty"` Username string `json:"username"` } `json:"couchbaseConfig"` Hostname string `json:"hostname"` MetricsConfig *struct { MetricsPort *float32 `json:"metricsPort,omitempty"` } `json:"metricsConfig,omitempty"` Name *string `json:"name,omitempty"` }
Cluster defines model for Cluster.
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 PostClustersAddJSONBody ¶
type PostClustersAddJSONBody = Cluster
PostClustersAddJSONBody defines parameters for PostClustersAdd.
type PostClustersAddJSONRequestBody ¶
type PostClustersAddJSONRequestBody = PostClustersAddJSONBody
PostClustersAddJSONRequestBody defines body for PostClustersAdd for application/json ContentType.
type PostSgwAddJSONBody ¶
type PostSgwAddJSONBody = Sgw
PostSgwAddJSONBody defines parameters for PostSgwAdd.
type PostSgwAddJSONRequestBody ¶
type PostSgwAddJSONRequestBody = PostSgwAddJSONBody
PostSgwAddJSONRequestBody defines body for PostSgwAdd for application/json ContentType.
type ServerInterface ¶
type ServerInterface interface { // Add a new Couchbase cluster to Prometheus // (POST /clusters/add) PostClustersAdd(ctx echo.Context) error // Collects diagnostic information about CMOS for Support analysis. // (POST /collectInformation) PostCollectInformation(ctx echo.Context) error // Outputs the OpenAPI specification for this API. // (GET /openapi.json) GetOpenapiJson(ctx echo.Context) error // Add a new Sync Gateway cluster to Prometheus // (POST /sgw/add) PostSgwAdd(ctx echo.Context) error }
ServerInterface represents all server handlers.
type ServerInterfaceWrapper ¶
type ServerInterfaceWrapper struct {
Handler ServerInterface
}
ServerInterfaceWrapper converts echo contexts to parameters.
func (*ServerInterfaceWrapper) GetOpenapiJson ¶
func (w *ServerInterfaceWrapper) GetOpenapiJson(ctx echo.Context) error
GetOpenapiJson converts echo context to params.
func (*ServerInterfaceWrapper) PostClustersAdd ¶
func (w *ServerInterfaceWrapper) PostClustersAdd(ctx echo.Context) error
PostClustersAdd converts echo context to params.
func (*ServerInterfaceWrapper) PostCollectInformation ¶
func (w *ServerInterfaceWrapper) PostCollectInformation(ctx echo.Context) error
PostCollectInformation converts echo context to params.
func (*ServerInterfaceWrapper) PostSgwAdd ¶
func (w *ServerInterfaceWrapper) PostSgwAdd(ctx echo.Context) error
PostSgwAdd converts echo context to params.
type Sgw ¶
type Sgw struct { Hostname string `json:"hostname"` MetricsConfig *struct { MetricsPort *float32 `json:"metricsPort,omitempty"` } `json:"metricsConfig,omitempty"` Name *string `json:"name,omitempty"` SgwConfig struct { Password string `json:"password"` Username string `json:"username"` } `json:"sgwConfig"` }
Sgw defines model for Sgw.