Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Expose the image structure and policy structure in the crate root `lib.rs`. The caller can use the signature library as follows: ```rust use signature::{Image, Policy}; use oci_distribution::Reference; let reference = Reference::try_from("docker.io/library/example:tag").unwrap(); let image_digest = "sha256:sha256:69704ef328d05a9f806b6b8502915e6a0a4faa4d72018dc42343f511490daf8a"; let policy = Policy::from_file("path/to/policy/file").unwrap(); let mut image = Image::default_with_reference(reference); image.set_manifest_digest(image_digest)?; policy.is_image_allowed(image).except("Validate image failed"); ``` Signed-off-by: Jiale Zhang <[email protected]>
- Loading branch information