repository

package
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 18, 2026 License: Apache-2.0 Imports: 2 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

Functions

func ValidRetentionModeNames

func ValidRetentionModeNames() map[string]RetentionMode

Types

type Maintenance

type Maintenance struct {
	Type          MaintenanceType   `json:"type"`
	Safety        MaintenanceSafety `json:"safety"`
	Force         bool              `json:"force"`
	CleanupBuffer *time.Duration
}

type MaintenanceSafety

type MaintenanceSafety int
const (
	FullMaintenanceSafety MaintenanceSafety = 0
	//nolint:lll
	// Use only if there's no other kopia instances accessing the repo and the
	// storage backend is strongly consistent.
	// https://github.com/kopia/kopia/blob/f9de453efc198b6e993af8922f953a7e5322dc5f/repo/maintenance/maintenance_safety.go#L42
	NoMaintenanceSafety MaintenanceSafety = 1
)

func (MaintenanceSafety) String

func (i MaintenanceSafety) String() string

type MaintenanceType

type MaintenanceType int
const (
	CompleteMaintenance MaintenanceType = 0 // complete
	MetadataMaintenance MaintenanceType = 1 // metadata
)

func (MaintenanceType) String

func (i MaintenanceType) String() string

type Options

type Options struct {
	User string `json:"user"`
	Host string `json:"host"`
	// ViewTimestamp is the time at which the repo should be opened at if
	// immutable backups are being used. If nil then the current time is used.
	ViewTimestamp *time.Time `json:"viewTimestamp"`
	ReadOnly      bool       `json:"readonly,omitempty"`
}

Repo represents options that are specific to the repo storing backed up data.

type PersistentConfig

type PersistentConfig struct {
	MinEpochDuration *time.Duration
}

PersistentConfig represents configuration info that is persisted in the corso repo and can be updated with repository.UpdatePersistentConfig. Leaving a field as nil will result in no updates being made to it (i.e. PATCH semantics).

type Retention

type Retention struct {
	Mode     *RetentionMode
	Duration *time.Duration
	Extend   *bool
}

Retention contains various options for configuring the retention mode. Takes pointers instead of values so that we can tell the difference between an unset value and a set but invalid value. This allows for partial (re)configuration of things.

type RetentionMode

type RetentionMode int
const (
	UnknownRetention    RetentionMode = 0
	NoRetention         RetentionMode = 1 // none
	GovernanceRetention RetentionMode = 2 // governance
	ComplianceRetention RetentionMode = 3 // compliance
)

func (RetentionMode) String

func (i RetentionMode) String() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL