v1alpha1

package
v0.0.0-...-4f6fde9 Latest Latest
Warning

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

Go to latest
Published: Aug 31, 2026 License: Apache-2.0 Imports: 10 Imported by: 0

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

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetSpec

func GetSpec() (swagger *openapi3.T, err error)

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

func GetSpecJSON() ([]byte, error)

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

func GetSwagger() (*openapi3.T, error)

GetSwagger returns the OpenAPI specification corresponding to the generated code in this file.

Deprecated: GetSwagger predates kin-openapi renaming openapi3.Swagger to openapi3.T. Use GetSpec instead. This wrapper is retained for backwards compatibility.

func PathToRawSpec

func PathToRawSpec(pathToFile string) map[string]func() ([]byte, error)

Constructs a synthetic filesystem for resolving external references when loading openapi specifications.

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

func (a Access) Get(fieldName string) (value interface{}, found bool)

Getter for additional properties for Access. Returns the specified element and whether it was found

func (Access) MarshalJSON

func (a Access) MarshalJSON() ([]byte, error)

Override default JSON handling for Access to handle AdditionalProperties

func (*Access) Set

func (a *Access) Set(fieldName string, value interface{})

Setter for additional properties for Access

func (*Access) UnmarshalJSON

func (a *Access) UnmarshalJSON(b []byte) error

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

func (a Disk) Get(fieldName string) (value interface{}, found bool)

Getter for additional properties for Disk. Returns the specified element and whether it was found

func (Disk) MarshalJSON

func (a Disk) MarshalJSON() ([]byte, error)

Override default JSON handling for Disk to handle AdditionalProperties

func (*Disk) Set

func (a *Disk) Set(fieldName string, value interface{})

Setter for additional properties for Disk

func (*Disk) UnmarshalJSON

func (a *Disk) UnmarshalJSON(b []byte) error

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

func (a GuestOS) Get(fieldName string) (value interface{}, found bool)

Getter for additional properties for GuestOS. Returns the specified element and whether it was found

func (GuestOS) MarshalJSON

func (a GuestOS) MarshalJSON() ([]byte, error)

Override default JSON handling for GuestOS to handle AdditionalProperties

func (*GuestOS) Set

func (a *GuestOS) Set(fieldName string, value interface{})

Setter for additional properties for GuestOS

func (*GuestOS) UnmarshalJSON

func (a *GuestOS) UnmarshalJSON(b []byte) error

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

func (a Memory) Get(fieldName string) (value interface{}, found bool)

Getter for additional properties for Memory. Returns the specified element and whether it was found

func (Memory) MarshalJSON

func (a Memory) MarshalJSON() ([]byte, error)

Override default JSON handling for Memory to handle AdditionalProperties

func (*Memory) Set

func (a *Memory) Set(fieldName string, value interface{})

Setter for additional properties for Memory

func (*Memory) UnmarshalJSON

func (a *Memory) UnmarshalJSON(b []byte) error

Override default JSON handling for Memory to handle AdditionalProperties

type ProviderHints

type ProviderHints map[string]map[string]interface{}

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

func (a Storage) Get(fieldName string) (value interface{}, found bool)

Getter for additional properties for Storage. Returns the specified element and whether it was found

func (Storage) MarshalJSON

func (a Storage) MarshalJSON() ([]byte, error)

Override default JSON handling for Storage to handle AdditionalProperties

func (*Storage) Set

func (a *Storage) Set(fieldName string, value interface{})

Setter for additional properties for Storage

func (*Storage) UnmarshalJSON

func (a *Storage) UnmarshalJSON(b []byte) error

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

func (a VMSpec) Get(fieldName string) (value interface{}, found bool)

Getter for additional properties for VMSpec. Returns the specified element and whether it was found

func (VMSpec) MarshalJSON

func (a VMSpec) MarshalJSON() ([]byte, error)

Override default JSON handling for VMSpec to handle AdditionalProperties

func (*VMSpec) Set

func (a *VMSpec) Set(fieldName string, value interface{})

Setter for additional properties for VMSpec

func (*VMSpec) UnmarshalJSON

func (a *VMSpec) UnmarshalJSON(b []byte) error

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

func (a Vcpu) Get(fieldName string) (value interface{}, found bool)

Getter for additional properties for Vcpu. Returns the specified element and whether it was found

func (Vcpu) MarshalJSON

func (a Vcpu) MarshalJSON() ([]byte, error)

Override default JSON handling for Vcpu to handle AdditionalProperties

func (*Vcpu) Set

func (a *Vcpu) Set(fieldName string, value interface{})

Setter for additional properties for Vcpu

func (*Vcpu) UnmarshalJSON

func (a *Vcpu) UnmarshalJSON(b []byte) error

Override default JSON handling for Vcpu to handle AdditionalProperties

Jump to

Keyboard shortcuts

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