Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrUnsupportedAlgorithm is returned when the requested hash algorithm is not supported. ErrUnsupportedAlgorithm = errors.New("unsupported algorithm") // ErrHashMismatch is returned when the downloaded content does not match the expected hash. ErrHashMismatch = errors.New("hash mismatch") // ErrPartialWrite is returned when data was already written to Out before a failure occurred, // making fallback to another source unsafe. ErrPartialWrite = errors.New("partial write") // ErrAllSourcesFailed is returned when no server or direct source could provide the content. ErrAllSourcesFailed = errors.New("all sources failed") )
Functions ¶
This section is empty.
Types ¶
type FetchOptions ¶
type Fetcher ¶
func NewFetcher ¶
type HTTPStatusError ¶
type HTTPStatusError struct {
StatusCode int
}
HTTPStatusError is returned when a source responds with a non-200 status code.
func (*HTTPStatusError) Error ¶
func (e *HTTPStatusError) Error() string
Click to show internal directories.
Click to hide internal directories.