1syntax = "proto3";
2
3import "github.com/gogo/protobuf/gogoproto/gogo.proto";
4import "meta.proto";
5
6package sensu.core.v2;
7
8option go_package = "v2";
9option (gogoproto.populate_all) = true;
10option (gogoproto.equal_all) = true;
11option (gogoproto.marshaler_all) = true;
12option (gogoproto.unmarshaler_all) = true;
13option (gogoproto.sizer_all) = true;
14option (gogoproto.testgen_all) = true;
15
16// Asset defines an asset agents install as a dependency for a check.
17message Asset {
18  option (gogoproto.face) = true;
19  option (gogoproto.goproto_getters) = false;
20
21  // URL is the location of the asset
22  string url = 2 [(gogoproto.customname) = "URL"];
23
24  // Sha512 is the SHA-512 checksum of the asset
25  string sha512 = 3;
26
27  // Filters are a collection of sensu queries, used by the system to determine
28  // if the asset should be installed. If more than one filter is present the
29  // queries are joined by the "AND" operator.
30  repeated string filters = 5 [(gogoproto.jsontag) = "filters"];
31
32  // Metadata contains the name, namespace, labels and annotations of the asset
33  ObjectMeta metadata = 8 [(gogoproto.embed) = true, (gogoproto.jsontag) = "metadata,omitempty", (gogoproto.nullable) = false];
34
35  // Headers is a collection of key/value string pairs used as HTTP headers
36  // for asset retrieval.
37  map<string, string> headers = 9 [(gogoproto.jsontag) = "headers"];
38}
39