Documentation
¶
Overview ¶
Package secrets defines the opaque value and reference contracts used by LoopRig's credential stores. Secret values deliberately have no useful ordinary representation: callers must opt in to Bytes at the point where a value is consumed.
Index ¶
- Constants
- Variables
- func IsVisibleCommit(err error) bool
- type CanceledError
- type ConflictError
- type CorruptRecordError
- func (e *CorruptRecordError) Error() string
- func (e *CorruptRecordError) Format(state fmt.State, verb rune)
- func (e *CorruptRecordError) GoString() string
- func (e *CorruptRecordError) LogValue() slog.Value
- func (e *CorruptRecordError) Reference() Reference
- func (e *CorruptRecordError) Unwrap() error
- type DeleteOptions
- type DeleteResult
- type DeleteStatus
- type EmptySecretError
- type InsecurePathError
- type InvalidNamespaceError
- func (e *InvalidNamespaceError) Error() string
- func (e *InvalidNamespaceError) Format(state fmt.State, verb rune)
- func (e *InvalidNamespaceError) GoString() string
- func (e *InvalidNamespaceError) LogValue() slog.Value
- func (e *InvalidNamespaceError) Reason() string
- func (e *InvalidNamespaceError) Unwrap() error
- type InvalidOptionsError
- func (e *InvalidOptionsError) Error() string
- func (e *InvalidOptionsError) Format(state fmt.State, verb rune)
- func (e *InvalidOptionsError) GoString() string
- func (e *InvalidOptionsError) LogValue() slog.Value
- func (e *InvalidOptionsError) Reason() string
- func (e *InvalidOptionsError) Unwrap() error
- type InvalidPageTokenError
- func (e *InvalidPageTokenError) Error() string
- func (e *InvalidPageTokenError) Format(state fmt.State, verb rune)
- func (e *InvalidPageTokenError) GoString() string
- func (e *InvalidPageTokenError) LogValue() slog.Value
- func (e *InvalidPageTokenError) Reason() string
- func (e *InvalidPageTokenError) Unwrap() error
- type InvalidReferenceError
- func (e *InvalidReferenceError) Error() string
- func (e *InvalidReferenceError) Format(state fmt.State, verb rune)
- func (e *InvalidReferenceError) GoString() string
- func (e *InvalidReferenceError) LogValue() slog.Value
- func (e *InvalidReferenceError) Reason() string
- func (e *InvalidReferenceError) Unwrap() error
- type InvalidVersionError
- func (e *InvalidVersionError) Error() string
- func (e *InvalidVersionError) Format(state fmt.State, verb rune)
- func (e *InvalidVersionError) GoString() string
- func (e *InvalidVersionError) LogValue() slog.Value
- func (e *InvalidVersionError) Reason() string
- func (e *InvalidVersionError) Unwrap() error
- type Lister
- type Metadata
- type Namespace
- type NotFoundError
- type Page
- type PageToken
- type Precondition
- type PreconditionCapabilities
- type PutOptions
- type Record
- type Reference
- type Resolver
- type Secret
- type SecretSizeError
- type Store
- type UnavailableError
- type UnsupportedCapabilityError
- type UnsupportedSchemeError
- type Version
- type VersionMismatchError
- type VisibleCommitError
- type ZeroSecretError
Constants ¶
const ( MaxReferenceLength = 512 MaxReferencePathLength = 448 MaxReferenceSchemeLen = 32 )
Reference limits keep parsing and canonicalization bounded at untrusted boundaries. Paths are slash-separated opaque identifiers, not filesystem paths.
const MaxPageItems = 1000
MaxPageItems is the largest page an implementation may return. A caller's smaller limit is still mandatory for each List operation.
const MaxPageTokenLength = 256
MaxPageTokenLength bounds opaque continuation tokens.
const MaxSecretSize = 1 << 20
MaxSecretSize is the largest value accepted by New. Keeping the bound in the base package gives stores a common limit to enforce before allocating or decoding an envelope.
const MaxVersionLength = 256
MaxVersionLength bounds backend-issued opaque versions.
Variables ¶
var ( ErrInvalidVersion = errors.New("secrets: invalid version") ErrInvalidOptions = errors.New("secrets: invalid options") ErrInvalidPageToken = errors.New("secrets: invalid page token") ErrNotFound = errors.New("secrets: secret not found") ErrUnsupportedScheme = errors.New("secrets: unsupported scheme") ErrUnsupportedCapability = errors.New("secrets: unsupported capability") ErrInsecurePath = errors.New("secrets: insecure path") ErrCorruptRecord = errors.New("secrets: corrupt record") ErrConflict = errors.New("secrets: version conflict") ErrCanceled = errors.New("secrets: operation canceled") )
var ( ErrInvalidReference = errors.New("secrets: invalid reference") ErrInvalidNamespace = errors.New("secrets: invalid namespace") )
var ( // ErrEmptySecret identifies an empty value passed to New. ErrEmptySecret = errors.New("secrets: empty secret") // ErrSecretTooLarge identifies a value over MaxSecretSize. ErrSecretTooLarge = errors.New("secrets: secret value too large") // ErrZeroSecret identifies an invalid zero Secret supplied to a record or // mutation. A zero Secret has no value that can be disclosed or stored. ErrZeroSecret = errors.New("secrets: zero secret") )
var VersionUnsupported = Version{/* contains filtered or unexported fields */}
VersionUnsupported explicitly represents a backend that cannot provide a stable comparable version. It is not synthesized from timestamps or fingerprints, and it is the only supported way to report the marker.
Functions ¶
func IsVisibleCommit ¶
IsVisibleCommit reports whether err contains a visible-commit classification without requiring consumers to import a backend-specific error package.
Types ¶
type CanceledError ¶
type CanceledError struct {
// contains filtered or unexported fields
}
CanceledError reports cancellation while preserving errors.Is only for the normalized context cancellation sentinels, without retaining arbitrary wrapped text.
func NewCanceledError ¶
func NewCanceledError(operation string, cause error) *CanceledError
NewCanceledError constructs a bounded cancellation error. Only the two standard context sentinels are retained as a normalized kind.
func (*CanceledError) Error ¶
func (e *CanceledError) Error() string
func (*CanceledError) GoString ¶
func (e *CanceledError) GoString() string
func (*CanceledError) Is ¶
func (e *CanceledError) Is(target error) bool
func (*CanceledError) LogValue ¶
func (e *CanceledError) LogValue() slog.Value
type ConflictError ¶
type ConflictError struct {
// contains filtered or unexported fields
}
ConflictError reports a failed compare-and-swap precondition. Version details are intentionally not retained in the public error; callers can resolve the record again if they need fresh coordination state.
func NewConflictError ¶
func NewConflictError(reference Reference) *ConflictError
NewConflictError constructs an error carrying only the safe reference.
func (*ConflictError) Error ¶
func (e *ConflictError) Error() string
func (*ConflictError) GoString ¶
func (e *ConflictError) GoString() string
func (*ConflictError) LogValue ¶
func (e *ConflictError) LogValue() slog.Value
func (*ConflictError) Reference ¶
func (e *ConflictError) Reference() Reference
Reference returns the safe reference associated with the error.
func (*ConflictError) Unwrap ¶
func (e *ConflictError) Unwrap() error
type CorruptRecordError ¶
type CorruptRecordError struct {
// contains filtered or unexported fields
}
CorruptRecordError reports a record that cannot be safely decoded.
func NewCorruptRecordError ¶
func NewCorruptRecordError(reference Reference) *CorruptRecordError
NewCorruptRecordError constructs an error carrying only the safe reference. Backend detail is intentionally not accepted or retained.
func (*CorruptRecordError) Error ¶
func (e *CorruptRecordError) Error() string
func (*CorruptRecordError) GoString ¶
func (e *CorruptRecordError) GoString() string
func (*CorruptRecordError) LogValue ¶
func (e *CorruptRecordError) LogValue() slog.Value
func (*CorruptRecordError) Reference ¶
func (e *CorruptRecordError) Reference() Reference
Reference returns the safe reference associated with the error.
func (*CorruptRecordError) Unwrap ¶
func (e *CorruptRecordError) Unwrap() error
type DeleteOptions ¶
type DeleteOptions struct {
Precondition Precondition
ExpectedVersion Version
}
DeleteOptions carries an unconditional or compare-and-swap condition. The zero value is unconditional and deletion of an absent reference is idempotent.
func CompareAndSwapDelete ¶
func CompareAndSwapDelete(version Version) DeleteOptions
CompareAndSwapDelete returns options requiring the supplied existing version.
func UnconditionalDelete ¶
func UnconditionalDelete() DeleteOptions
UnconditionalDelete returns options for an unconditional delete.
func (DeleteOptions) Validate ¶
func (o DeleteOptions) Validate() error
Validate checks DeleteOptions.
type DeleteResult ¶
type DeleteResult struct {
Reference Reference
Version Version
Status DeleteStatus
}
DeleteResult reports an idempotent deletion without returning secret bytes. A successful unconditional delete may report VersionUnsupported only when the backend explicitly lacks comparable versions; that marker never implies that a compare-and-swap precondition was checked or can be used safely.
func NewDeleteResult ¶
func NewDeleteResult(reference Reference, status DeleteStatus, version Version) (DeleteResult, error)
NewDeleteResult constructs a value-free delete result and validates its status/version combination. Absent deletes use VersionUnsupported because no record version exists to report.
func (DeleteResult) Validate ¶
func (r DeleteResult) Validate() error
Validate checks a delete result's status and safe coordination metadata.
type DeleteStatus ¶
type DeleteStatus uint8
DeleteStatus reports whether a delete removed a record or found it already absent. It is intentionally one status field rather than several booleans whose combinations could be contradictory.
const ( DeleteStatusAbsent DeleteStatus = iota DeleteStatusDeleted )
func (DeleteStatus) String ¶
func (s DeleteStatus) String() string
type EmptySecretError ¶
type EmptySecretError struct{}
EmptySecretError reports an empty value passed to New.
func (*EmptySecretError) Error ¶
func (e *EmptySecretError) Error() string
func (*EmptySecretError) GoString ¶
func (e *EmptySecretError) GoString() string
func (*EmptySecretError) LogValue ¶
func (e *EmptySecretError) LogValue() slog.Value
func (*EmptySecretError) Unwrap ¶
func (e *EmptySecretError) Unwrap() error
type InsecurePathError ¶
type InsecurePathError struct {
// contains filtered or unexported fields
}
InsecurePathError reports an unsafe path or permission boundary.
func NewInsecurePathError ¶
func NewInsecurePathError(reason string) *InsecurePathError
NewInsecurePathError constructs a bounded insecure-path error.
func (*InsecurePathError) Error ¶
func (e *InsecurePathError) Error() string
func (*InsecurePathError) GoString ¶
func (e *InsecurePathError) GoString() string
func (*InsecurePathError) LogValue ¶
func (e *InsecurePathError) LogValue() slog.Value
func (*InsecurePathError) Reason ¶
func (e *InsecurePathError) Reason() string
Reason returns a normalized, secret-free reason label.
func (*InsecurePathError) Unwrap ¶
func (e *InsecurePathError) Unwrap() error
type InvalidNamespaceError ¶
type InvalidNamespaceError struct {
// contains filtered or unexported fields
}
InvalidNamespaceError reports a malformed namespace without retaining raw input.
func NewInvalidNamespaceError ¶
func NewInvalidNamespaceError(reason string) *InvalidNamespaceError
NewInvalidNamespaceError constructs a bounded invalid-namespace error.
func (*InvalidNamespaceError) Error ¶
func (e *InvalidNamespaceError) Error() string
func (*InvalidNamespaceError) Format ¶
func (e *InvalidNamespaceError) Format(state fmt.State, verb rune)
func (*InvalidNamespaceError) GoString ¶
func (e *InvalidNamespaceError) GoString() string
func (*InvalidNamespaceError) LogValue ¶
func (e *InvalidNamespaceError) LogValue() slog.Value
func (*InvalidNamespaceError) Reason ¶
func (e *InvalidNamespaceError) Reason() string
Reason returns a normalized, secret-free reason label.
func (*InvalidNamespaceError) Unwrap ¶
func (e *InvalidNamespaceError) Unwrap() error
type InvalidOptionsError ¶
type InvalidOptionsError struct {
// contains filtered or unexported fields
}
InvalidOptionsError reports malformed mutation or pagination options.
func NewInvalidOptionsError ¶
func NewInvalidOptionsError(reason string) *InvalidOptionsError
NewInvalidOptionsError constructs a bounded invalid-options error.
func (*InvalidOptionsError) Error ¶
func (e *InvalidOptionsError) Error() string
func (*InvalidOptionsError) Format ¶
func (e *InvalidOptionsError) Format(state fmt.State, verb rune)
func (*InvalidOptionsError) GoString ¶
func (e *InvalidOptionsError) GoString() string
func (*InvalidOptionsError) LogValue ¶
func (e *InvalidOptionsError) LogValue() slog.Value
func (*InvalidOptionsError) Reason ¶
func (e *InvalidOptionsError) Reason() string
Reason returns a normalized, secret-free reason label.
func (*InvalidOptionsError) Unwrap ¶
func (e *InvalidOptionsError) Unwrap() error
type InvalidPageTokenError ¶
type InvalidPageTokenError struct {
// contains filtered or unexported fields
}
InvalidPageTokenError reports malformed or oversized token text without retaining raw input.
func NewInvalidPageTokenError ¶
func NewInvalidPageTokenError(reason string) *InvalidPageTokenError
NewInvalidPageTokenError constructs a bounded invalid-page-token error.
func (*InvalidPageTokenError) Error ¶
func (e *InvalidPageTokenError) Error() string
func (*InvalidPageTokenError) Format ¶
func (e *InvalidPageTokenError) Format(state fmt.State, verb rune)
func (*InvalidPageTokenError) GoString ¶
func (e *InvalidPageTokenError) GoString() string
func (*InvalidPageTokenError) LogValue ¶
func (e *InvalidPageTokenError) LogValue() slog.Value
func (*InvalidPageTokenError) Reason ¶
func (e *InvalidPageTokenError) Reason() string
Reason returns a normalized, secret-free reason label.
func (*InvalidPageTokenError) Unwrap ¶
func (e *InvalidPageTokenError) Unwrap() error
type InvalidReferenceError ¶
type InvalidReferenceError struct {
// contains filtered or unexported fields
}
InvalidReferenceError reports malformed or unsafe reference text without retaining the caller's raw input (which could itself contain a credential).
func NewInvalidReferenceError ¶
func NewInvalidReferenceError(reason string) *InvalidReferenceError
NewInvalidReferenceError constructs a bounded invalid-reference error. The reason is normalized to a small package-owned vocabulary and is never retained verbatim.
func (*InvalidReferenceError) Error ¶
func (e *InvalidReferenceError) Error() string
func (*InvalidReferenceError) Format ¶
func (e *InvalidReferenceError) Format(state fmt.State, verb rune)
func (*InvalidReferenceError) GoString ¶
func (e *InvalidReferenceError) GoString() string
func (*InvalidReferenceError) LogValue ¶
func (e *InvalidReferenceError) LogValue() slog.Value
func (*InvalidReferenceError) Reason ¶
func (e *InvalidReferenceError) Reason() string
Reason returns a normalized, secret-free reason label.
func (*InvalidReferenceError) Unwrap ¶
func (e *InvalidReferenceError) Unwrap() error
type InvalidVersionError ¶
type InvalidVersionError struct {
// contains filtered or unexported fields
}
InvalidVersionError reports an empty, oversized, or unsafe version without retaining the caller's raw value.
func NewInvalidVersionError ¶
func NewInvalidVersionError(reason string) *InvalidVersionError
NewInvalidVersionError constructs a bounded invalid-version error.
func (*InvalidVersionError) Error ¶
func (e *InvalidVersionError) Error() string
func (*InvalidVersionError) Format ¶
func (e *InvalidVersionError) Format(state fmt.State, verb rune)
func (*InvalidVersionError) GoString ¶
func (e *InvalidVersionError) GoString() string
func (*InvalidVersionError) LogValue ¶
func (e *InvalidVersionError) LogValue() slog.Value
func (*InvalidVersionError) Reason ¶
func (e *InvalidVersionError) Reason() string
Reason returns a normalized, secret-free reason label.
func (*InvalidVersionError) Unwrap ¶
func (e *InvalidVersionError) Unwrap() error
type Lister ¶
Lister is an optional metadata-only capability. Implementations must honor the caller's bounded limit and namespace exactly; values are never listed.
type Namespace ¶
type Namespace struct {
// contains filtered or unexported fields
}
Namespace is a canonical scheme and path prefix used to constrain listing. It cannot contain references from another scheme or a sibling prefix.
func NewNamespace ¶
NewNamespace constructs a namespace. A single trailing slash is accepted as presentation syntax and removed from the canonical prefix.
func ParseNamespace ¶
ParseNamespace parses a namespace written in reference form. It accepts a single trailing slash to make prefix literals convenient, while String always emits the canonical no-trailing-slash form.
func (Namespace) Contains ¶
Contains reports whether ref is the namespace itself or a descendant path. The segment boundary check prevents "personal" from containing "personally".
func (Namespace) Prefix ¶
Prefix is an alias for Path, useful at call sites that emphasize boundary semantics.
type NotFoundError ¶
type NotFoundError struct {
// contains filtered or unexported fields
}
NotFoundError reports an absent safe reference.
func NewNotFoundError ¶
func NewNotFoundError(reference Reference) *NotFoundError
NewNotFoundError constructs an error carrying only the already-validated reference.
func (*NotFoundError) Error ¶
func (e *NotFoundError) Error() string
func (*NotFoundError) GoString ¶
func (e *NotFoundError) GoString() string
func (*NotFoundError) LogValue ¶
func (e *NotFoundError) LogValue() slog.Value
func (*NotFoundError) Reference ¶
func (e *NotFoundError) Reference() Reference
Reference returns the safe reference associated with the error.
func (*NotFoundError) Unwrap ¶
func (e *NotFoundError) Unwrap() error
type Page ¶
Page is a bounded metadata page and optional opaque continuation token.
type PageToken ¶
type PageToken struct {
// contains filtered or unexported fields
}
PageToken is an opaque bounded continuation token. Its representation is constructor-enforced and comparable; its zero value denotes the first page.
func NewPageToken ¶
NewPageToken validates an opaque continuation token. Empty input is the zero first-page token.
func (PageToken) MarshalText ¶
MarshalText emits the bounded token text.
func (*PageToken) UnmarshalText ¶
UnmarshalText accepts bounded printable token text and leaves p unchanged on failure.
type Precondition ¶
type Precondition uint8
Precondition selects the mutation condition for Put and Delete.
const ( PreconditionUnconditional Precondition = iota PreconditionCreateOnly PreconditionCompareAndSwap )
type PreconditionCapabilities ¶
PreconditionCapabilities reports affirmative support for conditional mutations. A Store that does not support a requested precondition must return an UnsupportedCapabilityError instead of treating it as unconditional.
type PutOptions ¶
type PutOptions struct {
Precondition Precondition
ExpectedVersion Version
}
PutOptions carries one explicit mutation precondition. The zero value is unconditional. ExpectedVersion is required only for compare-and-swap.
func CompareAndSwapPut ¶
func CompareAndSwapPut(version Version) PutOptions
CompareAndSwapPut returns options requiring the supplied existing version.
func CreateOnlyPut ¶
func CreateOnlyPut() PutOptions
CreateOnlyPut returns options that succeed only when the reference is absent.
func UnconditionalPut ¶
func UnconditionalPut() PutOptions
UnconditionalPut returns options for an unconditional mutation.
func (PutOptions) Validate ¶
func (o PutOptions) Validate() error
Validate checks that PutOptions describe exactly one supported condition.
type Record ¶
Record is the resolved value plus safe coordination metadata. Callers do not choose Version or UpdatedAt when a backend creates a record.
type Reference ¶
type Reference struct {
// contains filtered or unexported fields
}
Reference is a canonical, non-secret identifier. The path is opaque to this package and is interpreted by the backend selected by Scheme; it is never treated as a filesystem path.
func NewReference ¶
NewReference builds a canonical reference from a validated scheme and opaque slash-separated path.
func ParseReference ¶
ParseReference parses a strict scheme://path reference and returns its canonical representation. Schemes are normalized to lowercase; paths are preserved exactly after validation. Query strings, fragments, URL authorities, filesystem traversal syntax, and endpoint schemes are not accepted.
func (Reference) MarshalText ¶
MarshalText allows safe persistence of the canonical reference.
func (Reference) String ¶
String returns the canonical stable representation. The zero Reference has an empty representation.
func (*Reference) UnmarshalText ¶
UnmarshalText parses canonical reference text and leaves r unchanged on error.
type Secret ¶
type Secret struct {
// contains filtered or unexported fields
}
Secret is an immutable opaque value. Its bytes are private and all normal formatting and structured logging paths are redacted.
The zero value is invalid. Construct values with New and call Bytes only at an explicit value-consumption boundary.
func New ¶
New copies value and returns an opaque Secret. The input remains owned by the caller and may be changed or cleared immediately after this call.
func (Secret) Bytes ¶
Bytes returns a copy of the value. It returns nil for the invalid zero Secret, so the zero value never discloses a value or appears storable.
func (Secret) Format ¶
Format implements fmt.Formatter and ignores every verb, flag, width, and precision. This prevents numeric and nested formatting from falling back to the unexported byte slice representation.
func (Secret) GoString ¶
GoString implements fmt.GoStringer for %#v and always returns a fixed redaction. It deliberately does not include the underlying byte length.
func (Secret) LogValue ¶
LogValue implements slog.LogValuer and keeps Secret values out of structured logs, including when passed through slog.Any.
type SecretSizeError ¶
SecretSizeError reports a value larger than the module's bound. It carries only sizes, never any value bytes.
func (*SecretSizeError) Error ¶
func (e *SecretSizeError) Error() string
func (*SecretSizeError) GoString ¶
func (e *SecretSizeError) GoString() string
func (*SecretSizeError) LogValue ¶
func (e *SecretSizeError) LogValue() slog.Value
func (*SecretSizeError) Unwrap ¶
func (e *SecretSizeError) Unwrap() error
type Store ¶
type Store interface {
Resolver
Put(context.Context, Reference, Secret, PutOptions) (Record, error)
Delete(context.Context, Reference, DeleteOptions) (DeleteResult, error)
}
Store is a mutable Resolver. Implementations must reject zero Secrets and enforce the requested precondition rather than silently weakening it.
type UnavailableError ¶
type UnavailableError struct {
// contains filtered or unexported fields
}
UnavailableError reports an unavailable backend. Operation is normalized to a closed vocabulary and arbitrary causes are intentionally not accepted or retained.
func NewUnavailableError ¶
func NewUnavailableError(operation string, reference Reference) *UnavailableError
NewUnavailableError constructs a bounded unavailable-backend error.
func (*UnavailableError) Error ¶
func (e *UnavailableError) Error() string
func (*UnavailableError) GoString ¶
func (e *UnavailableError) GoString() string
func (*UnavailableError) Is ¶
func (e *UnavailableError) Is(target error) bool
func (*UnavailableError) LogValue ¶
func (e *UnavailableError) LogValue() slog.Value
func (*UnavailableError) Reference ¶
func (e *UnavailableError) Reference() Reference
Reference returns the safe reference associated with the error.
type UnsupportedCapabilityError ¶
type UnsupportedCapabilityError struct{}
UnsupportedCapabilityError reports a requested capability that the backend cannot provide safely. Capability detail is intentionally not retained.
func NewUnsupportedCapabilityError ¶
func NewUnsupportedCapabilityError() *UnsupportedCapabilityError
NewUnsupportedCapabilityError constructs a bounded unsupported-capability error.
func (*UnsupportedCapabilityError) Error ¶
func (e *UnsupportedCapabilityError) Error() string
func (*UnsupportedCapabilityError) Format ¶
func (e *UnsupportedCapabilityError) Format(state fmt.State, verb rune)
func (*UnsupportedCapabilityError) GoString ¶
func (e *UnsupportedCapabilityError) GoString() string
func (*UnsupportedCapabilityError) LogValue ¶
func (e *UnsupportedCapabilityError) LogValue() slog.Value
func (*UnsupportedCapabilityError) Unwrap ¶
func (e *UnsupportedCapabilityError) Unwrap() error
type UnsupportedSchemeError ¶
type UnsupportedSchemeError struct{}
UnsupportedSchemeError reports a backend scheme for which an implementation has no resolver. Scheme detail is deliberately not retained: even a syntactically valid scheme can be caller-controlled secret-bearing input.
func NewUnsupportedSchemeError ¶
func NewUnsupportedSchemeError() *UnsupportedSchemeError
NewUnsupportedSchemeError constructs a bounded unsupported-scheme error.
func (*UnsupportedSchemeError) Error ¶
func (e *UnsupportedSchemeError) Error() string
func (*UnsupportedSchemeError) Format ¶
func (e *UnsupportedSchemeError) Format(state fmt.State, verb rune)
func (*UnsupportedSchemeError) GoString ¶
func (e *UnsupportedSchemeError) GoString() string
func (*UnsupportedSchemeError) LogValue ¶
func (e *UnsupportedSchemeError) LogValue() slog.Value
func (*UnsupportedSchemeError) Unwrap ¶
func (e *UnsupportedSchemeError) Unwrap() error
type Version ¶
type Version struct {
// contains filtered or unexported fields
}
Version is an opaque backend-issued coordination value. Its representation is constructor-enforced and comparable, while the unsupported marker has a private tag so it cannot collide with a supported value's text.
func NewVersion ¶
NewVersion validates a backend-issued version. The explicit unsupported sentinel is reserved for direct backend use via VersionUnsupported.
func (Version) IsUnsupported ¶
IsUnsupported reports explicit lack of backend version support.
func (Version) MarshalText ¶
MarshalText emits the bounded canonical version text, including the explicit unsupported marker.
func (*Version) UnmarshalText ¶
UnmarshalText accepts the explicit unsupported marker or a supported value, leaving v unchanged on failure.
type VersionMismatchError ¶
type VersionMismatchError = ConflictError
VersionMismatchError is a descriptive alias for ConflictError.
type VisibleCommitError ¶
VisibleCommitError classifies a mutation error whose linearization point has already passed. Implementations must keep any additional error detail bounded and safe; callers use the returned mutation result as authoritative and must not assume the previous state survived.
type ZeroSecretError ¶
type ZeroSecretError struct{}
ZeroSecretError reports use of a zero Secret where a value is required.
func (*ZeroSecretError) Error ¶
func (e *ZeroSecretError) Error() string
func (*ZeroSecretError) GoString ¶
func (e *ZeroSecretError) GoString() string
func (*ZeroSecretError) LogValue ¶
func (e *ZeroSecretError) LogValue() slog.Value
func (*ZeroSecretError) Unwrap ¶
func (e *ZeroSecretError) Unwrap() error
Directories
¶
| Path | Synopsis |
|---|---|
|
Package contracttest contains reusable contract checks for secrets.Store implementations.
|
Package contracttest contains reusable contract checks for secrets.Store implementations. |
|
examples
|
|
|
local-store
command
|
|
|
references
command
|
|
|
secret-safety
command
|
|
|
Package local implements an owner-only, descriptor-relative local secret store.
|
Package local implements an owner-only, descriptor-relative local secret store. |