mapping

package
v1.65.0 Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2026 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package mapping turns what the index reports into the admin protos.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Duration

func Duration(seconds int64) time.Duration

Duration is a count of seconds as a duration.

func Seconds

func Seconds(d time.Duration) int64

Seconds is d in whole seconds, as the admin protos carry durations.

Types

type Mapper

type Mapper interface {
	Set(in index.SetInfo) *pb.BackupSet

	// field:Version from:"Policy.Version"
	// field:Mode from:"Policy.Mode"
	// field:SizeThreshold from:"Policy.SizeThreshold"
	// field:EntropyEstimator from:"Policy.EntropyEstimator"
	// field:EntropyThreshold from:"Policy.EntropyThreshold"
	// field:PresenceScope from:"Policy.PresenceScope"
	Policy(in index.StorePolicy) *pb.StorePolicy

	// field:Version from:"-"
	WritePolicy(in *pb.SetStorePolicyRequest) storekey.Policy

	// field:KeepWithin using:"Seconds"
	Retention(in retention.Policy) *pb.RetentionPolicy

	// field:KeepWithin using:"Duration"
	FromRetention(in *pb.RetentionPolicy) retention.Policy

	Bracket(in retention.Bracket) *pb.RetentionBracket
	FromBracket(in *pb.RetentionBracket) retention.Bracket
}

mapper:generate

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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