1mod app;
2mod backend;
3pub mod balancing;
4mod error;
5mod parts_ctx;
6mod pipeline;
7pub mod policy;
8mod proxy;
9mod route;
10pub mod routing;
11
12pub use app::{App, AppBuilder, run};
13pub use error::ApigateError;
14pub use parts_ctx::PartsCtx;
15pub use pipeline::{
16 HookResult, MapResult, PipelineFn, PipelineFuture, PipelineResult, RequestScope,
17};
18pub use route::{DstChunk, RewriteSpec, RewriteTemplate, SrcSeg};
19
20#[derive(Clone, Copy, Debug)]
21pub enum Method {
22 Get,
23 Post,
24 Put,
25 Delete,
26 Patch,
27 Head,
28 Options,
29}
30
31#[derive(Clone, Copy, Debug)]
32pub struct RouteDef {
33 pub method: Method,
34 pub path: &'static str,
35 pub rewrite: RewriteSpec,
36 pub policy: Option<&'static str>,
37 pub pipeline: Option<PipelineFn>,
38}
39
40#[derive(Clone, Copy, Debug)]
41pub struct Routes {
42 pub service: &'static str,
43 pub prefix: &'static str,
44 pub policy: Option<&'static str>,
45 pub routes: &'static [RouteDef],
46}