Benign rust 243 installs Download

artifacthub-client 0.0.7

“Rust client library for the Artifact Hub API”

Archive ships a root-level test treeRust test marker or harness
SHA-256c35acbcd6941d7a1f65bef11cc2ebc4eaab18a4e3f69728f4834b57180082bdb

Evidence

References reqwest Rust HTTP library error.rs · lines 1–9
1/// Error returned by Artifact Hub client operations.
2#[derive(Debug, thiserror::Error)]
3pub enum ArtifactHubError {
4 /// The HTTP request could not be sent.
5 #[error("Request failed: {0}")]
6 Request(#[source] reqwest::Error),
7 /// The response body could not be read.
8 #[error("Failed to read response: {0}")]
9 Body(#[source] reqwest:: …
References reqwest Rust HTTP library client.rs · lines 1–14
1use crate::api::{
2 HelmHandler, PackagesHandler, RepositoriesHandler, SecurityHandler, StatsHandler,
3};
4use crate::error::{ArtifactHubError, Result};
5use reqwest::Client;
6use serde::de::DeserializeOwned;
7use std::sync::Arc;
⋯7 lines
References the Tokio async runtime namespace packages.rs · lines 10–18
10:40… , path};
11use wiremock::{Mock, MockServer, ResponseTemplate};
12
13#[tokio::test]
14async fn search_preserves_requested_facets() {
15 let server = MockServer::start().await;
16 // search_packages.sql uses numeric IDs for kinds/categories and strings for licenses.
17 let facets = serde_json::json!([
18 {"title …
#[test] attribute models.rs · lines 1–11
1use artifacthub_client::models::{
2 ArtifactHubValue, ChartTemplate, ChartTemplates, PackageSummary, SearchRepositoryResult,
3 SearchResult,
4};
5
6#[test]
7fn package_metadata_preserves_hub_fields() {
8 let mut expected = artifacthub_server_mock::package_snapshot("1.3.0");
9 // These large fields have dedicated readme/versions operations.
10 expected.as_object_mut().unwrap().remove("readme");
11 …
Encoded content decoded: base64 models.rs · lines 91–99
91:56… e(serde_json::json!({
92 "name": "templates/service.yaml",
93 "data": "YXBpVmVyc2lvbjogdjEKa2luZDogU2VydmljZQo=",
94 }))
95 .unwrap();
⋯4 lines

Showing the top 5 files — 1 more file (3 regions) not shown.

No evidence locations were recorded for this file. Raw result

Keyboard shortcuts on this page: j for the next sample, k for the previous one, x to go back to the feed, d to download the original bytes, r to re-queue the sample for analysis.