Skip to content

Commit 2cb0982

Browse files
Martin Taillefergeeknoid
Martin Taillefer
authored andcommitted
Add support for returning attributes from mixer API calls.
1 parent 0af5ee2 commit 2cb0982

File tree

3 files changed

+15
-6
lines changed

3 files changed

+15
-6
lines changed

mixer/v1/check.proto

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,12 @@ message CheckResponse {
3838
// Index of the request this response is associated with
3939
int64 request_index = 1;
4040

41+
// The attributes to use for this response
42+
Attributes attribute_update = 2;
43+
4144
// Indicates whether or not the preconditions succeeded
42-
google.rpc.Status result = 2 [(gogoproto.nullable) = false];
45+
google.rpc.Status result = 3 [(gogoproto.nullable) = false];
4346

4447
// The amount of time for which this result can be considered valid, given the same inputs
45-
google.protobuf.Duration expiration = 3 [(gogoproto.nullable) = false, (gogoproto.stdduration) = true];
48+
google.protobuf.Duration expiration = 4 [(gogoproto.nullable) = false, (gogoproto.stdduration) = true];
4649
}

mixer/v1/quota.proto

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,12 +53,15 @@ message QuotaResponse {
5353
// Index of the request this response is associated with.
5454
int64 request_index = 1;
5555

56+
// The attributes to use for this response
57+
Attributes attribute_update = 2;
58+
5659
// Indicates whether the quota request was successfully processed.
57-
google.rpc.Status result = 2 [(gogoproto.nullable) = false];
60+
google.rpc.Status result = 3 [(gogoproto.nullable) = false];
5861

5962
// The amount of time the returned quota can be considered valid, this is 0 for non-expiring quotas.
60-
google.protobuf.Duration expiration = 3 [(gogoproto.nullable) = false, (gogoproto.stdduration) = true];
63+
google.protobuf.Duration expiration = 4 [(gogoproto.nullable) = false, (gogoproto.stdduration) = true];
6164

6265
// The total amount of quota returned, may be less than requested.
63-
int64 amount = 4;
66+
int64 amount = 5;
6467
}

mixer/v1/report.proto

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,9 @@ message ReportResponse {
3737
// Index of the request this response is associated with
3838
int64 request_index = 1;
3939

40+
// The attributes to use for this response
41+
Attributes attribute_update = 2;
42+
4043
// Indicates whether the report was processed or not
41-
google.rpc.Status result = 2 [(gogoproto.nullable) = false];
44+
google.rpc.Status result = 3 [(gogoproto.nullable) = false];
4245
}

0 commit comments

Comments
 (0)