ctlcmd

package
v0.2.5 Latest Latest
Warning

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

Go to latest
Published: Jul 30, 2023 License: MIT Imports: 9 Imported by: 0

README

ctlcmd

import "github.com/slalombuild/fusion/internal/commands/ctlcmd"

Package ctlcmd contains all commands for the fusionctl cli

Index

Variables

var (
    ErrPrompt = "failed to ask survey prompt"
)

type Answers

type Answers struct {
    Resource string `arg:"" help:"Terraform resource name (e.g. loadbalancer, security_group)"`
    Provider string `help:"Cloud provider name (e.g. aws, gcp, azure)" enum:"aws,gcp,azure," default:"" short:"p"`
    Import   string `help:"Terraform file to import" short:"i" type:"existingfile"`
}

type Ctl

type Ctl struct {
    Resource NewResourceCmd `cmd:"" help:"Create new fusion resources from existing terraform"`
    Stack    NewStackCmd    `cmd:"" help:"Create new fusion stacks from existing terraform" hidden:"true"`
}

type NewResourceCmd

type NewResourceCmd struct {
    Questions []*survey.Question `kong:"-"`
    Answers   Answers            `embed:""`
    Fields    map[string]string  `help:"Map of fields and their types to be used in template" short:"f" default:"name=string;description=string"`
    Save      bool               `help:"Save output" default:"false"`
}
func (*NewResourceCmd) Run
func (cmd *NewResourceCmd) Run(ctx *commands.Context) error

type NewStackCmd

type NewStackCmd struct {
    Questions []*survey.Question `kong:"-"`
}
func (*NewStackCmd) Run
func (cmd *NewStackCmd) Run(ctx *commands.Context) error

Generated by gomarkdoc

Documentation

Overview

Package ctlcmd contains all commands for the fusionctl cli

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrPrompt = "failed to ask survey prompt"
)

Functions

This section is empty.

Types

type Answers

type Answers struct {
	Resource string `arg:"" help:"Terraform resource name (e.g. loadbalancer, security_group)"`
	Provider string `help:"Cloud provider name (e.g. aws, gcp, azure)" enum:"aws,gcp,azure," default:"" short:"p"`
	Import   string `help:"Terraform file to import" short:"i" type:"existingfile"`
}

type Ctl

type Ctl struct {
	Resource NewResourceCmd `cmd:"" help:"Create new fusion resources from existing terraform"`
	Stack    NewStackCmd    `cmd:"" help:"Create new fusion stacks from existing terraform" hidden:"true"`
}

type NewResourceCmd

type NewResourceCmd struct {
	Questions []*survey.Question `kong:"-"`
	Answers   Answers            `embed:""`
	Fields    map[string]string  `help:"Map of fields and their types to be used in template" short:"f" default:"name=string;description=string"`
	Save      bool               `help:"Save output" default:"false"`
}

func (*NewResourceCmd) Run

func (cmd *NewResourceCmd) Run(ctx *commands.Context) error

type NewStackCmd

type NewStackCmd struct {
	Questions []*survey.Question `kong:"-"`
}

func (*NewStackCmd) Run

func (cmd *NewStackCmd) Run(ctx *commands.Context) error

Jump to

Keyboard shortcuts

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