command

package
v0.10.3 Latest Latest
Warning

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

Go to latest
Published: Mar 16, 2023 License: MPL-2.0 Imports: 38 Imported by: 0

Documentation

Overview

Package command contains the logic for processing all the commands and subcommands. It uses the Tharsis SDK to interface with Tharsis API's remote Terraform backend.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewApplyCommandFactory

func NewApplyCommandFactory(meta *Metadata) func() (cli.Command, error)

NewApplyCommandFactory returns a applyCommand struct.

func NewConfigureCommandFactory

func NewConfigureCommandFactory(meta *Metadata) func() (cli.Command, error)

NewConfigureCommandFactory returns a configureCommand struct.

func NewConfigureListCommandFactory

func NewConfigureListCommandFactory(meta *Metadata) func() (cli.Command, error)

NewConfigureListCommandFactory returns a configureListCommand struct.

func NewDestroyCommandFactory

func NewDestroyCommandFactory(meta *Metadata) func() (cli.Command, error)

NewDestroyCommandFactory returns a destroyCommand struct.

func NewGroupCommandFactory

func NewGroupCommandFactory(meta *Metadata) func() (cli.Command, error)

NewGroupCommandFactory returns a groupCommand struct.

func NewGroupCreateCommandFactory

func NewGroupCreateCommandFactory(meta *Metadata) func() (cli.Command, error)

NewGroupCreateCommandFactory returns a groupCreateCommand struct.

func NewGroupDeleteCommandFactory

func NewGroupDeleteCommandFactory(meta *Metadata) func() (cli.Command, error)

NewGroupDeleteCommandFactory returns a groupCommandDelete struct.

func NewGroupGetCommandFactory

func NewGroupGetCommandFactory(meta *Metadata) func() (cli.Command, error)

NewGroupGetCommandFactory returns a groupGetCommand struct.

func NewGroupListCommandFactory

func NewGroupListCommandFactory(meta *Metadata) func() (cli.Command, error)

NewGroupListCommandFactory returns a groupListCommand struct.

func NewGroupSetEnvironmentVarsCommandFactory

func NewGroupSetEnvironmentVarsCommandFactory(meta *Metadata) func() (cli.Command, error)

NewGroupSetEnvironmentVarsCommandFactory returns a groupSetEnvironmentVarsCommand struct.

func NewGroupSetTerraformVarsCommandFactory

func NewGroupSetTerraformVarsCommandFactory(meta *Metadata) func() (cli.Command, error)

NewGroupSetTerraformVarsCommandFactory returns a groupSetTerraformVarsCommand struct.

func NewGroupUpdateCommandFactory

func NewGroupUpdateCommandFactory(meta *Metadata) func() (cli.Command, error)

NewGroupUpdateCommandFactory returns a groupUpdateCommand struct.

func NewLoginCommandFactory

func NewLoginCommandFactory(meta *Metadata) func() (cli.Command, error)

NewLoginCommandFactory returns a loginCommand struct.

func NewModuleCommandFactory added in v0.5.0

func NewModuleCommandFactory(meta *Metadata) func() (cli.Command, error)

NewModuleCommandFactory returns a moduleCommand struct.

func NewModuleCreateAttestationCommandFactory added in v0.8.0

func NewModuleCreateAttestationCommandFactory(meta *Metadata) func() (cli.Command, error)

NewModuleCreateAttestationCommandFactory returns a moduleCreateAttestationCommand struct.

func NewModuleCreateCommandFactory added in v0.5.0

func NewModuleCreateCommandFactory(meta *Metadata) func() (cli.Command, error)

NewModuleCreateCommandFactory returns a moduleCreateCommand struct.

func NewModuleDeleteAttestationCommandFactory added in v0.8.0

func NewModuleDeleteAttestationCommandFactory(meta *Metadata) func() (cli.Command, error)

NewModuleDeleteAttestationCommandFactory returns a moduleDeleteAttestationCommand struct.

func NewModuleDeleteCommandFactory added in v0.8.0

func NewModuleDeleteCommandFactory(meta *Metadata) func() (cli.Command, error)

NewModuleDeleteCommandFactory returns a moduleDeleteCommand struct.

func NewModuleDeleteVersionCommandFactory added in v0.8.0

