Documentation
¶
Overview ¶
Package snapshot stores recovery snapshots. The Bootstrap defines what a snapshot contains; this package only keeps the document, outside the project, so that it survives `gtt clean`.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Info ¶
type Info struct {
Dir string `json:"dir"`
Snapshot string `json:"snapshot"` // path of the Bootstrap snapshot document
Meta Meta `json:"meta"`
// Summary fields read from the Bootstrap document for display only.
BootstrapVersion string `json:"bootstrap_version"`
Primary string `json:"primary_ade"`
Participating []string `json:"participating"`
Profile string `json:"methodology_profile"`
Language string `json:"language"`
}
Info describes one stored snapshot.
type Meta ¶
type Meta struct {
Schema int `json:"schema"`
ProjectRoot string `json:"project_root"`
CreatedAt string `json:"created_at"`
CLIVersion string `json:"cli_version"`
BootstrapOrigin string `json:"bootstrap_origin,omitempty"`
BootstrapChecksum string `json:"bootstrap_checksum,omitempty"`
Reason string `json:"reason"`
}
Meta is the CLI's own record around a Bootstrap snapshot.
type Store ¶
type Store struct {
Home string
// contains filtered or unexported fields
}
Store keeps snapshots under the user-level GTT home.
func (Store) SaveDomain ¶ added in v1.28.0
SaveDomain zips the project's gtt-domain/ and docs/ideas/ into <home>/backups/<project>/, outside the project, so that a disk, a clone or a move that loses the project does not lose its content. It returns the path ("" when there is nothing to keep). Symbolic links are skipped, and what is stored is only ever relative to the project.