codegen

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 2, 2024 License: Apache-2.0 Imports: 12 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 CheckUploadChunkParams

type CheckUploadChunkParams struct {
	// Path File path
	Path string `form:"path" json:"path"`

	// RelativePath File path
	RelativePath string `form:"relativePath" json:"relativePath"`

	// Filename File name
	Filename string `form:"filename" json:"filename"`

	// ChunkNumber chunk number
	ChunkNumber string `form:"chunkNumber" json:"chunkNumber"`

	// TotalChunks total chunks
	TotalChunks int `form:"totalChunks" json:"totalChunks"`
}

CheckUploadChunkParams defines parameters for CheckUploadChunk.

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

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 GetZTInfoOK

type GetZTInfoOK = ZTInfo

GetZTInfoOK defines model for GetZTInfoOK.

type HealthPorts

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 PostUploadFileMultipartBody

type PostUploadFileMultipartBody struct {
	ChunkNumber      *string             `json:"chunkNumber,omitempty"`
	ChunkSize        *string             `json:"chunkSize,omitempty"`
	CurrentChunkSize *string             `json:"currentChunkSize,omitempty"`
	File             *openapi_types.File `json:"file,omitempty"`
	Filename         *string             `json:"filename,omitempty"`
	Identifier       *string             `json:"identifier,omitempty"`
	Path             *string             `json:"path,omitempty"`
	RelativePath     *string             `json:"relativePath,omitempty"`
	TotalChunks      *string             `json:"totalChunks,omitempty"`
	TotalSize        *string             `json:"totalSize,omitempty"`
}

PostUploadFileMultipartBody defines parameters for PostUploadFile.

type PostUploadFileMultipartRequestBody

type PostUploadFileMultipartRequestBody PostUploadFileMultipartBody

PostUploadFileMultipartRequestBody defines body for PostUploadFile for multipart/form-data ContentType.

type ResponseClientError

type ResponseClientError = BaseResponse

ResponseClientError defines model for ResponseClientError.

type ResponseInternalServerError

type ResponseInternalServerError = BaseResponse

ResponseInternalServerError defines model for ResponseInternalServerError.

type ResponseOK

type ResponseOK = BaseResponse

ResponseOK defines model for ResponseOK.

type ResponseStringOK

type ResponseStringOK = SuccessResponseString

ResponseStringOK defines model for ResponseStringOK.

type ServerInterface

type ServerInterface interface {
	// Test file methods
	// (GET /file/test)
	GetFileTest(ctx echo.Context) error
	// Check upload chunk
	// (GET /file/upload)
	CheckUploadChunk(ctx echo.Context, params CheckUploadChunkParams) error
	// Upload file
	// (POST /file/upload)
	PostUploadFile(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
	// Get Zerotier info
	// (GET /zt/info)
	GetZerotierInfo(ctx echo.Context) error
	// Set Zerotier network status
	// (PUT /zt/{network_id}/status)
	SetZerotierNetworkStatus(ctx echo.Context, networkId string) error
}

ServerInterface represents all server handlers.

type ServerInterfaceWrapper

type ServerInterfaceWrapper struct {
	Handler ServerInterface
}

ServerInterfaceWrapper converts echo contexts to parameters.

func (*ServerInterfaceWrapper) CheckUploadChunk

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

CheckUploadChunk converts echo context to params.

func (*ServerInterfaceWrapper) GetFileTest

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

GetFileTest converts echo context to params.

func (*ServerInterfaceWrapper) GetHealthPorts

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

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

GetHealthlogs converts echo context to params.

func (*ServerInterfaceWrapper) GetZerotierInfo

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

GetZerotierInfo converts echo context to params.

func (*ServerInterfaceWrapper) PostUploadFile

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

PostUploadFile converts echo context to params.

func (*ServerInterfaceWrapper) SetZerotierNetworkStatus

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

SetZerotierNetworkStatus converts echo context to params.

type SetZerotierNetworkStatusJSONBody

type SetZerotierNetworkStatusJSONBody struct {
	Status *SetZerotierNetworkStatusJSONBodyStatus `json:"status,omitempty"`
}

SetZerotierNetworkStatusJSONBody defines parameters for SetZerotierNetworkStatus.

type SetZerotierNetworkStatusJSONBodyStatus

type SetZerotierNetworkStatusJSONBodyStatus string

SetZerotierNetworkStatusJSONBodyStatus defines parameters for SetZerotierNetworkStatus.

const (
	Offline SetZerotierNetworkStatusJSONBodyStatus = "offline"
	Online  SetZerotierNetworkStatusJSONBodyStatus = "online"
)

Defines values for SetZerotierNetworkStatusJSONBodyStatus.

type SetZerotierNetworkStatusJSONRequestBody

type SetZerotierNetworkStatusJSONRequestBody SetZerotierNetworkStatusJSONBody

SetZerotierNetworkStatusJSONRequestBody defines body for SetZerotierNetworkStatus for application/json ContentType.

type SuccessResponseString

type SuccessResponseString struct {
	// Data When the interface returns success, this field is the specific success information
	Data *string `json:"data,omitempty"`

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

SuccessResponseString defines model for SuccessResponseString.

type ZTInfo

type ZTInfo struct {
	Id     *string `json:"id,omitempty"`
	Name   *string `json:"name,omitempty"`
	Status *string `json:"status,omitempty"`
}

ZTInfo defines model for ZTInfo.

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