[package]
name = "avina-api"
description = "Rust API server for the LRZ-specific features of the Openstack-based LRZ Compute Cloud."
authors = ["Sandro-Alessio Gierens <sandro@gierens.de>"]
categories = ["web-programming"]
edition = "2024"
homepage = "https://github.com/LRZ-BADW/avina"
repository = "https://github.com/LRZ-BADW/avina"
exclude = []
readme = "README.md"
license = "MIT"
version = "1.2.1"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[lib]
crate-type = ["cdylib", "rlib"]
name = "avina_api"
path = "src/lib.rs"

[[bin]]
name = "avina-api"
path = "src/main.rs"

[features]
default = ["all"]
all = ["accounting", "budgeting", "hello", "pricing", "quota", "resources", "user"]
accounting = ["avina-wire/accounting"]
budgeting = ["avina-wire/budgeting"]
hello = ["avina-wire/hello"]
pricing = ["avina-wire/pricing"]
quota = ["avina-wire/quota"]
resources = ["avina-wire/resources"]
user = ["avina-wire/user"]

[dependencies]
actix-web = "4"
actix-cors = "0.7.1"
tracing = { version = "0.1", features = ["log"] }
tracing-subscriber = { version = "0.3", features = ["registry", "env-filter"] }
tracing-bunyan-formatter = "0.3"
tracing-log = "0.2"
tracing-actix-web = "0.7"
secrecy = { version = "0.10.3", features = ["serde"] }
anyhow = "1"
serde = { version = "1.0", features = ["derive"] }
serde_json = "1"
serde-aux = "4"
config = "0.15"
tokio = { version = "1", features = ["macros", "rt-multi-thread"] }
jzon = "0.12"
avina-wire = { version = "2.2", path = "../wire", features = ["sqlx"] }
thiserror = "2.0"
chrono = { version = "0.4", features = ["serde"] }
strum = { version = "0.28", features = ["derive"] }
indexmap = "2.14"
uuid = { version = "1.20", features = ["v4"] }

[dependencies.sqlx]
version = "0.8"
default-features = false
features = [
    "runtime-tokio",
    "tls-rustls",
    "macros",
    "mysql",
    "uuid",
    "chrono",
    "migrate",
]

[dependencies.reqwest]
version = "0.13"
default-features = false
features = ["json", "rustls", "cookies"]

[dev-dependencies]
once_cell = "1"
cargo-husky = { workspace = true }
wiremock = "0.6"
rand = "0.9"
avina-test = { path = "../test" }
