Documentation ¶
Index ¶
- Constants
- Variables
- func RegisterUserServiceServer(s grpc.ServiceRegistrar, srv UserServiceServer)
- type IdReq
- type MsgRsp
- type UnimplementedUserServiceServer
- type UnsafeUserServiceServer
- type UpdateSingleReq
- func (*UpdateSingleReq) Descriptor() ([]byte, []int)deprecated
- func (x *UpdateSingleReq) GetUpdateKey() string
- func (x *UpdateSingleReq) GetUser() *User
- func (*UpdateSingleReq) ProtoMessage()
- func (x *UpdateSingleReq) ProtoReflect() protoreflect.Message
- func (x *UpdateSingleReq) Reset()
- func (x *UpdateSingleReq) String() string
- type User
- func (*User) Descriptor() ([]byte, []int)deprecated
- func (x *User) GetAccount() string
- func (x *User) GetBirthDay() int64
- func (x *User) GetCreateTime() int64
- func (x *User) GetEmail() string
- func (x *User) GetId() int32
- func (x *User) GetLastLoginTime() int64
- func (x *User) GetNickName() string
- func (x *User) GetPhone() string
- func (x *User) GetPicUrl() string
- func (x *User) GetPwd() string
- func (x *User) GetStatus() int32
- func (*User) ProtoMessage()
- func (x *User) ProtoReflect() protoreflect.Message
- func (x *User) Reset()
- func (x *User) String() string
- type UserServiceClient
- type UserServiceServer
Constants ¶
const ( UserService_GetUserInfo_FullMethodName = "/userIdl.UserService/GetUserInfo" UserService_UpdateUserSingle_FullMethodName = "/userIdl.UserService/UpdateUserSingle" UserService_UpdateUser_FullMethodName = "/userIdl.UserService/UpdateUser" )
Variables ¶
var File_planetmsg_user_user_service_proto protoreflect.FileDescriptor
var UserService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "userIdl.UserService", HandlerType: (*UserServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "GetUserInfo", Handler: _UserService_GetUserInfo_Handler, }, { MethodName: "UpdateUserSingle", Handler: _UserService_UpdateUserSingle_Handler, }, { MethodName: "UpdateUser", Handler: _UserService_UpdateUser_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "planetmsg/user/user_service.proto", }
UserService_ServiceDesc is the grpc.ServiceDesc for UserService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterUserServiceServer ¶
func RegisterUserServiceServer(s grpc.ServiceRegistrar, srv UserServiceServer)
Types ¶
type IdReq ¶
type IdReq struct { UserId int32 `protobuf:"varint,1,opt,name=userId,proto3" json:"userId,omitempty"` // contains filtered or unexported fields }
func (*IdReq) Descriptor
deprecated
func (*IdReq) ProtoMessage ¶
func (*IdReq) ProtoMessage()
func (*IdReq) ProtoReflect ¶
func (x *IdReq) ProtoReflect() protoreflect.Message
type MsgRsp ¶
type MsgRsp struct { Msg string `protobuf:"bytes,1,opt,name=msg,proto3" json:"msg,omitempty"` // contains filtered or unexported fields }
func (*MsgRsp) Descriptor
deprecated
func (*MsgRsp) ProtoMessage ¶
func (*MsgRsp) ProtoMessage()
func (*MsgRsp) ProtoReflect ¶
func (x *MsgRsp) ProtoReflect() protoreflect.Message
type UnimplementedUserServiceServer ¶
type UnimplementedUserServiceServer struct { }
UnimplementedUserServiceServer must be embedded to have forward compatible implementations.
func (UnimplementedUserServiceServer) GetUserInfo ¶
func (UnimplementedUserServiceServer) UpdateUser ¶
func (UnimplementedUserServiceServer) UpdateUserSingle ¶
func (UnimplementedUserServiceServer) UpdateUserSingle(context.Context, *UpdateSingleReq) (*MsgRsp, error)
type UnsafeUserServiceServer ¶
type UnsafeUserServiceServer interface {
// contains filtered or unexported methods
}
UnsafeUserServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to UserServiceServer will result in compilation errors.
type UpdateSingleReq ¶
type UpdateSingleReq struct { UpdateKey string `protobuf:"bytes,1,opt,name=updateKey,proto3" json:"updateKey,omitempty"` User *User `protobuf:"bytes,2,opt,name=user,proto3" json:"user,omitempty"` // contains filtered or unexported fields }
func (*UpdateSingleReq) Descriptor
deprecated
func (*UpdateSingleReq) Descriptor() ([]byte, []int)
Deprecated: Use UpdateSingleReq.ProtoReflect.Descriptor instead.
func (*UpdateSingleReq) GetUpdateKey ¶
func (x *UpdateSingleReq) GetUpdateKey() string
func (*UpdateSingleReq) GetUser ¶
func (x *UpdateSingleReq) GetUser() *User
func (*UpdateSingleReq) ProtoMessage ¶
func (*UpdateSingleReq) ProtoMessage()
func (*UpdateSingleReq) ProtoReflect ¶
func (x *UpdateSingleReq) ProtoReflect() protoreflect.Message
func (*UpdateSingleReq) Reset ¶
func (x *UpdateSingleReq) Reset()
func (*UpdateSingleReq) String ¶
func (x *UpdateSingleReq) String() string
type User ¶
type User struct { Id int32 `protobuf:"varint,1,opt,name=Id,proto3" json:"Id,omitempty"` Account string `protobuf:"bytes,2,opt,name=Account,proto3" json:"Account,omitempty"` NickName string `protobuf:"bytes,3,opt,name=NickName,proto3" json:"NickName,omitempty"` Pwd string `protobuf:"bytes,4,opt,name=Pwd,proto3" json:"Pwd,omitempty"` Email string `protobuf:"bytes,5,opt,name=Email,proto3" json:"Email,omitempty"` Phone string `protobuf:"bytes,6,opt,name=Phone,proto3" json:"Phone,omitempty"` PicUrl string `protobuf:"bytes,7,opt,name=PicUrl,proto3" json:"PicUrl,omitempty"` BirthDay int64 `protobuf:"varint,8,opt,name=BirthDay,proto3" json:"BirthDay,omitempty"` CreateTime int64 `protobuf:"varint,9,opt,name=CreateTime,proto3" json:"CreateTime,omitempty"` Status int32 `protobuf:"varint,10,opt,name=Status,proto3" json:"Status,omitempty"` LastLoginTime int64 `protobuf:"varint,11,opt,name=LastLoginTime,proto3" json:"LastLoginTime,omitempty"` // contains filtered or unexported fields }
func (*User) Descriptor
deprecated
func (*User) GetAccount ¶
func (*User) GetBirthDay ¶
func (*User) GetCreateTime ¶
func (*User) GetLastLoginTime ¶
func (*User) GetNickName ¶
func (*User) ProtoMessage ¶
func (*User) ProtoMessage()
func (*User) ProtoReflect ¶
func (x *User) ProtoReflect() protoreflect.Message
type UserServiceClient ¶
type UserServiceClient interface { // 查询用户 GetUserInfo(ctx context.Context, in *IdReq, opts ...grpc.CallOption) (*User, error) // 通过字段修改用户信息 UpdateUserSingle(ctx context.Context, in *UpdateSingleReq, opts ...grpc.CallOption) (*MsgRsp, error) // 修改用户信息 UpdateUser(ctx context.Context, in *User, opts ...grpc.CallOption) (*MsgRsp, error) }
UserServiceClient is the client API for UserService service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
func NewUserServiceClient ¶
func NewUserServiceClient(cc grpc.ClientConnInterface) UserServiceClient
type UserServiceServer ¶
type UserServiceServer interface { // 查询用户 GetUserInfo(context.Context, *IdReq) (*User, error) // 通过字段修改用户信息 UpdateUserSingle(context.Context, *UpdateSingleReq) (*MsgRsp, error) // 修改用户信息 UpdateUser(context.Context, *User) (*MsgRsp, error) // contains filtered or unexported methods }
UserServiceServer is the server API for UserService service. All implementations must embed UnimplementedUserServiceServer for forward compatibility