Documentation ¶
Index ¶
- Variables
- func NewRecipeFile(recipeFileString string) (*types.OpenInstallationRecipe, error)
- type LocalRecipeFetcher
- func (f *LocalRecipeFetcher) FetchRecipe(ctx context.Context, manifest *types.DiscoveryManifest, friendlyName string) (*types.OpenInstallationRecipe, error)
- func (f *LocalRecipeFetcher) FetchRecipes(ctx context.Context, manifest *types.DiscoveryManifest) ([]types.OpenInstallationRecipe, error)
- func (f *LocalRecipeFetcher) FetchRecommendations(ctx context.Context, manifest *types.DiscoveryManifest) ([]types.OpenInstallationRecipe, error)
- type MockRecipeFetcher
- func (f *MockRecipeFetcher) FetchRecipe(ctx context.Context, manifest *types.DiscoveryManifest, friendlyName string) (*types.OpenInstallationRecipe, error)
- func (f *MockRecipeFetcher) FetchRecipes(ctx context.Context, manifest *types.DiscoveryManifest) ([]types.OpenInstallationRecipe, error)
- func (f *MockRecipeFetcher) FetchRecommendations(ctx context.Context, manifest *types.DiscoveryManifest) ([]types.OpenInstallationRecipe, error)
- type MockRecipeFileFetcher
- type NerdGraphClient
- type RecipeFetcher
- type RecipeFileFetcher
- type RecipeFileFetcherImpl
- type ServiceRecipeFetcher
- func (f *ServiceRecipeFetcher) FetchRecipe(ctx context.Context, manifest *types.DiscoveryManifest, friendlyName string) (*types.OpenInstallationRecipe, error)
- func (f *ServiceRecipeFetcher) FetchRecipes(ctx context.Context, manifest *types.DiscoveryManifest) ([]types.OpenInstallationRecipe, error)
- func (f *ServiceRecipeFetcher) FetchRecommendations(ctx context.Context, manifest *types.DiscoveryManifest) ([]types.OpenInstallationRecipe, error)
Constants ¶
This section is empty.
Variables ¶
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 LocalRecipeFetcher ¶ added in v0.24.0
type LocalRecipeFetcher struct {
Path string
}
func (*LocalRecipeFetcher) FetchRecipe ¶ added in v0.24.0
func (f *LocalRecipeFetcher) FetchRecipe(ctx context.Context, manifest *types.DiscoveryManifest, friendlyName string) (*types.OpenInstallationRecipe, error)
func (*LocalRecipeFetcher) FetchRecipes ¶ added in v0.24.0
func (f *LocalRecipeFetcher) FetchRecipes(ctx context.Context, manifest *types.DiscoveryManifest) ([]types.OpenInstallationRecipe, error)
func (*LocalRecipeFetcher) FetchRecommendations ¶ added in v0.24.0
func (f *LocalRecipeFetcher) FetchRecommendations(ctx context.Context, manifest *types.DiscoveryManifest) ([]types.OpenInstallationRecipe, error)
type MockRecipeFetcher ¶
type MockRecipeFetcher struct { FetchRecipeErr error FetchRecipesErr error FetchRecommendationsErr error FetchRecipeCallCount int FetchRecipesCallCount int FetchRecommendationsCallCount int FetchRecipeVals []types.OpenInstallationRecipe FetchRecipeVal *types.OpenInstallationRecipe FetchRecipesVal []types.OpenInstallationRecipe FetchRecommendationsVal []types.OpenInstallationRecipe FetchRecipeNameCount map[string]int }
func NewMockRecipeFetcher ¶
func NewMockRecipeFetcher() *MockRecipeFetcher
func (*MockRecipeFetcher) FetchRecipe ¶
func (f *MockRecipeFetcher) FetchRecipe(ctx context.Context, manifest *types.DiscoveryManifest, friendlyName string) (*types.OpenInstallationRecipe, error)
func (*MockRecipeFetcher) FetchRecipes ¶
func (f *MockRecipeFetcher) FetchRecipes(ctx context.Context, manifest *types.DiscoveryManifest) ([]types.OpenInstallationRecipe, error)
func (*MockRecipeFetcher) FetchRecommendations ¶
func (f *MockRecipeFetcher) FetchRecommendations(ctx context.Context, manifest *types.DiscoveryManifest) ([]types.OpenInstallationRecipe, error)
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 RecipeFetcher ¶
type RecipeFetcher interface { FetchRecipe(context.Context, *types.DiscoveryManifest, string) (*types.OpenInstallationRecipe, error) FetchRecommendations(context.Context, *types.DiscoveryManifest) ([]types.OpenInstallationRecipe, error) FetchRecipes(context.Context, *types.DiscoveryManifest) ([]types.OpenInstallationRecipe, error) }
RecipeFetcher is responsible for retrieving recipe information.
func NewServiceRecipeFetcher ¶
func NewServiceRecipeFetcher(client NerdGraphClient) RecipeFetcher
NewServiceRecipeFetcher returns a new instance of ServiceRecipeFetcher.
type RecipeFileFetcher ¶
type RecipeFileFetcher interface { FetchRecipeFile(recipeURL *url.URL) (*types.OpenInstallationRecipe, error) LoadRecipeFile(filename string) (*types.OpenInstallationRecipe, error) }
func NewRecipeFileFetcher ¶
func NewRecipeFileFetcher() RecipeFileFetcher
type RecipeFileFetcherImpl ¶
type RecipeFileFetcherImpl struct { HTTPGetFunc func(string) (*http.Response, error) // contains filtered or unexported fields }
func (*RecipeFileFetcherImpl) FetchRecipeFile ¶
func (f *RecipeFileFetcherImpl) FetchRecipeFile(recipeURL *url.URL) (*types.OpenInstallationRecipe, error)
func (*RecipeFileFetcherImpl) LoadRecipeFile ¶
func (f *RecipeFileFetcherImpl) LoadRecipeFile(filename string) (*types.OpenInstallationRecipe, error)
type ServiceRecipeFetcher ¶
type ServiceRecipeFetcher struct {
// contains filtered or unexported fields
}
ServiceRecipeFetcher is an implementation of the recipeFetcher interface that relies on the Neerdgraph-stitched recipe service to source its results.
func (*ServiceRecipeFetcher) FetchRecipe ¶
func (f *ServiceRecipeFetcher) FetchRecipe(ctx context.Context, manifest *types.DiscoveryManifest, friendlyName string) (*types.OpenInstallationRecipe, error)
FetchRecipe gets a recipe by name from the recipe service.
func (*ServiceRecipeFetcher) FetchRecipes ¶
func (f *ServiceRecipeFetcher) FetchRecipes(ctx context.Context, manifest *types.DiscoveryManifest) ([]types.OpenInstallationRecipe, error)
FetchRecipes fetches all available recipes from the recipe service.
func (*ServiceRecipeFetcher) FetchRecommendations ¶
func (f *ServiceRecipeFetcher) FetchRecommendations(ctx context.Context, manifest *types.DiscoveryManifest) ([]types.OpenInstallationRecipe, error)
FetchRecommendations fetches recipe recommendations from the recipe service based on the information passed in the provided DiscoveryManifest.
Click to show internal directories.
Click to hide internal directories.