store

package
v2.8.3 Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2021 License: MIT Imports: 21 Imported by: 2

Documentation

Index

Constants

View Source
const DISK_GLOBAL_KEY = "__packr_global__"

Variables

This section is empty.

Functions

func Clean

func Clean(root string) error

func GoBin

func GoBin() string

GoBin returns the current GO_BIN env var or if it's missing, a default of "go"

func GoPath

func GoPath() string

GoPath returns the current GOPATH env var or if it's missing, the default.

Types

type Disk

type Disk struct {
	DBPath    string
	DBPackage string
	// contains filtered or unexported fields
}

func NewDisk

func NewDisk(path string, pkg string) *Disk

func (*Disk) Clean

func (d *Disk) Clean(box *parser.Box) error

func (*Disk) Close

func (d *Disk) Close() error

Close ...

func (*Disk) FileNames

func (d *Disk) FileNames(box *parser.Box) ([]string, error)

func (*Disk) Files

func (d *Disk) Files(box *parser.Box) ([]*parser.File, error)

func (*Disk) Pack

func (d *Disk) Pack(box *parser.Box) error

type FnStore

type FnStore struct {
	FileNamesFn func(*parser.Box) ([]string, error)
	FilesFn     func(*parser.Box) ([]*parser.File, error)
	PackFn      func(*parser.Box) error
	CleanFn     func(*parser.Box) error
}

func (*FnStore) Clean

func (f *FnStore) Clean(box *parser.Box) error

func (*FnStore) FileNames

func (f *FnStore) FileNames(box *parser.Box) ([]string, error)

func (*FnStore) Files

func (f *FnStore) Files(box *parser.Box) ([]*parser.File, error)

func (*FnStore) Pack

func (f *FnStore) Pack(box *parser.Box) error

type Legacy

type Legacy struct {
	*Disk
	// contains filtered or unexported fields
}

func NewLegacy

func NewLegacy() *Legacy

func (*Legacy) Close

func (l *Legacy) Close() error

Close ...

func (*Legacy) Pack

func (l *Legacy) Pack(box *parser.Box) error

type Store

type Store interface {
	FileNames(*parser.Box) ([]string, error)
	Files(*parser.Box) ([]*parser.File, error)
	Pack(*parser.Box) error
	Clean(*parser.Box) error
}

Directories

Path Synopsis
_fixtures

Jump to

Keyboard shortcuts

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