recipes

package
v0.41.10 Latest Latest
Warning

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

Go to latest
Published: Jan 11, 2022 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	//go:embed files/*
	EmbeddedFS embed.FS
)
View Source
var ErrRecipeNotFound = errors.New("recipe not found")

ErrRecipeNotFound is used when a recipe is requested by name, but does not exist for the given constraint.

Functions

func NewRecipeFile

func NewRecipeFile(recipeFileString string) (*types.OpenInstallationRecipe, error)

Types

type EmbeddedRecipeFetcher added in v0.31.0

type EmbeddedRecipeFetcher struct{}

func NewEmbeddedRecipeFetcher added in v0.31.0

func NewEmbeddedRecipeFetcher() *EmbeddedRecipeFetcher

func (*EmbeddedRecipeFetcher) FetchLibraryVersion added in v0.32.0

func (f *EmbeddedRecipeFetcher) FetchLibraryVersion(ctx context.Context) string

func (*EmbeddedRecipeFetcher) FetchRecipes added in v0.31.0

type LocalRecipeFetcher added in v0.24.0

type LocalRecipeFetcher struct {
	Path string
}

func (*LocalRecipeFetcher) FetchLibraryVersion added in v0.32.0

func (f *LocalRecipeFetcher) FetchLibraryVersion(ctx context.Context) string

func (*LocalRecipeFetcher) FetchRecipes added in v0.24.0

type MockNerdGraphClient added in v0.29.0

type MockNerdGraphClient struct {
	RespBody interface{}
}

func NewMockNerdGraphClient added in v0.29.0

func NewMockNerdGraphClient() *MockNerdGraphClient

func (*MockNerdGraphClient) QueryWithResponseAndContext added in v0.29.0

func (c *MockNerdGraphClient) QueryWithResponseAndContext(ctx context.Context, query string, variables map[string]interface{}, respBody interface{}) error

type MockProcessFilterer added in v0.28.0

type MockProcessFilterer struct {
	FilterVal       []types.MatchedProcess
	FilterCallCount int
}

func NewMockProcessFilterer added in v0.28.0

func NewMockProcessFilterer() *MockProcessFilterer

func (*MockProcessFilterer) Filter added in v0.28.0

type MockRecipeFetcher

type MockRecipeFetcher struct {
	FetchRecipesErr       error
	FetchRecipesCallCount int
	FetchRecipesVal       []types.OpenInstallationRecipe
}

func NewMockRecipeFetcher

func NewMockRecipeFetcher() *MockRecipeFetcher

func (*MockRecipeFetcher) FetchLibraryVersion added in v0.32.0

func (f *MockRecipeFetcher) FetchLibraryVersion(ctx context.Context) string

func (*MockRecipeFetcher) FetchRecipes

type MockRecipeFileFetcher

type MockRecipeFileFetcher struct {
	FetchRecipeFileFunc func(*url.URL) (*types.OpenInstallationRecipe, error)
	LoadRecipeFileFunc  func(string) (*types.OpenInstallationRecipe, error)
}

func NewMockRecipeFileFetcher

func NewMockRecipeFileFetcher() *MockRecipeFileFetcher

func (*MockRecipeFileFetcher) FetchRecipeFile

func (f *MockRecipeFileFetcher) FetchRecipeFile(url *url.URL) (*types.OpenInstallationRecipe, error)

func (*MockRecipeFileFetcher) LoadRecipeFile

func (f *MockRecipeFileFetcher) LoadRecipeFile(filename string) (*types.OpenInstallationRecipe, error)

type NerdGraphClient

type NerdGraphClient interface {
	QueryWithResponseAndContext(context.Context, string, map[string]interface{}, interface{}) error
}

type ProcessMatchFinder added in v0.28.0

type ProcessMatchRecipeFilterer added in v0.28.0

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

func NewProcessMatchRecipeFilterer added in v0.28.0

func NewProcessMatchRecipeFilterer() *ProcessMatchRecipeFilterer

