1pub use phoenix_auth as auth;
2pub use phoenix_config as config;
3pub use phoenix_console as console;
4pub use phoenix_console::commands;
5pub use phoenix_runtime as core;
6pub use phoenix_runtime::applications;
7pub use phoenix_crypto as crypto;
8pub use phoenix_database as database;
9pub use phoenix_dx as dx;
10pub use phoenix_dx::mount_routes;
11pub use phoenix_http as http;
12pub use phoenix_logging as logging;
13pub use phoenix_macros::contract;
14pub use phoenix_metrics as metrics;
15pub use phoenix_plugin as plugin;
16pub use phoenix_routing as routing;
17pub use phoenix_routing::routes;
18pub use phoenix_security as security;
19pub use phoenix_validation as validation;
20pub use phoenix_view as view;
21
22#[cfg(feature = "mail")]
23pub use phoenix_mail as mail;
24#[cfg(feature = "queue")]
25pub use phoenix_queue as queue;
26#[cfg(feature = "redis")]
27pub use phoenix_redis as redis;
28#[cfg(feature = "storage")]
29pub use phoenix_storage as storage;
30#[cfg(feature = "testing")]
31pub use phoenix_testing as testing;
32
33pub mod prelude {
34 pub use phoenix_auth::{
35 AbacPolicy, AuditReason, AuthorizationAudit, AuthorizationAuditEvent,
36 AuthorizationDecision, AuthorizationEngine, AuthorizationError, AuthorizationRequest,
37 CurrentPrincipal, Permission, PolicyFn, Principal, PrincipalFromJwt, Rbac, RbacError,
38 RequirePermission, Role, policy_fn,
39 };
40 pub use phoenix_config::{AppConfig, AppConfigBuilder, ConfigError, Environment, SecretValue};
41 pub use phoenix_console::{CommandContext, CommandEntry, CommandResult, Console, commands};
42 pub use phoenix_runtime::applications;
43 pub use phoenix_runtime::{
44 Application, ApplicationModule, HttpProtocol, MultiApplicationBuilder,
45 MultiApplicationError, Server, ServerError, ServerHandle, TlsConfig, TlsConfigError,
46 };
47 pub use phoenix_crypto::{
48 BlindIndexError, BlindIndexKey, BlindIndexer, Ciphertext,
49 EncryptionError as CryptoEncryptionError, EncryptionKey, Encryptor, FileTokenStore, Jwt,
50 JwtAuth, JwtClaims, JwtConfig, JwtError, JwtKey, JwtManager, MAX_BLIND_INDEX_KEYS,
51 MemoryTokenStore, Password, PasswordError, RefreshRecord, RotateRefresh, StatefulJwtAuth,
52 TokenError, TokenPair, TokenService, TokenStore, TokenStoreError,
53 };
54 pub use phoenix_database::{Backend, Database, DatabaseBuilder, DatabaseError, TestDatabase};
55 pub use phoenix_dx::{
56 Bound, MiddlewareAliasError, MiddlewareAliases, ModelBinding, Resource, ResourceAction,
57 ResourceRoutes, mount_routes,
58 };
59 pub use phoenix_http::{
60 BoxFuture, ByteStream, CloseCode, CloseFrame, ConnectionInfo, CspNonce, Download, Form,
61 FormRejection, FromMultipart, FromRequest, Handler, Header, HeaderRejection, IntoResponse,
62 InvalidCspNonce, InvalidSseField, Json, JsonRejection, KeepAlive, LastEventId, Message,
63 Method, Middleware, Mime, Multipart, MultipartData, MultipartField, MultipartRejection,
64 Next, Path, PathRejection, Query, QueryRejection, Redirect, Request, RequestBodyError,
65 RequestBodyMode, RequestBodyStream, RequestBodyStreamRejection, Response, ResponseBody,
66 ResponseContext, RouteManifest, SecurityHeaders, Sse, SseConfigError, SseEvent, State,
67 StateMiddleware, StateRejection, StatusCode, StreamingHandler, TransportScheme,
68 TypedHandler, Uri, Version, WebSocket, WebSocketConfigError, WebSocketError,
69 WebSocketUpgrade, WebSocketUpgradeRejection, middleware_fn, streaming, typed,
70 };
71 pub use phoenix_logging::{LogFormat, Logging, LoggingError, LoggingGuard};
72 pub use phoenix_metrics::{
73 DatabaseOutcome, JobOutcome, Metrics, MetricsMiddleware, RendererMetricsSnapshot,
74 };
75 pub use phoenix_plugin::{Capability, FeatureError, FeatureParts, FeatureSet, Plugin};
76 pub use phoenix_routing::routes;
77 pub use phoenix_routing::{
78 ApplicationContext, MultiRouterError, RouteBuildError, RouteGroup, Router, Routes,
79 UrlGenerationError,
80 };
81 pub use phoenix_security::{
82 AccessLog, ClientIp, ClientIpRateLimitKey, Cors, CorsConfig, CspPolicyError, Csrf,
83 EffectiveScheme, HostAllowlist, HttpsRedirect, HttpsRedirectError, MemoryRateLimitBackend,
84 MemorySessionBackend, NonceSecurityPolicy, RateLimit, RateLimitBackend, RateLimitConfig,
85 RateLimitDecision, RateLimitFailureMode, RateLimitKey, RateLimitStoreError, RequestId,
86 RequestIdValue, SameSite, SecurityPolicy, Session, SessionBackend, SessionBackendError,
87 SessionConfig, SessionMiddleware, SessionSnapshot, SessionStore, SessionWrite,
88 TrustedProxies, effective_scheme,
89 };
90 pub use phoenix_validation::{
91 BoxedRule, Rule, RuleContext, Validate, Validated, ValidatedRejection, ValidationError,
92 ValidationErrors, Validator, custom_rule, max_length, min_length, required, rules, string,
93 };
94 pub use phoenix_view::{
95 ASSET_MANIFEST_SCHEMA, Aes256GcmCodec, AssetEntry, AssetManifest, AssetManifestError,
96 DocumentContext, DocumentSlots, DocumentTemplate, DocumentTemplateError, EncryptionError,
97 Island, NodeRenderer, OpenGraph, Page, PageEnvelope, PageHead, PageResponseError,
98 PayloadCodec, RenderContext, RenderFrame, RenderMode, RenderResult, RendererConfig,
99 RendererError, RendererHealth, RendererManifest, RendererStream, TrustedHtml,
100 };
101
102 #[cfg(feature = "mail")]
103 pub use phoenix_mail::{
104 Address, MailError, MailTransport, Mailer, MemoryTransport, Message as EmailMessage,
105 MessageBuilder,
106 };
107 #[cfg(feature = "queue")]
108 pub use phoenix_queue::{
109 JobEnvelope, JobError, JobHandler, JobId, MemoryQueue, PushOptions, PushResult, Queue,
110 QueueBackend, QueueError, ShutdownSignal, ShutdownToken, Worker, WorkerConfig,
111 };
112 #[cfg(feature = "redis")]
113 pub use phoenix_redis::{
114 RedisBackends, RedisConnectError, RedisRateLimitBackend, RedisSessionBackend, RedisStores,
115 RedisTokenStore,
116 };
117 #[cfg(feature = "storage")]
118 pub use phoenix_storage::{LocalDisk, Storage, StorageError, sanitize_key};
119 #[cfg(feature = "testing")]
120 pub use phoenix_testing::{
121 IntoApplication, RequestBuilder, TestApp, TestAppError, TestResponse,
122 };
123}