Documentation
¶
Index ¶
- Variables
- func RegisterUserServiceServer(s grpc.ServiceRegistrar, srv UserServiceServer)
- type GetUserByEmailReq
- type GetUserByEmailResp
- func (*GetUserByEmailResp) Descriptor() ([]byte, []int)deprecated
- func (x *GetUserByEmailResp) GetAddress() string
- func (x *GetUserByEmailResp) GetAvatar() string
- func (x *GetUserByEmailResp) GetBirthDay() int64
- func (x *GetUserByEmailResp) GetDescription() string
- func (x *GetUserByEmailResp) GetEmail() string
- func (x *GetUserByEmailResp) GetNickName() string
- func (*GetUserByEmailResp) ProtoMessage()
- func (x *GetUserByEmailResp) ProtoReflect() protoreflect.Message
- func (x *GetUserByEmailResp) Reset()
- func (x *GetUserByEmailResp) String() string
- type LoginReq
- type LoginResp
- type RegisterReq
- func (*RegisterReq) Descriptor() ([]byte, []int)deprecated
- func (x *RegisterReq) GetConfirmPassword() string
- func (x *RegisterReq) GetEmail() string
- func (x *RegisterReq) GetPassword() string
- func (*RegisterReq) ProtoMessage()
- func (x *RegisterReq) ProtoReflect() protoreflect.Message
- func (x *RegisterReq) Reset()
- func (x *RegisterReq) String() string
- type RegisterResp
- type UnimplementedUserServiceServer
- func (UnimplementedUserServiceServer) GetUserByEmail(context.Context, *GetUserByEmailReq) (*GetUserByEmailResp, error)
- func (UnimplementedUserServiceServer) Login(context.Context, *LoginReq) (*LoginResp, error)
- func (UnimplementedUserServiceServer) Register(context.Context, *RegisterReq) (*RegisterResp, error)
- type UnsafeUserServiceServer
- type UserServiceClient
- type UserServiceServer
Constants ¶
This section is empty.
Variables ¶
var File_user_proto protoreflect.FileDescriptor
var UserService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "user.UserService", HandlerType: (*UserServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Register", Handler: _UserService_Register_Handler, }, { MethodName: "Login", Handler: _UserService_Login_Handler, }, { MethodName: "GetUserByEmail", Handler: _UserService_GetUserByEmail_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "user.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 GetUserByEmailReq ¶
type GetUserByEmailReq struct { Email string `protobuf:"bytes,1,opt,name=email,proto3" json:"email,omitempty"` // contains filtered or unexported fields }
func (*GetUserByEmailReq) Descriptor
deprecated
func (*GetUserByEmailReq) Descriptor() ([]byte, []int)
Deprecated: Use GetUserByEmailReq.ProtoReflect.Descriptor instead.
func (*GetUserByEmailReq) GetEmail ¶
func (x *GetUserByEmailReq) GetEmail() string
func (*GetUserByEmailReq) ProtoMessage ¶
func (*GetUserByEmailReq) ProtoMessage()
func (*GetUserByEmailReq) ProtoReflect ¶
func (x *GetUserByEmailReq) ProtoReflect() protoreflect.Message
func (*GetUserByEmailReq) Reset ¶
func (x *GetUserByEmailReq) Reset()
func (*GetUserByEmailReq) String ¶
func (x *GetUserByEmailReq) String() string
type GetUserByEmailResp ¶
type GetUserByEmailResp struct { Email string `protobuf:"bytes,1,opt,name=Email,proto3" json:"Email,omitempty"` NickName string `protobuf:"bytes,2,opt,name=NickName,proto3" json:"NickName,omitempty"` Description string `protobuf:"bytes,3,opt,name=Description,proto3" json:"Description,omitempty"` Avatar string `protobuf:"bytes,4,opt,name=Avatar,proto3" json:"Avatar,omitempty"` BirthDay int64 `protobuf:"varint,5,opt,name=BirthDay,proto3" json:"BirthDay,omitempty"` Address string `protobuf:"bytes,6,opt,name=Address,proto3" json:"Address,omitempty"` // contains filtered or unexported fields }
func (*GetUserByEmailResp) Descriptor
deprecated
func (*GetUserByEmailResp) Descriptor() ([]byte, []int)
Deprecated: Use GetUserByEmailResp.ProtoReflect.Descriptor instead.
func (*GetUserByEmailResp) GetAddress ¶
func (x *GetUserByEmailResp) GetAddress() string
func (*GetUserByEmailResp) GetAvatar ¶
func (x *GetUserByEmailResp) GetAvatar() string
func (*GetUserByEmailResp) GetBirthDay ¶
func (x *GetUserByEmailResp) GetBirthDay() int64
func (*GetUserByEmailResp) GetDescription ¶
func (x *GetUserByEmailResp) GetDescription() string
func (*GetUserByEmailResp) GetEmail ¶
func (x *GetUserByEmailResp) GetEmail() string
func (*GetUserByEmailResp) GetNickName ¶
func (x *GetUserByEmailResp) GetNickName() string
func (*GetUserByEmailResp) ProtoMessage ¶
func (*GetUserByEmailResp) ProtoMessage()
func (*GetUserByEmailResp) ProtoReflect ¶
func (x *GetUserByEmailResp) ProtoReflect() protoreflect.Message
func (*GetUserByEmailResp) Reset ¶
func (x *GetUserByEmailResp) Reset()
func (*GetUserByEmailResp) String ¶
func (x *GetUserByEmailResp) String() string
type LoginReq ¶
type LoginReq struct { Email string `protobuf:"bytes,1,opt,name=email,proto3" json:"email,omitempty"` Password string `protobuf:"bytes,2,opt,name=password,proto3" json:"password,omitempty"` // contains filtered or unexported fields }
func (*LoginReq) Descriptor
deprecated
func (*LoginReq) GetPassword ¶
func (*LoginReq) ProtoMessage ¶
func (*LoginReq) ProtoMessage()
func (*LoginReq) ProtoReflect ¶
func (x *LoginReq) ProtoReflect() protoreflect.Message
type LoginResp ¶
type LoginResp struct { UserId int32 `protobuf:"varint,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"` // contains filtered or unexported fields }
func (*LoginResp) Descriptor
deprecated
func (*LoginResp) ProtoMessage ¶
func (*LoginResp) ProtoMessage()
func (*LoginResp) ProtoReflect ¶
func (x *LoginResp) ProtoReflect() protoreflect.Message
type RegisterReq ¶
type RegisterReq struct { Email string `protobuf:"bytes,1,opt,name=email,proto3" json:"email,omitempty"` Password string `protobuf:"bytes,2,opt,name=password,proto3" json:"password,omitempty"` ConfirmPassword string `protobuf:"bytes,3,opt,name=confirm_password,json=confirmPassword,proto3" json:"confirm_password,omitempty"` // contains filtered or unexported fields }
func (*RegisterReq) Descriptor
deprecated
func (*RegisterReq) Descriptor() ([]byte, []int)
Deprecated: Use RegisterReq.ProtoReflect.Descriptor instead.
func (*RegisterReq) GetConfirmPassword ¶
func (x *RegisterReq) GetConfirmPassword() string
func (*RegisterReq) GetEmail ¶
func (x *RegisterReq) GetEmail() string
func (*RegisterReq) GetPassword ¶
func (x *RegisterReq) GetPassword() string
func (*RegisterReq) ProtoMessage ¶
func (*RegisterReq) ProtoMessage()
func (*RegisterReq) ProtoReflect ¶
func (x *RegisterReq) ProtoReflect() protoreflect.Message
func (*RegisterReq) Reset ¶
func (x *RegisterReq) Reset()
func (*RegisterReq) String ¶
func (x *RegisterReq) String() string
type RegisterResp ¶
type RegisterResp struct { UserId int32 `protobuf:"varint,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"` // contains filtered or unexported fields }
func (*RegisterResp) Descriptor
deprecated
func (*RegisterResp) Descriptor() ([]byte, []int)
Deprecated: Use RegisterResp.ProtoReflect.Descriptor instead.
func (*RegisterResp) GetUserId ¶
func (x *RegisterResp) GetUserId() int32
func (*RegisterResp) ProtoMessage ¶
func (*RegisterResp) ProtoMessage()
func (*RegisterResp) ProtoReflect ¶
func (x *RegisterResp) ProtoReflect() protoreflect.Message
func (*RegisterResp) Reset ¶
func (x *RegisterResp) Reset()
func (*RegisterResp) String ¶
func (x *RegisterResp) String() string
type UnimplementedUserServiceServer ¶
type UnimplementedUserServiceServer struct { }
UnimplementedUserServiceServer must be embedded to have forward compatible implementations.
func (UnimplementedUserServiceServer) GetUserByEmail ¶
func (UnimplementedUserServiceServer) GetUserByEmail(context.Context, *GetUserByEmailReq) (*GetUserByEmailResp, error)
func (UnimplementedUserServiceServer) Register ¶
func (UnimplementedUserServiceServer) Register(context.Context, *RegisterReq) (*RegisterResp, 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 UserServiceClient ¶
type UserServiceClient interface { Register(ctx context.Context, in *RegisterReq, opts ...grpc.CallOption) (*RegisterResp, error) Login(ctx context.Context, in *LoginReq, opts ...grpc.CallOption) (*LoginResp, error) GetUserByEmail(ctx context.Context, in *GetUserByEmailReq, opts ...grpc.CallOption) (*GetUserByEmailResp, 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 { Register(context.Context, *RegisterReq) (*RegisterResp, error) Login(context.Context, *LoginReq) (*LoginResp, error) GetUserByEmail(context.Context, *GetUserByEmailReq) (*GetUserByEmailResp, error) // contains filtered or unexported methods }
UserServiceServer is the server API for UserService service. All implementations must embed UnimplementedUserServiceServer for forward compatibility