dag

package
v0.2.8 Latest Latest
Warning

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

Go to latest
Published: Jan 28, 2023 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Discard = discard{}
View Source
var ErrDatabaseMoved = fmt.Errorf("dag/sqlite: database moved")
View Source
var ErrNotFound = fmt.Errorf("dag/sqlite: file not found")

Functions

This section is empty.

Types

type Cache added in v0.2.6

type Cache interface {
	Get(path string) (*virtual.File, error)
	Set(path string, file *virtual.File) error
	Link(from string, toPatterns ...string) error
	Delete(paths ...string) error
	Reset() error
	Close() error
}

type DB added in v0.2.6

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

func Load added in v0.2.6

func Load(log log.Log, dbPath string) (*DB, error)

func (*DB) Ancestors added in v0.2.6

func (c *DB) Ancestors(paths ...string) (deps []string, err error)

Ancestors returns all the ancestor paths. Those that depend on the given paths.

func (*DB) Close added in v0.2.6

func (c *DB) Close() error

func (*DB) Delete added in v0.2.6

func (c *DB) Delete(paths ...string) error

func (*DB) Files added in v0.2.6

func (c *DB) Files() ([]*File, error)

func (*DB) Get added in v0.2.6

func (c *DB) Get(path string) (*virtual.File, error)
func (c *DB) Link(from string, toPatterns ...string) error
func (c *DB) Links() ([]*Link, error)

func (*DB) Print added in v0.2.6

func (c *DB) Print(w io.Writer) error

Print the DAG in a dot graph format. That you can paste in here: https://dreampuf.github.io/GraphvizOnline

func (*DB) Reset added in v0.2.6

func (c *DB) Reset() error

func (*DB) Set added in v0.2.6

func (c *DB) Set(path string, file *virtual.File) error

type File added in v0.2.6

type File struct {
	Path  string
	Data  []byte
	Mode  fs.FileMode
	Links []string
}
type Link struct {
	From string
	To   string
}

Jump to

Keyboard shortcuts

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