mapping

package
v1.123.1 Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2026 License: Apache-2.0 Imports: 6 Imported by: 1 module, 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

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; a count past what a duration holds is the longest one, or the shortest.

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