terraform

package
v0.2.3 Latest Latest
Warning

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

Go to latest
Published: Jul 19, 2024 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	RootModuleDir   = "."
	ModulesDir      = ".terraform" + string(os.PathSeparator) + "modules"
	ModulesJsonPath = ModulesDir + string(os.PathSeparator) + "modules.json"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Command

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

func NewCommand

func NewCommand(maxConcurrent int) *Command

func (*Command) GetAll

func (c *Command) GetAll(ctx context.Context, workDirs []*dir.Dir) error

type DependencyGraph

type DependencyGraph struct {
	*dir.Graph[StateDir, ModuleDir]
}

func NewDependencyGraph

func NewDependencyGraph() *DependencyGraph

type DependencyStore

type DependencyStore struct {
	*DependencyGraph
}

func NewDependencyStore

func NewDependencyStore() *DependencyStore

func (*DependencyStore) Dump

func (s *DependencyStore) Dump()

func (*DependencyStore) List

func (s *DependencyStore) List(stateDirs []*dir.Dir) []string

func (*DependencyStore) Save

func (s *DependencyStore) Save(moduleDir *ModuleDir, stateDir *StateDir)

type DependentGraph

type DependentGraph struct {
	*dir.Graph[ModuleDir, StateDir]
}

func NewDependentGraph

func NewDependentGraph() *DependentGraph

func (*DependentGraph) IsModule

func (m *DependentGraph) IsModule(src dir.Path) bool

type DependentStore

type DependentStore struct {
	*DependentGraph
}

func NewDependentStore

func NewDependentStore() *DependentStore

func (*DependentStore) Dump

func (s *DependentStore) Dump()

func (*DependentStore) List

func (s *DependentStore) List(moduleDirs []*dir.Dir) []string

func (*DependentStore) Save

func (s *DependentStore) Save(moduleDir *ModuleDir, stateDir *StateDir)

type Filter

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

func NewFilter

func NewFilter(baseDir *dir.BaseDir) *Filter

func (*Filter) SubDirs

func (t *Filter) SubDirs() ([]*dir.Dir, error)

type ModuleDir

type ModuleDir struct {
	*dir.Dir
}

func NewModuleDir

func NewModuleDir(raw string, baseDir *dir.BaseDir) *ModuleDir

type Parser

type Parser struct {
	ParserStore
}

func NewParser

func NewParser(store ParserStore) *Parser

func (*Parser) Parse

func (p *Parser) Parse(sourceDir *dir.Dir, raw []byte) ([]*ModuleDir, error)

func (*Parser) ParseAll

func (p *Parser) ParseAll(sourceDirs []*dir.Dir) error

type ParserStore

type ParserStore interface {
	Save(moduleDir *ModuleDir, stateDir *StateDir)
}

type StateDir added in v0.0.6

type StateDir struct {
	*dir.Dir
}

func NewStateDir added in v0.0.6

func NewStateDir(raw string, baseDir *dir.BaseDir) *StateDir

type Store

type Store interface {
	Save(moduleDir *ModuleDir, stateDir *StateDir)
	List(dirs []*dir.Dir) []string
	Dump()
}

type TerraformModule

type TerraformModule struct {
	Key    string `json:"Key"`
	Source string `json:"Source"`
	Dir    string `json:"Dir"`
}

type TerraformModulesJson

type TerraformModulesJson struct {
	Modules []TerraformModule `json:"Modules"`
}

Jump to

Keyboard shortcuts

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