Documentation
¶
Index ¶
- Constants
- func ApplicationManifestFromPayload(payload Payload) (application.Manifest, error)
- func Build(application, environment string, createdAt time.Time, entries []PayloadEntry, ...) ([]byte, error)
- func LogsHistoryFromPayload(payload Payload) (logsprovider.HistoryBackup, bool, error)
- func ObjectStorageBackupsFromPayload(payload Payload) ([]objectstorage.BucketBackup, error)
- func OpenBaoBackupFromPayload(application, environment string, payload Payload) (openbao.ApplicationSecretBackup, error)
- func PostgresBackupsFromPayload(m application.Manifest, payload Payload) ([]application.PostgresBackup, error)
- func WorkloadStorageFromPayload(payload Payload) (map[string][]byte, error)
- type Entry
- type Envelope
- type KDFParams
- type Manifest
- type Payload
- type PayloadEntry
- func ApplicationManifestPayloadEntry(m application.Manifest) (PayloadEntry, error)
- func LogsHistoryPayloadEntry(backup logsprovider.HistoryBackup) (PayloadEntry, error)
- func ObjectStoragePayloadEntry(backup objectstorage.BucketBackup) (PayloadEntry, error)
- func OpenBaoPayloadEntry(backup openbao.ApplicationSecretBackup) (PayloadEntry, error)
- func PostgresPayloadEntries(backups []application.PostgresBackup) ([]PayloadEntry, error)
- func RecoveryManifestPayloadEntry(selection RecoverySelection) (PayloadEntry, error)
- func WorkloadStoragePayloadEntry(volume string, archive []byte) (PayloadEntry, error)
- type RecoveryContributor
- type RecoveryManifest
- type RecoverySelection
- type RecoveryStateClass
- type RecoverySupport
Constants ¶
View Source
const ( FormatMagic = "BASEHARBOR-APP-BACKUP" SchemaVersion = 1 MaxEntries = 128 MaxEntryBytes int64 = 512 << 20 MaxPayloadBytes int64 = 2 << 30 )
View Source
const (
RecoveryManifestVersion = 1
)
Variables ¶
This section is empty.
Functions ¶
func ApplicationManifestFromPayload ¶
func ApplicationManifestFromPayload(payload Payload) (application.Manifest, error)
func LogsHistoryFromPayload ¶ added in v0.4.16
func LogsHistoryFromPayload(payload Payload) (logsprovider.HistoryBackup, bool, error)
func ObjectStorageBackupsFromPayload ¶ added in v0.4.16
func ObjectStorageBackupsFromPayload(payload Payload) ([]objectstorage.BucketBackup, error)
func OpenBaoBackupFromPayload ¶
func OpenBaoBackupFromPayload(application, environment string, payload Payload) (openbao.ApplicationSecretBackup, error)
func PostgresBackupsFromPayload ¶
func PostgresBackupsFromPayload(m application.Manifest, payload Payload) ([]application.PostgresBackup, error)
Types ¶
type Entry ¶
type Manifest ¶
type Payload ¶
type Payload struct {
Manifest Manifest `json:"manifest"`
Entries []PayloadEntry `json:"entries"`
}
type PayloadEntry ¶
func ApplicationManifestPayloadEntry ¶
func ApplicationManifestPayloadEntry(m application.Manifest) (PayloadEntry, error)
func LogsHistoryPayloadEntry ¶ added in v0.4.16
func LogsHistoryPayloadEntry(backup logsprovider.HistoryBackup) (PayloadEntry, error)
func ObjectStoragePayloadEntry ¶ added in v0.4.16
func ObjectStoragePayloadEntry(backup objectstorage.BucketBackup) (PayloadEntry, error)
func OpenBaoPayloadEntry ¶
func OpenBaoPayloadEntry(backup openbao.ApplicationSecretBackup) (PayloadEntry, error)
func PostgresPayloadEntries ¶
func PostgresPayloadEntries(backups []application.PostgresBackup) ([]PayloadEntry, error)
func RecoveryManifestPayloadEntry ¶ added in v0.4.16
func RecoveryManifestPayloadEntry(selection RecoverySelection) (PayloadEntry, error)
func WorkloadStoragePayloadEntry ¶ added in v0.4.16
func WorkloadStoragePayloadEntry(volume string, archive []byte) (PayloadEntry, error)
type RecoveryContributor ¶ added in v0.4.16
type RecoveryContributor struct {
StateClass RecoveryStateClass `json:"state_class"`
LogicalResource string `json:"logical_resource,omitempty"`
Ownership string `json:"ownership"`
Support RecoverySupport `json:"support"`
DefaultSelected bool `json:"default_selected"`
Selected bool `json:"selected"`
Durable bool `json:"durable,omitempty"`
ExplicitlyExcluded bool `json:"explicitly_excluded,omitempty"`
Reason string `json:"reason,omitempty"`
}
func (RecoveryContributor) Validate ¶ added in v0.4.16
func (c RecoveryContributor) Validate() error
type RecoveryManifest ¶ added in v0.4.16
type RecoveryManifest struct {
Version int `json:"version"`
Contributors []RecoveryContributor `json:"contributors"`
}
func RecoveryManifestFromPayload ¶ added in v0.4.16
func RecoveryManifestFromPayload(payload Payload) (RecoveryManifest, bool, error)
func (RecoveryManifest) Validate ¶ added in v0.4.16
func (m RecoveryManifest) Validate() error
type RecoverySelection ¶ added in v0.4.16
type RecoverySelection struct {
Contributors []RecoveryContributor `json:"contributors"`
}
func DiscoverManifestRecovery ¶ added in v0.4.16
func DiscoverManifestRecovery(m application.Manifest) (RecoverySelection, error)
func NewRecoverySelection ¶ added in v0.4.16
func NewRecoverySelection(contributors []RecoveryContributor) (RecoverySelection, error)
func (RecoverySelection) Apply ¶ added in v0.4.16
func (s RecoverySelection) Apply(include, exclude []RecoveryStateClass) (RecoverySelection, error)
func (RecoverySelection) HasSelected ¶ added in v0.4.16
func (s RecoverySelection) HasSelected(class RecoveryStateClass) bool
func (RecoverySelection) Selected ¶ added in v0.4.16
func (s RecoverySelection) Selected() []RecoveryContributor
func (RecoverySelection) ValidateForCapture ¶ added in v0.4.16
func (s RecoverySelection) ValidateForCapture() error
type RecoveryStateClass ¶ added in v0.4.16
type RecoveryStateClass string
const ( StateApplicationMetadata RecoveryStateClass = "application.metadata" StateSecrets RecoveryStateClass = "secrets" StateSQL RecoveryStateClass = "database.sql" StateObjectStorage RecoveryStateClass = "object-storage.s3" StateWorkloadStorage RecoveryStateClass = "workload.storage" StateLogs RecoveryStateClass = "observability.logs" StateMetrics RecoveryStateClass = "observability.metrics" StateTraces RecoveryStateClass = "observability.traces" StatePKI RecoveryStateClass = "security.pki" )
func ParseRecoveryStateClass ¶ added in v0.4.16
func ParseRecoveryStateClass(value string) (RecoveryStateClass, error)
type RecoverySupport ¶ added in v0.4.16
type RecoverySupport string
const ( RecoverySupported RecoverySupport = "supported" RecoveryUnsupported RecoverySupport = "unsupported" RecoveryExternal RecoverySupport = "external" )
Click to show internal directories.
Click to hide internal directories.