cred

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2016 License: Apache-2.0 Imports: 11 Imported by: 14

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Overlay

func Overlay(path string, flags []pcli.Flag, store Store) error

Overlay provides default values for the specified flags using matching values from a credential store.

Types

type Store

type Store interface {
	// Get gets a single value from the specified path.
	Get(path, key string) (string, error)

	// GetBulk gets all key/value pairs from the specified path.
	GetBulk(path string) (map[string]string, error)

	// Post updates a single value at the specified path.
	Post(path, key, value string) error

	// PostBulk updates all key/value pairs at the specified path.
	PostBulk(path string, values map[string]string) error
}

Store is a repository of credentials for use by omg plugins.

func NewFileStore added in v0.1.6

func NewFileStore(root string) Store

NewFileStore creates a Store backed by local files at the specified root directory.

func NewStore added in v1.0.0

func NewStore(conn string) (Store, error)

NewStore creates a new Store based on the specified connection string. The following connection strings are supported:

  • Hashicorp Vault: 'vault://TOKEN@domain:port'
  • Filesystem: 'file://rootdir'

func NewVaultStore

func NewVaultStore(domain, token string) Store

NewVaultStore creates a Store backed by Hashicorp's Vault.

Jump to

Keyboard shortcuts

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