github.com/juju/juju@v0.0.0-20240430160146-1752b71fcf00/rpc/params/backups.go (about) 1 // Copyright 2014 Canonical Ltd. 2 // Licensed under the AGPLv3, see LICENCE file for details. 3 4 package params 5 6 import ( 7 "time" 8 9 "github.com/juju/version/v2" 10 ) 11 12 // BackupsCreateArgs holds the args for the API Create method. 13 type BackupsCreateArgs struct { 14 Notes string `json:"notes"` 15 NoDownload bool `json:"no-download"` 16 } 17 18 // BackupsDownloadArgs holds the args for the API Download method. 19 type BackupsDownloadArgs struct { 20 ID string `json:"id"` 21 } 22 23 // BackupsMetadataResult holds the metadata for a backup as returned by 24 // an API backups method (such as Create). 25 type BackupsMetadataResult struct { 26 ID string `json:"id"` 27 28 Checksum string `json:"checksum"` 29 ChecksumFormat string `json:"checksum-format"` 30 Size int64 `json:"size"` 31 Stored time.Time `json:"stored"` // May be zero... 32 33 Started time.Time `json:"started"` 34 Finished time.Time `json:"finished"` // May be zero... 35 Notes string `json:"notes"` 36 Model string `json:"model"` 37 Machine string `json:"machine"` 38 Hostname string `json:"hostname"` 39 Version version.Number `json:"version"` 40 Base string `json:"base"` 41 42 Filename string `json:"filename"` 43 44 // FormatVersion stores the version of the backup format. 45 // All unversioned backup files are considered 0, 46 // so the versioned formats start at 1. 47 FormatVersion int64 `json:"format-version"` 48 49 // ControllerUUID is the controller UUID that is backed up. 50 ControllerUUID string `json:"controller-uuid"` 51 52 // ControllerMachineID is the controller machine ID that the backup was created on. 53 ControllerMachineID string `json:"controller-machine-id"` 54 55 // ControllerMachineInstanceID is the controller machine cloud instance ID that the backup was created on. 56 ControllerMachineInstanceID string `json:"controller-machine-inst-id"` 57 58 // HANodes reflects HA configuration: number of controller nodes in HA. 59 HANodes int64 `json:"ha-nodes"` 60 }