cookbook

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Jul 21, 2023 License: GPL-3.0 Imports: 22 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cookbook

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

func NewCookbook

func NewCookbook(
	box *packr.Box,
	workspacePath string,
	outputBuffer, errorBuffer io.Writer,
) (*Cookbook, error)

func (*Cookbook) CookbookList

func (c *Cookbook) CookbookList(importedOnly bool) []*CookbookMetadata

func (*Cookbook) DeleteImportedCookbook

func (c *Cookbook) DeleteImportedCookbook(name string) error

func (*Cookbook) GetCookbook

func (c *Cookbook) GetCookbook(name string) *CookbookMetadata

func (*Cookbook) GetRecipe

func (c *Cookbook) GetRecipe(recipeKey, iaas string) Recipe

func (*Cookbook) HasRecipe

func (c *Cookbook) HasRecipe(recipeKey, iaas string) bool

func (*Cookbook) IaaSList

func (c *Cookbook) IaaSList() []provider.CloudProvider

func (*Cookbook) ImportCookbook

func (c *Cookbook) ImportCookbook(cookbookPath string) (err error)

func (*Cookbook) MarshalJSON

func (c *Cookbook) MarshalJSON() ([]byte, error)

func (*Cookbook) RecipeList

func (c *Cookbook) RecipeList() []CookbookRecipeInfo

func (*Cookbook) SetRecipe

func (c *Cookbook) SetRecipe(recipe Recipe)

func (*Cookbook) UnmarshalJSON

func (c *Cookbook) UnmarshalJSON(b []byte) error

func (*Cookbook) Validate

func (c *Cookbook) Validate() error

type CookbookMetadata

type CookbookMetadata struct {
	CookbookName     string `yaml:"cookbook-name"`
	CookbookVersion  string `yaml:"cookbook-version"`
	Description      string `yaml:"description"`
	TerraformVersion string `yaml:"terraform-version"`
	TargetOsName     string `yaml:"target-os-name"`
	TargetOsArch     string `yaml:"target-os-arch"`

	EnvVars [][]string `yaml:"env-args"`

	Imported bool
	Recipes  []string
	// contains filtered or unexported fields
}

type CookbookRecipeInfo

type CookbookRecipeInfo struct {
	RecipeKey string

	CookbookName    string
	CookbookVersion string
	RecipeName      string

	IsBastion bool
	IaaSList  []provider.CloudProvider
}

type Recipe

type Recipe interface {
	config.Configurable

	CreateCLI(
		workingPath string,
		outputBuffer, errorBuffer io.Writer,
	) (run.CLI, error)

	ConfigPath() string
	PluginPath() string
	StatePath() string
	RunPath() string

	GetVariable(name string) (*Variable, bool)
	GetVariables() []*Variable
	GetKeyFieldValues() []string

	IsBastion() bool
	ResourceInstanceList() []string
	ResourceInstanceDataList() []string

	BackendType() string

	RepoTimestamp() string
	CookbookName() string
	CookbookVersion() string
	RecipeName() string
	RecipeIaaS() string
	RecipeKey() string

	AddEnvVars(vars map[string]string)
}

func NewRecipe

func NewRecipe(
	recipeKey,
	recipeIaaS,
	tfConfigPath,
	tfPluginPath,
	tfStatePath,
	tfCLIPath,
	workingDirectory,
	repoTimestamp,
	cookbookName,
	cookbookVersion,
	recipeName string,
	recipeEnvVars [][]string,
) (Recipe, error)

type Variable

type Variable struct {
	Name     string  `json:"name"`
	Value    *string `json:"value"`
	Optional bool    `json:"optional"`
}

Jump to

Keyboard shortcuts

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