micro/auth/service/proto/rules.proto
Vasiliy Tolstov 756b346672
auth/service: move all proto files to single dir (#1439)
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
2020-03-30 18:23:00 +03:00

48 lines
713 B
Protocol Buffer

syntax = "proto3";
package go.micro.auth;
import "auth.proto";
service Rules {
rpc Create(CreateRequest) returns (CreateResponse) {};
rpc Delete(DeleteRequest) returns (DeleteResponse) {};
rpc List(ListRequest) returns (ListResponse) {};
}
enum Access {
UNKNOWN = 0;
GRANTED = 1;
DENIED = 2;
}
message Rule {
string id = 1;
string role = 2;
Resource resource = 3;
Access access = 4;
}
message CreateRequest {
string role = 1;
Resource resource = 2;
Access access = 3;
}
message CreateResponse {}
message DeleteRequest {
string role = 1;
Resource resource = 2;
Access access = 3;
}
message DeleteResponse {}
message ListRequest {
}
message ListResponse {
repeated Rule rules = 1;
}