vault

package
v8.2.1+incompatible Latest Latest
Warning

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

Go to latest
Published: May 24, 2019 License: MIT Imports: 18 Imported by: 2 modules, 5 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Decode

func Decode(s string) string

func Encode

func Encode(s string, n int) string

func Stream

func Stream(enctype string, key, iv []byte) (cipher.Stream, cipher.Stream, error)

func WriteCrypt

func WriteCrypt(path, master string, creds *Credentials) error

Types

type Client

type Client struct {
	URL   string
	Token string
	HTTP  *http.Client
}

func Connect

func Connect(url, cacert string) (*Client, error)

func (*Client) Delete

func (c *Client) Delete(path string) error

func (*Client) Do

func (c *Client) Do(method, url string, data interface{}) (*http.Response, error)

func (*Client) Get

func (c *Client) Get(path string, out interface{}) (bool, error)

func (*Client) Initialize

func (c *Client) Initialize(crypt, master string) (string, error)

func (*Client) Initialized

func (c *Client) Initialized() (bool, error)

func (*Client) NewParameters

func (c *Client) NewParameters(id, typ string, fixed bool) (Parameters, error)

func (*Client) Post

func (c *Client) Post(path string, in, out interface{}) error

func (*Client) Put

func (c *Client) Put(path string, in, out interface{}) error

func (*Client) Rekey

func (c *Client) Rekey(path, current, proposed string, rotate bool) (string, error)

func (*Client) Retrieve

func (c *Client) Retrieve(id string) (Parameters, error)

func (*Client) RetrieveFixed

func (c *Client) RetrieveFixed() (Parameters, error)

func (*Client) Seal

func (c *Client) Seal() error

func (*Client) Sealed

func (c *Client) Sealed() (bool, error)

func (*Client) Status

func (vault *Client) Status() (string, error)

func (*Client) Store

func (c *Client) Store(id string, params Parameters) error

func (*Client) StoreFixed

func (c *Client) StoreFixed(p Parameters) error

func (*Client) Unseal

func (c *Client) Unseal(crypt, master string) error

type Credentials

type Credentials struct {
	SealKey   string `json:"seal_key"`
	RootToken string `json:"root_token"`
}

func ReadCrypt

func ReadCrypt(path, master string) (*Credentials, error)

type Parameters

type Parameters struct {
	Key  string `json:"key"`
	IV   string `json:"iv"`
	Type string `json:"type"`
	UUID string `json:"uuid"`
}

func DeriveFixedParameters

func DeriveFixedParameters(key []byte) (Parameters, error)

func GenerateFixedParameters

func GenerateFixedParameters() (string, Parameters, error)

func GenerateRandomParameters

func GenerateRandomParameters(typ string) (Parameters, error)

Jump to

Keyboard shortcuts

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