Documentation
¶
Index ¶
- func WriteConfig(w io.Writer, opts ConfigOptions) error
- type ArchiveRange
- type BackupInfo
- type BackupOptions
- type BackupSize
- type BackupTime
- type BackupType
- type Cmd
- type ConfigOptions
- type DBRef
- type Database
- type InfoOutput
- type Repository
- type RepositoryType
- type RetentionFullType
- type StanzaInfo
- type Status
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func WriteConfig ¶
func WriteConfig(w io.Writer, opts ConfigOptions) error
Types ¶
type ArchiveRange ¶
type BackupInfo ¶
type BackupInfo struct {
Label string `json:"label"`
Type string `json:"type"`
Timestamp BackupTime `json:"timestamp"`
Archive ArchiveRange `json:"archive"`
Database DBRef `json:"database"`
Info BackupSize `json:"info"`
}
type BackupOptions ¶
type BackupOptions struct {
Type BackupType `json:"type"`
Annotations map[string]string `json:"annotations,omitempty"`
BackupOptions map[string]string `json:"backup_options,omitempty"`
}
func (BackupOptions) StringSlice ¶
func (b BackupOptions) StringSlice() []string
type BackupSize ¶
type BackupTime ¶
func (BackupTime) StartTime ¶
func (b BackupTime) StartTime() time.Time
func (BackupTime) StopTime ¶
func (b BackupTime) StopTime() time.Time
type BackupType ¶
type BackupType string
const ( BackupTypeFull BackupType = "full" BackupTypeDifferential BackupType = "diff" BackupTypeIncremental BackupType = "incr" )
func (BackupType) String ¶
func (b BackupType) String() string
type Cmd ¶
func (Cmd) StringSlice ¶
type ConfigOptions ¶
type InfoOutput ¶
type InfoOutput []*StanzaInfo
func ParseInfoOutput ¶
func ParseInfoOutput(output []byte) (InfoOutput, error)
func (InfoOutput) Stanza ¶
func (i InfoOutput) Stanza(name string) *StanzaInfo
type Repository ¶
type Repository struct {
ID string `json:"id"`
Type RepositoryType `json:"type"`
S3Bucket string `json:"s3_bucket,omitempty"`
S3Region string `json:"s3_region,omitempty"`
S3Endpoint string `json:"s3_endpoint,omitempty"`
S3Key string `json:"s3_key,omitempty"`
S3KeySecret string `json:"s3_key_secret,omitempty"`
GCSBucket string `json:"gcs_bucket,omitempty"`
GCSEndpoint string `json:"gcs_endpoint,omitempty"`
GCSKey string `json:"gcs_key,omitempty"`
AzureAccount string `json:"azure_account,omitempty"`
AzureContainer string `json:"azure_container,omitempty"`
AzureEndpoint string `json:"azure_endpoint,omitempty"`
AzureKey string `json:"azure_key,omitempty"`
RetentionFull int `json:"retention_full"`
RetentionFullType RetentionFullType `json:"retention_full_type"`
BasePath string `json:"base_path,omitempty"`
CustomOptions map[string]string `json:"custom_options,omitempty"`
}
func (*Repository) Clone ¶
func (r *Repository) Clone() *Repository
func (*Repository) DefaultOptionalFieldsFrom ¶
func (r *Repository) DefaultOptionalFieldsFrom(other *Repository)
DefaultOptionalFieldsFrom will default this repository's optional fields to the values from the given repository.
func (*Repository) Identifier ¶
func (r *Repository) Identifier() string
Identifier computes a unique identifier for the repository.
func (*Repository) WithDefaults ¶
func (r *Repository) WithDefaults() *Repository
type RepositoryType ¶
type RepositoryType string
const ( RepositoryTypeS3 RepositoryType = "s3" RepositoryTypeGCS RepositoryType = "gcs" RepositoryTypeAzure RepositoryType = "azure" RepositoryTypePosix RepositoryType = "posix" RepositoryTypeCifs RepositoryType = "cifs" )
type RetentionFullType ¶
type RetentionFullType string
const ( RetentionFullTypeTime RetentionFullType = "time" RetentionFullTypeCount RetentionFullType = "count" )
type StanzaInfo ¶
type StanzaInfo struct {
Name string `json:"name"`
Status Status `json:"status"`
DB []Database `json:"db"`
Backup []BackupInfo `json:"backup"`
}
Click to show internal directories.
Click to hide internal directories.