admin: expose community admin lib target

This commit is contained in:
github-ops
2026-05-15 08:02:32 +00:00
parent a1e90585b1
commit 7ebe8cae22
5 changed files with 27 additions and 28 deletions
+9
View File
@@ -0,0 +1,9 @@
pub mod app;
pub mod auth;
pub mod error;
pub mod rate_limit;
pub mod request_context;
pub mod routes;
pub mod service;
pub mod state;
pub mod storage;
+6 -17
View File
@@ -1,31 +1,20 @@
mod app;
mod auth;
mod error;
mod rate_limit;
mod request_context;
mod routes;
mod service;
mod state;
mod storage;
use std::{env, net::SocketAddr, path::PathBuf};
use crank_community_auth::PasswordIdentityProvider;
use crank_registry::{PostgresPoolConfig, PostgresRegistry};
use sqlx::postgres::PgConnectOptions;
use tokio::net::TcpListener;
use tracing::info;
use crate::{
use admin_api::{
app::build_app,
auth::{AuthSettings, BootstrapAdminConfig},
service::AdminServiceBuilder,
state::AppState,
};
use crank_community_auth::PasswordIdentityProvider;
use crank_registry::{PostgresPoolConfig, PostgresRegistry};
use crank_runtime::{
RequestRateLimitConfig, RequestRateLimiter, RuntimeCacheConfig, RuntimeCacheStores,
RuntimeLimits, SecretCrypto, community_default,
};
use sqlx::postgres::PgConnectOptions;
use tokio::net::TcpListener;
use tracing::info;
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {