aarondb/gateway
Types
pub type GatewayError {
Unauthorized(String)
TransactError(String)
QueryError(String)
}
Constructors
-
Unauthorized(String) -
TransactError(String) -
QueryError(String)
Values
pub fn authorize_and_query(
db: process.Subject(transactor.Message),
token_str: String,
query_ast: List(ast.BodyClause),
required_caps: List(auth.Capability),
) -> Result(query_types.QueryResult, GatewayError)
pub fn authorize_and_transact(
db: process.Subject(transactor.Message),
token_str: String,
facts: List(#(fact.Eid, String, fact.Value)),
required_caps: List(auth.Capability),
) -> Result(Int, GatewayError)
Rich Hickey 🧙🏾♂️: The Gateway is a pure authorization boundary. It verifies capabilities before any AST reaches the internal logic.