storage

package
v0.6.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 21, 2026 License: MIT Imports: 1 Imported by: 0

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

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

type Storage

type Storage = theauth.Storage

Storage is the persistence contract TheAuth depends on. Re-exported from the root package so adapters can reference the conventional location while the root package owns the interface definition (avoids a root -> storage -> root import cycle).

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL