meta

package
v0.6.2 Latest Latest
Warning

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

Go to latest
Published: Oct 5, 2016 License: MPL-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AdditionalOptionsUsage

func AdditionalOptionsUsage() string

func GeneralOptionsUsage

func GeneralOptionsUsage() string

GeneralOptionsUsage returns the usage documentation for commonly available options

Types

type FlagSetFlags

type FlagSetFlags uint

FlagSetFlags is an enum to define what flags are present in the default FlagSet returned by Meta.FlagSet.

const (
	FlagSetNone    FlagSetFlags = 0
	FlagSetServer  FlagSetFlags = 1 << iota
	FlagSetDefault              = FlagSetServer
)

type Meta

type Meta struct {
	ClientToken string
	Ui          cli.Ui

	// The things below can be set, but aren't common
	ForceAddress string // Address to force for API clients

	// Queried if no token can be found
	TokenHelper TokenHelperFunc
	// contains filtered or unexported fields
}

Meta contains the meta-options and functionality that nearly every Vault command inherits.

func (*Meta) Client

func (m *Meta) Client() (*api.Client, error)

Client returns the API client to a Vault server given the configured flag settings for this command.

func (*Meta) DefaultWrappingLookupFunc

func (m *Meta) DefaultWrappingLookupFunc(operation, path string) string

func (*Meta) FlagSet

func (m *Meta) FlagSet(n string, fs FlagSetFlags) *flag.FlagSet

FlagSet returns a FlagSet with the common flags that every command implements. The exact behavior of FlagSet can be configured using the flags as the second parameter, for example to disable server settings on the commands that don't talk to a server.

type TokenHelperFunc

type TokenHelperFunc func() (token.TokenHelper, error)

Jump to

Keyboard shortcuts

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