Commit Graph

22 Commits

Author SHA1 Message Date
Anthony Oteri d2d51b3a2d refactor: simplify codebase and fix correctness issues
- api: extract check_api_version_header() helper, eliminating duplicated
  header-checking logic in parse_response_status()
- api: simplify parse_rfc5988() using split_once and let-else
- api: propagate JSON decode errors in fetch_paginated() instead of
  silently swallowing them
- api: add connect/request timeouts via a shared build_client() helper;
  all handlers now use a configured client instead of reqwest::get()
- api: fix stale log trace name get_manifest -> get_digest
- commands: promote inline response structs to module-level for clarity
- commands: fix etag stripping logic (was using wrong quote/apostrophe
  pattern; now correctly strips RFC 7232 double-quotes)
- commands: simplify iterator chains in catalog/tags handlers
- error: simplify ResponseHeaderParseError from Box<dyn Error> to String
- main: fix stale log trace name make_registry_url -> parse_registry_arg
- main: use as_deref().unwrap_or() instead of allocating via to_owned()
- cli: remove unused imports and #![allow(unused_imports)] attribute
2026-05-13 14:51:42 -04:00
Anthony Oteri 0e4219b405 Change License
This changes the effective license from a simple Apache-2.0 license to a
dual license consisting of both Apache-2.0 and the MIT license to be more
compatible for use in GPL Code.

The MIT license requires reproducing countless copies of the same copyright
header with diffferent names in the copyright field, for every MIT library
in use.  The Apache license does not have this drawback.  However, this is not
the primary motivation for creating these issues.  The Apache license also has
protections from patent trolls and explicit contribuition licensing clause.
However the Apache license is incompatible with GPLv2.  This is why Rust is
dual-licensed as MIT/Apache (the "primary" license being Apache, MIT only for
GPLv2 compat), and doing so would be wise for this project.  This also makes
this crate suitable for inclusion and unrestricted sharing in the Rust
standard distribution and other projects using dual MIT/Apache.
2023-10-03 09:36:43 -04:00
Anthony Oteri 80d1acf295 Replace async-std with tokio
Tokio is a far more mature async runtime.
2023-10-02 13:01:58 -04:00
Anthony Oteri 13ae092b91 Replace femme logger with simple_logger 2023-09-29 15:05:23 -04:00
Anthony Oteri 1ebe0bba84 Fix clippy error 2023-09-26 23:01:58 -04:00
Anthony Oteri 2e10f9b5f7 Automated code cleanup 2023-09-26 23:01:58 -04:00
Anthony Oteri e83cdef39c Additional test coverage for parsing the registry arg 2023-09-26 23:01:58 -04:00
Anthony Oteri a6cd95bfa4 Add unit tests for existing commands 2023-09-26 16:09:52 -04:00
Anthony Oteri 031ea891ec Run automated code cleanup 2023-09-21 16:18:44 -04:00
Anthony Oteri cead0006a4 Miscellaneous code cleanup 2023-09-21 15:56:34 -04:00
Anthony Oteri 535e08e9bb Support for specifying the URL on the command line 2023-09-21 15:34:19 -04:00
Anthony Oteri 3156a9f99e Fix clippy security errors 2023-09-21 14:28:15 -04:00
Anthony Oteri 2e084a4b2e Enable Clippy::Pedantic checks by default 2023-09-21 13:47:25 -04:00
Anthony Oteri 3768401faf Refactoring for Show/Delete handlers
Refactor the existing code architecture to be a little flatter to support adding the show and delete handlers.  Currently these two handlers are just stubbed functions, but the CLI looks about right.
2023-09-20 16:38:24 -04:00
Anthony Oteri 6f44b77a6d Code cleanup
Fix some minor issues detected by automated code inspection tools.
2023-09-18 14:37:10 -04:00
Anthony Oteri 6199848e23 Add Required Copyright header to source files 2023-09-18 14:16:09 -04:00
Anthony Oteri b9d34e7614 Add support for listing image tags 2023-09-18 14:01:21 -04:00
Anthony Oteri 9445c9e817 Add API Version check endpoint 2023-09-14 10:03:10 -04:00
Anthony Oteri 00a1ad87e7 Rename "repo list" command to "catalog"
The official Docker Registry V2 API calls the commmand to list the repositories
the "catalog", so to keep things as consistent as possible and not invent new
names for things that have meaning in the domain, stick with the same naming
convention.
2023-09-14 09:24:09 -04:00
Anthony Oteri 88de046934 Remove .clone() from LogLevel which implements Copy 2023-09-13 21:51:33 -04:00
Anthony Oteri 957b0bb2cc Apply consistent formatting with cargo-fmt 2023-09-13 21:45:37 -04:00
Anthony Oteri 7b0c3f1dcc Create initial project structure
The initial project structure includes the base scaffolding of the
application as well as the ability to fetch the repo list from the
remote endpoint.
2023-09-13 17:37:28 -04:00