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.

func PostPath

func PostPath() (string, error)

PostPath returns the first path that defines a POST operation in the embedded OpenAPI specification. It is used to derive endpoint suffixes from the spec rather than hardcoding them.

Types

type ACMProviderHints

type ACMProviderHints struct {
	// AgentLabels Labels to match agents (for baremetal)
	AgentLabels *map[string]string `json:"agent_labels,omitempty"`

	// BaseDomain Base domain for the cluster (e.g., "example.com")
	BaseDomain *string `json:"base_domain,omitempty"`

	// InfraEnv Name of the InfraEnv to use (for baremetal)
	InfraEnv *string `json:"infra_env,omitempty"`

	// Platform Target platform for the cluster
	Platform *ACMProviderHintsPlatform `json:"platform,omitempty"`

	// ReleaseImage Optional override for the release image
	ReleaseImage *string `json:"release_image,omitempty"`
}

ACMProviderHints ACM-specific provider hints

type ACMProviderHintsPlatform

type ACMProviderHintsPlatform string

ACMProviderHintsPlatform Target platform for the cluster

const (
	Baremetal ACMProviderHintsPlatform = "baremetal"
	Kubevirt  ACMProviderHintsPlatform = "kubevirt"
)

Defines values for ACMProviderHintsPlatform.

func (ACMProviderHintsPlatform) Valid

func (e ACMProviderHintsPlatform) Valid() bool

Valid indicates whether the value is a known member of the ACMProviderHintsPlatform enum.

type Cluster

type Cluster struct {
	// ApiEndpoint Kubernetes API endpoint URL (available when READY)
	ApiEndpoint *string `json:"api_endpoint,omitempty"`

	// ConsoleUri OpenShift console URI (available when READY)
	ConsoleUri *string `json:"console_uri,omitempty"`

	// CreateTime Timestamp when the cluster was created
	CreateTime *time.Time `json:"create_time,omitempty"`

	// Id DCM-level resource identifier. Server-generated UUID if not client-specified via the ?id= query parameter on creation. Used in URL paths and the path field.
	//
	// Example: 123e4567-e89b-12d3-a456-426614174000
	Id *string `json:"id,omitempty"`

	// Kubeconfig Base64-encoded kubeconfig for cluster access. Populated when cluster status is READY. Empty during PENDING, PROVISIONING, or FAILED states.
	Kubeconfig *string `json:"kubeconfig,omitempty"`

	// Path Resource path for this cluster
	//
	// Example: clusters/123e4567-e89b-12d3-a456-426614174000
	Path *string `json:"path,omitempty"`

	// Spec Service-type-specific input specification for a cluster
	Spec ClusterSpec `json:"spec"`

	// Status Current status of the cluster
	Status *ClusterStatus `json:"status,omitempty"`

	// StatusMessage Human-readable message about the current status
	StatusMessage *string `json:"status_message,omitempty"`

	// UpdateTime Timestamp when the cluster was last updated
	UpdateTime *time.Time `json:"update_time,omitempty"`
}

Cluster A cluster resource managed by ACM/HyperShift

type ClusterIdPath

type ClusterIdPath = string

ClusterIdPath defines model for ClusterIdPath.

type ClusterList

type ClusterList struct {
	// Clusters List of clusters
	Clusters *[]Cluster `json:"clusters,omitempty"`

	// NextPageToken Token to fetch the next page of results
	NextPageToken *string `json:"next_page_token,omitempty"`
}

ClusterList Paginated list of clusters

type ClusterMetadata

type ClusterMetadata struct {
	// Labels Key-value labels for the cluster
	Labels *map[string]string `json:"labels,omitempty"`

	// Name Human-readable cluster name. Used as the K8s HostedCluster metadata.name. Must be unique within the target namespace.
	Name string `json:"name"`
}

ClusterMetadata Metadata for the cluster

type ClusterNodes

type ClusterNodes struct {
	// ControlPlane Control plane node specification
	ControlPlane *ControlPlaneSpec `json:"control_plane,omitempty"`

	// Workers Worker node specification
	Workers *WorkerSpec `json:"workers,omitempty"`
}

ClusterNodes Node configuration for the cluster

type ClusterSpec

