cache

package
v0.8.1 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

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