hashi

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Dec 7, 2015 License: MIT Imports: 10 Imported by: 0

Documentation

Overview

See LICENSE file for license details Copyright (c) 2015 XOR Data Exchange, Inc.

Package hashi provides an implementation of the vault interface for Hashicorp's Vault

Index

Constants

This section is empty.

Variables

View Source
var ErrVersionMismatch = errors.New("Key returned does no match requested version")

Functions

This section is empty.

Types

type Vault

type Vault struct {
	// contains filtered or unexported fields
}

func NewVault

func NewVault(c *api.Config) (*Vault, error)

NewVault returns a new hashicorp Vault client

func (*Vault) AuthAppID

func (v *Vault) AuthAppID(app, user string) error

AuthAppID authenticates with Vault using an AppID and UserID and sets the access token for requests.

func (*Vault) ClearToken

func (v *Vault) ClearToken()

ClearToken deletes the token cookie if it's set.

func (*Vault) CurrentKeyVersion

func (v *Vault) CurrentKeyVersion(prefix string) (uint64, error)

CurrentKeyVersion retrieves the latest version of the specified key to be used

func (*Vault) CurrentSaltVersion

func (v *Vault) CurrentSaltVersion(prefix string) (uint64, error)

CurrentSaltVersion retrieves the latest version of the specified salt to be used

func (*Vault) CurrentSalts

func (v *Vault) CurrentSalts(prefix string) ([]uint64, error)

CurrentSalts fetches the list of currently active salts for the prefix and version provided.

func (*Vault) GetKey

func (v *Vault) GetKey(prefix string, version uint64) (*superdog.Key, error)

GetKey fetches the encryption key information for the key version provided.

func (*Vault) GetSalt

func (v *Vault) GetSalt(prefix string, version uint64) ([]byte, error)

GetSalt fetches the salt for the prefix and version provided.

func (*Vault) SetToken

func (v *Vault) SetToken(t string)

SetToken sets the token cookie to the new value.

func (*Vault) Token

func (v *Vault) Token() string

Token returns the access token currently being used.

Jump to

Keyboard shortcuts

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