syntax = "proto3"; //import "google/protobuf/empty.proto"; //import "google/protobuf/wrappers.proto"; //import "google/protobuf/type.proto"; option go_package = "./auth"; service Auth { // account password login rpc Login(ReqLogin) returns(ResLogin); // verify token validate rpc Verify(ReqVerify) returns (Subject); // registry rpc Registry(ReqRegistry) returns (Subject); // uid registry info rpc FindByUid(ReqFindByUid) returns(Subject); } message Subject { string uid = 1; string username = 2; int64 time = 3; // ms map extra = 4; } message ReqLogin { string account = 2; string password = 3; } message ResLogin { string token = 2; // string refreshToken = 3; Subject subject = 7; } message ReqVerify { string token = 2; } message ReqRegistry { string account = 1; string username = 2; string password = 3; map extra = 4; } message ReqFindByUid { string uid = 1; }