v1

package
v1.1.7 Latest Latest
Warning

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

Go to latest
Published: Jul 9, 2025 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AccountStatusResponse added in v0.3.0

type AccountStatusResponse struct {
	HTTPStatusCode int           `json:"http_code,omitempty"` // http response status code
	Status         models.Status `json:"status,omitempty"`
}

func (*AccountStatusResponse) Render added in v0.3.0

type BasePlacement added in v1.1.6

type BasePlacement struct {
	Reservation string             `json:"reservation,omitempty"`
	Resources   []ResourceRequest  `json:"resources"`
	Annotations models.Annotations `json:"annotations,omitempty"`
}

func (*BasePlacement) Bind added in v1.1.6

func (p *BasePlacement) Bind(r *http.Request) error

type Error

type Error struct {
	Err            error `json:"-"`                   // low-level runtime error
	HTTPStatusCode int   `json:"http_code,omitempty"` // http response status code

	Message        string   `json:"message"`                   // user-facing
	AppCode        int64    `json:"code,omitempty"`            // application-specific error code
	ErrorText      string   `json:"error,omitempty"`           // application-level error message, for debugging
	ErrorMultiline []string `json:"error_multiline,omitempty"` // application-level error message, for debugging
}

func (*Error) Render

func (p *Error) Render(w http.ResponseWriter, r *http.Request) error

type HealthCheckResult

type HealthCheckResult struct {
	HTTPStatusCode int    `json:"http_code,omitempty"` // http response status code
	Message        string `json:"message"`
}

type LifecycleRequestResponse added in v0.3.0

type LifecycleRequestResponse struct {
	HTTPStatusCode int    `json:"http_code,omitempty"` // http response status code
	Message        string `json:"message"`
	RequestID      string `json:"request_id,omitempty"`
	Status         string `json:"status,omitempty"`
}

func (*LifecycleRequestResponse) Render added in v0.3.0

type PlacementDryRunRequest added in v1.1.6

type PlacementDryRunRequest struct {
	BasePlacement
}

type PlacementDryRunResponse added in v1.1.6

type PlacementDryRunResponse struct {
	OverallAvailable bool                    `json:"overallAvailable"`
	OverallMessage   string                  `json:"overallMessage"`
	Results          []*ResourceDryRunResult `json:"results"`

	// Embedding for renderer
	HTTPStatusCode int `json:"-"`
}

PlacementDryRunResponse is the consolidated response for a dry-run request.

func (*PlacementDryRunResponse) Render added in v1.1.6

Render is a no-op for the renderer interface.

type PlacementRequest

type PlacementRequest struct {
	ServiceUuid string `json:"service_uuid"`
	Provider    string `json:"provider,omitempty"`

	BasePlacement
}

type PlacementResponse

type PlacementResponse struct {
	HTTPStatusCode int    `json:"http_code,omitempty"` // http response status code
	Message        string `json:"message"`
	Placement      models.PlacementWithCreds
}

func (*PlacementResponse) Render

type PlacementStatusResponse added in v0.3.3

type PlacementStatusResponse struct {
	HTTPStatusCode int             `json:"http_code,omitempty"` // http response status code
	Status         []models.Status `json:"status,omitempty"`
}

func (*PlacementStatusResponse) Render added in v0.3.3

type ReservationRenameRequest added in v1.1.1

type ReservationRenameRequest struct {
	NewName string `json:"new_name"`
}

func (*ReservationRenameRequest) Bind added in v1.1.1

func (*ReservationRenameRequest) Render added in v1.1.1

type ReservationResponse added in v0.3.5

type ReservationResponse struct {
	HTTPStatusCode int                 `json:"http_code,omitempty"` // http response status code
	Message        string              `json:"message"`
	Reservation    *models.Reservation `json:"reservation"`
}

func (*ReservationResponse) Render added in v0.3.5

type ResourceDryRunResult added in v1.1.6

type ResourceDryRunResult struct {
	Kind                    string `json:"kind"`
	Available               bool   `json:"available"`
	Message                 string `json:"message"`
	SchedulableClusterCount int    `json:"schedulable_cluster_count"`
	Error                   string `json:"error,omitempty"` // Optional: to report specific errors
}

ResourceDryRunResult holds the dry-run result for a single resource.

type ResourceRequest

