wasmcloud_host/
oci.rs

1// Adapted from
2// https://github.com/wasmCloud/wasmcloud-otp/blob/5f13500646d9e077afa1fca67a3fe9c8df5f3381/host_core/native/hostcore_wasmcloud_native/src/oci.rs
3
4use std::path::PathBuf;
5
6use serde::{Deserialize, Serialize};
7
8/// Configuration options for OCI operations.
9#[derive(Clone, Debug, Default, Deserialize, Eq, PartialEq, Serialize)]
10pub struct Config {
11    /// Additional CAs to include in the OCI client configuration
12    pub additional_ca_paths: Vec<PathBuf>,
13    /// Whether or not to allow downloading OCI artifacts with the tag `latest`
14    pub allow_latest: bool,
15    /// A list of OCI registries that are allowed to be accessed over HTTP
16    pub allowed_insecure: Vec<String>,
17    /// Used in tandem with `oci_user` and `oci_password` to override credentials for a specific OCI registry.
18    pub oci_registry: Option<String>,
19    /// Username for the OCI registry specified by `oci_registry`.
20    pub oci_user: Option<String>,
21    /// Password for the OCI registry specified by `oci_registry`.
22    pub oci_password: Option<String>,
23}