getlib

package module
v0.0.0-...-76af178 Latest Latest
Warning

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

Go to latest
Published: Jan 19, 2023 License: GPL-3.0 Imports: 11 Imported by: 2

Documentation

Overview

getlib document

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DownloadFile

func DownloadFile(url string, sourceHash string, destination string) (err error)

func ExecForEach

func ExecForEach(url string, sourceHash string, funcToExec TieFunc, relPath string) (err error)

func IsDir

func IsDir(url string, sourceHash string) (isDir bool, err error)

func ReadFile

func ReadFile(url string, sourceHash string) (file io.Reader, err error)

Types

type Cache

type Cache struct {
	CacheDir    string
	SizeLimit   int64  // Max bytes
	HistoryFile string // Contain hash and file sizes
}

func InitCache

func InitCache(customLocation string) Cache

func (*Cache) ReadFile

func (c *Cache) ReadFile(url string, sourceHash string) (file io.Reader, err error)

type Download

type Download struct {
	// contains filtered or unexported fields
}

func (*Download) Run

func (d *Download) Run(file io.Reader, relPath string) (err error)

type TieFunc

type TieFunc interface {
	Run(file io.Reader, relPath string) (err error)
}

Jump to

Keyboard shortcuts

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