vault

package
v1.34.0 Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2024 License: Apache-2.0 Imports: 5 Imported by: 1

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 SecretID added in v0.21.0

type SecretID struct {
	OwnerID string
	Name    string
}

type SecretSearchRequest added in v0.21.0

type SecretSearchRequest struct {
	Keywords string   `json:"keywords"`
	Filter   string   `json:"filter"`
	OwnerIDs []string `json:"owner_id"`
}

Search criteria for secrets

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) CreateUserSecret added in v0.21.0

func (vault *Vault) CreateUserSecret(
	secretID SecretID,
	allowReadBy []string,
	allowWriteBy []string,
	secret interface{},
) error

CreateUserSecret creates a user secret

func (*Vault) DeleteSecret added in v0.6.0

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

DeleteSecret delete existing secret from PrivX vault

func (*Vault) DeleteUserSecret added in v0.21.0

func (vault *Vault) DeleteUserSecret(secretID SecretID) error

DeleteSecret delete existing secret from PrivX vault

func (*Vault) SearchSecrets added in v0.6.0

func (vault *Vault) SearchSecrets(offset, limit int, sortkey, sortdir string, searchBody SecretSearchRequest) ([]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) UpdateUserSecret added in v0.21.0

func (vault *Vault) UpdateUserSecret(
	secretID SecretID,
	allowReadTo []string,
	allowWriteTo []string,
	secret interface{},
) error

UpdateUserSecret existing secret at PrivX Vault

func (*Vault) UserSecret added in v0.21.0

func (vault *Vault) UserSecret(secretID SecretID) (*Secret, error)

UserSecret gets the content of the argument user secret.

func (*Vault) UserSecretMetadata added in v0.21.0

func (vault *Vault) UserSecretMetadata(secretID SecretID) (*Secret, error)

SecretMetadata returns secret metadata

func (*Vault) UserSecrets added in v0.21.0

func (vault *Vault) UserSecrets(secretID SecretID, offset, limit int) ([]Secret, error)

UserSecrets returns user secrets client has access to

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