Documentation
¶
Overview ¶
Package client provides a client for the OmniVault daemon.
Index ¶
- type Client
- func (c *Client) DeleteSecret(ctx context.Context, path string) error
- func (c *Client) GetSecret(ctx context.Context, path string) (*daemon.SecretResponse, error)
- func (c *Client) GetStatus(ctx context.Context) (*daemon.StatusResponse, error)
- func (c *Client) Init(ctx context.Context, password string) error
- func (c *Client) IsDaemonRunning() bool
- func (c *Client) ListSecrets(ctx context.Context, prefix string) (*daemon.ListResponse, error)
- func (c *Client) Lock(ctx context.Context) error
- func (c *Client) SetSecret(ctx context.Context, path, value string, fields, tags map[string]string) error
- func (c *Client) Stop(ctx context.Context) error
- func (c *Client) Unlock(ctx context.Context, password string) error
- type DaemonError
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is a client for the OmniVault daemon.
func NewWithPaths ¶
NewWithPaths creates a new daemon client with custom paths (for testing).
func NewWithSocket ¶
NewWithSocket creates a new daemon client with a custom socket path (for testing). Deprecated: Use NewWithPaths for cross-platform support.
func (*Client) DeleteSecret ¶
DeleteSecret removes a secret.
func (*Client) IsDaemonRunning ¶
IsDaemonRunning checks if the daemon is running.
func (*Client) ListSecrets ¶
ListSecrets returns all secrets.
type DaemonError ¶
DaemonError represents an error from the daemon.
func (*DaemonError) Error ¶
func (e *DaemonError) Error() string
func (*DaemonError) IsInvalidPassword ¶
func (e *DaemonError) IsInvalidPassword() bool
IsInvalidPassword returns true if the error indicates invalid password.
func (*DaemonError) IsNotFound ¶
func (e *DaemonError) IsNotFound() bool
IsNotFound returns true if the error indicates not found.
func (*DaemonError) IsVaultLocked ¶
func (e *DaemonError) IsVaultLocked() bool
IsVaultLocked returns true if the error indicates the vault is locked.