| 1 |
syntax = "proto3"; |
| 2 |
|
| 3 |
package in_toto_attestation.v1; |
| 4 |
|
| 5 |
import "google/protobuf/struct.proto"; |
| 6 |
|
| 7 |
option go_package = "github.com/in-toto/attestation/go/v1"; |
| 8 |
option java_package = "io.github.intoto.attestation.v1"; |
| 9 |
|
| 10 |
// Proto representation of the in-toto v1 ResourceDescriptor. |
| 11 |
// https://github.com/in-toto/attestation/blob/main/spec/v1/resource_descriptor.md |
| 12 |
// Validation of all fields is left to the users of this proto. |
| 13 |
message ResourceDescriptor { |
| 14 |
string name = 1; |
| 15 |
|
| 16 |
string uri = 2; |
| 17 |
|
| 18 |
map<string, string> digest = 3; |
| 19 |
|
| 20 |
bytes content = 4; |
| 21 |
|
| 22 |
string download_location = 5; |
| 23 |
|
| 24 |
string media_type = 6; |
| 25 |
|
| 26 |
// Per the Struct protobuf spec, this type corresponds to |
| 27 |
// a JSON Object, which is truly a map<string, Value> under the hood. |
| 28 |
// So, the Struct a) is still consistent with our specification for |
| 29 |
// the `annotations` field, and b) has native support in some language |
| 30 |
// bindings making their use easier in implementations. |
| 31 |
// See: https://pkg.go.dev/google.golang.org/protobuf/types/known/structpb#Struct |
| 32 |
google.protobuf.Struct annotations = 7; |
| 33 |
} |