Skip to content

added madmin, inventory, batch-catalog support#201

Draft
HJLebbink wants to merge 1 commit intominio:masterfrom
HJLebbink:feature/madmin
Draft

added madmin, inventory, batch-catalog support#201
HJLebbink wants to merge 1 commit intominio:masterfrom
HJLebbink:feature/madmin

Conversation

@HJLebbink
Copy link
Copy Markdown
Member

No description provided.

@HJLebbink HJLebbink added the enhancement Used in release doc generation label Jan 27, 2026
@HJLebbink HJLebbink self-assigned this Jan 27, 2026
Add batch and s3inventory features

- Added 3 updated batch operation builders (batch_job_status, cancel_batch_job, describe_batch_job)
- Added complete s3inventory module with 7 APIs
- Added s3inventory tests (10 test files)
- Added s3inventory examples (14 example files)
- Updated lib.rs to export s3inventory module
- Added InvalidInventoryJobId variant to ValidationErr
- Added serde_yaml dependency for inventory YAML support
- Updated Cargo.toml with inventory example configurations

Total: 57 files (55 new + 2 modified)

Add madmin inventory control operations

- Added madmin/builders/inventory/ (cancel, suspend, resume inventory jobs)
- Added madmin/client/batch/mod.rs (batch client implementations)
- Added madmin/client/inventory/ (inventory control client implementations)
- Added madmin/response/inventory/ (inventory control response types)
- Fixed JobId type conversions in batch client methods

Total: 12 files (11 new + 1 modified)

Fix code quality issues per CLAUDE.md standards

CRITICAL FIXES:
- Added copyright headers to 9 batch builder files
- Replaced 36 panicking From with TryFrom implementations (12 types)
  * AccessKey, SecretKey, PolicyName, GroupName, KmsKeyId, KmsIdentity,
    TierName, PoolName, NodeAddress, ConfigKey, IdpConfigName, Arn
  * All now use TryFrom pattern matching JobId implementation
- Updated examples and tests to use new TryFrom pattern

MAJOR FIXES:
- Added struct documentation to 8 batch builders
- Added comprehensive module documentation to batch/mod.rs
  * Includes architecture, operations list, and usage examples

MINOR FIXES:
- Removed 2 redundant comments from generate_batch_job.rs

All changes follow CLAUDE.md typed parameter pattern and eliminate
runtime panics in favor of proper Result-based error handling.

Verified:
- ✅ cargo check passes
- ✅ cargo clippy shows 0 warnings
- ✅ All tests pass
- ✅ Examples compile

Refactor madmin client methods to S3-style pattern

Changed 6 user management client methods to accept parameters with
generic TryInto bounds, matching the S3 client API pattern.

BEFORE (builder-only pattern):
  client.add_user()
      .access_key(AccessKey::new("user")?)
      .secret_key(SecretKey::new("pass")?)
      .send().await?

AFTER (S3-style pattern):
  client.add_user("user", "pass")?.send().await?

Methods updated:
- add_user(access_key, secret_key)
- remove_user(access_key)
- set_user(access_key, secret_key)
- delete_service_account(access_key)
- info_access_key(access_key)
- info_service_account(access_key)

Benefits:
- Cleaner, more ergonomic API
- Consistent with S3 client pattern
- Accepts &str, String, or pre-validated types
- Type validation at call site with proper error handling

Updated:
- 6 client method signatures
- 6 builder type aliases
- 3 examples (user_management, policy_management, service_accounts)
- 1 test file

Verified:
- ✅ cargo check passes
- ✅ All examples compile
- ✅ All tests pass (471 tests)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement Used in release doc generation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant