commands

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jul 30, 2021 License: Apache-2.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewLocalCommand

func NewLocalCommand(rootConfig *RootConfig, out io.Writer) *ffcli.Command

LocalCommand creates a new ffcli.Command

func NewServerCommand

func NewServerCommand(rootConfig *RootConfig, out io.Writer) *ffcli.Command

NewServerCommand creates a new ffcli.Command

Types

type LocalCommand

type LocalCommand struct {
	// contains filtered or unexported fields
}

LocalCommand configuration object

func (*LocalCommand) Exec

func (c *LocalCommand) Exec(ctx context.Context, _ []string) error

Exec function for this command.

type RootConfig

type RootConfig struct {
	Verbose bool
}

Config for the root command, including flags and types that should be available to each subcommand.

func RootCommand

func RootCommand() (*ffcli.Command, *RootConfig)

New constructs a usable ffcli.Command and an empty Config. The config's token and verbose fields will be set after a successful parse. The caller must initialize the config's object API client field.

func (*RootConfig) Exec

func (c *RootConfig) Exec(context.Context, []string) error

Exec function for this command.

func (*RootConfig) RegisterFlags

func (c *RootConfig) RegisterFlags(fs *flag.FlagSet)

RegisterFlags registers the flag fields into the provided flag.FlagSet. This helper function allows subcommands to register the root flags into their flagsets, creating "global" flags that can be passed after any subcommand at the commandline.

type ServerCommand

type ServerCommand struct {
	RootConfig                    *RootConfig
	Out                           io.Writer
	Host                          string
	Token                         string
	ReadTimeout                   time.Duration
	WriteTimeout                  time.Duration
	ShutdownTimeout               time.Duration
	Demo                          bool
	TokenStorageBackend           string
	TokenStorageDynamoDBTableName string
	ProxyAuthEnabled              bool
	TracingEnabled                bool
}

ServerCommand configuration object

func (*ServerCommand) Exec

func (c *ServerCommand) Exec(ctx context.Context, _ []string) error

Exec function for this command.

Jump to

Keyboard shortcuts

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