func (*ProcessMatchRecipeFilterer) Filter added in v0.28.0

type RecipeFetcher

type RecipeFetcher interface {
	FetchRecipes(context.Context) ([]types.OpenInstallationRecipe, error)
	FetchLibraryVersion(context.Context) string
}

RecipeFetcher is responsible for retrieving recipe information.

type RecipeFileFetcher

type RecipeFileFetcher struct {
	HTTPGetFunc func(string) (*http.Response, error)
	// contains filtered or unexported fields
}

func NewRecipeFileFetcher

func NewRecipeFileFetcher() *RecipeFileFetcher

func (*RecipeFileFetcher) FetchRecipeFile

func (f *RecipeFileFetcher) FetchRecipeFile(recipeURL *url.URL) (*types.OpenInstallationRecipe, error)

func (*RecipeFileFetcher) LoadRecipeFile

func (f *RecipeFileFetcher) LoadRecipeFile(filename string) (*types.OpenInstallationRecipe, error)

type RecipeFilterRunner added in v0.28.0

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

func NewRecipeFilterRunner added in v0.28.0

func NewRecipeFilterRunner(ic types.InstallerContext, s *execution.InstallStatus) *RecipeFilterRunner

func (*RecipeFilterRunner) EnsureDoesNotFilter added in v0.29.2

func (*RecipeFilterRunner) RunFilter added in v0.28.0

func (*RecipeFilterRunner) RunFilterAll added in v0.29.2

type RecipeFilterer added in v0.28.0

type RecipeFilterer interface {
	Filter(context.Context, *types.OpenInstallationRecipe, *types.DiscoveryManifest) bool
}

type RecipeRepository added in v0.28.0

type RecipeRepository struct {
	RecipeLoaderFunc func() ([]types.OpenInstallationRecipe, error)
	// contains filtered or unexported fields
}

func NewRecipeRepository added in v0.28.0

func NewRecipeRepository(loaderFunc func() ([]types.OpenInstallationRecipe, error)) *RecipeRepository

NewRecipeRepository returns a new instance of types.RecipeRepository.

func (*RecipeRepository) FindAll added in v0.28.0

type RegexProcessMatchFinder added in v0.28.0

type RegexProcessMatchFinder struct{}

func NewRegexProcessMatchFinder added in v0.28.0

func NewRegexProcessMatchFinder() *RegexProcessMatchFinder

func (*RegexProcessMatchFinder) FindMatches added in v0.28.0

func (*RegexProcessMatchFinder) FindMatchesMultiple added in v0.28.0

func (f *RegexProcessMatchFinder) FindMatchesMultiple(ctx context.Context, processes []types.GenericProcess, recipes []types.OpenInstallationRecipe) []types.MatchedProcess

type ScriptEvaluationRecipeFilterer added in v0.28.0

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

func NewScriptEvaluationRecipeFilterer added in v0.28.0

func NewScriptEvaluationRecipeFilterer(installStatus *execution.InstallStatus) *ScriptEvaluationRecipeFilterer

func (*ScriptEvaluationRecipeFilterer) Filter added in v0.28.0

type SkipFilterer added in v0.28.0

type SkipFilterer struct {
	*execution.InstallStatus
	// contains filtered or unexported fields
}

func NewSkipFilterer added in v0.28.0

func NewSkipFilterer(s *execution.InstallStatus) *SkipFilterer

func (*SkipFilterer) Filter added in v0.28.0

func (*SkipFilterer) OnlyNames added in v0.28.0

func (f *SkipFilterer) OnlyNames(names ...string)

func (*SkipFilterer) SkipKeywords added in v0.28.0

func (f *SkipFilterer) SkipKeywords(keywords ...string)

func (*SkipFilterer) SkipNames added in v0.28.0

func (f *SkipFilterer) SkipNames(names ...string)

func (*SkipFilterer) SkipTypes added in v0.28.0

func (f *SkipFilterer) SkipTypes(types ...string)

Jump to

Keyboard shortcuts

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