Documentation
¶
Index ¶
- Variables
- func IsDownload(err error) bool
- func IsMalformedVersion(err error) bool
- func IsPackageNotFound(err error) bool
- func IsURLUnreachable(err error) bool
- func IsVersionNotFound(err error) bool
- func NewDownloadError(url string, err error) error
- func NewMalformedVersionError(version string, err error) error
- func NewPackageNotFoundError(kind, goos, goarch string) error
- func NewURLUnreachableError(url string, err error) error
- func NewVersionNotFoundError(version, goos, goarch string) error
- type DownloadError
- type MalformedVersionError
- type PackageNotFoundError
- type URLUnreachableError
- type VersionNotFoundError
Constants ¶
This section is empty.
Variables ¶
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
IsDownload checks if the error occurred during download operation.
func IsMalformedVersion ¶ added in v1.6.0
IsMalformedVersion checks if the error indicates invalid version syntax.
func IsPackageNotFound ¶ added in v1.6.0
IsPackageNotFound checks if the error indicates missing package.
func IsURLUnreachable ¶ added in v1.6.0
IsURLUnreachable checks if the error indicates network unreachable.
func IsVersionNotFound ¶ added in v1.6.0
IsVersionNotFound checks if the error indicates missing version.
func NewDownloadError ¶
NewDownloadError creates a download failure error instance.
func NewMalformedVersionError ¶ added in v1.6.0
NewMalformedVersionError creates malformed version error instance.
func NewPackageNotFoundError ¶ added in v1.6.0
NewPackageNotFoundError creates a package missing error instance.
func NewURLUnreachableError ¶
NewURLUnreachableError creates a URL unreachable error instance.
func NewVersionNotFoundError ¶ added in v1.6.0
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) 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.