2020-01-30 11:41:24 +00:00
|
|
|
syntax = "proto3";
|
|
|
|
package query;
|
2020-01-30 13:29:38 +00:00
|
|
|
option go_package = "github.com/nspcc-dev/neofs-api/query";
|
2020-01-30 11:41:24 +00:00
|
|
|
|
|
|
|
import "github.com/gogo/protobuf/gogoproto/gogo.proto";
|
|
|
|
|
|
|
|
option (gogoproto.stable_marshaler_all) = true;
|
|
|
|
|
|
|
|
message Filter {
|
|
|
|
option (gogoproto.goproto_stringer) = false;
|
|
|
|
|
|
|
|
enum Type {
|
|
|
|
// Exact sets when value of filter should be equal to the header value
|
|
|
|
Exact = 0;
|
|
|
|
// Regex sets when value of filter should match the header value by the regular expression
|
|
|
|
Regex = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
// Type of filter
|
|
|
|
Type type = 1 [(gogoproto.customname) = "Type"];
|
|
|
|
// Name of field that should be filtered
|
|
|
|
string Name = 2;
|
|
|
|
// Value that should be used for filter
|
|
|
|
string Value = 3;
|
|
|
|
}
|
|
|
|
|
|
|
|
message Query {
|
|
|
|
option (gogoproto.goproto_stringer) = false;
|
|
|
|
|
|
|
|
// Filters is set of filters, should not be empty
|
|
|
|
repeated Filter Filters = 1 [(gogoproto.nullable) = false];
|
|
|
|
}
|