config

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Aug 4, 2020 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CommandLineGlobals

type CommandLineGlobals struct {
	// CacheDir is user local directory used to store temporary data.
	CacheDir string

	// Verbosity is the user's preference for logging output.
	Verbosity int

	NS1APIBaseURL string
	NS1APIKey     string
}

CommandLineGlobals are options that apply to all/most commands. These are set on the root command level.

func NewCommandLineGlobals

func NewCommandLineGlobals() CommandLineGlobals

NewCommandLineGlobals creates a new globals with some defaults.

func (*CommandLineGlobals) RequireAPIAccess

func (g *CommandLineGlobals) RequireAPIAccess() error

RequireAPIAccess validates that global parameters are set appropriately for REST API access.

Jump to

Keyboard shortcuts

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