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
- 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 BaseResponse
- type CheckUploadChunkParams
- type EchoRouter
- type GetHealthPortsOK
- type GetHealthServicesOK
- type GetZTInfoOK
- type HealthPorts
- type HealthServices
- type PostUploadFileMultipartBody
- type PostUploadFileMultipartRequestBody
- type ResponseClientError
- type ResponseInternalServerError
- type ResponseOK
- type ResponseStringOK
- type ServerInterface
- type ServerInterfaceWrapper
- func (w *ServerInterfaceWrapper) CheckUploadChunk(ctx echo.Context) error
- func (w *ServerInterfaceWrapper) GetFileTest(ctx echo.Context) error
- func (w *ServerInterfaceWrapper) GetHealthPorts(ctx echo.Context) error
- func (w *ServerInterfaceWrapper) GetHealthServices(ctx echo.Context) error
- func (w *ServerInterfaceWrapper) GetHealthlogs(ctx echo.Context) error
- func (w *ServerInterfaceWrapper) GetZerotierInfo(ctx echo.Context) error
- func (w *ServerInterfaceWrapper) PostUploadFile(ctx echo.Context) error
- func (w *ServerInterfaceWrapper) SetZerotierNetworkStatus(ctx echo.Context) error
- type SetZerotierNetworkStatusJSONBody
- type SetZerotierNetworkStatusJSONBodyStatus
- type SetZerotierNetworkStatusJSONRequestBody
- type SuccessResponseString
- type ZTInfo
Constants ¶
const (
Access_tokenScopes = "access_token.Scopes"
)
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 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 HealthPorts ¶
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 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.
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. |