Add candidate artifact codec decoding
This commit is contained in:
@@ -50,6 +50,13 @@ type ArtifactCodec[T any] interface {
|
||||
Decode([]byte) (T, error)
|
||||
}
|
||||
|
||||
// CandidateArtifactCodec extends an artifact codec with strict representation
|
||||
// decoding for values that have not yet passed semantic validation.
|
||||
type CandidateArtifactCodec[T any] interface {
|
||||
ArtifactCodec[T]
|
||||
DecodeCandidate([]byte) (T, error)
|
||||
}
|
||||
|
||||
// DigestArtifactSchema returns the SHA-256 digest of the exact JSON Schema
|
||||
// bytes. Schema formatting is therefore part of the registered identity.
|
||||
func DigestArtifactSchema(schema ArtifactSchema) string {
|
||||
|
||||
Reference in New Issue
Block a user