vault

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Jul 28, 2021 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 Params added in v0.6.0

type Params struct {
	Offset  int    `json:"offset,omitempty"`
	Limit   int    `json:"limit,omitempty"`
	Sortkey string `json:"sortkey,omitempty"`
	Sortdir string `json:"sortdir,omitempty"`
}

Params struct for pagination queries.

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) CreateSecret added in v0.6.0

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

CreateSecret create new secret to PrivX Vault

func (*Vault) DeleteSecret added in v0.6.0

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

DeleteSecret delete existing secret from PrivX vault

func (*Vault) SearchSecrets added in v0.6.0

func (vault *Vault) SearchSecrets(offset, limit int, keywords, sortkey, sortdir string) ([]Secret, error)

SearchSecrets search for existing secrets

func (*Vault) Secret added in v0.6.0

func (vault *Vault) Secret(name string) (*Secret, error)

Secret gets the content of the argument secret.

func (*Vault) SecretMetadata added in v0.6.0

func (vault *Vault) SecretMetadata(name string) (*Secret, error)

SecretMetadata returns secret metadata

func (*Vault) Secrets added in v0.6.0

func (vault *Vault) Secrets(offset, limit int) ([]Secret, error)

Secrets returns secrets client has access to

func (*Vault) UpdateSecret added in v0.6.0

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

UpdateSecret existing secret at PrivX Vault

func (*Vault) VaultSchemas added in v0.6.0

func (vault *Vault) VaultSchemas() (*json.RawMessage, error)

VaultSchemas returns the defined schemas

Jump to

Keyboard shortcuts

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