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 CreateProviderJSONRequestBody
- type CreateProviderParams
- type Error
- type Health
- type ListProvidersParams
- type Provider
- type ProviderList
- type ProviderMetadata
- type ProviderStatus
- type ProviderType
- type ResourceCapacity
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 CreateProviderJSONRequestBody ¶
type CreateProviderJSONRequestBody = Provider
CreateProviderJSONRequestBody defines body for CreateProvider for application/json ContentType.
type CreateProviderParams ¶
type CreateProviderParams struct {
// Id Optional provider ID for idempotent registration
Id *string `form:"id,omitempty" json:"id,omitempty"`
}
CreateProviderParams defines parameters for CreateProvider.
type Error ¶
type Error struct {
// Detail Human-readable explanation specific to this occurrence
//
// Example: service type 'vm' is already served by provider 'vm-provider'
Detail *string `json:"detail,omitempty"`
// Instance URI reference for this specific error occurrence
Instance *string `json:"instance,omitempty"`
// Status HTTP status code
//
// Example: 409
Status *int `json:"status,omitempty"`
// Title Short human-readable summary of the problem
//
// Example: Service Type Conflict
Title string `json:"title"`
// Type URI reference identifying the error type
//
// Example: CONFLICT
Type string `json:"type"`
}
Error RFC 7807 compliant error response
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"`
}
Health Health status singleton resource
type ListProvidersParams ¶
type ListProvidersParams struct {
// MaxPageSize Maximum number of results per page
MaxPageSize *int `form:"max_page_size,omitempty" json:"max_page_size,omitempty"`
// PageToken Token for retrieving the next page of results.
// Obtained from the next_page_token field of a previous response.
PageToken *string `form:"page_token,omitempty" json:"page_token,omitempty"`
}
ListProvidersParams defines parameters for ListProviders.
type Provider ¶
type Provider struct {
// CreateTime Timestamp when the provider was first registered
CreateTime *time.Time `json:"create_time,omitempty"`
// DisplayName Human-readable display name for the provider
//
// Example: Database Service Provider
DisplayName *string `json:"display_name,omitempty"`
// Endpoint URL where the agent can reach the SP
//
// Example: https://sp.example.com:8080
Endpoint string `json:"endpoint"`
// Id Unique identifier for the Service Provider
//
// Example: sp-db-001
Id *string `json:"id,omitempty"`
// LastCheckTime Timestamp of the last health check
//
// Example: 2026-06-05T10:30:00Z
LastCheckTime *time.Time `json:"last_check_time,omitempty"`
// Metadata Additional metadata about the provider
Metadata *ProviderMetadata `json:"metadata,omitempty"`
// Name Unique name of the Service Provider (natural key)
//
// Example: db-provider
Name string `json:"name"`
// Operations List of operations supported for this service type
//
// Example: ["create","delete","update"]
Operations *[]string `json:"operations,omitempty"`
// Path Resource path identifier
//
// Example: providers/sp-db-001
Path *string `json:"path,omitempty"`
// SchemaVersion Schema version of the service type the SP supports
//
// Example: v1alpha1
SchemaVersion string `json:"schema_version"`
// ServiceType Type of service this provider offers (one per SP)
//
// Example: database
ServiceType string `json:"service_type"`
// Status Current health state of the provider
//
// Example: Ready
Status *ProviderStatus `json:"status,omitempty"`
// Type Whether the SP is embedded or external
//
// Example: external
Type *ProviderType `json:"type,omitempty"`
// UpdateTime Timestamp when the provider was last updated
UpdateTime *time.Time `json:"update_time,omitempty"`
}
Provider Service Provider registration resource
type ProviderList ¶
type ProviderList struct {
// NextPageToken Token for retrieving the next page of results
NextPageToken *string `json:"next_page_token,omitempty"`
Results *[]Provider `json:"results,omitempty"`
}
ProviderList Paginated list of providers
type ProviderMetadata ¶
type ProviderMetadata struct {
// RegionCode Geographic region code where the provider operates
//
// Example: us-east-1
RegionCode *string `json:"region_code,omitempty"`
// Resources Resource capacity information
Resources *ResourceCapacity `json:"resources,omitempty"`
// Status Current operational status of the provider
//
// Example: healthy
Status *string `json:"status,omitempty"`
// Zone Availability zone or datacenter identifier
//
// Example: datacenter-b
Zone *string `json:"zone,omitempty"`
AdditionalProperties map[string]interface{} `json:"-"`
}
ProviderMetadata Additional metadata about the provider
func (ProviderMetadata) Get ¶
func (a ProviderMetadata) Get(fieldName string) (value interface{}, found bool)
Getter for additional properties for ProviderMetadata. Returns the specified element and whether it was found
func (ProviderMetadata) MarshalJSON ¶
func (a ProviderMetadata) MarshalJSON() ([]byte, error)
Override default JSON handling for ProviderMetadata to handle AdditionalProperties
func (*ProviderMetadata) Set ¶
func (a *ProviderMetadata) Set(fieldName string, value interface{})
Setter for additional properties for ProviderMetadata
func (*ProviderMetadata) UnmarshalJSON ¶
func (a *ProviderMetadata) UnmarshalJSON(b []byte) error
Override default JSON handling for ProviderMetadata to handle AdditionalProperties
type ProviderStatus ¶
type ProviderStatus string
ProviderStatus Current health state of the provider
Example: Ready
const ( Ready ProviderStatus = "Ready" Unhealthy ProviderStatus = "Unhealthy" )
Defines values for ProviderStatus.
func (ProviderStatus) Valid ¶
func (e ProviderStatus) Valid() bool
Valid indicates whether the value is a known member of the ProviderStatus enum.
type ProviderType ¶
type ProviderType string
ProviderType Whether the SP is embedded or external
Example: external
const ( Embedded ProviderType = "embedded" External ProviderType = "external" )
Defines values for ProviderType.
func (ProviderType) Valid ¶
func (e ProviderType) Valid() bool
Valid indicates whether the value is a known member of the ProviderType enum.
type ResourceCapacity ¶
type ResourceCapacity struct {
// TotalCpu Total CPU cores available
//
// Example: 200
TotalCpu *string `json:"total_cpu,omitempty"`
// TotalMemory Total memory available
//
// Example: 1TB
TotalMemory *string `json:"total_memory,omitempty"`
// TotalNode Total number of nodes
//
// Example: 100
TotalNode *int `json:"total_node,omitempty"`
// TotalStorage Total storage available
//
// Example: 2TB
TotalStorage *string `json:"total_storage,omitempty"`
}
ResourceCapacity Resource capacity information