protoutil

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Jun 25, 2024 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrScheduleDisabled = errors.New("never")

Functions

func BackupProgressEntryToBackupError added in v0.13.0

func BackupProgressEntryToBackupError(b *restic.BackupProgressEntry) (*v1.BackupProgressError, error)

BackupProgressEntryToBackupError converts a BackupProgressEntry to a BackupError if it's type is "error"

func LsEntryToProto

func LsEntryToProto(e *restic.LsEntry) *v1.LsEntry

func RepoStatsToProto added in v0.8.0

func RepoStatsToProto(s *restic.RepoStats) *v1.RepoStats

func ResolveSchedule added in v1.0.0

func ResolveSchedule(sched *v1.Schedule, lastRan time.Time) (time.Time, error)

ResolveSchedule resolves a schedule to the next time it should run based on last execution. note that this is different from backup behavior which is always relative to the current time.

func RetentionPolicyFromProto

func RetentionPolicyFromProto(p *v1.RetentionPolicy) *restic.RetentionPolicy

func RetentionPolicyToProto

func RetentionPolicyToProto(p *restic.RetentionPolicy) *v1.RetentionPolicy

func SnapshotToProto

func SnapshotToProto(s *restic.Snapshot) *v1.ResticSnapshot

func ValidateOperation

func ValidateOperation(op *v1.Operation) error

ValidateOperation verifies critical properties of the operation proto.

func ValidateSchedule added in v1.0.0

func ValidateSchedule(sched *v1.Schedule) error

func ValidateSnapshot

func ValidateSnapshot(s *v1.ResticSnapshot) error

ValidateSnapshot verifies critical properties of the snapshot proto representation.

Types

This section is empty.

Jump to

Keyboard shortcuts

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