resourcesmanager

package
v3.8.0 Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2021 License: BSD-3-Clause Imports: 11 Imported by: 0

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.

Jump to

Keyboard shortcuts

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