func NewModuleDeleteVersionCommandFactory(meta *Metadata) func() (cli.Command, error)

NewModuleDeleteVersionCommandFactory returns a moduleDeleteVersionCommand struct.

func NewModuleGetCommandFactory added in v0.8.0

func NewModuleGetCommandFactory(meta *Metadata) func() (cli.Command, error)

NewModuleGetCommandFactory returns a moduleGetCommand struct.

func NewModuleGetVersionCommandFactory added in v0.8.0

func NewModuleGetVersionCommandFactory(meta *Metadata) func() (cli.Command, error)

NewModuleGetVersionCommandFactory returns a moduleGetVersionCommand struct.

func NewModuleListAttestationsCommandFactory added in v0.8.0

func NewModuleListAttestationsCommandFactory(meta *Metadata) func() (cli.Command, error)

NewModuleListAttestationsCommandFactory returns a moduleListAttestationsCommand struct.

func NewModuleListCommandFactory added in v0.8.0

func NewModuleListCommandFactory(meta *Metadata) func() (cli.Command, error)

NewModuleListCommandFactory returns a moduleListCommand struct.

func NewModuleListVersionsCommandFactory added in v0.8.0

func NewModuleListVersionsCommandFactory(meta *Metadata) func() (cli.Command, error)

NewModuleListVersionsCommandFactory returns a moduleListVersionsCommand struct.

func NewModuleUpdateAttestationCommandFactory added in v0.8.0

func NewModuleUpdateAttestationCommandFactory(meta *Metadata) func() (cli.Command, error)

NewModuleUpdateAttestationCommandFactory returns a moduleUpdateAttestationCommand struct.

func NewModuleUpdateCommandFactory added in v0.8.0

func NewModuleUpdateCommandFactory(meta *Metadata) func() (cli.Command, error)

NewModuleUpdateCommandFactory returns a moduleUpdateCommand struct.

func NewModuleUploadVersionCommandFactory added in v0.5.0

func NewModuleUploadVersionCommandFactory(meta *Metadata) func() (cli.Command, error)

NewModuleUploadVersionCommandFactory returns a moduleUploadVersionCommand struct.

func NewPlanCommandFactory

func NewPlanCommandFactory(meta *Metadata) func() (cli.Command, error)

NewPlanCommandFactory returns a planCommand struct.

func NewRunCancelCommandFactory

func NewRunCancelCommandFactory(meta *Metadata) func() (cli.Command, error)

NewRunCancelCommandFactory returns a runCancelCommand struct.

func NewRunCommandFactory

func NewRunCommandFactory(meta *Metadata) func() (cli.Command, error)

NewRunCommandFactory returns a runCommand struct.

func NewSSOCommandFactory

func NewSSOCommandFactory(meta *Metadata) func() (cli.Command, error)

NewSSOCommandFactory returns a ssoCommand struct.

func NewServiceAccountCommandFactory added in v0.6.0

func NewServiceAccountCommandFactory(meta *Metadata) func() (cli.Command, error)

NewServiceAccountCommandFactory returns a serviceAccountCommand struct.

func NewServiceAccountCreateTokenCommandFactory added in v0.7.0

func NewServiceAccountCreateTokenCommandFactory(meta *Metadata) func() (cli.Command, error)

NewServiceAccountCreateTokenCommandFactory returns a serviceAccountCreateTokenCommand struct.

func NewTerraformProviderCommandFactory added in v0.9.0

func NewTerraformProviderCommandFactory(meta *Metadata) func() (cli.Command, error)

NewTerraformProviderCommandFactory returns a (Terraform provider) Command struct.

func NewTerraformProviderCreateCommandFactory added in v0.9.0

func NewTerraformProviderCreateCommandFactory(meta *Metadata) func() (cli.Command, error)

NewTerraformProviderCreateCommandFactory returns a (Terraform provider Create) Command struct.

func NewTerraformProviderUploadVersionCommandFactory added in v0.9.0

func NewTerraformProviderUploadVersionCommandFactory(meta *Metadata) func() (cli.Command, error)

NewTerraformProviderUploadVersionCommandFactory returns a (Terraform provider Upload-Version) Command struct.

