Skip to main content

Crate auths_storage

Crate auths_storage 

Source
Expand description

Storage adapters for auths-id ports.

This crate provides concrete implementations of the storage port traits defined in auths-id::ports. Each backend is gated behind a feature flag so consumers only pull in the dependencies they need.

§Features

  • backend-git — Git-backed storage via libgit2 (enables GitRegistryBackend)
  • backend-postgres — PostgreSQL-backed storage via sqlx (stub, not yet implemented)

§Usage

[dependencies]
auths-storage = { path = "...", features = ["backend-git"] }

Instantiate the backend and inject it at the composition root:

use std::sync::Arc;
use auths_id::ports::RegistryBackend;
use auths_storage::git::GitRegistryBackend;

let backend: Arc<dyn RegistryBackend + Send + Sync> =
    Arc::new(GitRegistryBackend::new(config));