examine

package
v0.92.15 Latest Latest
Warning

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

Go to latest
Published: May 1, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Examine

func Examine(fs afero.Fs, path string) error

Examine loads local modules and compares them to their latest version to see differences TODO: Comparison between local and latest

func GetFromGithub

func GetFromGithub(fs afero.Fs, repo string) (*tfconfig.Module, error)

GetFromGithub Retrieves modules that are available through github

func GetLocalModules

func GetLocalModules(fs afero.Fs, dir string) (*tfconfig.Module, error)

GetLocalModules retrieves all terraform modules within a given directory TODO:(EC) Define local and global modules OR rename the values

Types

type Input

type Input struct {
	Name     string `json:"name"`
	Type     string `json:"type"`
	Required bool   `json:"required"`
}

type ModuleWrapper

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

TODO:(EC) Add a RegistryModule field

func LatestModuleVersions

func LatestModuleVersions(fs afero.Fs, module *tfconfig.Module) ([]ModuleWrapper, error)

LatestModuleVersions retrieves the latest version of the provided modules

type Output

type Output struct {
	Name string `json:"name"`
}

type RegistryModule

type RegistryModule struct {
	ID         string      `json:"id"`
	Namespace  string      `json:"namespace"`
	Name       string      `json:"name"`
	Version    string      `json:"version"`
	Provider   string      `json:"provider"`
	Source     string      `json:"source"`
	Tag        string      `json:"tag"`
	Root       Root        `json:"root"`
	Submodules []Submodule `json:"submodules"`
	Providers  []string    `json:"providers"`
	Versions   []string    `json:"versions"`
}

type Resource

type Resource struct {
	Name string `json:"name"`
	Type string `json:"type"`
}

type Root

type Root struct {
	Inputs    []Input    `json:"inputs"`
	Outputs   []Output   `json:"outputs"`
	Resources []Resource `json:"resources"`
}

type Submodule

type Submodule struct {
	Path      string     `json:"path"`
	Name      string     `json:"name"`
	Inputs    []Input    `json:"inputs"`
	Outputs   []Output   `json:"outputs"`
	Resources []Resource `json:"resources"`
}

Jump to

Keyboard shortcuts

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