cmd

package
v1.7.4 Latest Latest
Warning

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

Go to latest
Published: Oct 9, 2024 License: Apache-2.0 Imports: 35 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var StubbedSuccessResponse = `{
	"key": "test-key",
	"name": "test-name"
}`

Functions

func CallCmd

func CallCmd(
	t *testing.T,
	clients APIClients,
	trackerFn analytics.TrackerFn,
	args []string,
) ([]byte, error)

func Execute

func Execute(version string)

func ExtraErrorHelp

func ExtraErrorHelp(cmdName string, cmdAction string) string

func HasOptionalFlags

func HasOptionalFlags(cmd *cobra.Command) bool

func HasRequiredFlags

func HasRequiredFlags(cmd *cobra.Command) bool

func NewQuickStartCmd

func NewQuickStartCmd(
	analyticsTrackerFn analytics.TrackerFn,
	environmentsClient environments.Client,
	flagsClient flags.Client,
) *cobra.Command

func SetupTestEnvVars

func SetupTestEnvVars(_ *testing.T) func(t *testing.T)

SetupTestEnvVars sets up and tears down tests for checking that environment variables are set.

func WrappedOptionalFlagUsages

func WrappedOptionalFlagUsages(cmd *cobra.Command) string

func WrappedRequiredFlagUsages

func WrappedRequiredFlagUsages(cmd *cobra.Command) string

Types

type APIClients

type APIClients struct {
	DevClient          dev_server.Client
	EnvironmentsClient environments.Client
	FlagsClient        flags.Client
	MembersClient      members.Client
	ProjectsClient     projects.Client
	ResourcesClient    resources.Client
}

type Command

type Command interface {
	Cmd() *cobra.Command
	HelpCalled() bool
}

type RootCmd

type RootCmd struct {
	Commands []Command
	// contains filtered or unexported fields
}

func NewRootCommand

func NewRootCommand(
	configService config.Service,
	analyticsTrackerFn analytics.TrackerFn,
	clients APIClients,
	version string,
	useConfigFile bool,
) (*RootCmd, error)

func (RootCmd) Cmd

func (cmd RootCmd) Cmd() *cobra.Command

func (RootCmd) Execute

func (cmd RootCmd) Execute() error

func (RootCmd) HelpCalled

func (cmd RootCmd) HelpCalled() bool

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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