diff --git a/user.pb.go b/user.pb.go index 3dd7cff..97f38b5 100644 --- a/user.pb.go +++ b/user.pb.go @@ -380,6 +380,8 @@ func init() { type UserService interface { GetByToken(in *UserRequest, out *UserResponse) error Login(in *LoginRequest, out *LoginResponse) error + GetByUsername(in *UserInfoByUsername, out *UserResponse) error + GetByUsercode(in *UserInfoByUsercode, out *UserResponse) error } // AcceptUserServiceClient accepts connections on the listener and serves requests @@ -457,6 +459,12 @@ func (c *UserServiceClient) GetByToken(in *UserRequest, out *UserResponse) error func (c *UserServiceClient) Login(in *LoginRequest, out *LoginResponse) error { return c.Call("UserService.Login", in, out) } +func (c *UserServiceClient) GetByUsername(in *UserInfoByUsername, out *UserResponse) error { + return c.Call("UserService.GetByUsername", in, out) +} +func (c *UserServiceClient) GetByUsercode(in *UserInfoByUsercode, out *UserResponse) error { + return c.Call("UserService.GetByUsercode", in, out) +} // DialUserService connects to an UserService at the specified network address. func DialUserService(network, addr string) (*UserServiceClient, *rpc.Client, error) { diff --git a/user.proto b/user.proto index f4ecc45..646ef7b 100644 --- a/user.proto +++ b/user.proto @@ -65,4 +65,6 @@ message LoginResponse { service UserService { rpc getByToken (UserRequest) returns (UserResponse); // 使用token查询用户 rpc login (LoginRequest) returns (LoginResponse); // 登录 + rpc getByUsername (UserInfoByUsername) returns (UserResponse); // 使用username查询用户 + rpc getByUsercode (UserInfoByUsercode) returns (UserResponse); // 使用usercode查询用户 } \ No newline at end of file