Documentation ¶
Index ¶
- type Params
- type Secret
- type SecretID
- type SecretSearchRequest
- type Vault
- func (vault *Vault) CreateSecret(name string, allowReadBy []string, allowWriteBy []string, secret interface{}) error
- func (vault *Vault) CreateUserSecret(secretID SecretID, allowReadBy []string, allowWriteBy []string, ...) error
- func (vault *Vault) DeleteSecret(name string) error
- func (vault *Vault) DeleteUserSecret(secretID SecretID) error
- func (vault *Vault) SearchSecrets(offset, limit int, sortkey, sortdir string, searchBody SecretSearchRequest) ([]Secret, error)
- func (vault *Vault) Secret(name string) (*Secret, error)
- func (vault *Vault) SecretMetadata(name string) (*Secret, error)
- func (vault *Vault) Secrets(offset, limit int) ([]Secret, error)
- func (vault *Vault) UpdateSecret(name string, allowReadTo []string, allowWriteTo []string, secret interface{}) error
- func (vault *Vault) UpdateUserSecret(secretID SecretID, allowReadTo []string, allowWriteTo []string, ...) error
- func (vault *Vault) UserSecret(secretID SecretID) (*Secret, error)
- func (vault *Vault) UserSecretMetadata(secretID SecretID) (*Secret, error)
- func (vault *Vault) UserSecrets(secretID SecretID, offset, limit int) ([]Secret, error)
- func (vault *Vault) VaultSchemas() (*json.RawMessage, error)
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 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 (*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
DeleteSecret delete existing secret from PrivX vault
func (*Vault) DeleteUserSecret ¶ added in v0.21.0
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) SecretMetadata ¶ added in v0.6.0
SecretMetadata returns secret metadata
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
UserSecret gets the content of the argument user secret.
func (*Vault) UserSecretMetadata ¶ added in v0.21.0
SecretMetadata returns secret metadata
func (*Vault) UserSecrets ¶ added in v0.21.0
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