type ResourceRequest struct {
	Alias            string                   `json:"alias,omitempty"`
	Annotations      models.Annotations       `json:"annotations,omitempty"`
	CloudPreference  models.Annotations       `json:"cloud_preference,omitempty"`
	CloudSelector    models.Annotations       `json:"cloud_selector,omitempty"`
	ClusterCondition string                   `json:"cluster_condition,omitempty"`
	ClusterRelation  []models.ClusterRelation `json:"cluster_relation,omitempty"`
	Count            int                      `json:"count"`
	Kind             string                   `json:"kind"`
	LimitRange       *v1.LimitRange           `json:"limit_range,omitempty"`
	Quota            *v1.ResourceList         `json:"quota,omitempty"`
	RequestedQuota   *v1.ResourceQuota        `json:"-"` // plumbing
}

func (*ResourceRequest) Bind

func (p *ResourceRequest) Bind(r *http.Request) error

type ResourcesResponse added in v0.3.5

type ResourcesResponse struct {
	HTTPStatusCode int    `json:"http_code,omitempty"` // http response status code
	Message        string `json:"message"`
	Resources      []any  `json:"resources,omitempty"`
	Count          int    `json:"count"`
}

func (*ResourcesResponse) Render added in v0.3.5

type SimpleMessage

type SimpleMessage struct {
	Message          string   `json:"message"`
	MessageMultiline []string `json:"message_multiline,omitempty"`
}

func (*SimpleMessage) Render

type TokenRequest

type TokenRequest struct {
	Claims map[string]any `json:"claims"`
}

func (*TokenRequest) Bind

func (t *TokenRequest) Bind(r *http.Request) error

type TokenResponse

type TokenResponse struct {
	Token           string     `json:"token,omitempty"`
	AccessToken     string     `json:"access_token,omitempty"`
	RefreshToken    string     `json:"refresh_token,omitempty"`
	Exp             *time.Time `json:"exp,omitempty"`
	AccessTokenExp  *time.Time `json:"access_token_exp,omitempty"`
	RefreshTokenExp *time.Time `json:"refresh_token_exp,omitempty"`
}

func (*TokenResponse) Render

type UpdateDNSAccountConfigurationRequest added in v1.1.0

type UpdateDNSAccountConfigurationRequest struct {
	Annotations        *models.Annotations `json:"annotations,omitempty"`
	AwsAccessKeyID     string              `json:"aws_access_key_id"`
	AwsSecretAccessKey string              `json:"aws_secret_access_key"`
	AdditionalVars     map[string]any      `json:"additional_vars,omitempty"`
}

func (*UpdateDNSAccountConfigurationRequest) Bind added in v1.1.0

type UpdateIBMResourceGroupSandboxConfigurationRequest added in v1.1.0

type UpdateIBMResourceGroupSandboxConfigurationRequest struct {
	Annotations    *models.Annotations `json:"annotations,omitempty"`
	APIKey         *string             `json:"apikey,omitempty"`
	AdditionalVars map[string]any      `json:"additional_vars,omitempty"`
}

func (*UpdateIBMResourceGroupSandboxConfigurationRequest) Bind added in v1.1.0

type UpdateOcpSharedConfigurationRequest added in v1.0.0

type UpdateOcpSharedConfigurationRequest struct {
	DefaultSandboxQuota       *v1.ResourceQuota   `json:"default_sandbox_quota,omitempty"`
	QuotaRequired             *bool               `json:"quota_required"`
	StrictDefaultSandboxQuota *bool               `json:"strict_default_sandbox_quota"`
	SkipQuota                 *bool               `json:"skip_quota,omitempty"`
	Annotations               *models.Annotations `json:"annotations,omitempty"`
	Token                     *string             `json:"token,omitempty"`
	AdditionalVars            map[string]any      `json:"additional_vars,omitempty"`
	MaxMemoryUsagePercentage  *float64            `json:"max_memory_usage_percentage,omitempty"`
	MaxCpuUsagePercentage     *float64            `json:"max_cpu_usage_percentage,omitempty"`
	UsageNodeSelector         *string             `json:"usage_node_selector,omitempty"`
	LimitRange                *v1.LimitRange      `json:"limit_range,omitempty"`
}

func (*UpdateOcpSharedConfigurationRequest) Bind added in v1.0.0

Jump to

Keyboard shortcuts

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