Help us shape the future of Go! Take the 2026 Go Developer Survey

updater

package
v2.16.0 Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2026 License: BSD-3-Clause Imports: 1 Imported by: 3

Documentation

Index

Constants

View Source
const (
	// StatusChecked indicates a resource was checked.
	StatusChecked = "checked"
	// StatusUpdated indicates a resource was updated.
	StatusUpdated = "updated"
	// StatusRestarted indicates a resource was restarted because a dependency changed.
	StatusRestarted = "restarted"
	// StatusSkipped indicates a resource was skipped.
	StatusSkipped = "skipped"
	// StatusFailed indicates a resource failed to update.
	StatusFailed = "failed"
	// StatusUpToDate indicates a resource is already up to date.
	StatusUpToDate = "up_to_date"
	// StatusUpdateAvailable indicates an update is available.
	StatusUpdateAvailable = "update_available"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AutoUpdateRecord added in v2.16.0

type AutoUpdateRecord struct {
	ID               string         `json:"id"`
	CreatedAt        time.Time      `json:"createdAt" sortable:"true"`
	UpdatedAt        *time.Time     `json:"updatedAt,omitempty"`
	ResourceID       string         `json:"resourceId"`
	ResourceType     string         `json:"resourceType"`
	ResourceName     string         `json:"resourceName"`
	Status           string         `json:"status"`
	StartTime        time.Time      `json:"startTime"`
	EndTime          *time.Time     `json:"endTime,omitempty"`
	UpdateAvailable  bool           `json:"updateAvailable"`
	UpdateApplied    bool           `json:"updateApplied"`
	OldImageVersions map[string]any `json:"oldImageVersions,omitempty"`
	NewImageVersions map[string]any `json:"newImageVersions,omitempty"`
	Error            *string        `json:"error,omitempty"`
	Details          map[string]any `json:"details,omitempty"`
}

AutoUpdateRecord reports a persisted resource auto-update operation.

type CheckProjectInput added in v2.11.0

type CheckProjectInput struct {
	EnvironmentID string `path:"id" doc:"Environment ID"`
	ProjectID     string `path:"projectId" doc:"Project ID"`
}

CheckProjectInput identifies the project whose service policies should be checked.

type FrozenUpdateTarget added in v2.15.0

type FrozenUpdateTarget struct {
	ContainerID          string
	ContainerName        string
	ComposeProject       string
	ComposeService       string
	ComposeNumber        string
	BaselineImageID      string
	BaselineStartedAt    string
	BaselineRestartCount int
	DesiredImageRef      string
	DesiredDigest        string
}

FrozenUpdateTarget identifies the selected container and immutable image intent.

type Options

type Options struct {
	// Type filters updates by resource type ("image" | "container" | "project")
	Type string `json:"type,omitempty"`

	// ResourceIds limits updates to specific resources
	ResourceIds []string `json:"resourceIds,omitempty"`

	// ForceUpdate forces updates even if up to date
	ForceUpdate bool `json:"forceUpdate,omitempty"`

	// DryRun performs a dry run without applying updates
	DryRun bool `json:"dryRun,omitempty"`
}

type ResourceResult

type ResourceResult struct {
	// ResourceID is the unique identifier of the resource.
	//
	// Required: true
	ResourceID string `json:"resourceId"`

	// ResourceName is the name of the resource.
	//
	// Required: false
	ResourceName string `json:"resourceName,omitempty"`

	// ResourceType is the type of the resource ("image" | "container" | "project").
	//
	// Required: true
	ResourceType string `json:"resourceType"`

	// Status is the current status ("checked" | "updated" | "restarted" | "skipped" | "failed" | "up_to_date" | "update_available").
	//
	// Required: true
	Status string `json:"status"`

	// UpdateAvailable indicates if an update is available.
	//
	// Required: false
	UpdateAvailable bool `json:"updateAvailable,omitempty"`

	// UpdateApplied indicates if an update was applied.
	//
	// Required: false
	UpdateApplied bool `json:"updateApplied,omitempty"`

	// OldImages is a map of old image references.
	//
	// Required: false
	OldImages map[string]string `json:"oldImages,omitempty"`

	// NewImages is a map of new image references.
	//
	// Required: false
	NewImages map[string]string `json:"newImages,omitempty"`

	// Error contains any error message encountered during the update.
	//
	// Required: false
	Error string `json:"error,omitempty"`

	// Details contains additional details about the update operation.
	//
	// Required: false
	Details map[string]any `json:"details,omitempty"`
}

ResourceResult represents the result of an update operation on a single resource.

type Result

type Result struct {
	// Success indicates if the overall update operation was successful.
	//
	// Required: false
	Success bool `json:"success,omitempty"`

	// Checked is the number of resources checked.
	//
	// Required: true
	Checked int `json:"checked"`

	// Updated is the number of resources updated.
	//
	// Required: true
	Updated int `json:"updated"`

	// Restarted is the number of resources restarted because a dependency changed.
	//
	// Required: false
	Restarted int `json:"restarted,omitempty"`

	// Skipped is the number of resources skipped.
	//
	// Required: true
	Skipped int `json:"skipped"`

	// Failed is the number of resources that failed to update.
	//
	// Required: true
	Failed int `json:"failed"`

	// StartTime is the time when the update operation started.
	//
	// Required: false
	StartTime string `json:"startTime,omitempty"`

	// EndTime is the time when the update operation ended.
	//
	// Required: false
	EndTime string `json:"endTime,omitempty"`

	// Duration is the total duration of the update operation.
	//
	// Required: true
	Duration string `json:"duration"`

	// Items is a list of individual resource results.
	//
	// Required: true
	Items []ResourceResult `json:"items"`

	// ActivityID is the background activity that tracked this update operation.
	//
	// Required: false
	ActivityID *string `json:"activityId,omitempty"`
}

Result represents the complete result of an update operation.

type Status

type Status struct {
	// UpdatingContainers is the count of containers currently being updated.
	//
	// Required: true
	UpdatingContainers int `json:"updatingContainers"`

	// UpdatingProjects is the count of projects currently being updated.
	//
	// Required: true
	UpdatingProjects int `json:"updatingProjects"`

	// ContainerIds is a list of container IDs currently being updated.
	//
	// Required: true
	ContainerIds []string `json:"containerIds"`

	// ProjectIds is a list of project IDs currently being updated.
	//
	// Required: true
	ProjectIds []string `json:"projectIds"`
}

Status represents the current status of the updater.

Jump to

Keyboard shortcuts

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