applylist

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Sep 25, 2019 License: Apache-2.0 Imports: 5 Imported by: 9

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PrependToEachPath added in v0.2.0

func PrependToEachPath(prefix string, paths []string) []string

PrependToEachPath prepends the specified prefix path to the base path, using path.Join to handle slashes.

Types

type Factory

type Factory struct {
	RepoPath      string
	BlacklistPath string
	WhitelistPath string
	FileSystem    sysutil.FileSystemInterface
}

Factory handles constructing the list of files to apply and the blacklist.

func (*Factory) Create

func (f *Factory) Create(rawList []string) (applyList, blacklist, whitelist []string, err error)

Create takes in a preliminary list of candidate files for applying, and filters against the blacklist and whitelist. Three alphabetically sorted lists are returned: the final list of files to apply, the blacklist, and the whitelist.

type FactoryInterface

type FactoryInterface interface {
	Create([]string) (applyList, blacklist, whitelist []string, err error)
}

FactoryInterface allows for mocking out the functionality of Factory when testing the full process of an apply run.

type MockFactoryInterface

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

MockFactoryInterface is a mock of FactoryInterface interface

func NewMockFactoryInterface

func NewMockFactoryInterface(ctrl *gomock.Controller) *MockFactoryInterface

NewMockFactoryInterface creates a new mock instance

func (*MockFactoryInterface) Create

func (_m *MockFactoryInterface) Create(_param0 []string) ([]string, []string, []string, error)

Create mocks base method

func (*MockFactoryInterface) EXPECT

EXPECT returns an object that allows the caller to indicate expected use

type MockFactoryInterfaceMockRecorder added in v0.2.0

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

MockFactoryInterfaceMockRecorder is the mock recorder for MockFactoryInterface

func (*MockFactoryInterfaceMockRecorder) Create added in v0.2.0

func (_mr *MockFactoryInterfaceMockRecorder) Create(arg0 interface{}) *gomock.Call

Create indicates an expected call of Create

Jump to

Keyboard shortcuts

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