vault_audit_tools/utils/mod.rs
1//! Utility functions and helpers.
2//!
3//! This module provides common functionality used across multiple commands:
4//!
5//! - [`progress`] - Progress tracking and display utilities
6//! - [`time`] - Timestamp parsing and formatting helpers
7//! - [`reader`] - Smart file reader with automatic decompression
8//!
9//! # Examples
10//!
11//! ## Parsing timestamps
12//!
13//! ```no_run
14//! use vault_audit_tools::utils::time::parse_timestamp;
15//!
16//! let timestamp = parse_timestamp("2025-10-20T10:30:00.000Z").unwrap();
17//! println!("Parsed: {}", timestamp);
18//! ```
19//!
20//! ## Reading compressed files
21//!
22//! ```no_run
23//! use vault_audit_tools::utils::reader::open_file;
24//! use std::io::{BufRead, BufReader};
25//!
26//! // Automatically decompresses .gz and .zst files
27//! let reader = open_file("audit.log.gz").unwrap();
28//! let buf_reader = BufReader::new(reader);
29//! ```
30
31pub mod progress;
32pub mod reader;
33pub mod time;