Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetCacheDir

func GetCacheDir() string

func GetCacheLocation

func GetCacheLocation(resource *url.URL) string

func GetCacheWriter

func GetCacheWriter(source io.ReadCloser, cachedir string, resource *url.URL) io.ReadCloser

func ParseURL

func ParseURL(urlS string) (*url.URL, error)

Types

type CacheWriter

type CacheWriter struct {
	Tee     io.Reader
	ToClose io.Closer
}

func (*CacheWriter) Close

func (cw *CacheWriter) Close() error

func (*CacheWriter) Read

func (cw *CacheWriter) Read(p []byte) (int, error)

type DefaultReader

type DefaultReader struct{}

func (DefaultReader) GetURL

func (d DefaultReader) GetURL(u *url.URL) (body io.ReadCloser, statuscode int, err error)

func (DefaultReader) HasVisited

func (d DefaultReader) HasVisited(u *url.URL) bool

type URLReader

type URLReader interface {
	GetURL(u *url.URL) (body io.ReadCloser, statuscode int, err error)
	HasVisited(u *url.URL) bool
}