apigate 1.0.0

Macro-driven API gateway for Rust: declarative routing, request transformation, and reverse proxying built on axum
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
struct Input;
struct Output;

#[apigate::map]
async fn remap(input: Input) -> apigate::MapResult<Output> {
    let _ = input;
    Ok(Output)
}

#[apigate::service(name = "sales", prefix = "/sales")]
mod sales {
    use super::*;

    #[apigate::get("/items", map = remap)]
    async fn items() {}
}

fn main() {}