Documentation ¶
Overview ¶
Package resourcesmanager contains the resources manager.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrDestDirEmpty = errors.New("resources: DestDir is empty") ErrSHA256Mismatch = errors.New("resources: sha256 mismatch") )
Errors returned by this package.
Functions ¶
This section is empty.
Types ¶
type CopyWorker ¶
type CopyWorker struct { DestDir string // mandatory Different func(left, right string) bool // optional Equal func(left, right string) bool // optional MkdirAll func(path string, perm os.FileMode) error // optional NewReader func(r io.Reader) (io.ReadCloser, error) // optional Open func(path string) (fs.File, error) // optional ReadAll func(r io.Reader) ([]byte, error) // optional ReadFile func(filename string) ([]byte, error) // optional WriteFile func(filename string, data []byte, perm fs.FileMode) error // optional }
CopyWorker ensures that resources are current. You always need to set the DestDir attribute. All the rest is optional.
func (*CopyWorker) Ensure ¶
func (cw *CopyWorker) Ensure() error
Ensure ensures that the resources on disk are current.
Click to show internal directories.
Click to hide internal directories.