cache

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2020 License: GPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Write

func Write(path string, cache *Cache) error

Write a cache to target path

Types

type Cache

type Cache struct {
	Packages map[string][]string `json:"packages"`
}

Cache represent the installed package cache TODO when managing archive refactor this

func Read

func Read(path string) (*Cache, error)

Read a cache from target path

func (*Cache) AddPackage

func (c *Cache) AddPackage(pkg string, files []string)

AddPackage add given package alongside his files into the cache

func (*Cache) GetFiles

func (c *Cache) GetFiles(pkg string) []string

GetFiles return files associated with given package return nil if no such package exist

func (*Cache) RemovePackage

func (c *Cache) RemovePackage(pkg string)

RemovePackage remove given package from cache

Jump to

Keyboard shortcuts

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