opts

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: May 22, 2021 License: GPL-3.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var CmdsToFieldNames = map[string]string{
	"OutputFormat": "Format",
	"Verbose":      "V",

	"WatcherInitInactive": "Active",
}

Map of CommandOptions to field names

Functions

This section is empty.

Types

type CommandOptions

type CommandOptions struct {
	// Persistent
	Args         []string
	OutputFormat string
	Verbose      bool
	// Non-persistent
	InputFile           string
	WatcherInitInactive bool
}

func NewCommandOptions

func NewCommandOptions() *CommandOptions

func (*CommandOptions) SetArgs

func (c *CommandOptions) SetArgs(args []string) error

func (*CommandOptions) SetInputFile

func (c *CommandOptions) SetInputFile(a string) error

func (*CommandOptions) SetOutputFormat

func (c *CommandOptions) SetOutputFormat(a string) error

func (*CommandOptions) SetVerbose

func (c *CommandOptions) SetVerbose(a bool)

func (*CommandOptions) SetWatcherInitInactive

func (c *CommandOptions) SetWatcherInitInactive(a bool)

type ConfigOptions

type ConfigOptions struct {
	ConfigFile string
	Context    string
	Debug      bool
}

func NewConfigOptions

func NewConfigOptions() *ConfigOptions

func (*ConfigOptions) SetConfigFile

func (c *ConfigOptions) SetConfigFile(a string)

func (*ConfigOptions) SetContext

func (c *ConfigOptions) SetContext(a string)

func (*ConfigOptions) SetDebug

func (c *ConfigOptions) SetDebug(a bool)

type CredentialOptions

type CredentialOptions struct {
	Addresses []string
	User      string
	Password  string
	APIKey    string
	Token     string
	Insecure  bool
	CloudID   string
}

func NewCredentialOptions

func NewCredentialOptions() *CredentialOptions

func (*CredentialOptions) SetAPIKey

func (c *CredentialOptions) SetAPIKey(a string)

func (*CredentialOptions) SetAddresses

func (c *CredentialOptions) SetAddresses(a []string)

func (*CredentialOptions) SetCloudID

func (c *CredentialOptions) SetCloudID(a string)

func (*CredentialOptions) SetInsecure

func (c *CredentialOptions) SetInsecure()

func (*CredentialOptions) SetPassword

func (c *CredentialOptions) SetPassword(a string)

func (*CredentialOptions) SetToken

func (c *CredentialOptions) SetToken(a string)

func (*CredentialOptions) SetUser

func (c *CredentialOptions) SetUser(a string)

Jump to

Keyboard shortcuts

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