#[non_exhaustive]pub struct VgiConfig {
pub trust_registry_did: String,
pub vtc_did: String,
pub verify_trust_action: String,
pub verify_trust_version: String,
pub verify_trust_sha256: Option<String>,
pub required_check: String,
pub platform_keyring: Option<Vec<u8>>,
pub extra_files: Vec<ExtraFile>,
}Expand description
Forge-neutral inputs to a bootstrap plan.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.trust_registry_did: StringDID of the Trust Registry (TRUST_REGISTRY_DID).
vtc_did: StringDID of this VTC (VTC_DID) — the only authority a bootstrapped repo
trusts (§4.1).
verify_trust_action: StringThe verify-trust action reference the workflow uses:, pinned to a
commit, e.g. OpenVTC/verifiable-git-infrastructure/.github/actions/verify-trust@<sha>.
verify_trust_version: StringThe VGI release the action downloads (version: input), e.g. v0.5.0.
verify_trust_sha256: Option<String>SHA-256 of the release tarball the runner downloads (sha256: input,
64 lowercase hex). Where the runner cannot verify the release’s build
attestation (Forgejo), this pin in the reviewed workflow is what
survives a replaced release asset; an adapter for such a forge refuses
a plan without it.
required_check: StringName of the required status check. The workflow’s job is given this name, so the two cannot disagree.
platform_keyring: Option<Vec<u8>>Armored PGP keyring of the forge’s platform keys (GitHub’s web-flow)
for the exempt keyring. Supplied by configuration; adapters do not
fetch it on their own.
extra_files: Vec<ExtraFile>Extra files a community commits to every new repo (§5.8 layer 3:
a CODEOWNERS, a licence). Committed before protection is enabled.
Implementations§
Source§impl VgiConfig
impl VgiConfig
Sourcepub fn new(
trust_registry_did: impl Into<String>,
vtc_did: impl Into<String>,
verify_trust_action: impl Into<String>,
verify_trust_version: impl Into<String>,
) -> Self
pub fn new( trust_registry_did: impl Into<String>, vtc_did: impl Into<String>, verify_trust_action: impl Into<String>, verify_trust_version: impl Into<String>, ) -> Self
A config with the default check name and no keyring or extra files.
Sourcepub fn with_verify_trust_sha256(self, sha256: impl Into<String>) -> Self
pub fn with_verify_trust_sha256(self, sha256: impl Into<String>) -> Self
Pin the release tarball’s SHA-256.
Sourcepub fn with_platform_keyring(self, armored: impl Into<Vec<u8>>) -> Self
pub fn with_platform_keyring(self, armored: impl Into<Vec<u8>>) -> Self
Set the platform keyring.