module

package
v0.0.10 Latest Latest
Warning

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

Go to latest
Published: May 30, 2023 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ColocateModules

func ColocateModules(metadataFilePath string, out string, modulePaths []string) error

ColocateModules colocates the given module paths to the given out directory.

Types

type Command

type Command struct {
	Local    *CommandLocal    `command:"local"`
	Registry *CommandRegistry `command:"registry"`
}

Command represents the `module` command and available subcommands.

type CommandLocal

type CommandLocal struct {
	Name string `long:"name" required:"true" description:"The Please name of the Terraform module."`
	Pkg  string `long:"pkg" required:"true" description:"The Please package of the Terraform module."`
	Srcs string `` /* 128-byte string literal not displayed */
	Out  string `long:"out" required:"true" description:"The directory to write the processed Terraform module to."`

	Aliases []string `` /* 138-byte string literal not displayed */
	Strip   []string `long:"strip" required:"false" description:"The directories to strip from the Terraform module."`
	Deps    []string `long:"deps" required:"false" description:"Other Terraform modules that this Terraform module depends on."`

	Opts *Opts
}

CommandLocal represents the `module local` command and its flags.

func (*CommandLocal) Execute

func (c *CommandLocal) Execute(args []string) error

Execute builds a Terraform Registry Module as a Terraform Module.

type CommandRegistry

type CommandRegistry struct {
	Name       string   `long:"name"`
	Registry   string   `long:"registry" description:""`
	Namespace  string   `long:"namespace" description:""`
	ModuleName string   `long:"module_name"`
	Version    string   `long:"version" description:""`
	Provider   string   `long:"provider" description:""`
	Aliases    []string `long:"aliases" description:""`
	Pkg        string   `long:"pkg" description:""`
	Strip      []string `long:"strip" description:""`
	Deps       []string `long:"deps" description:""`
	Out        string   `long:"out" description:""`

	Opts *Opts
}

CommandRegistry represents the `module local` command and its flags.

func (*CommandRegistry) Download

func (c *CommandRegistry) Download(downloadURL string) error

Download retrieves the configured Terraform Module from the configured Terraform Registry.

func (*CommandRegistry) Execute

func (c *CommandRegistry) Execute(args []string) error

Execute builds a Terraform Registry Module as a Terraform Module.

func (*CommandRegistry) GetDownloadURL

func (c *CommandRegistry) GetDownloadURL() (string, error)

GetDownloadURL returns the `hashicorp/go-getter` compatible URI.

type Metadata

type Metadata struct {
	Target  string
	Aliases []string
}

Metadata represents a module's metadata.

func Load

func Load(path string) (*Metadata, error)

Load returns a module's Metadata loaded from the given directory.

func (*Metadata) Save

func (m *Metadata) Save(path string) error

Save saves the Metadata data to be re-used in other workflows.

func (*Metadata) StripDirs

func (m *Metadata) StripDirs(out string, strip []string) error

StripDirs strips the configured directories from the module.

type Opts

type Opts struct {
	// The file in which Please module metadata is stored in relative to each module.
	MetadataFile string `` /* 153-byte string literal not displayed */
}

Opts represent the available options to this Module package as whole.

Jump to

Keyboard shortcuts

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