Documentation ¶
Overview ¶
Package adapters provides primitives to interact with the openapi HTTP API.
Code generated by github.com/deepmap/oapi-codegen version v1.12.4 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.4 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 GetHost200Response
- type GetVMByVMId200Response
- type GetVMPowerByVMId200Response
- type GinServerOptions
- type Host
- type Memory
- type Metadata
- type MiddlewareFunc
- type PatchApiV1VmsVmIdJSONBody
- type PatchApiV1VmsVmIdJSONRequestBody
- type PatchUpdateVMByVMId200Response
- type PatchUpdateVMRequest
- type PostApiV1VmsJSONBody
- type PostApiV1VmsJSONRequestBody
- type PostApiV1VmsVmIdPowerJSONBody
- type PostApiV1VmsVmIdPowerJSONRequestBody
- type PostChangeVMsPowerStatusByVMIdRequest
- type PostCreateNewVM200Response
- type PostCreateNewVMRequest
- type ServerInterface
- type ServerInterfaceWrapper
- func (siw *ServerInterfaceWrapper) DeleteApiV1VmsVmId(c *gin.Context)
- 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) PostApiV1VmsVmIdPower(c *gin.Context)
- type StoragePool
- type StoragePoolStatus
- type Vm
- type VmPowerActions
- type VmPowerInfo
- type VmPowerInfoState
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 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 PatchUpdateVMRequest ¶ added in v0.2.0
type PatchUpdateVMRequest = models.PatchUpdateVMRequest
type PostApiV1VmsJSONBody ¶
type PostApiV1VmsJSONBody = models.PostApiV1VmsJSONBody
type PostApiV1VmsJSONRequestBody ¶
type PostApiV1VmsJSONRequestBody = models.PostApiV1VmsJSONRequestBody
type PostApiV1VmsVmIdPowerJSONBody ¶ added in v0.2.0
type PostApiV1VmsVmIdPowerJSONBody = models.PostApiV1VmsVmIdPowerJSONBody
type PostApiV1VmsVmIdPowerJSONRequestBody ¶ added in v0.2.0
type PostApiV1VmsVmIdPowerJSONRequestBody = models.PostApiV1VmsVmIdPowerJSONRequestBody
type PostChangeVMsPowerStatusByVMIdRequest ¶ added in v0.2.0
type PostChangeVMsPowerStatusByVMIdRequest = models.PostChangeVMsPowerStatusByVMIdRequest
type PostCreateNewVM200Response ¶
type PostCreateNewVM200Response = models.PostCreateNewVM200Response
type PostCreateNewVMRequest ¶ added in v0.2.0
type PostCreateNewVMRequest = models.PostCreateNewVMRequest
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) // (DELETE /api/v1/vms/{vmId}) DeleteApiV1VmsVmId(c *gin.Context, vmId openapi_types.UUID) // 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) PostApiV1VmsVmIdPower(c *gin.Context, vmId openapi_types.UUID) }
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) DeleteApiV1VmsVmId ¶ added in v0.2.0
func (siw *ServerInterfaceWrapper) DeleteApiV1VmsVmId(c *gin.Context)
DeleteApiV1VmsVmId operation middleware
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) PostApiV1VmsVmIdPower ¶ added in v0.2.0
func (siw *ServerInterfaceWrapper) PostApiV1VmsVmIdPower(c *gin.Context)
PostApiV1VmsVmIdPower operation middleware
type StoragePool ¶
type StoragePool = models.StoragePool
type StoragePoolStatus ¶
type StoragePoolStatus = models.StoragePoolStatus
type VmPowerActions ¶ added in v0.2.0
type VmPowerActions = models.VmPowerActions
type VmPowerInfo ¶
type VmPowerInfo = models.VmPowerInfo
type VmPowerInfoState ¶
type VmPowerInfoState = models.VmPowerInfoState