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 ¶
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 ¶
ListResponse is the body of GET /snapshots.
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.