Documentation
¶
Index ¶
- Constants
- func DownloadUrl(config Config)
- func ValidateExt(url string) bool
- func ValidateUrl(url string) (string, bool, error)
- func WriteDownloadManifest(res []*UrlResult)
- type Config
- type Crawler
- type DirectoryCrawler
- type Extension
- type History
- type Manager
- func (m *Manager) Compare(file1 string, file2 string, value labels)
- func (m *Manager) Diff(m1 string, m2 string, timeless bool) []Sig
- func (m *Manager) Download(config Config, label labels)
- func (m *Manager) GenerateManifest(path string, config Config) (string, string, error)
- func (m *Manager) History(asset string, args []string)
- func (m *Manager) Write(label labels)
- type Sig
- type SigTimeless
- type UrlResult
- type Urls
- type Util
- type WebCrawler
Constants ¶
View Source
const ( MANIFEST labels = iota MERKLETREE SIGZAG ASSET DIFF HISTORY DIRECTORY WEB URL URLS DOWNLOAD DATASOURCE )
Variables ¶
This section is empty.
Functions ¶
func ValidateExt ¶
func WriteDownloadManifest ¶
func WriteDownloadManifest(res []*UrlResult)
WriteDownloadManifest write the metadata from downloading to file
Types ¶
type DirectoryCrawler ¶
type DirectoryCrawler struct { Dir string `json:"dir"` Regex []*regexp.Regexp `json:"regex"` Conf Config `json:"conf"` FileDigests [][]byte `json:"file_digests"` Signatures []*Sig `json:"signatures"` }
func NewDirectoryCrawler ¶
func NewDirectoryCrawler(root string, conf *Config) *DirectoryCrawler
NewDirectoryCrawler instantiates a new directory crawler object
func (*DirectoryCrawler) Crawl ¶
func (d *DirectoryCrawler) Crawl() error
func (*DirectoryCrawler) FileSignature ¶
func (d *DirectoryCrawler) FileSignature(path string) []byte
FileSignature generates a hash value for files found in the path
func (*DirectoryCrawler) Write ¶
func (d *DirectoryCrawler) Write(fileType labels) (string, error)
Write the manifest to disk
type Manager ¶
func (*Manager) GenerateManifest ¶
GenerateManifest walks a directory and writes metadata and cryptographic signature to a file
type SigTimeless ¶
type UrlResult ¶
type WebCrawler ¶
type WebCrawler struct {
Conf Config
}
func NewWebCrawler ¶
func NewWebCrawler(conf *Config) *WebCrawler
NewWebCrawler instantiates a new web crawler object
func (WebCrawler) Crawl ¶
func (w WebCrawler) Crawl() error
Click to show internal directories.
Click to hide internal directories.