Skip to main content

surrealdb_expr/expr/statements/define/config/
api.rs

1use surrealdb_strand::Strand;
2
3use crate::expr::Expr;
4use crate::expr::permission::Permission;
5
6/// The api configuration as it is received from ast.
7
8#[derive(Clone, Debug, Default, Eq, PartialEq, Hash)]
9pub struct ApiConfig {
10	pub middleware: Vec<Middleware>,
11	pub permissions: Permission,
12}
13
14/// The api middleware as it is received from ast.
15
16#[derive(Clone, Debug, Default, Eq, PartialEq, Hash)]
17pub struct Middleware {
18	pub name: Strand,
19	pub args: Vec<Expr>,
20}