vault

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2020 License: Apache-2.0 Imports: 4 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Secret

type Secret struct {
	ID         string              `json:"name"`
	Author     string              `json:"author,omitempty"`
	Editor     string              `json:"updated_by,omitempty"`
	Created    string              `json:"created,omitempty"`
	Updated    string              `json:"updated,omitempty"`
	AllowRead  []rolestore.RoleRef `json:"read_roles,omitempty"`
	AllowWrite []rolestore.RoleRef `json:"write_roles,omitempty"`
	Data       json.RawMessage     `json:"data,omitempty"`
}

Secret contains PrivX metadata about secret and its vault

type Vault

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

Vault is client instance.

func New

func New(api restapi.Connector) *Vault

New creates a new Vault client instance, using the argument SDK API client.

func (*Vault) Create

func (vault *Vault) Create(
	name string,
	allowReadBy []string,
	allowWriteBy []string,
	secret interface{},
) error

Create new secret to PrivX Vault

func (*Vault) Get

func (vault *Vault) Get(name string) (bag *Secret, err error)

Get gets the content of the argument secret.

func (*Vault) Remove

func (vault *Vault) Remove(name string) error

Remove existing secret from PrivX vault

func (*Vault) Update

func (vault *Vault) Update(
	name string,
	allowReadTo []string,
	allowWriteTo []string,
	secret interface{},
) error

Update existing secret at PrivX Vault

Jump to

Keyboard shortcuts

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