Documentation
¶
Index ¶
- Variables
- type Downloader
- func (downloader *Downloader) CacheDir() string
- func (downloader *Downloader) Clean() (err error)
- func (downloader *Downloader) Clear() (err error)
- func (downloader *Downloader) Close() (err error)
- func (downloader *Downloader) Download(rawURL string) (content []byte, isFromCache bool, err error)
- func (downloader *Downloader) MaxCacheDuration() time.Duration
- func (downloader *Downloader) ShouldKeepCacheOnClose() bool
- type Options
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrStatusCodeNotOK = errors.New("status code not ok")
)
Functions ¶
This section is empty.
Types ¶
type Downloader ¶
type Downloader struct {
// contains filtered or unexported fields
}
func NewDownloader ¶
func NewDownloader(options *Options) (downloader *Downloader, err error)
func (*Downloader) CacheDir ¶
func (downloader *Downloader) CacheDir() string
func (*Downloader) Clean ¶
func (downloader *Downloader) Clean() (err error)
func (*Downloader) Clear ¶
func (downloader *Downloader) Clear() (err error)
func (*Downloader) Close ¶
func (downloader *Downloader) Close() (err error)
func (*Downloader) Download ¶
func (downloader *Downloader) Download(rawURL string) (content []byte, isFromCache bool, err error)
func (*Downloader) MaxCacheDuration ¶
func (downloader *Downloader) MaxCacheDuration() time.Duration
func (*Downloader) ShouldKeepCacheOnClose ¶
func (downloader *Downloader) ShouldKeepCacheOnClose() bool
Source Files
¶
Click to show internal directories.
Click to hide internal directories.