storage

package
v1.0.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: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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.
sqlite module

Jump to

Keyboard shortcuts

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