tfmod

package module
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Jul 7, 2024 License: Apache-2.0 Imports: 15 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 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 DependenciesRunner added in v0.0.4

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

func NewDependenciesRunner added in v0.0.4

func NewDependenciesRunner(flags *DependenciesFlags, store Store, io *IO) *DependenciesRunner

func (*DependenciesRunner) List added in v0.0.4

func (r *DependenciesRunner) List() ([]string, error)

func (*DependenciesRunner) Run added in v0.0.4

func (r *DependenciesRunner) Run() error

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 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 DependentsRunner added in v0.0.4

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

func NewDependentsRunner added in v0.0.4

func NewDependentsRunner(flags *DependentsFlags, store Store, io *IO) *DependentsRunner

func (*DependentsRunner) List added in v0.0.4

func (r *DependentsRunner) List() ([]string, error)

func (*DependentsRunner) Run added in v0.0.4

func (r *DependentsRunner) Run() error

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 GetFlags added in v0.0.4

type GetFlags struct {
	*GlobalFlags
}

func NewGetFlags added in v0.0.4

func NewGetFlags(globalFlags *GlobalFlags) *GetFlags

func (*GetFlags) GoString added in v0.0.4

func (f *GetFlags) GoString() string

type GetRunner added in v0.0.4

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

func NewGetRunner added in v0.0.4

func NewGetRunner(flags *GetFlags, store Store, io *IO) *GetRunner

func (*GetRunner) Run added in v0.0.4

func (r *GetRunner) Run() error

func (*GetRunner) TerraformGet added in v0.0.4

func (r *GetRunner) TerraformGet() ([]string, error)

type GlobalFlags added in v0.0.2

type GlobalFlags struct {
	BaseDir  string
	Format   string
	EnableTf bool
	Debug    bool
}

func (*GlobalFlags) GetBaseDir added in v0.0.4

func (f *GlobalFlags) GetBaseDir() *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) []string

func (*InMemoryStore) ListTfDirs added in v0.0.3

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

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 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 *dir.Dir, raw []byte) ([]*ModuleDir, error)

func (*Parser) ParseAll

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

type Store

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

type Terraform

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

func NewTerraform

func NewTerraform(baseDir *dir.BaseDir, enable bool) *Terraform

func (*Terraform) GetAll added in v0.0.4

func (t *Terraform) GetAll() ([]*dir.Dir, 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