cache

package
v0.0.30 Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2024 License: GPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var XdgBinHome = &directory{
	fs:   afero.NewOsFs(),
	path: xdg.BinHome,
}

Functions

func Tar

func Tar(cache Cacher, reader io.Reader, files ...string) error

func TarEntries

func TarEntries(cache Cacher, reader *tar.Reader, files []string) error

func TarGz

func TarGz(cache Cacher, reader io.Reader, files ...string) error

Types

type Cachable

type Cachable interface {
	Cached(Cacher) bool
	Cache(context.Context, Cacher) error
}

type Cacher

type Cacher interface {
	WriteAll(string, io.Reader) error
	Reader(string) (io.Reader, error)
}

type Directory

type Directory interface {
	Cacher
	JoinPath(...string) string
	List() ([]string, error)
}

func AtDirectory

func AtDirectory(path string) Directory

func NewDirectory

func NewDirectory(fsys afero.Fs, path string) Directory

Jump to

Keyboard shortcuts

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