2016-03-23 07:25:48 +03:00
|
|
|
syntax = "proto3";
|
|
|
|
package authpb;
|
|
|
|
|
|
|
|
import "gogoproto/gogo.proto";
|
|
|
|
|
|
|
|
option (gogoproto.marshaler_all) = true;
|
|
|
|
option (gogoproto.sizer_all) = true;
|
|
|
|
option (gogoproto.unmarshaler_all) = true;
|
|
|
|
option (gogoproto.goproto_getters_all) = false;
|
|
|
|
option (gogoproto.goproto_enum_prefix_all) = false;
|
|
|
|
|
|
|
|
// User is a single entry in the bucket authUsers
|
|
|
|
message User {
|
|
|
|
bytes name = 1;
|
|
|
|
bytes password = 2;
|
2016-04-11 08:34:13 +03:00
|
|
|
repeated string roles = 3;
|
2016-03-23 07:25:48 +03:00
|
|
|
}
|
2016-04-01 05:07:43 +03:00
|
|
|
|
2016-04-05 09:42:38 +03:00
|
|
|
// Permission is a single entity
|
|
|
|
message Permission {
|
|
|
|
enum Type {
|
|
|
|
READ = 0;
|
|
|
|
WRITE = 1;
|
|
|
|
READWRITE = 2;
|
|
|
|
}
|
2016-06-07 21:45:29 +03:00
|
|
|
Type permType = 1;
|
|
|
|
|
|
|
|
bytes key = 2;
|
|
|
|
bytes range_end = 3;
|
2016-04-05 09:42:38 +03:00
|
|
|
}
|
|
|
|
|
2016-04-01 05:07:43 +03:00
|
|
|
// Role is a single entry in the bucket authRoles
|
|
|
|
message Role {
|
2016-04-05 09:42:38 +03:00
|
|
|
bytes name = 1;
|
|
|
|
|
|
|
|
repeated Permission keyPermission = 2;
|
2016-04-01 05:07:43 +03:00
|
|
|
}
|