tfmod

package module
v0.0.3 Latest Latest
Warning

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

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

README

template

The template repository.

Description

Template repository for developing with GitHub.

Usage

N/A

N/A

License

Apache 2 Licensed. See LICENSE for full details.

Documentation

Index

Constants

View Source
const (
	TerraformModulesPath = ".terraform/modules/modules.json"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type App

type App struct {
	*IO
	*Ldflags

	*GlobalFlags
	// contains filtered or unexported fields
}

func NewApp

func NewApp(io *IO, ldflags *Ldflags) *App

func (*App) Run

func (a *App) Run(args []string) error

type Dependencies

type Dependencies struct {
	Store
	*IO
	// contains filtered or unexported fields
}

func NewDependencies

func NewDependencies(flags *DependenciesFlags, store Store, io *IO) *Dependencies

func (*Dependencies) Run

func (d *Dependencies) Run() error

type DependenciesFlags added in v0.0.2

type DependenciesFlags struct {
	StateDirs []string
	*GlobalFlags
}

func NewDependenciesFlags added in v0.0.2

func NewDependenciesFlags(globalFlags *GlobalFlags) *DependenciesFlags

func (*DependenciesFlags) GoString added in v0.0.3

func (f *DependenciesFlags) GoString() string

type DependencyMap added in v0.0.3

type DependencyMap struct {
	*DirMap[TfDir, ModuleDir]
}

func NewDependencyMap added in v0.0.3

func NewDependencyMap() *DependencyMap

type DependentMap

type DependentMap struct {
	*DirMap[ModuleDir, TfDir]
}

func NewDependentMap

func NewDependentMap() *DependentMap

func (*DependentMap) IsModule

func (m *DependentMap) IsModule(dir string) bool

type Dependents

type Dependents struct {
	Store
	*IO
	// contains filtered or unexported fields
}

func NewDependents

func NewDependents(flags *DependentsFlags, store Store, io *IO) *Dependents

func (*Dependents) Run

func (d *Dependents) Run() error

type DependentsFlags added in v0.0.2

type DependentsFlags struct {
	ModuleDirs []string
	*GlobalFlags
}

func NewDependentsFlags added in v0.0.2

func NewDependentsFlags(globalFlags *GlobalFlags) *DependentsFlags

func (*DependentsFlags) GoString added in v0.0.3

func (f *DependentsFlags) GoString() string

type DirMap added in v0.0.3

type DirMap[S, D dir.Path] struct {
	// contains filtered or unexported fields
}

func NewDirMap added in v0.0.3

func NewDirMap[S, D dir.Path]() *DirMap[S, D]

func (*DirMap[S, D]) Add added in v0.0.3

func (m *DirMap[S, D]) Add(src *S, dst *D)

func (*DirMap[S, D]) Include added in v0.0.3

func (m *DirMap[S, D]) Include(src string) bool

func (*DirMap[S, D]) ListDst added in v0.0.3

func (m *DirMap[S, D]) ListDst(src string) []*D

func (*DirMap[S, D]) String added in v0.0.3

func (m *DirMap[S, D]) String() string

type Dirs added in v0.0.3

type Dirs struct {
	*collection.TreeSet
}

func NewDirs added in v0.0.3

func NewDirs() *Dirs

type GlobalFlags added in v0.0.2

type GlobalFlags struct {
	InputBaseDir string
	EnableTf     bool
	Debug        bool
}

func (*GlobalFlags) BaseDir added in v0.0.2

func (f *GlobalFlags) BaseDir() *dir.BaseDir

func (*GlobalFlags) GoString added in v0.0.3

func (f *GlobalFlags) GoString() string

type IO

type IO struct {
	InReader  io.Reader
	OutWriter io.Writer
	ErrWriter io.Writer
}

type InMemoryStore

type InMemoryStore struct {
	*DependencyMap
	*DependentMap
}

func NewInMemoryStore added in v0.0.2

func NewInMemoryStore() *InMemoryStore

func (*InMemoryStore) Dump

func (s *InMemoryStore) Dump()

func (*InMemoryStore) ListModuleDirs added in v0.0.3

func (s *InMemoryStore) ListModuleDirs(stateDirs []string) *Dirs

func (*InMemoryStore) ListTfDirs added in v0.0.3

func (s *InMemoryStore) ListTfDirs(moduleDirs []string) *Dirs

func (*InMemoryStore) Save

func (s *InMemoryStore) Save(moduleDir *ModuleDir, tfDir *TfDir)

type Ldflags

type Ldflags struct {
	Name    string
	Version string
	Commit  string
	Date    string
}

type Loader

type Loader struct {
	Store
	*dir.BaseDir
	// contains filtered or unexported fields
}

func NewLoader

func NewLoader(store Store, baseDir *dir.BaseDir, enableTf bool) *Loader

func (*Loader) Load

func (l *Loader) Load() error

type ModuleDir

type ModuleDir struct {
	*dir.Dir
}

func NewModuleDir added in v0.0.3

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

type Parser

type Parser struct {
	Store
}

func NewParser

func NewParser(store Store) *Parser

func (*Parser) Parse

func (p *Parser) Parse(sourceDir *SourceDir, raw []byte) ([]*ModuleDir, error)

func (*Parser) ParseAll

func (p *Parser) ParseAll(sourceDirs []*SourceDir) error

type SourceDir

type SourceDir struct {
	*dir.Dir
}

func NewSourceDir added in v0.0.3

func NewSourceDir(raw string, baseDir *dir.BaseDir) *SourceDir

func (*SourceDir) ToTfDir added in v0.0.3

func (d *SourceDir) ToTfDir() *TfDir

type Store

type Store interface {
	Save(moduleDir *ModuleDir, tfDir *TfDir)
	ListTfDirs(moduleDirs []string) *Dirs
	ListModuleDirs(stateDirs []string) *Dirs
	Dump()
}

type Terraform

type Terraform struct{}

func NewTerraform

func NewTerraform() *Terraform

func (*Terraform) ExecuteGetAll

func (t *Terraform) ExecuteGetAll(sourceDirs []*SourceDir, enable bool) error

type TerraformModule added in v0.0.3

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

type TerraformModulesJson added in v0.0.3

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

type TfDir

type TfDir struct {
	*dir.Dir
}

func NewTfDir added in v0.0.3

func NewTfDir(raw string, baseDir *dir.BaseDir) *TfDir

Directories

Path Synopsis
cmd
tfmod command
internal
dir

Jump to

Keyboard shortcuts

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