commands

package
v2.0.0-beta.3 Latest Latest
Warning

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

Go to latest
Published: Jun 24, 2022 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	FlagEndpoint = "endpoint"
	FlagToken    = "token"
	FlagFormat   = "format"
)
View Source
const (
	FormatJSON  = "json"
	FormatTable = "table"
	FormatCSV   = "csv"
)

Variables

View Source
var (
	Name        = "flow"
	Description = "flow is a command-line interface for managing the Flow Swiss cloud platform."
	Version     = "v2.0.0-beta.1"

	DefaultEndpoint = "https://api.flow.swiss/"
)
View Source
var Root = cobra.Command{
	Use:           Name,
	Short:         Description,
	Version:       Version,
	SilenceErrors: true,
}

Functions

func Add

func Add(parent *cobra.Command, children ...Command)

func Build

func Build(cmd Command) *cobra.Command

func Print

func Print(out console.Writer, val interface{}) error

func PrintStdout

func PrintStdout(val interface{}) error

func Run

func Run()

Types

type Command

type Command interface {
	Run(ctx context.Context, cfg Config, args []string) error
	Desc() *cobra.Command
}

type CommandFunc

type CommandFunc func(ctx context.Context, cfg Config) error

type Config

type Config struct {
	Client goclient.Client
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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