Documentation ¶
Index ¶
Constants ¶
const ImageWithoutSignature = 10
Error verifying image due to no signature
const NoCertificateFoundOnSignature = 13
Error verifying image due to no certificate found on signature
const NoMatchingSignature = 12
Error verifying image due to no matching signature
const NonExistentTag = 11
Error verifying image due to non-existent tag
Variables ¶
This section is empty.
Functions ¶
func Error ¶
func Error(cosignError CosignError) error
func GenerateExitCodeDocs ¶
GenerateExitCodeDocs will generate documentation for the exit codes that the cosign application will throw. Inspired by elemental-cli who convieniently solved this problem prior: https://github.com/rancher/elemental-cli/blob/main/docs/generate_docs.go there was no need to change (apart from some file paths) due to it giving us exactly what we want without error.
func LookupExitCodeForError ¶ added in v2.1.0
func WrapError ¶
WrapError takes an error type and depending on the type of error passed, will access it's error message and errorType (and return the associated exitCode) and wrap them in a generic `CosignError`. If no custom error has been found, then it will still return a `CosignError` with an error message, but the `exitCode` will be `1`.
Types ¶
type CosignError ¶
func (*CosignError) ExitCode ¶
func (ce *CosignError) ExitCode() int