net

package
v0.0.0-...-0b4b87a Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 18, 2019 License: MIT Imports: 11 Imported by: 0

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
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL