pluginutil

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Sep 23, 2016 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LoadResourceFromContext

func LoadResourceFromContext(c *cli.Context, flag string) (string, error)

LoadResourceFromContext loads data from a CLI flag.

If the value of the specified flag starts with '@', the flag is interpreted as a filename and the contents of the file are returned.

In all other cases, the flag value is returned directly.

func NewContext

func NewContext(args []string, myflags []cli.Flag) (context *cli.Context)

NewContext - convenience method to construct a valid cli.Context within a plugin

func ToCliFlagArray

func ToCliFlagArray(fs []pcli.Flag) (cliFlags []cli.Flag)

ToCliFlagArray - converts a plugin flag array into a codegangsta cli.Flag array

Types

type CloudConfigInfer added in v0.0.2

type CloudConfigInfer struct {
	CloudConfig enaml.CloudConfigManifest
}

func NewCloudConfigInfer added in v0.0.2

func NewCloudConfigInfer(c enaml.CloudConfigManifest) *CloudConfigInfer

NewCloudConfigInfer - get a cloud configinferer from a cloud config enaml object

func NewCloudConfigInferFromBytes added in v0.0.2

func NewCloudConfigInferFromBytes(b []byte) *CloudConfigInfer

NewCloudConfigInferFromBytes - get a cloud configinferer from a cloud config bytes array

func (*CloudConfigInfer) InferDefaultAZ added in v0.0.2

func (s *CloudConfigInfer) InferDefaultAZ() string

func (*CloudConfigInfer) InferDefaultDiskType added in v0.0.2

func (s *CloudConfigInfer) InferDefaultDiskType() string

func (*CloudConfigInfer) InferDefaultNetwork added in v0.0.2

func (s *CloudConfigInfer) InferDefaultNetwork() string

func (*CloudConfigInfer) InferDefaultVMType added in v0.0.2

func (s *CloudConfigInfer) InferDefaultVMType() string

type CloudConfigInferer added in v0.0.2

type CloudConfigInferer interface {
	InferDefaultVMType() string
	InferDefaultDiskType() string
	InferDefaultNetwork() string
	InferDefaultAZ() string
}

type VaultRotater added in v0.0.5

type VaultRotater interface {
	RotateSecrets(hash string, secrets interface{}) error
}

type VaultUnmarshal

type VaultUnmarshal struct {
	Domain string
	Token  string
	// contains filtered or unexported fields
}

func NewVaultUnmarshal

func NewVaultUnmarshal(domain, token string) *VaultUnmarshal

func (*VaultUnmarshal) RotateSecrets added in v0.0.5

func (s *VaultUnmarshal) RotateSecrets(hash string, secrets interface{}) error

func (*VaultUnmarshal) UnmarshalFlags

func (s *VaultUnmarshal) UnmarshalFlags(hash string, flgs []pcli.Flag) error

UnmarshalFlags sets default values for any flags in flgs that have values in the specified Vault hash.

func (*VaultUnmarshal) UnmarshalSomeFlags added in v0.0.9

func (s *VaultUnmarshal) UnmarshalSomeFlags(hash string, flags []pcli.Flag, flagnames ...string) error

UnmarshalSomeFlags is like UnmarshalFlags except it takes a whitelist of flags to unmarshal.

Jump to

Keyboard shortcuts

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