[package]
edition = "2024"
rust-version = "1.96"
name = "gatekeep-sqlx"
version = "1.1.0"
authors = ["Mari"]
build = false
autolib = false
autobins = false
autoexamples = false
autotests = false
autobenches = false
description = "SQLx query lowering adapter for gatekeep"
homepage = "https://github.com/plethu/gatekeep"
documentation = "https://docs.rs/gatekeep-sqlx"
readme = "README.md"
keywords = [
"authorization",
"policy",
"authz",
"sqlx",
]
categories = [
"authentication",
"database",
]
license = "MIT OR Apache-2.0"
repository = "https://github.com/plethu/gatekeep"
[features]
default = ["postgres"]
dovecote = [
"dovecote-postgres",
"dovecote-sqlite",
"dovecote-mysql",
]
dovecote-mysql = [
"mysql",
"dep:dovecote",
"dep:dovecote-sqlx-mysql",
"dep:sha2",
"dep:uuid",
]
dovecote-postgres = [
"postgres",
"dep:dovecote",
"dep:dovecote-sqlx-postgres",
"dep:sha2",
"dep:uuid",
]
dovecote-sqlite = [
"sqlite",
"dep:dovecote",
"dep:dovecote-sqlx-sqlite",
"dep:sha2",
"dep:uuid",
]
mysql = [
"sqlx/mysql",
"sqlx/time",
"sqlx/uuid",
]
mysql-tests = [
"mysql",
"sqlx/runtime-tokio",
]
postgres = [
"sqlx/postgres",
"sqlx/time",
"sqlx/uuid",
]
postgres-tests = [
"postgres",
"sqlx/runtime-tokio",
]
sqlite = [
"sqlx/sqlite",
"sqlx/time",
"sqlx/uuid",
]
sqlite-tests = [
"sqlite",
"sqlx/runtime-tokio",
]
[lib]
name = "gatekeep_sqlx"
path = "src/lib.rs"
[[test]]
name = "dovecote_bridge_mysql"
path = "tests/dovecote_bridge_mysql.rs"
[[test]]
name = "dovecote_bridge_postgres"
path = "tests/dovecote_bridge_postgres.rs"
[[test]]
name = "dovecote_bridge_sqlite"
path = "tests/dovecote_bridge_sqlite.rs"
[[test]]
name = "lowering"
path = "tests/lowering.rs"
[[test]]
name = "mysql"
path = "tests/mysql.rs"
[[test]]
name = "postgres"
path = "tests/postgres.rs"
[[test]]
name = "sqlite_audit"
path = "tests/sqlite_audit.rs"
[dependencies.async-trait]
version = "0.1.89"
[dependencies.dovecote]
version = "0.1.0"
optional = true
package = "dovecote"
[dependencies.dovecote-sqlx-mysql]
version = "0.1.0"
optional = true
package = "dovecote-sqlx-mysql"
[dependencies.dovecote-sqlx-postgres]
version = "0.1.0"
optional = true
package = "dovecote-sqlx-postgres"
[dependencies.dovecote-sqlx-sqlite]
version = "0.1.0"
optional = true
package = "dovecote-sqlx-sqlite"
[dependencies.gatekeep]
version = "1.1.0"
[dependencies.serde]
version = "1.0.228"
features = ["derive"]
[dependencies.serde_json]
version = "1.0.145"
[dependencies.sha2]
version = "0.10.9"
optional = true
[dependencies.sqlx]
version = "0.9.0"
features = [
"json",
"time",
"uuid",
]
default-features = false
[dependencies.thiserror]
version = "2.0.17"
[dependencies.time]
version = "0.3.41"
features = ["parsing"]
[dependencies.uuid]
version = "1.18.1"
features = ["v4"]
optional = true
[dev-dependencies.serde]
version = "1.0.228"
features = ["derive"]
[dev-dependencies.tokio]
version = "1.48.0"
features = [
"macros",
"rt-multi-thread",
]
[lints.clippy]
dbg_macro = "deny"
expect_used = "deny"
missing_errors_doc = "deny"
module_name_repetitions = "allow"
multiple_crate_versions = "allow"
panic = "deny"
todo = "deny"
unimplemented = "deny"
unwrap_used = "deny"
[lints.clippy.all]
level = "deny"
priority = -1
[lints.clippy.cargo]
level = "deny"
priority = -1
[lints.clippy.nursery]
level = "warn"
priority = -1
[lints.clippy.pedantic]
level = "deny"
priority = -1
[lints.rust]
missing_docs = "warn"
unsafe_code = "forbid"