config

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Dec 6, 2015 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Unmarshal

func Unmarshal(data []byte, v interface{}) error

Unmarshal config data into v.

Types

type Box

type Box struct {
	Comment   string   `vcrypt:"comment,optional"`
	EdgeSlice []string `vcrypt:"edge,optional"`

	PublicKey string `vcrypt:"publickey"`
}

Box config

func (Box) Cryptex

func (n Box) Cryptex() (cryptex.Cryptex, error)

Cryptex for Box

func (Box) Edges

func (n Box) Edges() []string

Edges for Box

type CryptexNode

type CryptexNode interface {
	Cryptex() (cryptex.Cryptex, error)
	Edges() []string
}

CryptexNode config

type Decoder

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

Decoder decodes data from a Reader.

func NewDecoder

func NewDecoder(r io.Reader) *Decoder

NewDecoder constructs a decoder from a Reader.

func (*Decoder) Decode

func (d *Decoder) Decode(v interface{}) error

Decode builds config from the Reader data.

type Demux

type Demux struct {
	Comment   string   `vcrypt:"comment,optional"`
	EdgeSlice []string `vcrypt:"edge,optional"`
}

Demux config

func (Demux) Cryptex

func (n Demux) Cryptex() (cryptex.Cryptex, error)

Cryptex for Demux

func (Demux) Edges

func (n Demux) Edges() []string

Edges for Demux

type Marker

type Marker struct {
	Comment string `vcrypt:"comment,optional"`
}

Marker config

type Mux

type Mux struct {
	Comment   string   `vcrypt:"comment,optional"`
	EdgeSlice []string `vcrypt:"edge,optional"`
}

Mux config

func (Mux) Cryptex

func (n Mux) Cryptex() (cryptex.Cryptex, error)

Cryptex for Mux

func (Mux) Edges

func (n Mux) Edges() []string

Edges for Mux

type OpenPGP

type OpenPGP struct {
	Comment   string   `vcrypt:"comment,optional"`
	EdgeSlice []string `vcrypt:"edge,optional"`

	PublicKeys []string `vcrypt:"publickey"`
}

OpenPGP config

func (OpenPGP) Cryptex

func (n OpenPGP) Cryptex() (cryptex.Cryptex, error)

Cryptex for OpenPGP

func (OpenPGP) Edges

func (n OpenPGP) Edges() []string

Edges for OpenPGP

type OpenPGPKey

type OpenPGPKey struct {
	Comment string `vcrypt:"comment,optional"`

	KeyIDs []string `vcrypt:"keyid,optional"`
}

OpenPGPKey config

func (OpenPGPKey) Secret

func (n OpenPGPKey) Secret() (secret.Secret, error)

Secret for OpenPGPKey

type Password

type Password struct {
	Comment string `vcrypt:"comment,optional"`
}

Password config

func (Password) Secret

func (n Password) Secret() (secret.Secret, error)

Secret for Password

type Plan

type Plan struct {
	// Top level config
	Comment string `vcrypt:"comment,optional"`
	Root    string `vcrypt:"root"`

	// Cryptex config
	SSSs        map[string]SSS       `vcrypt:"sss,section"`
	XORs        map[string]XOR       `vcrypt:"xor,section"`
	SecretBoxes map[string]SecretBox `vcrypt:"secretbox,section"`
	Boxes       map[string]Box       `vcrypt:"box,section"`
	RSAs        map[string]RSA       `vcrypt:"rsa,section"`
	OpenPGPs    map[string]OpenPGP   `vcrypt:"openpgp,section"`
	Muxes       map[string]Mux       `vcrypt:"mux,section"`
	Demuxes     map[string]Demux     `vcrypt:"demux,section"`

	// Secret config
	Passwords   map[string]Password   `vcrypt:"password,section"`
	OpenPGPKeys map[string]OpenPGPKey `vcrypt:"openpgp-key,section"`

	// Material config
	Materials map[string]Marker `vcrypt:"material,section"`
}

Plan config

func (Plan) CryptexNode

func (p Plan) CryptexNode(name string) (CryptexNode, bool)

CryptexNode returns the CryptexNode for the name.

func (Plan) SecretNode

func (p Plan) SecretNode(name string) (SecretNode, bool)

SecretNode returns the SecretNode for the name.

type RSA

type RSA struct {
	Comment   string   `vcrypt:"comment,optional"`
	EdgeSlice []string `vcrypt:"edge,optional"`

	PublicKey string `vcrypt:"publickey"`
}

RSA config

func (RSA) Cryptex

func (n RSA) Cryptex() (cryptex.Cryptex, error)

Cryptex for RSA

func (RSA) Edges

func (n RSA) Edges() []string

Edges for RSA

type SSS

type SSS struct {
	Comment   string   `vcrypt:"comment,optional"`
	EdgeSlice []string `vcrypt:"edge,optional"`

	N int `vcrypt:"max-shares"`
	K int `vcrypt:"required-shares"`
}

SSS config

func (SSS) Cryptex

func (n SSS) Cryptex() (cryptex.Cryptex, error)

Cryptex for SSS

func (SSS) Edges

func (n SSS) Edges() []string

Edges for SSS

type SecretBox

type SecretBox struct {
	Comment   string   `vcrypt:"comment,optional"`
	EdgeSlice []string `vcrypt:"edge,optional"`
}

SecretBox config

func (SecretBox) Cryptex

func (n SecretBox) Cryptex() (cryptex.Cryptex, error)

Cryptex for SecretBox

func (SecretBox) Edges

func (n SecretBox) Edges() []string

Edges for SecretBox

type SecretNode

type SecretNode interface {
	Secret() (secret.Secret, error)
}

SecretNode config

type XOR

type XOR struct {
	Comment   string   `vcrypt:"comment,optional"`
	EdgeSlice []string `vcrypt:"edge,optional"`
}

XOR config

func (XOR) Cryptex

func (n XOR) Cryptex() (cryptex.Cryptex, error)

Cryptex for XOR

func (XOR) Edges

func (n XOR) Edges() []string

Edges for XOR

Jump to

Keyboard shortcuts

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