Documentation
¶
Index ¶
- type AccountStatusResponse
- type BasePlacement
- type Error
- type HealthCheckResult
- type LifecycleResponse
- type OffboardPlacementInfo
- type OffboardReport
- type PlacementDryRunRequest
- type PlacementDryRunResponse
- type PlacementRequest
- type PlacementResponse
- type PlacementStatusResponse
- type ReservationRenameRequest
- type ReservationResponse
- type ResourceDryRunResult
- type ResourceRequest
- type ResourcesResponse
- type SimpleMessage
- type TokenActivityResponse
- type TokenRequest
- type TokenResponse
- type UpdateDNSAccountConfigurationRequest
- type UpdateIBMResourceGroupSandboxConfigurationRequest
- type UpdateOcpSharedConfigurationRequest
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
models.Status
}
func (*AccountStatusResponse) Render ¶ added in v0.3.0
func (p *AccountStatusResponse) Render(w http.ResponseWriter, r *http.Request) error
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"`
}
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
}
type HealthCheckResult ¶
type LifecycleResponse ¶ added in v1.1.8
type LifecycleResponse 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"`
LifecycleResult models.Status `json:"lifecycle_result,omitempty"`
}
func (*LifecycleResponse) Render ¶ added in v1.1.8
func (p *LifecycleResponse) Render(w http.ResponseWriter, r *http.Request) error
type OffboardPlacementInfo ¶ added in v1.2.0
type OffboardPlacementInfo struct {
PlacementID int `json:"placement_id"`
ServiceUuid string `json:"service_uuid"`
Status string `json:"status,omitempty"`
ClusterNames []string `json:"cluster_names,omitempty"`
}
OffboardPlacementInfo describes a placement found during cluster offboarding.
type OffboardReport ¶ added in v1.2.0
type OffboardReport struct {
ClusterName string `json:"cluster_name"`
ClusterDisabled bool `json:"cluster_disabled"`
PlacementsDeleted []OffboardPlacementInfo `json:"placements_deleted"`
PlacementsRequiringManualCleanup []OffboardPlacementInfo `json:"placements_requiring_manual_cleanup"`
ClusterDeleted bool `json:"cluster_deleted"`
Message string `json:"message"`
}
OffboardReport is the response returned by the offboard endpoint.
func (*OffboardReport) Render ¶ added in v1.2.0
func (r *OffboardReport) Render(w http.ResponseWriter, rr *http.Request) error
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
func (resp *PlacementDryRunResponse) Render(w http.ResponseWriter, r *http.Request) error
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 ¶
func (p *PlacementResponse) Render(w http.ResponseWriter, r *http.Request) error
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
func (p *PlacementStatusResponse) Render(w http.ResponseWriter, r *http.Request) error
type ReservationRenameRequest ¶ added in v1.1.1
type ReservationRenameRequest struct {
NewName string `json:"new_name"`
}
func (*ReservationRenameRequest) Bind ¶ added in v1.1.1
func (p *ReservationRenameRequest) Bind(r *http.Request) error
func (*ReservationRenameRequest) Render ¶ added in v1.1.1
func (p *ReservationRenameRequest) Render(w http.ResponseWriter, r *http.Request) error
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
func (p *ReservationResponse) Render(w http.ResponseWriter, r *http.Request) error
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"`
SchedulableClusterNames []string `json:"schedulable_cluster_names,omitempty"`
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"`
KeycloakUserPrefix string `json:"keycloak_user_prefix,omitempty"`
LimitRange *v1.LimitRange `json:"limit_range,omitempty"`
Quota *v1.ResourceList `json:"quota,omitempty"`
RequestedQuota *v1.ResourceQuota `json:"-"` // plumbing
}
func (*ResourceRequest) UnmarshalJSON ¶ added in v1.1.20
func (r *ResourceRequest) UnmarshalJSON(data []byte) error
UnmarshalJSON handles the shorthand limit_range format where "default" and "defaultRequest" are at the top level instead of inside spec.limits[].
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
func (o *ResourcesResponse) Render(w http.ResponseWriter, r *http.Request) error
type SimpleMessage ¶
type SimpleMessage struct {
Message string `json:"message"`
MessageMultiline []string `json:"message_multiline,omitempty"`
}
func (*SimpleMessage) Render ¶
func (p *SimpleMessage) Render(w http.ResponseWriter, r *http.Request) error
type TokenActivityResponse ¶ added in v1.2.0
type TokenActivityResponse struct {
Token models.Token `json:"token"`
Activity []models.AuditEntry `json:"activity"`
}
func (*TokenActivityResponse) Render ¶ added in v1.2.0
func (t *TokenActivityResponse) Render(w http.ResponseWriter, r *http.Request) error
type TokenRequest ¶
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 ¶
func (t *TokenResponse) Render(w http.ResponseWriter, r *http.Request) error
type UpdateDNSAccountConfigurationRequest ¶ 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"`
}
type UpdateOcpSharedConfigurationRequest ¶ added in v1.0.0
type UpdateOcpSharedConfigurationRequest struct {
}
Click to show internal directories.
Click to hide internal directories.