add sdk layer: vault client, token store, gitea API
vault.rs — OpenBao client with kubernetes auth, KV v2 operations, automatic token refresh on 403. proper error handling on all paths. tokens.rs — vault-backed token storage with expiry validation. get_valid returns Result<Option> to distinguish vault errors from missing tokens. username mappings stay in sqlite (not secrets). gitea.rs — typed gitea API v1 wrapper with per-user PAT auto-provisioning via admin API. username discovery by direct match or email search. URL-encoded query params. handles 400 and 422 token name conflicts with delete+retry.
This commit is contained in:
3
src/sdk/mod.rs
Normal file
3
src/sdk/mod.rs
Normal file
@@ -0,0 +1,3 @@
|
||||
pub mod gitea;
|
||||
pub mod tokens;
|
||||
pub mod vault;
|
||||
Reference in New Issue
Block a user