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 Container

type Container struct {
	// CreateTime Timestamp when the container was created
	CreateTime *time.Time `json:"create_time,omitempty"`

	// Id Unique identifier for the container instance
	//
	// Example: my-nginx-container
	Id *string `json:"id,omitempty"`

	// Path Resource path identifier
	//
	// Example: containers/my-nginx-container
	Path    *string      `json:"path,omitempty"`
	Service *ServiceInfo `json:"service,omitempty"`

	// Spec Container specification with input fields for creating a container
	Spec   ContainerSpec    `json:"spec"`
	Status *ContainerStatus `json:"status,omitempty"`

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

Container Container resource representing a container instance

type ContainerCpu

type ContainerCpu struct {
	// Max Maximum allowed CPU cores
	Max int `json:"max"`

	// Min Minimum guaranteed CPU cores
	Min                  int                    `json:"min"`
	AdditionalProperties map[string]interface{} `json:"-"`
}

ContainerCpu CPU resource constraints

func (ContainerCpu) Get

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

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

func (ContainerCpu) MarshalJSON

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

Override default JSON handling for ContainerCpu to handle AdditionalProperties

func (*ContainerCpu) Set

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

Setter for additional properties for ContainerCpu

func (*ContainerCpu) UnmarshalJSON

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

Override default JSON handling for ContainerCpu to handle AdditionalProperties

type ContainerEnvVar

type ContainerEnvVar struct {
	// Name Environment variable name
	Name string `json:"name"`

	// Value Environment variable value
	Value                string                 `json:"value"`
	AdditionalProperties map[string]interface{} `json:"-"`
}

ContainerEnvVar Environment variable definition

func (ContainerEnvVar) Get

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

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

func (ContainerEnvVar) MarshalJSON

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

Override default JSON handling for ContainerEnvVar to handle AdditionalProperties

func (*ContainerEnvVar) Set

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

Setter for additional properties for ContainerEnvVar

func (*ContainerEnvVar) UnmarshalJSON

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

Override default JSON handling for ContainerEnvVar to handle AdditionalProperties

type ContainerIdPath

type ContainerIdPath = string

ContainerIdPath defines model for ContainerIdPath.

type ContainerImage

type ContainerImage struct {
	// Reference Complete OCI image reference.
	// Format: [REGISTRY/]REPOSITORY[:TAG|@DIGEST]
	//
	//
	// Example: quay.io/myapp:v1.2
	Reference            string                 `json:"reference"`
	AdditionalProperties map[string]interface{} `json:"-"`
}

ContainerImage Container image specification

func (ContainerImage) Get

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

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

func (ContainerImage) MarshalJSON

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

Override default JSON handling for ContainerImage to handle AdditionalProperties

func (*ContainerImage) Set

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

Setter for additional properties for ContainerImage

func (*ContainerImage) UnmarshalJSON

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

Override default JSON handling for ContainerImage to handle AdditionalProperties

type ContainerList

type ContainerList struct {
	Containers *[]Container `json:"containers,omitempty"`

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

ContainerList Paginated list of container instances

type ContainerMemory

type ContainerMemory struct {
	// Max Maximum allowed memory with unit (e.g., "2GB", "4GB")
	Max string `json:"max"`

	// Min Minimum guaranteed memory with unit (e.g., "1GB", "2GB")
	Min                  string                 `json:"min"`
	AdditionalProperties map[string]interface{} `json:"-"`
}

ContainerMemory Memory resource constraints

func (ContainerMemory) Get

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

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

func (ContainerMemory) MarshalJSON

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

Override default JSON handling for ContainerMemory to handle AdditionalProperties

func (*ContainerMemory) Set

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

Setter for additional properties for ContainerMemory

func (*ContainerMemory) UnmarshalJSON

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

Override default JSON handling for ContainerMemory to handle AdditionalProperties

type ContainerMetadata

type ContainerMetadata struct {
	// Labels Custom key-value pairs for tagging and filtering
	Labels *map[string]string `json:"labels,omitempty"`

	// Name Resource name identifier
	Name string `json:"name"`

	// Namespace Kubernetes namespace where resources were created
	Namespace *string `json:"namespace,omitempty"`
}

ContainerMetadata Resource metadata for identification

type ContainerNetwork

type ContainerNetwork struct {
	// Ip Pod IP address
	Ip *string `json:"ip,omitempty"`

	// Ports Container ports to expose
	Ports                *[]ContainerPort       `json:"ports,omitempty"`
	AdditionalProperties map[string]interface{} `json:"-"`
}

ContainerNetwork Network configuration

func (ContainerNetwork) Get

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

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

func (ContainerNetwork) MarshalJSON

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

Override default JSON handling for ContainerNetwork to handle AdditionalProperties

func (*ContainerNetwork) Set

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

Setter for additional properties for ContainerNetwork

func (*ContainerNetwork) UnmarshalJSON

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

Override default JSON handling for ContainerNetwork to handle AdditionalProperties

type ContainerPort

type ContainerPort struct {
	// ContainerPort Port number inside container
	ContainerPort int `json:"container_port"`

	// Visibility How this port is exposed to consumers.
	// - none: Port is not exposed outside the container process
	// - internal: Exposed to the host or cluster network
	//   (e.g., Docker -p, Kubernetes ClusterIP Service)
	// - external: Reachable from outside the host/cluster
	//   (e.g., OpenShift Route, Kubernetes Ingress/LoadBalancer)
	//
	//
	// Example: internal
	Visibility           ContainerPortVisibility `json:"visibility"`
	AdditionalProperties map[string]interface{}  `json:"-"`
}

ContainerPort Container port definition

func (ContainerPort) Get

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

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

func (ContainerPort) MarshalJSON

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

Override default JSON handling for ContainerPort to handle AdditionalProperties

func (*ContainerPort) Set

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

Setter for additional properties for ContainerPort

func (*ContainerPort) UnmarshalJSON

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

Override default JSON handling for ContainerPort to handle AdditionalProperties

type ContainerPortVisibility

type ContainerPortVisibility string

ContainerPortVisibility How this port is exposed to consumers.

  • none: Port is not exposed outside the container process
  • internal: Exposed to the host or cluster network (e.g., Docker -p, Kubernetes ClusterIP Service)
  • external: Reachable from outside the host/cluster (e.g., OpenShift Route, Kubernetes Ingress/LoadBalancer)

Example: internal

const (
	External ContainerPortVisibility = "external"
	Internal ContainerPortVisibility = "internal"
	None     ContainerPortVisibility = "none"
)

Defines values for ContainerPortVisibility.

func (ContainerPortVisibility) Valid

func (e ContainerPortVisibility) Valid() bool

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

type ContainerProcess

type ContainerProcess struct {
	// Args Arguments to the entrypoint
	Args *[]string `json:"args,omitempty"`

	// Command Entrypoint override
	Command *[]string `json:"command,omitempty"`

	// Env Environment variables
	Env                  *[]ContainerEnvVar     `json:"env,omitempty"`
	AdditionalProperties map[string]interface{} `json:"-"`
}

ContainerProcess Container process configuration

func (ContainerProcess) Get

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

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

func (ContainerProcess) MarshalJSON

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

Override default JSON handling for ContainerProcess to handle AdditionalProperties

func (*ContainerProcess) Set

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

Setter for additional properties for ContainerProcess

func (*ContainerProcess) UnmarshalJSON

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

Override default JSON handling for ContainerProcess to handle AdditionalProperties

type ContainerResources

type ContainerResources struct {
	// Cpu CPU resource constraints
	Cpu ContainerCpu `json:"cpu"`

	// Memory Memory resource constraints
	Memory               ContainerMemory        `json:"memory"`
	AdditionalProperties map[string]interface{} `json:"-"`
}

ContainerResources CPU and memory resource constraints

func (ContainerResources) Get

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

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

func (ContainerResources) MarshalJSON

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

Override default JSON handling for ContainerResources to handle AdditionalProperties

func (*ContainerResources) Set

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

Setter for additional properties for ContainerResources

func (*ContainerResources) UnmarshalJSON

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

Override default JSON handling for ContainerResources to handle AdditionalProperties

type ContainerSpec

type ContainerSpec struct {
	// Image Container image specification
	Image ContainerImage `json:"image"`

	// Metadata Resource metadata for identification
	Metadata ContainerMetadata `json:"metadata"`

	// Network Network configuration
	Network *ContainerNetwork `json:"network,omitempty"`

	// Process Container process configuration
	Process *ContainerProcess `json:"process,omitempty"`

	// ProviderHints Optional provider-specific hints from the catalog (accepted, not acted upon)
	ProviderHints *map[string]interface{} `json:"provider_hints,omitempty"`

	// Resources CPU and memory resource constraints
	Resources ContainerResources `json:"resources"`

	// ServiceType Service type identifier (must be "container")
	ServiceType ContainerSpecServiceType `json:"service_type"`
}

ContainerSpec Container specification with input fields for creating a container

type ContainerSpecServiceType

type ContainerSpecServiceType string

ContainerSpecServiceType Service type identifier (must be "container")

const (
	ContainerSpecServiceTypeContainer ContainerSpecServiceType = "container"
)

Defines values for ContainerSpecServiceType.

func (ContainerSpecServiceType) Valid

func (e ContainerSpecServiceType) Valid() bool

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

type ContainerStatus

type ContainerStatus string

ContainerStatus Current status of the container instance

const (
	DELETED ContainerStatus = "DELETED"
	FAILED  ContainerStatus = "FAILED"
	PENDING ContainerStatus = "PENDING"
	RUNNING ContainerStatus = "RUNNING"
	UNKNOWN ContainerStatus = "UNKNOWN"
)

Defines values for ContainerStatus.

func (ContainerStatus) Valid

func (e ContainerStatus) Valid() bool

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

type CreateContainerJSONRequestBody

type CreateContainerJSONRequestBody = Container

CreateContainerJSONRequestBody defines body for CreateContainer for application/json ContentType.

type CreateContainerParams

type CreateContainerParams struct {
	// Id Optional client-specified ID for the container. If not provided,
	// the server will generate an ID.
	//
	// Requirements (per AEP-122):
	// - 1-63 characters long
	// - Start with a lowercase letter or digit
	// - Contain only lowercase letters, numbers, and hyphens
	// - End with letter or number
	Id *string `form:"id,omitempty" json:"id,omitempty"`
}

CreateContainerParams defines parameters for CreateContainer.

type Error

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

	// Errors Present only when two or more same-type validation errors occur.
	// Each entry describes one validation failure. Never empty, never
	// single-entry. Top-level detail equals the first entry for backward
	// compatibility.
	Errors *[]ErrorDetail `json:"errors,omitempty"`

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

	// Pointer JSON Pointer fragment identifier (RFC 6901 §6) locating the request body field that caused this error, e.g. "#/spec/resources/cpu/min". Absent when the error cannot be attributed to a single request body field or is not a validation error.
	Pointer *string `json:"pointer,omitempty"`

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

	// Title Short human-readable summary
	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/permission-denied | Permission denied | 403 | | .../problems/unauthenticated | Unauthenticated | 401 | | .../problems/internal | Internal Server Error | 500 | | .../problems/unavailable | Service unavailable | 503 |

type ErrorDetail

type ErrorDetail struct {
	// Detail Human-readable explanation of this specific validation error
	Detail string `json:"detail"`

	// Pointer JSON Pointer fragment identifier (RFC 6901 §6) locating the request body field that caused this error, e.g. "#/spec/resources/cpu/min". Absent when the error cannot be attributed to a single request body field.
	Pointer *string `json:"pointer,omitempty"`
}

ErrorDetail Individual validation error within a multi-error response

type ErrorType

type ErrorType string

ErrorType URI reference identifying the error type

const (
	ALREADYEXISTS    ErrorType = "https://dcm-project.github.io/problems/already-exists"
	INTERNAL         ErrorType = "https://dcm-project.github.io/problems/internal"
	INVALIDARGUMENT  ErrorType = "https://dcm-project.github.io/problems/invalid-argument"
	NOTFOUND         ErrorType = "https://dcm-project.github.io/problems/not-found"
	PERMISSIONDENIED ErrorType = "https://dcm-project.github.io/problems/permission-denied"
	UNAUTHENTICATED  ErrorType = "https://dcm-project.github.io/problems/unauthenticated"
	UNAVAILABLE      ErrorType = "https://dcm-project.github.io/problems/unavailable"
)

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"`

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

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

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

Health Health status singleton resource

type ListContainersParams

type ListContainersParams struct {
	// MaxPageSize Maximum number of resources to return in a single page
	MaxPageSize *int32 `form:"max_page_size,omitempty" json:"max_page_size,omitempty"`

	// PageToken Token indicating the starting point for the page
	PageToken *string `form:"page_token,omitempty" json:"page_token,omitempty"`
}

ListContainersParams defines parameters for ListContainers.

type ServiceInfo

type ServiceInfo struct {
	// ClusterIp Cluster-internal IP address
	ClusterIp *string `json:"cluster_ip,omitempty"`

	// ExternalIp External IP address (for LoadBalancer type)
	ExternalIp *string `json:"external_ip,omitempty"`

	// Name Name of the Kubernetes Service
	Name *string `json:"name,omitempty"`

	// Ports Service ports
	Ports *[]ServicePort `json:"ports,omitempty"`

	// Type Service type
	Type *ServiceInfoType `json:"type,omitempty"`
}

ServiceInfo Kubernetes Service details

type ServiceInfoType

type ServiceInfoType string

ServiceInfoType Service type

const (
	ClusterIP    ServiceInfoType = "ClusterIP"
	LoadBalancer ServiceInfoType = "LoadBalancer"
	NodePort     ServiceInfoType = "NodePort"
)

Defines values for ServiceInfoType.

func (ServiceInfoType) Valid

func (e ServiceInfoType) Valid() bool

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

type ServicePort

type ServicePort struct {
	// Port Service port number
	Port int `json:"port"`

	// Protocol Protocol (TCP, UDP)
	Protocol *string `json:"protocol,omitempty"`

	// TargetPort Target container port
	TargetPort int `json:"target_port"`
}

ServicePort Service port details

Jump to

Keyboard shortcuts

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