Documentation
¶
Overview ¶
Package storage re-exports the theauth.Storage interface and the canonical ErrNotFound sentinel that adapters return on lookup misses.
Concrete adapters live in sibling sub-packages: storage/memory for tests and local development, storage/postgres for production deployments backed by pgx and sqlc-generated queries.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNotFound = theauth.ErrStorageNotFound
ErrNotFound is returned by storage adapters when a lookup misses. Service code translates to theauth sentinel errors as appropriate. Aliased to theauth.ErrStorageNotFound so that root-package service code can errors.Is-check without importing this package (which would create an import cycle).
Functions ¶
This section is empty.
Types ¶
Directories
¶
| Path | Synopsis |
|---|---|
|
Package memory provides an in-process implementation of theauth.Storage backed by Go maps protected by a sync.RWMutex.
|
Package memory provides an in-process implementation of theauth.Storage backed by Go maps protected by a sync.RWMutex. |
|
Package postgres provides a production-grade implementation of theauth.Storage backed by PostgreSQL through pgx and sqlc-generated query bindings.
|
Package postgres provides a production-grade implementation of theauth.Storage backed by PostgreSQL through pgx and sqlc-generated query bindings. |
Click to show internal directories.
Click to hide internal directories.