pluginutil

package
v0.0.6 Latest Latest
Warning

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

Go to latest
Published: Jul 13, 2016 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DefaultClient added in v0.0.6

func DefaultClient() *http.Client

func LoadResourceFromContext added in v0.0.4

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

Types

type Doer added in v0.0.6

type Doer interface {
	Do(*http.Request) (*http.Response, error)
}

type VaultJsonObject added in v0.0.6

type VaultJsonObject struct {
	LeaseID       string            `json:"lease_id"`
	Renewable     bool              `json:"renewable"`
	LeaseDuration float64           `json:"lease_duration"`
	Data          map[string]string `json:"data"`
	Warnings      interface{}       `json:"warnings"`
	Auth          interface{}       `json:"auth"`
}

type VaultUnmarshal added in v0.0.6

type VaultUnmarshal struct {
	Domain string
	Token  string
	Client Doer
}

func (*VaultUnmarshal) UnmarshalFlags added in v0.0.6

func (s *VaultUnmarshal) UnmarshalFlags(hash string, c *cli.Context) (err error)

type VaultUnmarshaler added in v0.0.6

type VaultUnmarshaler interface {
	UnmarshalFlags(hash string, c *cli.Context) (err error)
}

func NewVaultUnmarshal added in v0.0.6

func NewVaultUnmarshal(domain, token string, client Doer) VaultUnmarshaler

Directories

Path Synopsis
This file was generated by counterfeiter
This file was generated by counterfeiter

Jump to

Keyboard shortcuts

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