cache

package
v0.8.2 Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2024 License: Apache-2.0 Imports: 12 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DownloadWithProgress added in v0.7.3

func DownloadWithProgress(url string, index string, filename string, task *taskin.Task) error

DownloadWithProgress downloads a file from the given URL and saves it to the specified filename, updating the progress on the provided taskin.Task.

func IndicesSync

func IndicesSync(indices []string) error

func PurgeIndices added in v0.7.3

func PurgeIndices() error

Types

type IndexInfo

type IndexInfo struct {
	Name        string    `yaml:"name"`
	LastSync    time.Time `yaml:"last_sync"`
	Size        uint64    `yaml:"size"`         // Size in bytes
	LastUpdated string    `yaml:"last_updated"` // From the server
}

type InfoFile

type InfoFile struct {
	Indices []IndexInfo `yaml:"indices"`
}

func Indices

func Indices() (InfoFile, error)

func (*InfoFile) GetIndex

func (i *InfoFile) GetIndex(name string) *IndexInfo

func (*InfoFile) IndexExists

func (i *InfoFile) IndexExists(name string) bool

Jump to

Keyboard shortcuts

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