dn

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Jul 12, 2019 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cache

type Cache struct {
	Files map[string]*CacheMeta
	// contains filtered or unexported fields
}

func NewCache

func NewCache(metaFile string) *Cache

func (*Cache) Check

func (cache *Cache) Check(url string, cachePath string) (bool, string)

func (*Cache) Fetch

func (cache *Cache) Fetch(url string, cachePath string) string

func (*Cache) StartDownload

func (cache *Cache) StartDownload(url string, cachePath string)

func (*Cache) Wait

func (cache *Cache) Wait()

type CacheMeta

type CacheMeta struct {
	Saved string `json:"saved,omitempty"`
	ETag  string `json:"etag,omitempty"`
	MD5   string `json:"md5,omitempty"`
}

Jump to

Keyboard shortcuts

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