api

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Oct 2, 2025 License: BSD-3-Clause-Clear Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Cancel added in v0.2.0

func Cancel(ctx context.Context, cfg *config.Config) (string, error)

func Fetch

func Fetch(ctx context.Context, cfg *config.Config, toVersion int) error

func Install

func Install(ctx context.Context, cfg *config.Config) error

func Start

func Start(ctx context.Context, cfg *config.Config) error

func Update

func Update(ctx context.Context, cfg *config.Config, toVersion int) error

Types

type AppStatus

type AppStatus struct {
	URI       string `json:"uri"`
	Name      string `json:"name"`
	Fetched   bool   `json:"fetched"`
	Installed bool   `json:"installed"`
	Running   bool   `json:"running"`
}

type BlobStats

type BlobStats struct {
	Bytes    int64 `json:"bytes"`
	NumBlobs int   `json:"num_blobs"`
}

type CurrentStatus

type CurrentStatus struct {
	UpdateID    string      `json:"update_id"`
	TargetID    string      `json:"target_id"`
	AppStatuses []AppStatus `json:"apps"`
	CompletedAt time.Time   `json:"completed_at"`
}

func GetCurrentStatus

func GetCurrentStatus(ctx context.Context, cfg *compose.Config) (*CurrentStatus, error)

type UpdateStatus

type UpdateStatus struct {
	ID          string       `json:"id"`
	TargetID    string       `json:"target_id"`
	State       update.State `json:"state"`
	StartTime   time.Time    `json:"start_time"`
	UpdatedAt   time.Time    `json:"updated_at"`
	Apps        []string     `json:"apps"`
	Size        BlobStats    `json:"size"`
	FetchedSize BlobStats    `json:"fetched_size"`
	Progress    int          `json:"progress"`
}

func GetUpdateStatus

func GetUpdateStatus(cfg *compose.Config) (*UpdateStatus, error)

Jump to

Keyboard shortcuts

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