tfmod

package module
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jul 4, 2024 License: Apache-2.0 Imports: 11 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 (
	ModulesPath       = ".terraform/modules/modules.json"
	SuppressTerraform = true
)

Variables

This section is empty.

Functions

func SimpleJsonMarshal

func SimpleJsonMarshal(v any) string

Types

type App

type App struct {
	*IO
	*Ldflags
	// 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 BaseDir

type BaseDir string

func (*BaseDir) ListTfDirs

func (d *BaseDir) ListTfDirs() (*TfDirs, error)

func (*BaseDir) String

func (d *BaseDir) String() string

type Dependencies

type Dependencies struct {
	Store
	BaseDir
	*IO
}

func NewDependencies

func NewDependencies(baseDir BaseDir, io *IO) *Dependencies

func (*Dependencies) Run

func (d *Dependencies) Run() error

type DependentMap

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

func NewDependentMap

func NewDependentMap() *DependentMap

func (*DependentMap) Add

func (m *DependentMap) Add(moduleDir ModuleDir, tfDir TfDir)

func (*DependentMap) IsModule

func (m *DependentMap) IsModule(moduleDir ModuleDir) bool

func (*DependentMap) ListTfDirSlice

func (m *DependentMap) ListTfDirSlice(moduleDir ModuleDir) []TfDir

func (*DependentMap) String

func (m *DependentMap) String() string

func (*DependentMap) ToJson

func (m *DependentMap) ToJson() string

type Dependents

type Dependents struct {
	SliceSourceDirs []string
	Store
	BaseDir
	*IO
}

func NewDependents

func NewDependents(baseDir BaseDir, io *IO) *Dependents

func (*Dependents) Run

func (d *Dependents) Run() error

type IO

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

type InMemoryStore

type InMemoryStore struct {
	*DependentMap
}

func NewStore

func NewStore() *InMemoryStore

func (*InMemoryStore) Dump

func (s *InMemoryStore) Dump() *DependentMap

func (*InMemoryStore) List

func (s *InMemoryStore) List(sourceDirs SourceDirs) *TfDirs

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
	BaseDir
	*IO
}

func NewLoader

func NewLoader(store Store, baseDir BaseDir, io *IO) *Loader

func (*Loader) Load

func (l *Loader) Load() error

type Module

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

type ModuleDir

type ModuleDir = string

type ModulesJson

type ModulesJson struct {
	Modules []Module `json:"Modules"`
}

type Parser

type Parser struct {
	BaseDir
	Store
}

func NewParser

func NewParser(baseDir BaseDir, store Store) *Parser

func (*Parser) Parse

func (p *Parser) Parse(tfDir TfDir, raw []byte) ([]ModuleDir, error)

func (*Parser) ParseAll

func (p *Parser) ParseAll(tfDirs *TfDirs) error

type SourceDir

type SourceDir = string

type SourceDirs

type SourceDirs []SourceDir

func NewSourceDirs

func NewSourceDirs(inputs []string) SourceDirs

type Store

type Store interface {
	Save(moduleDir ModuleDir, tfDir TfDir)
	List(sourceDirs SourceDirs) *TfDirs
	Dump() *DependentMap
}

type Terraform

type Terraform struct {
	*IO
}

func NewTerraform

func NewTerraform(io *IO) *Terraform

func (*Terraform) ExecuteGetAll

func (t *Terraform) ExecuteGetAll(dirs *TfDirs) error

type TfDir

type TfDir = string

type TfDirs

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

func NewTfDirs

func NewTfDirs() *TfDirs

func (*TfDirs) Add

func (d *TfDirs) Add(tfDir TfDir)

func (*TfDirs) List

func (d *TfDirs) List() []TfDir

func (*TfDirs) MarshalJSON

func (d *TfDirs) MarshalJSON() ([]byte, error)

func (*TfDirs) String

func (d *TfDirs) String() string

func (*TfDirs) ToJson

func (d *TfDirs) ToJson() string

Directories

Path Synopsis
cmd
tfmod command

Jump to

Keyboard shortcuts

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