errs

package
v1.8.0 Latest Latest
Warning

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

Go to latest
Published: Jul 10, 2025 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrUnsupportedChecksumAlgorithm Unsupported checksum algorithm
	ErrUnsupportedChecksumAlgorithm = errors.New("unsupported checksum algorithm")
	// ErrChecksumNotMatched File checksum does not match the computed checksum
	ErrChecksumNotMatched = errors.New("file checksum does not match the computed checksum")
	// ErrChecksumFileNotFound Checksum file not found
	ErrChecksumFileNotFound = errors.New("checksum file not found")
	// ErrAssetNotFound Asset not found
	ErrAssetNotFound = errors.New("asset not found")
	// ErrCollectorNotFound Collector not found
	ErrCollectorNotFound = errors.New("collector not found")
	// ErrEmptyURL URL is empty
	ErrEmptyURL = errors.New("empty url")
)

Functions

func IsDownload added in v1.6.0

func IsDownload(err error) bool

IsDownload checks if the error occurred during download operation.

func IsMalformedVersion added in v1.6.0

func IsMalformedVersion(err error) bool

IsMalformedVersion checks if the error indicates invalid version syntax.

func IsPackageNotFound added in v1.6.0

func IsPackageNotFound(err error) bool

IsPackageNotFound checks if the error indicates missing package.

func IsURLUnreachable added in v1.6.0

func IsURLUnreachable(err error) bool

IsURLUnreachable checks if the error indicates network unreachable.

func IsVersionNotFound added in v1.6.0

func IsVersionNotFound(err error) bool

IsVersionNotFound checks if the error indicates missing version.

func NewDownloadError

func NewDownloadError(url string, err error) error

NewDownloadError creates a download failure error instance.

func NewMalformedVersionError added in v1.6.0

func NewMalformedVersionError(version string, err error) error

NewMalformedVersionError creates malformed version error instance.

func NewPackageNotFoundError added in v1.6.0

func NewPackageNotFoundError(kind, goos, goarch string) error

NewPackageNotFoundError creates a package missing error instance.

func NewURLUnreachableError

func NewURLUnreachableError(url string, err error) error

NewURLUnreachableError creates a URL unreachable error instance.

func NewVersionNotFoundError added in v1.6.0

func NewVersionNotFoundError(version, goos, goarch string) error

NewVersionNotFoundError creates a version missing error instance.

Types

type DownloadError

type DownloadError struct {
	// contains filtered or unexported fields
}

DownloadError indicates failure during file download process.

func (DownloadError) Error

func (e DownloadError) Error() string

Error returns detailed error message.

func (DownloadError) URL

func (e DownloadError) URL() string

URL returns the resource location.

func (DownloadError) Unwrap added in v1.6.0

func (e DownloadError) Unwrap() error

Unwrap returns the wrapped error.

type MalformedVersionError added in v1.6.0

type MalformedVersionError struct {
	// contains filtered or unexported fields
}

MalformedVersionError indicates invalid version format.

func (MalformedVersionError) Error added in v1.6.0

func (e MalformedVersionError) Error() string

Error returns detailed error message.

func (MalformedVersionError) Unwrap added in v1.6.0

func (e MalformedVersionError) Unwrap() error

Unwrap returns the original error object.

func (MalformedVersionError) Version added in v1.6.0

func (e MalformedVersionError) Version() string

Version returns the semantic version string.

type PackageNotFoundError added in v1.6.0

type PackageNotFoundError struct {
	// contains filtered or unexported fields
}

PackageNotFoundError indicates the requested package does not exist.

func (PackageNotFoundError) Error added in v1.6.0

func (e PackageNotFoundError) Error() string

Error returns detailed error message.

type URLUnreachableError

type URLUnreachableError struct {
	// contains filtered or unexported fields
}

URLUnreachableError indicates failure to access the remote resource.

func (URLUnreachableError) Error

func (e URLUnreachableError) Error() string

Error returns detailed error message.

func (URLUnreachableError) URL

func (e URLUnreachableError) URL() string

URL returns the resource location URL.

func (URLUnreachableError) Unwrap added in v1.6.0

func (e URLUnreachableError) Unwrap() error

Unwrap returns the original error object.

type VersionNotFoundError added in v1.6.0

type VersionNotFoundError struct {
	// contains filtered or unexported fields
}

VersionNotFoundError indicates the specified version is unavailable.

func (VersionNotFoundError) Error added in v1.6.0

func (e VersionNotFoundError) Error() string

Error returns detailed error message.

func (VersionNotFoundError) Version added in v1.6.0

func (e VersionNotFoundError) Version() string

Version returns the semantic version string.

Jump to

Keyboard shortcuts

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