Documentation ¶
Index ¶
- Variables
- func IsConvertFailed(err error) bool
- func IsDataNotFound(err error) bool
- func IsDownloadFail(err error) bool
- func IsFileNotExist(err error) bool
- func IsInconsistentValues(err error) bool
- func IsInvalidValue(err error) bool
- func IsResourceExpired(err error) bool
- func IsResourceNotSupportRangeRequest(err error) bool
- func IsSystemError(err error) bool
- func IsTaskIDDuplicate(err error) bool
- func IsURLNotReachable(err error) bool
- type ErrFileNotExist
- type ErrInconsistentValues
- type ErrResourceExpired
- type ErrResourceNotSupportRangeRequest
- type ErrTaskIDDuplicate
- type ErrURLNotReachable
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrSystemError represents the error is a system error. ErrSystemError = errors.New("system error") // ErrTaskDownloadFail represents an exception was encountered while downloading the file ErrTaskDownloadFail = errors.New("resource download failed") // ErrDataNotFound represents the data cannot be found. ErrDataNotFound = errors.New("data not found") // ErrInvalidValue represents the value is invalid. ErrInvalidValue = errors.New("invalid value") // ErrConvertFailed represents failed to convert. ErrConvertFailed = errors.New("convert failed") )
Functions ¶
func IsSystemError ¶
IsSystemError checks the error is a system error or not.
func IsTaskIDDuplicate ¶
IsTaskIDDuplicate checks the error is a TaskIDDuplicate error or not.
Types ¶
type ErrFileNotExist ¶
type ErrFileNotExist struct {
File string
}
ErrFileNotExist represents the file is not exists
func (ErrFileNotExist) Error ¶
func (e ErrFileNotExist) Error() string
type ErrInconsistentValues ¶
type ErrInconsistentValues struct { Expected interface{} Actual interface{} }
func (ErrInconsistentValues) Error ¶
func (e ErrInconsistentValues) Error() string
type ErrResourceExpired ¶
type ErrResourceExpired struct {
URL string
}
ErrResourceExpired represents the downloaded resource has expired
func (ErrResourceExpired) Error ¶
func (e ErrResourceExpired) Error() string
type ErrResourceNotSupportRangeRequest ¶
type ErrResourceNotSupportRangeRequest struct {
URL string
}
ErrResourceNotSupportRangeRequest represents the downloaded resource does not support Range downloads
func (ErrResourceNotSupportRangeRequest) Error ¶
func (e ErrResourceNotSupportRangeRequest) Error() string
type ErrTaskIDDuplicate ¶
ErrTaskIDDuplicate represents the task id is in conflict.
func (ErrTaskIDDuplicate) Error ¶
func (e ErrTaskIDDuplicate) Error() string
type ErrURLNotReachable ¶
type ErrURLNotReachable struct {
URL string
}
ErrURLNotReachable represents the url is a not reachable.
func (ErrURLNotReachable) Error ¶
func (e ErrURLNotReachable) Error() string
Click to show internal directories.
Click to hide internal directories.