configure

package
v1.7.1 Latest Latest
Warning

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

Go to latest
Published: Mar 14, 2022 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Overview

Package configure contains commands to inspect and manipulate the CLI global confuguration.

Index

Constants

This section is empty.

Variables

View Source
var ErrEmptyToken = errors.New("token cannot be empty")

ErrEmptyToken is returned when a user tries to supply an emtpy string as a token in the configure command.

Functions

This section is empty.

Types

type APIClientFactory

type APIClientFactory func(token, endpoint string) (api.Interface, error)

APIClientFactory allows the configure command to regenerate the global Fastly API client when a new token is provided, in order to validate that token. It's a redeclaration of the app.APIClientFactory to avoid an import loop.

type RootCommand

type RootCommand struct {
	cmd.Base
	// contains filtered or unexported fields
}

RootCommand is the parent command for all subcommands in this package. It should be installed under the primary root command.

func NewRootCommand

func NewRootCommand(parent cmd.Registerer, configFilePath string, cf APIClientFactory, globals *config.Data) *RootCommand

NewRootCommand returns a new command registered in the parent.

func (*RootCommand) Exec

func (c *RootCommand) Exec(in io.Reader, out io.Writer) (err error)

Exec implements the command interface.

Jump to

Keyboard shortcuts

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