Initial: Holzleitner Mail-Client (Rust, Windows-Service)
Polling-Client, der beim Backend die noch nicht versendeten ausgelieferten Belege abfragt (GET /admin/delivered-belegnummern), ERPframe per CLI zum Mailversand anstößt (_SV_MAIL_VERSAND) und die Belege anschließend als versendet markiert (POST /admin/mark-mail-sent). Authentifizierung gegen das Backend per X-Admin-Api-Key. Enthält: Config-Laden (config.json, Vorlage config.example.json), Logging, Windows-Service-Wrapper (install-/uninstall-service.ps1). Nicht im Repo (.gitignore): config.json (Secrets: Admin-Key + ERPframe- Passwort), target/, logs/. config.example.json trägt nur Platzhalter. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
27
Cargo.toml
Normal file
27
Cargo.toml
Normal file
@ -0,0 +1,27 @@
|
||||
[package]
|
||||
name = "holzleitner-mailclient"
|
||||
version = "0.1.0"
|
||||
edition = "2021"
|
||||
description = "Pollt die noch nicht versendeten Belegnummern vom Holzleitner-Backend und stößt ERPFRAME.EXE an (das die Mails verschickt). Läuft als langlaufender Prozess unter Windows."
|
||||
|
||||
[[bin]]
|
||||
name = "holzleitner-mailclient"
|
||||
path = "src/main.rs"
|
||||
|
||||
[dependencies]
|
||||
tokio = { version = "1", features = ["rt-multi-thread", "macros", "time", "signal", "process"] }
|
||||
# rustls statt OpenSSL → keine C/OpenSSL-Abhängigkeit, einfacher für Windows-Builds.
|
||||
reqwest = { version = "0.12", default-features = false, features = ["rustls-tls", "json"] }
|
||||
serde = { version = "1", features = ["derive"] }
|
||||
serde_json = "1"
|
||||
chrono = "0.4"
|
||||
anyhow = "1"
|
||||
|
||||
# Windows-Dienst-Integration (SCM). Nur unter Windows kompiliert; auf anderen
|
||||
# Plattformen (z. B. Mac für den Kompiliertest) wird das Modul ausgeblendet.
|
||||
[target.'cfg(windows)'.dependencies]
|
||||
windows-service = "0.6"
|
||||
|
||||
[profile.release]
|
||||
strip = true
|
||||
lto = true
|
||||
Reference in New Issue
Block a user