Documentation ¶
Overview ¶
Package adapters provides primitives to interact with the openapi HTTP API.
Code generated by github.com/deepmap/oapi-codegen version v1.12.2 DO NOT EDIT.
Package adapters provides primitives to interact with the openapi HTTP API.
Code generated by github.com/deepmap/oapi-codegen version v1.12.2 DO NOT EDIT.
Index ¶
- func GetSwagger() (swagger *openapi3.T, err error)
- func PathToRawSpec(pathToFile string) map[string]func() ([]byte, error)
- func RegisterHandlers(router *gin.Engine, si ServerInterface) *gin.Engine
- func RegisterHandlersWithOptions(router *gin.Engine, si ServerInterface, options GinServerOptions) *gin.Engine
- type Cpu
- type Devices
- type Disk
- type DiskDevice
- type DiskType
- type GetAllVMsList200Response
- type GetApiV1VmsVmIdPowerJSONRequestBody
- type GetHost200Response
- type GetVMByVMId200Response
- type GetVMPowerByVMId200Response
- type GinServerOptions
- type Host
- type Memory
- type Metadata
- type MiddlewareFunc
- type PatchApiV1VmsVmIdJSONBody
- type PatchApiV1VmsVmIdJSONRequestBody
- type PatchUpdateVMByVMId200Response
- type PostApiV1VmsJSONBody
- type PostApiV1VmsJSONRequestBody
- type PostApiV1VmsVmIdPowerActionParams
- type PostApiV1VmsVmIdPowerActionParamsAction
- type PostCreateNewVM200Response
- type ServerInterface
- type ServerInterfaceWrapper
- func (siw *ServerInterfaceWrapper) GetApiV1Host(c *gin.Context)
- func (siw *ServerInterfaceWrapper) GetApiV1Vms(c *gin.Context)
- func (siw *ServerInterfaceWrapper) GetApiV1VmsVmId(c *gin.Context)
- func (siw *ServerInterfaceWrapper) GetApiV1VmsVmIdPower(c *gin.Context)
- func (siw *ServerInterfaceWrapper) PatchApiV1VmsVmId(c *gin.Context)
- func (siw *ServerInterfaceWrapper) PostApiV1Vms(c *gin.Context)
- func (siw *ServerInterfaceWrapper) PostApiV1VmsVmIdPowerAction(c *gin.Context)
- type StoragePool
- type StoragePoolStatus
- type Vm
- type VmPowerInfo
- type VmPowerInfoState
- type VmStatus
Constants ¶
This section is empty.
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 *gin.Engine, si ServerInterface) *gin.Engine
RegisterHandlers creates http.Handler with routing matching OpenAPI spec.
func RegisterHandlersWithOptions ¶
func RegisterHandlersWithOptions(router *gin.Engine, si ServerInterface, options GinServerOptions) *gin.Engine
RegisterHandlersWithOptions creates http.Handler with additional options
Types ¶
type DiskDevice ¶
type DiskDevice = models.DiskDevice
type GetAllVMsList200Response ¶
type GetAllVMsList200Response = models.GetAllVMsList200Response
type GetApiV1VmsVmIdPowerJSONRequestBody ¶
type GetApiV1VmsVmIdPowerJSONRequestBody = models.VmPowerInfo
type GetHost200Response ¶
type GetHost200Response = models.GetHost200Response
type GetVMByVMId200Response ¶
type GetVMByVMId200Response = models.GetVMByVMId200Response
type GetVMPowerByVMId200Response ¶
type GetVMPowerByVMId200Response = models.GetVMPowerByVMId200Response
type GinServerOptions ¶
type GinServerOptions struct { BaseURL string Middlewares []MiddlewareFunc ErrorHandler func(*gin.Context, error, int) }
GinServerOptions provides options for the Gin server.
type MiddlewareFunc ¶
type PatchApiV1VmsVmIdJSONBody ¶
type PatchApiV1VmsVmIdJSONBody = models.PatchApiV1VmsVmIdJSONBody
type PatchApiV1VmsVmIdJSONRequestBody ¶
type PatchApiV1VmsVmIdJSONRequestBody = models.PatchApiV1VmsVmIdJSONRequestBody
type PatchUpdateVMByVMId200Response ¶
type PatchUpdateVMByVMId200Response = models.PatchUpdateVMByVMId200Response
type PostApiV1VmsJSONBody ¶
type PostApiV1VmsJSONBody = models.PostApiV1VmsJSONBody
type PostApiV1VmsJSONRequestBody ¶
type PostApiV1VmsJSONRequestBody = models.PostApiV1VmsJSONRequestBody
type PostApiV1VmsVmIdPowerActionParams ¶
type PostApiV1VmsVmIdPowerActionParams = models.PostApiV1VmsVmIdPowerActionParams
type PostApiV1VmsVmIdPowerActionParamsAction ¶
type PostApiV1VmsVmIdPowerActionParamsAction = models.PostApiV1VmsVmIdPowerActionParamsAction
type PostCreateNewVM200Response ¶
type PostCreateNewVM200Response = models.PostCreateNewVM200Response
type ServerInterface ¶
type ServerInterface interface { // Get a host // (GET /api/v1/host) GetApiV1Host(c *gin.Context) // Get all VMs list // (GET /api/v1/vms) GetApiV1Vms(c *gin.Context) // Create a new VM // (POST /api/v1/vms) PostApiV1Vms(c *gin.Context) // Get a VM // (GET /api/v1/vms/{vmId}) GetApiV1VmsVmId(c *gin.Context, vmId openapi_types.UUID) // Update a VM // (PATCH /api/v1/vms/{vmId}) PatchApiV1VmsVmId(c *gin.Context, vmId openapi_types.UUID) // Get Power State // (GET /api/v1/vms/{vmId}/power) GetApiV1VmsVmIdPower(c *gin.Context, vmId openapi_types.UUID) // Change Power Status // (POST /api/v1/vms/{vmId}/power) PostApiV1VmsVmIdPowerAction(c *gin.Context, vmId openapi_types.UUID, params PostApiV1VmsVmIdPowerActionParams) }
ServerInterface represents all server handlers.
type ServerInterfaceWrapper ¶
type ServerInterfaceWrapper struct { Handler ServerInterface HandlerMiddlewares []MiddlewareFunc ErrorHandler func(*gin.Context, error, int) }
ServerInterfaceWrapper converts contexts to parameters.
func (*ServerInterfaceWrapper) GetApiV1Host ¶
func (siw *ServerInterfaceWrapper) GetApiV1Host(c *gin.Context)
GetApiV1Host operation middleware
func (*ServerInterfaceWrapper) GetApiV1Vms ¶
func (siw *ServerInterfaceWrapper) GetApiV1Vms(c *gin.Context)
GetApiV1Vms operation middleware
func (*ServerInterfaceWrapper) GetApiV1VmsVmId ¶
func (siw *ServerInterfaceWrapper) GetApiV1VmsVmId(c *gin.Context)
GetApiV1VmsVmId operation middleware
func (*ServerInterfaceWrapper) GetApiV1VmsVmIdPower ¶
func (siw *ServerInterfaceWrapper) GetApiV1VmsVmIdPower(c *gin.Context)
GetApiV1VmsVmIdPower operation middleware
func (*ServerInterfaceWrapper) PatchApiV1VmsVmId ¶
func (siw *ServerInterfaceWrapper) PatchApiV1VmsVmId(c *gin.Context)
PatchApiV1VmsVmId operation middleware
func (*ServerInterfaceWrapper) PostApiV1Vms ¶
func (siw *ServerInterfaceWrapper) PostApiV1Vms(c *gin.Context)
PostApiV1Vms operation middleware
func (*ServerInterfaceWrapper) PostApiV1VmsVmIdPowerAction ¶
func (siw *ServerInterfaceWrapper) PostApiV1VmsVmIdPowerAction(c *gin.Context)
PostApiV1VmsVmIdPowerAction operation middleware
type StoragePool ¶
type StoragePool = models.StoragePool
type StoragePoolStatus ¶
type StoragePoolStatus = models.StoragePoolStatus
type VmPowerInfo ¶
type VmPowerInfo = models.VmPowerInfo
type VmPowerInfoState ¶
type VmPowerInfoState = models.VmPowerInfoState