gen

package
v0.0.0-...-5485e49 Latest Latest
Warning

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

Go to latest
Published: Feb 7, 2025 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

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

Code generated by github.com/oapi-codegen/oapi-codegen/v2 version v2.4.1 DO NOT EDIT.

Index

Constants

View Source
const (
	BearerAuthScopes = "BearerAuth.Scopes"
)

Variables

This section is empty.

Functions

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 DiskResponse

type DiskResponse struct {
	// Free Free disk space in bytes.
	Free int `json:"free"`

	// Name Disk identifier, e.g., "/dev/sda1".
	Name string `json:"name"`

	// Total Total disk space in bytes.
	Total int `json:"total"`

	// Used Used disk space in bytes.
	Used int `json:"used"`
}

DiskResponse Local disk usage information.

type DisksResponse

type DisksResponse = []DiskResponse

DisksResponse List of local disk usage information.

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 ErrorResponse

type ErrorResponse = externalRef0.ErrorResponse

ErrorResponse defines model for ErrorResponse.

type GetSystemHostname200JSONResponse

type GetSystemHostname200JSONResponse HostnameResponse

func (GetSystemHostname200JSONResponse) VisitGetSystemHostnameResponse

func (response GetSystemHostname200JSONResponse) VisitGetSystemHostnameResponse(w http.ResponseWriter) error

type GetSystemHostname401JSONResponse

type GetSystemHostname401JSONResponse externalRef0.ErrorResponse

func (GetSystemHostname401JSONResponse) VisitGetSystemHostnameResponse

func (response GetSystemHostname401JSONResponse) VisitGetSystemHostnameResponse(w http.ResponseWriter) error

type GetSystemHostname403JSONResponse

type GetSystemHostname403JSONResponse externalRef0.ErrorResponse

func (GetSystemHostname403JSONResponse) VisitGetSystemHostnameResponse

func (response GetSystemHostname403JSONResponse) VisitGetSystemHostnameResponse(w http.ResponseWriter) error

type GetSystemHostname500JSONResponse

type GetSystemHostname500JSONResponse externalRef0.ErrorResponse

func (GetSystemHostname500JSONResponse) VisitGetSystemHostnameResponse

func (response GetSystemHostname500JSONResponse) VisitGetSystemHostnameResponse(w http.ResponseWriter) error

type GetSystemHostnameRequestObject

type GetSystemHostnameRequestObject struct {
}

type GetSystemHostnameResponseObject

type GetSystemHostnameResponseObject interface {
	VisitGetSystemHostnameResponse(w http.ResponseWriter) error
}

type GetSystemStatus200JSONResponse

type GetSystemStatus200JSONResponse SystemStatusResponse

func (GetSystemStatus200JSONResponse) VisitGetSystemStatusResponse

func (response GetSystemStatus200JSONResponse) VisitGetSystemStatusResponse(w http.ResponseWriter) error

type GetSystemStatus401JSONResponse

type GetSystemStatus401JSONResponse externalRef0.ErrorResponse

func (GetSystemStatus401JSONResponse) VisitGetSystemStatusResponse

func (response GetSystemStatus401JSONResponse) VisitGetSystemStatusResponse(w http.ResponseWriter) error

type GetSystemStatus403JSONResponse

type GetSystemStatus403JSONResponse externalRef0.ErrorResponse

func (GetSystemStatus403JSONResponse) VisitGetSystemStatusResponse

func (response GetSystemStatus403JSONResponse) VisitGetSystemStatusResponse(w http.ResponseWriter) error

type GetSystemStatus500JSONResponse

type GetSystemStatus500JSONResponse externalRef0.ErrorResponse

func (GetSystemStatus500JSONResponse) VisitGetSystemStatusResponse

func (response GetSystemStatus500JSONResponse) VisitGetSystemStatusResponse(w http.ResponseWriter) error

type GetSystemStatusRequestObject

type GetSystemStatusRequestObject struct {
}

type GetSystemStatusResponseObject

type GetSystemStatusResponseObject interface {
	VisitGetSystemStatusResponse(w http.ResponseWriter) error
}

type HostnameResponse

type HostnameResponse struct {
	// Hostname The system's hostname.
	Hostname string `json:"hostname"`
}

HostnameResponse The hostname of the system.

type LoadAverageResponse

type LoadAverageResponse struct {
	// N15min Load average for the last 15 minutes.
	N15min float32 `json:"15min"`

	// N1min Load average for the last 1 minute.
	N1min float32 `json:"1min"`

	// N5min Load average for the last 5 minutes.
	N5min float32 `json:"5min"`
}

LoadAverageResponse The system load averages for 1, 5, and 15 minutes.

type MemoryResponse

type MemoryResponse struct {
	// Free Free memory in bytes.
	Free int `json:"free"`

	// Total Total memory in bytes.
	Total int `json:"total"`

	// Used Used memory in bytes.
	Used int `json:"used"`
}

MemoryResponse Memory usage information.

type OSInfoResponse

type OSInfoResponse struct {
	// Distribution The name of the Linux distribution.
	Distribution string `json:"distribution"`

	// Version The version of the Linux distribution.
	Version string `json:"version"`
}

OSInfoResponse Operating system information.

type ServerInterface

type ServerInterface interface {
	// Retrieve system hostname
	// (GET /system/hostname)
	GetSystemHostname(ctx echo.Context) error
	// Retrieve system status
	// (GET /system/status)
	GetSystemStatus(ctx echo.Context) error
}

ServerInterface represents all server handlers.

func NewStrictHandler

func NewStrictHandler(ssi StrictServerInterface, middlewares []StrictMiddlewareFunc) ServerInterface

type ServerInterfaceWrapper

type ServerInterfaceWrapper struct {
	Handler ServerInterface
}

ServerInterfaceWrapper converts echo contexts to parameters.

func (*ServerInterfaceWrapper) GetSystemHostname

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

GetSystemHostname converts echo context to params.

func (*ServerInterfaceWrapper) GetSystemStatus

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

GetSystemStatus converts echo context to params.

type StrictHandlerFunc

type StrictHandlerFunc = strictecho.StrictEchoHandlerFunc

type StrictMiddlewareFunc

type StrictMiddlewareFunc = strictecho.StrictEchoMiddlewareFunc

type StrictServerInterface

type StrictServerInterface interface {
	// Retrieve system hostname
	// (GET /system/hostname)
	GetSystemHostname(ctx context.Context, request GetSystemHostnameRequestObject) (GetSystemHostnameResponseObject, error)
	// Retrieve system status
	// (GET /system/status)
	GetSystemStatus(ctx context.Context, request GetSystemStatusRequestObject) (GetSystemStatusResponseObject, error)
}

StrictServerInterface represents all server handlers.

type SystemStatusResponse

type SystemStatusResponse struct {
	// Disks List of local disk usage information.
	Disks DisksResponse `json:"disks"`

	// Hostname The hostname of the system.
	Hostname string `json:"hostname"`

	// LoadAverage The system load averages for 1, 5, and 15 minutes.
	LoadAverage LoadAverageResponse `json:"load_average"`

	// Memory Memory usage information.
	Memory MemoryResponse `json:"memory"`

	// OsInfo Operating system information.
	OsInfo OSInfoResponse `json:"os_info"`

	// Uptime The uptime of the system.
	Uptime string `json:"uptime"`
}

SystemStatusResponse defines model for SystemStatusResponse.

Jump to

Keyboard shortcuts

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