func NewWorkspaceAssignManagedIdentityCommandFactory

func NewWorkspaceAssignManagedIdentityCommandFactory(meta *Metadata) func() (cli.Command, error)

NewWorkspaceAssignManagedIdentityCommandFactory returns a workspaceAssignManagedIdentityCommand struct.

func NewWorkspaceCommandFactory

func NewWorkspaceCommandFactory(meta *Metadata) func() (cli.Command, error)

NewWorkspaceCommandFactory returns a workspaceCommand struct.

func NewWorkspaceCreateCommandFactory

func NewWorkspaceCreateCommandFactory(meta *Metadata) func() (cli.Command, error)

NewWorkspaceCreateCommandFactory returns a workspaceCreateCommand struct.

func NewWorkspaceDeleteCommandFactory

func NewWorkspaceDeleteCommandFactory(meta *Metadata) func() (cli.Command, error)

NewWorkspaceDeleteCommandFactory returns a workspaceDeleteCommand struct.

func NewWorkspaceGetAssignedManagedIdentitiesCommandFactory

func NewWorkspaceGetAssignedManagedIdentitiesCommandFactory(meta *Metadata) func() (cli.Command, error)

NewWorkspaceGetAssignedManagedIdentitiesCommandFactory returns a new workspaceGetAssignedManagedIdentitiesCommand.

func NewWorkspaceGetCommandFactory

func NewWorkspaceGetCommandFactory(meta *Metadata) func() (cli.Command, error)

NewWorkspaceGetCommandFactory returns a workspaceCommandGet struct.

func NewWorkspaceListCommandFactory

func NewWorkspaceListCommandFactory(meta *Metadata) func() (cli.Command, error)

NewWorkspaceListCommandFactory returns a workspaceCommandList struct.

func NewWorkspaceOutputsCommandFactory

func NewWorkspaceOutputsCommandFactory(meta *Metadata) func() (cli.Command, error)

NewWorkspaceOutputsCommandFactory returns a workspaceOutputsCommand struct.

func NewWorkspaceSetEnvironmentVarsCommandFactory

func NewWorkspaceSetEnvironmentVarsCommandFactory(meta *Metadata) func() (cli.Command, error)

NewWorkspaceSetEnvironmentVarsCommandFactory returns a workspaceSetEnvironmentVarsCommand struct.

func NewWorkspaceSetTerraformVarsCommandFactory

func NewWorkspaceSetTerraformVarsCommandFactory(meta *Metadata) func() (cli.Command, error)

NewWorkspaceSetTerraformVarsCommandFactory returns a workspaceSetTerraformVarsCommand struct.

func NewWorkspaceUnassignManagedIdentityCommandFactory

func NewWorkspaceUnassignManagedIdentityCommandFactory(meta *Metadata) func() (cli.Command, error)

NewWorkspaceUnassignManagedIdentityCommandFactory returns a workspaceUnassignManagedIdentityCommand struct.

func NewWorkspaceUpdateCommandFactory

func NewWorkspaceUpdateCommandFactory(meta *Metadata) func() (cli.Command, error)

NewWorkspaceUpdateCommandFactory returns a workspaceUpdateCommand struct.

Types

type Metadata

type Metadata struct {
	BinaryName         string
	DisplayTitle       string
	Version            string
	Logger             logger.Logger
	UI                 cli.Ui
	CurrentProfileName string
	//
	// In order to have the Makefile set the default endpoint URL through the
	// main package at build time and the configure command use the value,
	// it is necessary to pass the value through this struct.  If the configure
	// command attempts to reference the value in the main package, that causes
	// an import cycle.
	DefaultEndpointURL string
}

Metadata communicates information from the 'main' tharsis module to the individual commands run via the CLI platform.

In particular, the BinaryName field allows long-form command help to accurately show the binary name, even if the binary is copied.

The logger gives the command execution code access to the shared logger.

The name of the current profile (set by the global option) must be stored here in order to communicate it from the top-level module down to to the individual command modules prior to reading the settings file.

func (*Metadata) ReadSettings

func (m *Metadata) ReadSettings() (*settings.Settings, error)

ReadSettings reads the settings file. If the force argument is false and the settings have already been read, this function does nothing.

Jump to

Keyboard shortcuts

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