type ClusterSpec struct {
	// Metadata Metadata for the cluster
	Metadata ClusterMetadata `json:"metadata"`

	// Nodes Node configuration for the cluster
	Nodes *ClusterNodes `json:"nodes,omitempty"`

	// ProviderHints Provider-specific configuration hints
	ProviderHints *ProviderHints `json:"provider_hints,omitempty"`

	// ServiceType Service type identifier. Must be "cluster" for this SP.
	ServiceType ClusterSpecServiceType `json:"service_type"`

	// Version Kubernetes minor version for the cluster (e.g., "1.30"). Mapped internally to an OpenShift version via the compatibility matrix (OCP 4.x = K8s 1.(x+13)) and resolved to a ClusterImageSet on the ACM Hub.
	Version string `json:"version"`
}

ClusterSpec Service-type-specific input specification for a cluster

type ClusterSpecServiceType

type ClusterSpecServiceType string

ClusterSpecServiceType Service type identifier. Must be "cluster" for this SP.

const (
	ClusterSpecServiceTypeCluster ClusterSpecServiceType = "cluster"
)

Defines values for ClusterSpecServiceType.

func (ClusterSpecServiceType) Valid

func (e ClusterSpecServiceType) Valid() bool

Valid indicates whether the value is a known member of the ClusterSpecServiceType enum.

type ClusterStatus

type ClusterStatus string

ClusterStatus Current status of the cluster

const (
	ClusterStatusDELETED      ClusterStatus = "DELETED"
	ClusterStatusDELETING     ClusterStatus = "DELETING"
	ClusterStatusFAILED       ClusterStatus = "FAILED"
	ClusterStatusPENDING      ClusterStatus = "PENDING"
	ClusterStatusPROVISIONING ClusterStatus = "PROVISIONING"
	ClusterStatusREADY        ClusterStatus = "READY"
	ClusterStatusUNAVAILABLE  ClusterStatus = "UNAVAILABLE"
)

Defines values for ClusterStatus.

func (ClusterStatus) Valid

func (e ClusterStatus) Valid() bool

Valid indicates whether the value is a known member of the ClusterStatus enum.

type ControlPlaneSpec

type ControlPlaneSpec struct {
	// Count Number of control plane nodes
	Count *ControlPlaneSpecCount `json:"count,omitempty"`

	// Cpu Number of CPU cores per control plane node
	Cpu *int `json:"cpu,omitempty"`

	// Memory Memory per control plane node (e.g., "16GB", "32GB")
	//
	// Example: 16GB
	Memory *string `json:"memory,omitempty"`

	// Storage Storage per control plane node (e.g., "120GB", "500GB")
	//
	// Example: 120GB
	Storage *string `json:"storage,omitempty"`
}

ControlPlaneSpec Control plane node specification

type ControlPlaneSpecCount

type ControlPlaneSpecCount int

ControlPlaneSpecCount Number of control plane nodes

Defines values for ControlPlaneSpecCount.

func (ControlPlaneSpecCount) Valid

func (e ControlPlaneSpecCount) Valid() bool

Valid indicates whether the value is a known member of the ControlPlaneSpecCount enum.

type CreateClusterJSONRequestBody

type CreateClusterJSONRequestBody = Cluster

CreateClusterJSONRequestBody defines body for CreateCluster for application/json ContentType.

type CreateClusterParams

type CreateClusterParams struct {
	// Id Client-assigned resource identifier (AEP-133). If omitted, the server generates a UUID. Must be unique among all resources managed by this SP.
	Id *string `form:"id,omitempty" json:"id,omitempty"`
}

CreateClusterParams defines parameters for CreateCluster.

type Error

type Error struct {
	// Detail Human-readable explanation specific to this occurrence
	Detail *string `json:"detail,omitempty"`

	// Instance URI reference for this specific error occurrence
	Instance *string `json:"instance,omitempty"`

	// Status HTTP status code
	Status *int32 `json:"status,omitempty"`

	// Title Short, human-readable summary of the problem
	Title string `json:"title"`

	// Type URI reference identifying the error type
	Type ErrorType `json:"type"`
}

Error RFC 9457 compliant error response (Problem Details for HTTP APIs).

Defined problem types:

