Conversation
- Updated the main Cargo.toml to specify workspace members and set the edition to 2021. - Added a new Cargo.toml for the docker crate with dependencies on reqwest, tokio, and serde.
- Introduced a new `docker.rs` file containing the `DockerClient` struct and associated data structures for managing Docker containers, volumes, and versions. - Implemented methods for retrieving containers, version information, and volume details from the Docker API. - Added error handling through a custom `DockerError` enum to manage various error states. - Included tests for the implemented methods to ensure functionality across different operating systems.
- Introduced a new `lib.rs` file in the Docker crate, containing modules for Docker interactions and test cases. - Implemented tests for connecting to the Docker Unix socket and sending HTTP requests to the Docker API. - Configured socket paths for Linux and macOS environments to facilitate testing across different operating systems.
- Introduced a new `requests.rs` file in the Docker crate, defining the `DockerApi` and `DockerRequestMethod` enums for API endpoints and request methods. - Implemented the `TeusRequestBuilder` struct to facilitate Unix socket connections and format HTTP requests to the Docker API. - Added methods for building requests and parsing responses, including handling chunked responses. - Included unit tests to verify the correctness of request formatting for different HTTP methods.
- Created a new `handlers.rs` file in the Docker module to define API endpoints for retrieving Docker version, containers, and volumes. - Implemented asynchronous handlers for each endpoint, returning JSON responses with appropriate error handling. - Added a generic response structure for error messages to standardize API responses.
- Added a path dependency for the docker crate in the Cargo.toml file to facilitate integration with the Docker module.
- Updated the Docker socket path configuration to support macOS and Unix environments. - Introduced a new `DockerErrorResponse` struct for better error message parsing. - Refactored response handling in the Docker client methods to utilize a generic parsing function, enhancing error management across API calls. - Added additional fields to the `Labels` struct for Docker Compose compatibility. - Improved test socket path retrieval for macOS by using the environment variable for the home directory.
- Added `ContainerDetails` variant to the `DockerApi` enum for retrieving specific container information. - Updated the `endpoint` method to format the endpoint string for the new container details API call. - Minor formatting adjustments in the `TeusRequestBuilder` for improved readability.
- Integrated new API endpoint handlers for retrieving Docker version, container details, and volumes in the webserver. - Updated the API service configuration to include these new handlers, enhancing the Docker module's functionality.
- Added a new `docker` module to the webserver, enhancing the structure for Docker-related functionality. - Created a `mod.rs` file in the `docker` directory to define the `handlers` module for future API endpoint implementations. - Included the `auth` module in the webserver for improved organization of authentication-related features.
- Configured release profile settings to optimize for size, enabling link-time optimization and stripping symbols from the binary. - Set panic behavior to abort and reduced code generation units for improved build efficiency.
- Created a new `REFERENCES.md` file to document the Docker API, including a link to the official Docker API documentation. - This addition aims to provide developers with quick access to relevant resources for Docker integration.
…k settings - Changed the `labels` field in the `Container` struct from a custom `Labels` type to a `HashMap<String, String>` to accommodate missing labels. - Updated the `networks` field in the `NetworkSettings` struct to use a `HashMap<String, NetworkDetails>` for better flexibility. - Modified several fields in the `NetworkDetails` struct to be `Option<String>` to handle cases where values may be absent. - Adjusted API request methods to include an optional parameter for improved request handling.
…I requests - Updated the `format_url_request` method to include an optional `query` parameter, allowing for dynamic query string generation. - Modified the `make_request` method to accept the new `query` parameter and adjusted related tests to ensure correct request formatting with and without query strings. - Added debug print statements to log the constructed request and query string for easier troubleshooting.
…ions - Updated test cases to use immutable `temp_file` declarations instead of mutable ones for better clarity and consistency. - Removed unused import of `std::env` to clean up the code.
…g structs - Added `#[allow(dead_code)]` annotations to the `as_str` method in the `Environment` implementation and the `environment` field in the `ServerConfig` struct to suppress warnings for unused code. - This change improves code clarity while maintaining the current functionality.
- Added `#[allow(dead_code)]` annotations to the `DiskInfo` and `SysInfo` structs, as well as the `create_test_config` function in the tests module to suppress warnings for unused code. - This change enhances code clarity while preserving existing functionality.
The commit thoroughly documents the Docker API data structures with detailed type documentation, including: - Full documentation for Container, Port, NetworkDetails and other core types - Field-level documentation explaining each property's purpose and format - Usage examples showing how to work with the types - JSON format examples showing the API response structure - Cross-references between related types and fields - Parameter validation rules and constraints - Common values and formats for important fields
The changes add support for query parameters when listing Docker containers, including proper handling and serialization of the `all` parameter.
The changes add comprehensive documentation to configuration types and database schema structures. This includes detailed field descriptions, usage examples, and best practices for configuration settings. Various improvements include: - Document all public types and fields with examples - Add security considerations for sensitive settings - Include performance recommendations for monitoring intervals - Clarify relationships between database entities - Add TODO note about API organization
The new modules implement bookmark CRUD operations with SQLite storage and API endpoints for authenticated users.
…4s/Teus into feat/docker-sock-listener
This commit reformats all Rust source code files using Rustfmt, the standard Rust code formatting tool. The changes include: - Fix indentation and line wrapping - Remove extra newlines and trailing whitespace - Organize imports alphabetically - Format struct/enum declarations consistently - No functional changes - code behavior remains the same
The commit updates the container inspection response struct and related types to more closely match the Docker Engine API v1.50 spec, with comprehensive documentation and proper optional fields.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.