Documentation ¶
Index ¶
- type LoginBackend
- type Secret
- type SecretBackend
- type SecretDomain
- type Vault
- func (v *Vault) CreateSecret(dom string, sec Secret) error
- func (v *Vault) CreateSecretDomain(name string) (SecretDomain, error)
- func (v *Vault) DeleteSecret(dom string, name string) error
- func (v *Vault) DeleteSecretDomain(name string) error
- func (v *Vault) GetSecret(dom string, name string) (Secret, error)
- func (v *Vault) GetStatus() (bool, error)
- func (v *Vault) Init() error
- func (v *Vault) ListSecret(dom string) ([]string, error)
- func (v *Vault) RegisterQuorum(pgpkey string) (string, error)
- func (v *Vault) Unseal(shard string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type LoginBackend ¶
type LoginBackend interface { }
LoginBackend Interface that will be implemented for various login backends
type Secret ¶
Secret is the struct that defines the structure of a secret It consists of a name and map containing key value pairs
type SecretBackend ¶
type SecretBackend interface { Init() error GetStatus() (bool, error) Unseal(shard string) error RegisterQuorum(pgpkey string) (string, error) GetSecret(dom string, sec string) (Secret, error) ListSecret(dom string) ([]string, error) CreateSecretDomain(name string) (SecretDomain, error) CreateSecret(dom string, sec Secret) error DeleteSecretDomain(name string) error DeleteSecret(dom string, name string) error }
SecretBackend interface that will be implemented for various secret backends
func InitSecretBackend ¶
func InitSecretBackend() (SecretBackend, error)
InitSecretBackend returns an interface implementation
type SecretDomain ¶
SecretDomain is where Secrets are stored. A single domain can have any number of secrets
type Vault ¶
Vault is the main Struct used in Backend to initialize the struct
func (*Vault) CreateSecret ¶
CreateSecret creates a secret mounted on a particular domain name The secret itself is mounted on a path specified by name
func (*Vault) CreateSecretDomain ¶
func (v *Vault) CreateSecretDomain(name string) (SecretDomain, error)
CreateSecretDomain mounts the kv backend on a path with the given name
func (*Vault) DeleteSecret ¶
DeleteSecret deletes a secret mounted on the path provided
func (*Vault) DeleteSecretDomain ¶
DeleteSecretDomain deletes a secret domain which translates to an unmount operation on the given path in Vault
func (*Vault) GetSecret ¶
GetSecret returns a secret mounted on a particular domain name The secret itself is referenced via its name which translates to a mount path in vault
func (*Vault) Init ¶
Init will initialize the vault connection It will also initialize vault if it is not already initialized. The initial policy will also be created
func (*Vault) ListSecret ¶
ListSecret returns a list of secret names on a particular domain The values of the secret are not returned
func (*Vault) RegisterQuorum ¶
RegisterQuorum registers the PGP public key for a quorum client We will return a shard to the client that is registering