Documentation ¶
Overview ¶
Contains code for dealing with a registry of completed backup information.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CompletedJob ¶
type CompletedJob struct { // The time at which the backup was started. StartTime time.Time // The name of the backup job. Name string // The score representing the contents of the backup. Score blob.Score }
A record in the backup registry describing a successful backup job.
type Registry ¶
type Registry interface { // Record that the named backup job has completed. RecordBackup(ctx context.Context, j CompletedJob) (err error) // Return a list of all completed backups. ListBackups(ctx context.Context) (jobs []CompletedJob, err error) }
func NewGCSRegistry ¶
func NewGCSRegistry( ctx context.Context, bucket gcs.Bucket, cryptoPassword string, deriver crypto.KeyDeriver) (r Registry, crypter crypto.Crypter, err error)
Create a registry that stores data in the supplied GCS bucket, deriving a crypto key from the supplied password and ensuring that the bucket may not in the future be used with any other key and has not in the past, either. Return a crypter configured to use the key.
Click to show internal directories.
Click to hide internal directories.