Documentation
¶
Overview ¶
Package credential owns private primitives shared by stored authentication credentials. Public packages preserve their own typed persistence boundaries.
Index ¶
- Constants
- func AddressKey(namespace keyspace.Namespace, guard, provider, table string) (string, error)
- func CheckCreation[T any](ctx context.Context, check func(context.Context, *database.Tx) error, ...) (T, error)
- func InSchema(ctx context.Context, tx *database.Tx, db *database.DB, schema string, ...) error
- func IsNil(v any) bool
- func SubjectKey(scope, table string, identity model.Identity) (string, error)
- func ValidateAddress(namespace keyspace.Namespace, guard, provider, table string) error
- type Digest
- type Gate
Constants ¶
const EncodedSecretBytes = 43
const SecretBytes = 32
Variables ¶
This section is empty.
Functions ¶
func AddressKey ¶
func CheckCreation ¶
func CheckCreation[T any](ctx context.Context, check func(context.Context, *database.Tx) error, create func(func(context.Context, *database.Tx) error) (T, error)) (T, error)
CheckCreation ensures a synchronous adapter called the supplied check exactly once and did not suppress its failure. Adapter transaction correctness remains its contract; metadata inspection cannot undo a misbehaving adapter's commit.
Types ¶
type Digest ¶
type Digest struct {
// contains filtered or unexported fields
}
func Fingerprint ¶
Fingerprint hashes exact ordered UTF-8 components using the same unambiguous encoding as credential addresses. Callers validate their own size/shape limits.
func ParseDigest ¶
type Gate ¶
type Gate struct {
// contains filtered or unexported fields
}
Gate owns callback capacity until actual exit, including cancellation/Goexit. It does not own the borrowed backend or retry uncertain operations. A burst queues for at most admission.Wait(timeout); an unsatisfied wait reports fault.Overloaded before the operation starts.