manager

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2023 License: Apache-2.0 Imports: 13 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// offer sane defaults for proto vendoring
	DefaultMatchPatterns = []string{anyvendor.ProtoMatchPattern}
)
View Source
var (
	IrregularFileError = func(file string) error {
		return eris.Errorf("%s is not a regular file", file)
	}
)

Functions

func NewCopier

func NewCopier(fs afero.Fs, skipDirs []string) *copier

func NewDefaultCopier

func NewDefaultCopier() *copier

func NewGoModFactory

func NewGoModFactory(settings *anyvendor.FactorySettings) (*goModFactory, error)

Types

type FileCopier

type FileCopier interface {
	Copy(src, dst string) (int64, error)
	GetMatches(copyPat []string, dir string) ([]string, error)
}

This interface is used to abstract away the methods which require ENV vars or other system things. This is mostly for unit testing purposes.

type Manager

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

The manager is the external facing object that will be responsible for ensuring a given anyvendor config, as outlined by the `anyvendor.Config` object.

func NewManager

func NewManager(ctx context.Context, cwd string) (*Manager, error)

func NewManagerWithSettings added in v0.0.3

func NewManagerWithSettings(ctx context.Context, settings *anyvendor.FactorySettings) (*Manager, error)

func (*Manager) Ensure

func (m *Manager) Ensure(ctx context.Context, opts *anyvendor.Config) error

Directories

Path Synopsis
Package mock_manager is a generated GoMock package.
Package mock_manager is a generated GoMock package.

Jump to

Keyboard shortcuts

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