v1

package
v0.0.0-...-81da00b Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 25, 2022 License: Apache-2.0 Imports: 9 Imported by: 0

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

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetSwagger

func GetSwagger() (swagger *openapi3.T, err error)

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

func PathToRawSpec(pathToFile string) map[string]func() ([]byte, error)

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL