errors

package
v0.0.0-...-1d8bcda Latest Latest
Warning

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

Go to latest
Published: Mar 5, 2025 License: AGPL-3.0 Imports: 1 Imported by: 4

Documentation

Index

Constants

View Source
const (
	// ErrNotFound is returned when a path is not found.
	ErrNotFound = errors.ConstError("path not found")

	// ErrHashAndSizeAlreadyExists is returned when a hash already exists, but
	// the associated size is different. This should never happen, it means that
	// there is a collision in the hash function.
	ErrHashAndSizeAlreadyExists = errors.ConstError("hash exists for different file size")

	// ErrPathAlreadyExistsDifferentHash is returned when a path already exists
	// with a different hash.
	ErrPathAlreadyExistsDifferentHash = errors.ConstError("path already exists with different hash")

	// ErrMissingHash is returned when a hash is missing.
	ErrMissingHash = errors.ConstError("missing hash")

	// ErrHashPrefixTooShort is returned when the hash prefix is too short. To help
	// ensure uniqueness, we enforce a minimum length of 7 characters for hash prefixes.
	ErrHashPrefixTooShort = errors.ConstError("minimum hash prefix length is 7")

	// ErrInvalidHashPrefix is returned when the hash prefix is invalid for a reason
	// other than being too short.
	ErrInvalidHashPrefix = errors.ConstError("invalid hash prefix")

	// ErrInvalidHash is returned when the hash is invalid.
	ErrInvalidHash = errors.ConstError("invalid hash")

	// ErrInvalidHashLength is returned when the hash length is invalid.
	ErrInvalidHashLength = errors.ConstError("invalid hash length")
)

Variables

This section is empty.

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

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