codegen

package
v0.4.5-alpha6 Latest Latest
Warning

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

Go to latest
Published: Aug 7, 2023 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Package codegen provides primitives to interact with the openapi HTTP API.

Code generated by github.com/deepmap/oapi-codegen version v1.12.4 DO NOT EDIT.

Index

Constants

View Source
const (
	Access_tokenScopes = "access_token.Scopes"
)

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 BaseResponse

type BaseResponse struct {
	// Message message returned by server side if there is any
	Message *string `json:"message,omitempty"`
}

BaseResponse defines model for BaseResponse.

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 GetHealthPortsOK added in v0.4.4

type GetHealthPortsOK struct {
	Data *HealthPorts `json:"data,omitempty"`

	// Message message returned by server side if there is any
	Message *string `json:"message,omitempty"`
}

GetHealthPortsOK defines model for GetHealthPortsOK.

type GetHealthServicesOK

type GetHealthServicesOK struct {
	Data *HealthServices `json:"data,omitempty"`

	// Message message returned by server side if there is any
	Message *string `json:"message,omitempty"`
}

GetHealthServicesOK defines model for GetHealthServicesOK.

type HealthPorts added in v0.4.4

type HealthPorts struct {
	TCP *[]int `json:"tcp,omitempty"`
	UDP *[]int `json:"udp,omitempty"`
}

HealthPorts defines model for HealthPorts.

type HealthServices

type HealthServices struct {
	NotRunning *[]string `json:"not_running,omitempty"`
	Running    *[]string `json:"running,omitempty"`
}

HealthServices defines model for HealthServices.

type ResponseInternalServerError

type ResponseInternalServerError = BaseResponse

ResponseInternalServerError defines model for ResponseInternalServerError.

type ResponseOK

type ResponseOK = BaseResponse

ResponseOK defines model for ResponseOK.

type ServerInterface

type ServerInterface interface {
	// Test file methods
	// (GET /file/test)
	GetFileTest(ctx echo.Context) error
	// Get log
	// (GET /health/logs)
	GetHealthlogs(ctx echo.Context) error
	// Get port in use
	// (GET /health/ports)
	GetHealthPorts(ctx echo.Context) error
	// Get service status
	// (GET /health/services)
	GetHealthServices(ctx echo.Context) error
}

ServerInterface represents all server handlers.

type ServerInterfaceWrapper

type ServerInterfaceWrapper struct {
	Handler ServerInterface
}

ServerInterfaceWrapper converts echo contexts to parameters.

func (*ServerInterfaceWrapper) GetFileTest

func (w *ServerInterfaceWrapper) GetFileTest(ctx echo.Context) error

GetFileTest converts echo context to params.

func (*ServerInterfaceWrapper) GetHealthPorts added in v0.4.4

func (w *ServerInterfaceWrapper) GetHealthPorts(ctx echo.Context) error

GetHealthPorts converts echo context to params.

func (*ServerInterfaceWrapper) GetHealthServices

func (w *ServerInterfaceWrapper) GetHealthServices(ctx echo.Context) error

GetHealthServices converts echo context to params.

func (*ServerInterfaceWrapper) GetHealthlogs added in v0.4.4

func (w *ServerInterfaceWrapper) GetHealthlogs(ctx echo.Context) error

GetHealthlogs converts echo context to params.

Directories

Path Synopsis
Package message_bus provides primitives to interact with the openapi HTTP API.
Package message_bus provides primitives to interact with the openapi HTTP API.

Jump to

Keyboard shortcuts

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