syntax = "proto3"; import "user.proto"; option go_package = ".;proto"; package proto; service AuthService { rpc Authenticate(AuthRequest) returns (AuthReply) {} rpc EnsurePermGranted(CheckPermRequest) returns (CheckPermResponse) {} rpc EnsureUserPermGranted(CheckUserPermRequest) returns (CheckUserPermResponse) {} } message AuthInfo { UserInfo info = 1; uint64 session_id = 3; } message AuthRequest { uint64 session_id = 1; } message AuthReply { bool is_valid = 1; optional AuthInfo info = 2; } message CheckPermRequest { uint64 session_id = 1; string key = 2; bytes value = 3; } message CheckPermResponse { bool is_valid = 1; } message CheckUserPermRequest { uint64 user_id = 1; uint64 other_id = 2; string key = 3; bytes value = 4; } message CheckUserPermResponse { bool is_valid = 1; }