create

package
v0.5.7 Latest Latest
Warning

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

Go to latest
Published: Jan 22, 2026 License: GPL-2.0 Imports: 22 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewCloudResourceCommand

func NewCloudResourceCommand(factory cmd.Factory) *cobra.Command

NewCloudResourceCommand creates a new command

func NewCommand

func NewCommand(factory cmd.Factory) *cobra.Command

NewCommand creates and returns a new command

func NewRevisionCommand

func NewRevisionCommand(factory cmd.Factory) *cobra.Command

NewRevisionCommand creates a new command

Types

type CloudResourceCommand

type CloudResourceCommand struct {
	cmd.Factory
	// Filename is the name of the file to write the cloud resource to
	Filename string
	// Plan is the name of the plan
	Plan string
	// Revision is the semvar version of the revision
	Revision string
	// Revisions is a list of revisions available
	Revisions *terraformv1alpha1.RevisionList
}

CloudResourceCommand are the options for the command

func (*CloudResourceCommand) Run

func (o *CloudResourceCommand) Run(ctx context.Context) (err error)

Run runs the command

type Command

type Command struct {
	cmd.Factory
}

Command are the options for the command

type Input

type Input struct {
	// Context is an optional name of the context the input comes from
	Context string `json:"context"`
	// Default is the default value of the input
	Default interface{} `json:"default"`
	// Description is the description of the input
	Description string `json:"description"`
	// Key is the key of the input
	Key string `json:"key"`
	// Required is a flag to indicate if the input is required
	Required bool `json:"required"`
	// Type is the type of the input
	Type string `json:"type"`
}

Input defines an input to the cloud resource, we use this internally to the command to pass options around

func SuggestContextualInput

func SuggestContextualInput(input string, list *terraformv1alpha1.ContextList, min float64) (Input, bool)

SuggestContextualInput is responsible for suggesting contextual input based on the current state of the cluster

type RevisionCommand

type RevisionCommand struct {
	cmd.Factory
	// Name is the name of the revision
	Name string
	// Description is a description of the revision
	Description string
	// EnableDefaultVariables indicates if we should enable the default variables
	EnableDefaultVariables bool
	// Contexts is a list of contexts from the cluster
	Contexts *terraformv1alpha1.ContextList
	// Policies is a list of policies from the cluster
	Policies *terraformv1alpha1.PolicyList
	// Plans is a collection of plans already in the cluster
	Plans *terraformv1alpha1.PlanList
	// Revisions is a collection of revisions already in the cluster
	Revisions *terraformv1alpha1.RevisionList
	// Providers is a collection of providers in the cluster
	Providers *terraformv1alpha1.ProviderList
	// Inputs is a list of inputs for the revision
	Inputs []Input
	// Variables are the module variables
	Variables map[string]interface{}
	// ValueFrom is a list of value froms
	ValueFrom []terraformv1alpha1.ValueFromSource
	// Output are the outputs from the module
	Outputs []string
	// Module is the module to create the revision from
	Module string
	// Revision is the version of the revision
	Revision string
	// File is where to save the revision
	File string
	// Provider is the name of the provider to use
	Provider string
	// DeleteDownload indicates we should retain the download
	DeleteDownload bool
}

RevisionCommand are the options for the command

func (*RevisionCommand) Download

func (o *RevisionCommand) Download(ctx context.Context, module string) (string, bool, error)

Download is responsible for downloading the modules

func (*RevisionCommand) Run

func (o *RevisionCommand) Run(ctx context.Context) (err error)

Run runs the command

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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