Documentation
¶
Overview ¶
Package v1alpha1 provides primitives to interact with the openapi HTTP API.
Code generated by github.com/oapi-codegen/oapi-codegen/v2 version v2.8.0 DO NOT EDIT.
Package v1alpha1 provides primitives to interact with the openapi HTTP API.
Code generated by github.com/oapi-codegen/oapi-codegen/v2 version v2.8.0 DO NOT EDIT.
Index ¶
- func GetSpec() (swagger *openapi3.T, err error)
- func GetSpecJSON() ([]byte, error)
- func GetSwagger() (*openapi3.T, error)deprecated
- func PathToRawSpec(pathToFile string) map[string]func() ([]byte, error)
- type Access
- type CommonFields
- type CreateVMJSONRequestBody
- type CreateVMParams
- type Disk
- type Error
- type GuestOS
- type Health
- type ListVMsParams
- type Memory
- type ProviderHints
- type ServiceMetadata
- type ServiceType
- type Storage
- type VM
- type VMList
- type VMSpec
- type Vcpu
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetSpec ¶
GetSpec returns the OpenAPI specification corresponding to the generated code in this file. External references in the spec are resolved through PathToRawSpec; externally-referenced files must be embedded in their corresponding Go packages (via the import-mapping feature). URL-based external refs are not supported.
func GetSpecJSON ¶
GetSpecJSON returns the raw JSON bytes of the embedded OpenAPI specification: decompressed but not unmarshaled. External references are not resolved here; the bytes are the spec exactly as embedded by codegen. The result is cached at package init time, so repeated calls are cheap.
func GetSwagger
deprecated
Types ¶
type Access ¶
type Access struct {
// SshPublicKey SSH public key for VM access.
// Injected via cloud-init/cloudbase-init by providers.
//
// Provider mapping:
// - KubeVirt: cloud-init userData
// - AWS: key pair
// - Azure: SSH public key
// - GCP: instance metadata
// - VMware: guest customization
//
//
// Example: ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIExample...
SshPublicKey *string `json:"ssh_public_key,omitempty"`
AdditionalProperties map[string]interface{} `json:"-"`
}
Access VM access configuration
func (Access) Get ¶
Getter for additional properties for Access. Returns the specified element and whether it was found
func (Access) MarshalJSON ¶
Override default JSON handling for Access to handle AdditionalProperties
func (*Access) UnmarshalJSON ¶
Override default JSON handling for Access to handle AdditionalProperties
type CommonFields ¶
type CommonFields struct {
// CreateTime Timestamp when the resource was created (RFC 3339)
//
// Example: 2026-01-13T10:30:00Z
CreateTime *time.Time `json:"create_time,omitempty"`
// Id Unique identifier for the resource.
//
//
// Example: vm-abc123
Id *string `json:"id,omitempty"`
// Metadata Resource metadata for identification and governance.
// Used by all service type specifications.
Metadata ServiceMetadata `json:"metadata"`
// Path Resource path or location within the system hierarchy.
//
//
// Example: /production/us-east/compute
Path *string `json:"path,omitempty"`
// ProviderHints Optional provider-specific configuration.
//
// Allows platform-specific settings without breaking portability.
// Providers use hints they recognize and ignore unknown hints.
//
// Keys are provider identifiers (e.g., kubevirt, vmware, aws).
// Values are provider-specific configuration objects.
//
//
// Example: {"aws":{"instanceType":"t3.xlarge"},"kubevirt":{"instanceType":"u1.large"},"vmware":{"vmxVersion":"17"}}
ProviderHints *ProviderHints `json:"provider_hints,omitempty"`
// ServiceType Service type identifier.
// Makes the payload self-describing and enables routing/validation.
//
//
// Example: vm
ServiceType ServiceType `json:"service_type"`
// Status Current status of the resource.
//
//
// Example: running
Status *string `json:"status,omitempty"`
// StatusMessage Human-readable message providing details about the current status
//
// Example: Resource is running normally
StatusMessage *string `json:"status_message,omitempty"`
// UpdateTime Timestamp when the resource was last updated (RFC 3339)
//
// Example: 2026-01-13T15:45:30Z
UpdateTime *time.Time `json:"update_time,omitempty"`
}
CommonFields Common fields included in all service type specifications. These provide versioning, extensibility, and provider-specific configuration.
type CreateVMJSONRequestBody ¶
type CreateVMJSONRequestBody = VM
CreateVMJSONRequestBody defines body for CreateVM for application/json ContentType.
type CreateVMParams ¶
type CreateVMParams struct {
// Id Optional VM ID for idempotent creation
Id *string `form:"id,omitempty" json:"id,omitempty"`
}
CreateVMParams defines parameters for CreateVM.
type Disk ¶
type Disk struct {
// Capacity Disk capacity with unit suffix (MB, GB, TB)
//
// Example: 100GB
Capacity string `json:"capacity"`
// Name Disk identifier (unique within VM).
// The root volume must be named "boot".
// Additional disks can use names like "data", "log", etc.
//
//
// Example: boot
Name string `json:"name"`
AdditionalProperties map[string]interface{} `json:"-"`
}
Disk Virtual disk specification
func (Disk) Get ¶
Getter for additional properties for Disk. Returns the specified element and whether it was found
func (Disk) MarshalJSON ¶
Override default JSON handling for Disk to handle AdditionalProperties
func (*Disk) UnmarshalJSON ¶
Override default JSON handling for Disk to handle AdditionalProperties
type Error ¶
type Error struct {
// Detail Human-readable explanation specific to this occurrence
//
// Example: The 'name' field is required but was not provided
Detail *string `json:"detail,omitempty"`
// Instance URI reference for this specific error occurrence
//
// Example: /errors/123e4567-e89b-12d3-a456-426614174000
Instance *string `json:"instance,omitempty"`
// Status HTTP status code
//
// Example: 400
Status *int `json:"status,omitempty"`
// Title Short human-readable summary of the problem
//
// Example: Invalid Input
Title string `json:"title"`
// Type URI reference identifying the error type
//
// Example: https://dcm.example.com/errors/invalid-input
Type string `json:"type"`
}
Error RFC 7807 compliant error response
type GuestOS ¶
type GuestOS struct {
// Type Operating system identifier.
//
// Naming convention: <distro>-<version>
// Examples:
// - Linux: rhel-9, ubuntu-22.04, fedora-39, centos-stream-9
// - Windows: windows-server-2022, windows-11
//
// Providers map this to their image catalog:
// - KubeVirt: Container image or DataVolume
// - VMware: VM template or content library item
// - AWS: AMI ID
// - Azure: Image reference
//
//
// Example: rhel-9
Type string `json:"type"`
AdditionalProperties map[string]interface{} `json:"-"`
}
GuestOS Guest operating system configuration. Providers map the OS type to their image catalog.
func (GuestOS) Get ¶
Getter for additional properties for GuestOS. Returns the specified element and whether it was found
func (GuestOS) MarshalJSON ¶
Override default JSON handling for GuestOS to handle AdditionalProperties
func (*GuestOS) UnmarshalJSON ¶
Override default JSON handling for GuestOS to handle AdditionalProperties
type Health ¶
type Health struct {
// Path Canonical path of the resource
//
// Example: ok
Path *string `json:"path,omitempty"`
// Status Health status
//
// Example: ok
Status *string `json:"status,omitempty"`
}
Health Health status singleton resource
type ListVMsParams ¶
type ListVMsParams struct {
// MaxPageSize Maximum number of results per page
MaxPageSize *int `form:"max_page_size,omitempty" json:"max_page_size,omitempty"`
// PageToken Token for pagination
PageToken *string `form:"page_token,omitempty" json:"page_token,omitempty"`
}
ListVMsParams defines parameters for ListVMs.
type Memory ¶
type Memory struct {
// Size Memory size with unit suffix (MB, GB, TB).
// Maps to guest memory in all providers.
//
//
// Example: 16GB
Size string `json:"size"`
AdditionalProperties map[string]interface{} `json:"-"`
}
Memory Memory configuration (RAM)
func (Memory) Get ¶
Getter for additional properties for Memory. Returns the specified element and whether it was found
func (Memory) MarshalJSON ¶
Override default JSON handling for Memory to handle AdditionalProperties
func (*Memory) UnmarshalJSON ¶
Override default JSON handling for Memory to handle AdditionalProperties
type ProviderHints ¶
ProviderHints Optional provider-specific configuration.
Allows platform-specific settings without breaking portability. Providers use hints they recognize and ignore unknown hints.
Keys are provider identifiers (e.g., kubevirt, vmware, aws). Values are provider-specific configuration objects.
Example: {"aws":{"instanceType":"t3.xlarge"},"kubevirt":{"instanceType":"u1.large"},"vmware":{"vmxVersion":"17"}}
type ServiceMetadata ¶
type ServiceMetadata struct {
// Labels Key-value pairs for tagging and filtering.
// Both keys and values must be strings.
//
//
// Example: {"environment":"production","owner":"platform-team"}
Labels *map[string]string `json:"labels,omitempty"`
// Name Resource name identifier.
// Must be unique within the namespace.
//
//
// Example: my-dev-vm
Name string `json:"name"`
}
ServiceMetadata Resource metadata for identification and governance. Used by all service type specifications.
type ServiceType ¶
type ServiceType string
ServiceType Service type identifier. Makes the payload self-describing and enables routing/validation.
Example: vm
const ( Cluster ServiceType = "cluster" Container ServiceType = "container" Database ServiceType = "database" ThreeTierAppDemo ServiceType = "three-tier-app-demo" Vm ServiceType = "vm" )
Defines values for ServiceType.
func (ServiceType) Valid ¶
func (e ServiceType) Valid() bool
Valid indicates whether the value is a known member of the ServiceType enum.
type Storage ¶
type Storage struct {
// Disks Virtual disk specifications.
//
// Requirements:
// - Must contain at least one disk named "boot" for the root volume
// - Disk names must be unique within the VM
//
// Note: The boot disk requirement is enforced at application level.
Disks []Disk `json:"disks"`
AdditionalProperties map[string]interface{} `json:"-"`
}
Storage Storage configuration
func (Storage) Get ¶
Getter for additional properties for Storage. Returns the specified element and whether it was found
func (Storage) MarshalJSON ¶
Override default JSON handling for Storage to handle AdditionalProperties
func (*Storage) UnmarshalJSON ¶
Override default JSON handling for Storage to handle AdditionalProperties
type VM ¶
type VM struct {
// Path Resource path identifier
//
// Example: vms/123e4567-e89b-12d3-a456-426614174000
Path *string `json:"path,omitempty"`
// Spec Provider-agnostic virtual machine specification.
//
// Includes common fields (service_type, metadata, provider_hints)
// plus VM-specific fields for compute, storage, and operating system.
//
// Providers translate this abstract specification to their native format.
Spec VMSpec `json:"spec"`
}
VM Virtual Machine
type VMList ¶
type VMList struct {
// NextPageToken Token for retrieving the next page of results
//
// Example: eyJpZCI6IjEyM2U0NTY3LWU4OWItMTJkMy1hNDU2LTQyNjYxNDE3NDAwMCJ9
NextPageToken *string `json:"next_page_token,omitempty"`
Vms *[]VM `json:"vms,omitempty"`
}
VMList Paginated list of VMs
type VMSpec ¶
type VMSpec struct {
// Access VM access configuration
Access *Access `json:"access,omitempty"`
// CreateTime Timestamp when the resource was created (RFC 3339)
//
// Example: 2026-01-13T10:30:00Z
CreateTime *time.Time `json:"create_time,omitempty"`
// GuestOs Guest operating system configuration.
// Providers map the OS type to their image catalog.
GuestOs GuestOS `json:"guest_os"`
// Id Unique identifier for the resource.
//
//
// Example: vm-abc123
Id *string `json:"id,omitempty"`
// Memory Memory configuration (RAM)
Memory Memory `json:"memory"`
// Metadata Resource metadata for identification and governance.
// Used by all service type specifications.
Metadata ServiceMetadata `json:"metadata"`
// Path Resource path or location within the system hierarchy.
//
//
// Example: /production/us-east/compute
Path *string `json:"path,omitempty"`
// ProviderHints Optional provider-specific configuration.
//
// Allows platform-specific settings without breaking portability.
// Providers use hints they recognize and ignore unknown hints.
//
// Keys are provider identifiers (e.g., kubevirt, vmware, aws).
// Values are provider-specific configuration objects.
//
//
// Example: {"aws":{"instanceType":"t3.xlarge"},"kubevirt":{"instanceType":"u1.large"},"vmware":{"vmxVersion":"17"}}
ProviderHints *ProviderHints `json:"provider_hints,omitempty"`
// ServiceType Service type identifier.
// Makes the payload self-describing and enables routing/validation.
//
//
// Example: vm
ServiceType ServiceType `json:"service_type"`
// Status Current status of the resource.
//
//
// Example: running
Status *string `json:"status,omitempty"`
// StatusMessage Human-readable message providing details about the current status
//
// Example: Resource is running normally
StatusMessage *string `json:"status_message,omitempty"`
// Storage Storage configuration
Storage Storage `json:"storage"`
// UpdateTime Timestamp when the resource was last updated (RFC 3339)
//
// Example: 2026-01-13T15:45:30Z
UpdateTime *time.Time `json:"update_time,omitempty"`
// Vcpu Virtual CPU configuration
Vcpu Vcpu `json:"vcpu"`
AdditionalProperties map[string]interface{} `json:"-"`
}
VMSpec Provider-agnostic virtual machine specification.
Includes common fields (service_type, metadata, provider_hints) plus VM-specific fields for compute, storage, and operating system.
Providers translate this abstract specification to their native format.
func (VMSpec) Get ¶
Getter for additional properties for VMSpec. Returns the specified element and whether it was found
func (VMSpec) MarshalJSON ¶
Override default JSON handling for VMSpec to handle AdditionalProperties
func (*VMSpec) UnmarshalJSON ¶
Override default JSON handling for VMSpec to handle AdditionalProperties
type Vcpu ¶
type Vcpu struct {
// Count Number of virtual CPUs.
// Maps to vCPU count in all providers.
//
//
// Example: 4
Count int `json:"count"`
AdditionalProperties map[string]interface{} `json:"-"`
}
Vcpu Virtual CPU configuration
func (Vcpu) Get ¶
Getter for additional properties for Vcpu. Returns the specified element and whether it was found
func (Vcpu) MarshalJSON ¶
Override default JSON handling for Vcpu to handle AdditionalProperties
func (*Vcpu) UnmarshalJSON ¶
Override default JSON handling for Vcpu to handle AdditionalProperties