Documentation ¶
Index ¶
- type Backend
- type PolicyTemplates
- type VaultStore
- func (v *VaultStore) Delete(path string) error
- func (v *VaultStore) GeneratePoliciesAndRoles(directoryBackend, roleDir, policyDir, defaultTeam string, entities []string) error
- func (v *VaultStore) Get(path string) (string, error)
- func (v *VaultStore) List(login string) ([]string, error)
- func (v *VaultStore) SecretPath(login, name string) string
- func (v *VaultStore) Write(filename, name string, targets map[string]struct{}) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Backend ¶
type Backend interface { Delete(string) error Get(string) (string, error) List(string) ([]string, error) GeneratePoliciesAndRoles(string, string, string, string, []string) error SecretPath(string, string) string Write(string, string, map[string]struct{}) error }
Backend gives us basic methods for storing secrets
type PolicyTemplates ¶
type PolicyTemplates struct { GeneralPolicyTemplate string MemberPolicyTemplate string TeamPolicyTemplate string }
PolicyTemplates are used with Vault to give users permissions
type VaultStore ¶
VaultStore stores a Vault client
func NewVault ¶
func NewVault() (*VaultStore, error)
NewVault will connect to a Vault server using VAULT_ADDR and VAUL_TOKEN variables
func (*VaultStore) Delete ¶
func (v *VaultStore) Delete(path string) error
Delete will delete a secret from Vault
func (*VaultStore) GeneratePoliciesAndRoles ¶
func (v *VaultStore) GeneratePoliciesAndRoles(directoryBackend, roleDir, policyDir, defaultTeam string, entities []string) error
GeneratePoliciesAndRoles will generate a set of policies for a given directory of entities
func (*VaultStore) Get ¶
func (v *VaultStore) Get(path string) (string, error)
Get will return the stored secret at a given path
func (*VaultStore) List ¶
func (v *VaultStore) List(login string) ([]string, error)
List will list a set of secrets available
func (*VaultStore) SecretPath ¶
func (v *VaultStore) SecretPath(login, name string) string
SecretPath will return the path for a given secret
Click to show internal directories.
Click to hide internal directories.