| Type URI | Title | HTTP Status |
|----------|-------|-------------|
| .../problems/invalid-argument | Invalid argument | 400 |
| .../problems/not-found | Not found | 404 |
| .../problems/already-exists | Already exists | 409 |
| .../problems/unprocessable-entity | Unprocessable entity | 422 |
| .../problems/internal | Internal Server Error | 500 |
| .../problems/unavailable | Service unavailable | 503 |
| .../problems/permission-denied | Permission denied | 403 |
| .../problems/unauthenticated | Unauthenticated | 401 |

Note: permission-denied and unauthenticated are defined in the enum but not yet emitted by any handler. Titles follow the humanized-slug convention for forward-compatibility with K8s Container SP.

type ErrorType

type ErrorType string

ErrorType URI reference identifying the error type

const (
	ErrorTypeALREADYEXISTS       ErrorType = "https://dcm-project.github.io/problems/already-exists"
	ErrorTypeINTERNAL            ErrorType = "https://dcm-project.github.io/problems/internal"
	ErrorTypeINVALIDARGUMENT     ErrorType = "https://dcm-project.github.io/problems/invalid-argument"
	ErrorTypeNOTFOUND            ErrorType = "https://dcm-project.github.io/problems/not-found"
	ErrorTypePERMISSIONDENIED    ErrorType = "https://dcm-project.github.io/problems/permission-denied"
	ErrorTypeUNAUTHENTICATED     ErrorType = "https://dcm-project.github.io/problems/unauthenticated"
	ErrorTypeUNAVAILABLE         ErrorType = "https://dcm-project.github.io/problems/unavailable"
	ErrorTypeUNPROCESSABLEENTITY ErrorType = "https://dcm-project.github.io/problems/unprocessable-entity"
)

Defines values for ErrorType.

func (ErrorType) Valid

func (e ErrorType) Valid() bool

Valid indicates whether the value is a known member of the ErrorType enum.

type Health

type Health struct {
	// Path Canonical path of the resource
	//
	// Example: health
	Path *string `json:"path,omitempty"`

	// Status Health status
	//
	// Example: healthy
	Status *string `json:"status,omitempty"`

	// Type Resource type identifier
	//
	// Example: acm-cluster-service-provider.dcm.io/health
	Type *string `json:"type,omitempty"`

	// Uptime Seconds since SP started
	//
	// Example: 3600
	Uptime *int `json:"uptime,omitempty"`

	// Version SP build version string
	//
	// Example: 1.0.0
	Version *string `json:"version,omitempty"`
}

Health Health status singleton resource

type ListClustersParams

type ListClustersParams struct {
	// PageToken Token for fetching the next page of results
	PageToken *string `form:"page_token,omitempty" json:"page_token,omitempty"`

	// MaxPageSize Maximum number of results to return per page
	MaxPageSize *int32 `form:"max_page_size,omitempty" json:"max_page_size,omitempty"`
}

ListClustersParams defines parameters for ListClusters.

type ProviderHints

type ProviderHints struct {
	// Acm ACM-specific provider hints
	Acm                  *ACMProviderHints      `json:"acm,omitempty"`
	AdditionalProperties map[string]interface{} `json:"-"`
}

ProviderHints Provider-specific configuration hints

func (ProviderHints) Get

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

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

func (ProviderHints) MarshalJSON

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

Override default JSON handling for ProviderHints to handle AdditionalProperties

func (*ProviderHints) Set

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

Setter for additional properties for ProviderHints

func (*ProviderHints) UnmarshalJSON

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

Override default JSON handling for ProviderHints to handle AdditionalProperties

type WorkerSpec

type WorkerSpec struct {
	// Count Number of worker nodes
	Count *int `json:"count,omitempty"`

	// Cpu Number of CPU cores per worker node
	Cpu *int `json:"cpu,omitempty"`

	// Memory Memory per worker node (e.g., "16GB", "32GB")
	//
	// Example: 16GB
	Memory *string `json:"memory,omitempty"`

	// Storage Storage per worker node (e.g., "120GB", "500GB")
	//
	// Example: 120GB
	Storage *string `json:"storage,omitempty"`
}

WorkerSpec Worker node specification

Jump to

Keyboard shortcuts

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