MCPcopy Create free account
hub / github.com/apache/mesos / validate

Function validate

src/oci/spec.cpp:46–63  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

44
45
46Option<Error> validate(const Index& index)
47{
48 if (index.schemaversion() != 2) {
49 return Error(
50 "Incorrect 'schemaVersion': " +
51 stringify(index.schemaversion()));
52 }
53
54 foreach (const ManifestDescriptor& manifest, index.manifests()) {
55 Option<Error> error = validateDigest(manifest.digest());
56 if (error.isSome()) {
57 return Error(
58 "Failed to validate 'digest' of the 'manifest': " + error->message);
59 }
60 }
61
62 return None();
63}
64
65
66Option<Error> validate(const Manifest& manifest)

Callers 13

parseFunction · 0.70
addMethod · 0.50
TESTFunction · 0.50
TEST_FFunction · 0.50
TEST_PFunction · 0.50
TESTFunction · 0.50
TEST_FFunction · 0.50
TESTFunction · 0.50
TESTFunction · 0.50
sendMethod · 0.50
foreachFunction · 0.50
validateMethod · 0.50

Calls 6

NoneClass · 0.85
validateDigestFunction · 0.85
typeMethod · 0.80
ErrorFunction · 0.50
stringifyFunction · 0.50
isSomeMethod · 0.45

Tested by

no test coverage detected