Module cargo_test_support::registry
source · Structs
A helper struct that collects the arguments for HttpServer::check_authorized.
Based on looking at the request, these are the fields that the authentication header should attest to.
A builder for creating a new package in a registry.
A file to be created in a package.
A builder for initializing registries.
Request to the test http server
Response from the test http server
Enums
Entry with data that corresponds to
tar::EntryType
.Constants
Functions
Gets the alternative-registry version of
api_path
.Gets the alternative-registry version of
dl_path
.Variant of
init
that initializes the “alternative” registry and crates.io
replacement.Gets the alternative-registry version of
registry_path
.Gets the alternative-registry version of
registry_url
.Gets the path for local web API uploads. Cargo will place the contents of a web API
request here. For example,
api/v1/crates/new
is the result of publishing a crate.dl_path 🔒
Gets the path where crates can be downloaded using the web API endpoint. Crates
should be organized as
{name}/{version}/download
to match the web API
endpoint. This is rarely used and must be manually set up.Initializes the on-disk registry and sets up the config so that crates.io
is replaced with the one on disk.
Gets the path to the local index pretending to be crates.io. This is a Git repo
initialized with a
config.json
file pointing to dl_path
for downloads
and api_path
for uploads.