snapshot

package
v1.14.0 Latest Latest
Warning

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

Go to latest
Published: Oct 17, 2026 License: MIT Imports: 8 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package snapshot implements `cubecli snapshot`: VPS snapshots, permanent copies of a VPS disk taken from the server itself or converted from a completed backup.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewCmd

func NewCmd() *cobra.Command

Types

type DeployEstimate

type DeployEstimate struct {
	LocationName string `json:"location_name"`
	Remote       bool   `json:"remote"`
	Minutes      int    `json:"minutes"`
}

DeployEstimate is the expected deploy time of a snapshot in one location.

type ListResponse

type ListResponse struct {
	Snapshots []Snapshot `json:"snapshots"`
	Total     int        `json:"total"`
}

ListResponse is the body of GET /snapshots.

type Location

type Location struct {
	Name        string  `json:"name"`
	Description *string `json:"description"`
}

Location is a snapshot location as the API returns it.

type Quota

type Quota struct {
	Count        int     `json:"count"`
	CountMax     int     `json:"count_max"`
	GB           int     `json:"gb"`
	GBMax        int     `json:"gb_max"`
	PriceGBMonth float64 `json:"price_gb_month"`
}

Quota is the body of GET /snapshots/quota.

type Snapshot

type Snapshot struct {
	UUID          string   `json:"uuid"`
	Name          string   `json:"name"`
	Description   *string  `json:"description"`
	Status        string   `json:"status"`
	Origin        string   `json:"origin"`
	OSType        *string  `json:"os_type"`
	DiskGB        *int     `json:"disk_gb"`
	EstimatedGB   int      `json:"estimated_gb"`
	BillableGB    *float64 `json:"billable_gb"`
	Location      Location `json:"location"`
	StoreLocation Location `json:"store_location"`
	ProjectID     *int     `json:"project_id"`
	SourceVPS     struct {
		ID      *int    `json:"id"`
		Name    *string `json:"name"`
		Deleted bool    `json:"deleted"`
	} `json:"source_vps"`
	Template struct {
		TemplateName    string `json:"template_name"`
		Name            string `json:"name"`
		OperatingSystem string `json:"operating_system"`
	} `json:"template"`
	PriceGBMonth    float64          `json:"price_gb_month"`
	MonthlyCost     float64          `json:"monthly_cost"`
	HourlyCost      float64          `json:"hourly_cost"`
	MaxMonthlyCost  float64          `json:"max_monthly_cost"`
	DeployingCount  int              `json:"deploying_count"`
	CreatedAt       string           `json:"created_at"`
	AvailableAt     *string          `json:"available_at"`
	DeployEstimates []DeployEstimate `json:"deploy_estimates"`
}

Snapshot mirrors SnapshotOut of GET /snapshots and GET /snapshots/{uuid}. BillableGB is the space the snapshot takes once stored (compressed, rounded up to 0.01 GB, at least 1 GB and never above the disk), null until it is available; MaxMonthlyCost is the monthly cost if the copy took the whole disk.

Jump to

Keyboard shortcuts

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