digestset

package
v2.8.3+incompatible Latest Latest
Warning

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

Go to latest
Published: Oct 2, 2023 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrDigestAmbiguous = digestset.ErrDigestAmbiguous

ErrDigestAmbiguous is used when multiple digests are found in a set. None of the matching digests should be considered valid matches.

Deprecated: use digestset.ErrDigestAmbiguous.

View Source
var ErrDigestNotFound = digestset.ErrDigestNotFound

ErrDigestNotFound is used when a matching digest could not be found in a set.

Deprecated: use digestset.ErrDigestNotFound.

Functions

func NewSet deprecated

func NewSet() *digestset.Set

NewSet creates an empty set of digests which may have digests added.

Deprecated: use digestset.NewSet.

func ShortCodeTable deprecated

func ShortCodeTable(dst *digestset.Set, length int) map[digest.Digest]string

ShortCodeTable returns a map of Digest to unique short codes. The length represents the minimum value, the maximum length may be the entire value of digest if uniqueness cannot be achieved without the full value. This function will attempt to make short codes as short as possible to be unique.

Deprecated: use digestset.ShortCodeTable.

Types

type Set deprecated

type Set = digestset.Set

Set is used to hold a unique set of digests which may be easily referenced by a string representation of the digest as well as short representation. The uniqueness of the short representation is based on other digests in the set. If digests are omitted from this set, collisions in a larger set may not be detected, therefore it is important to always do short representation lookups on the complete set of digests. To mitigate collisions, an appropriately long short code should be used.

Deprecated: use digestset.Set.

Jump to

Keyboard shortcuts

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