Documentation
¶
Index ¶
- type Backend
- type BlobBackend
- type Error
- type ErrorKind
- type Ref
- type Resolver
- func (r *Resolver) DeleteBlob(ctx context.Context, raw string) error
- func (r *Resolver) Exists(ctx context.Context, raw string) (bool, error)
- func (r *Resolver) LoadBlob(ctx context.Context, raw string) ([]byte, error)
- func (r *Resolver) Resolve(ctx context.Context, raw string) (string, error)
- func (r *Resolver) SaveBlob(ctx context.Context, raw string, data []byte) error
- func (r *Resolver) Store(ctx context.Context, raw, value string) error
- func (r *Resolver) WritableBackends() []WritableBackend
- type WritableBackend
- type WritableBlobBackend
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BlobBackend ¶
type BlobBackend interface {
Backend
Scheme() string
LoadBlob(ctx context.Context, ref Ref) ([]byte, error)
}
BlobBackend extends a backend to support binary data retrieval.
type Error ¶
Error is a typed secret reference error.
type Resolver ¶
type Resolver struct {
// contains filtered or unexported fields
}
Resolver routes secret references by scheme.
Resolutions from interactive native stores (macOS Keychain, Windows Credential Manager, Linux Secret Service) are cached in-process and deduplicated with singleflight. This matters for unsigned/dev builds, where the OS cannot persist an "always allow" ACL keyed to the binary's code signature and so re-prompts on every keychain access: without the cache, the concurrent store probes and per-action re-probes would each pop a separate password dialog. With it, a given reference prompts at most once per process.
func NewResolver ¶
NewResolver creates a resolver from scheme backends.
func (*Resolver) DeleteBlob ¶
DeleteBlob parses and removes a binary blob from a secret reference.
func (*Resolver) SaveBlob ¶
SaveBlob parses and atomically stores a binary blob to a secret reference.
func (*Resolver) WritableBackends ¶
func (r *Resolver) WritableBackends() []WritableBackend
WritableBackends returns registered backends that support interactive writes.
type WritableBackend ¶
type WritableBackend interface {
Backend
Scheme() string
DisplayName() string
WriteSupported() bool
DefaultRef(storeName, account string) string
Exists(ctx context.Context, ref Ref) (bool, error)
Store(ctx context.Context, ref Ref, value string) error
}
WritableBackend extends a backend with native-store write and existence checks for interactive CLI flows.
Directories
¶
| Path | Synopsis |
|---|---|
|
Package backends holds the secret backends Cloudstic ships with, split out from the pkg/secretref contract so that implementing a custom backend does not drag in the platform-native ones (macOS Keychain, libsecret, Windows Credential Manager) and their build constraints.
|
Package backends holds the secret backends Cloudstic ships with, split out from the pkg/secretref contract so that implementing a custom backend does not drag in the platform-native ones (macOS Keychain, libsecret, Windows Credential Manager) and their build constraints. |