Documentation ¶
Index ¶
- Constants
- Variables
- func RegisterUserServer(s grpc.ServiceRegistrar, srv UserServer)
- type LoginReponse
- func (*LoginReponse) Descriptor() ([]byte, []int)deprecated
- func (x *LoginReponse) GetEmail() string
- func (x *LoginReponse) GetId() int32
- func (x *LoginReponse) GetNickname() string
- func (x *LoginReponse) GetUsername() string
- func (*LoginReponse) ProtoMessage()
- func (x *LoginReponse) ProtoReflect() protoreflect.Message
- func (x *LoginReponse) Reset()
- func (x *LoginReponse) String() string
- type LoginRequest
- func (*LoginRequest) Descriptor() ([]byte, []int)deprecated
- func (x *LoginRequest) GetEmail() string
- func (x *LoginRequest) GetPassword() string
- func (*LoginRequest) ProtoMessage()
- func (x *LoginRequest) ProtoReflect() protoreflect.Message
- func (x *LoginRequest) Reset()
- func (x *LoginRequest) String() string
- type UnimplementedUserServer
- type UnsafeUserServer
- type UserClient
- type UserServer
Constants ¶
const (
User_Login_FullMethodName = "/user.User/Login"
)
Variables ¶
var File_user_proto protoreflect.FileDescriptor
var User_ServiceDesc = grpc.ServiceDesc{ ServiceName: "user.User", HandlerType: (*UserServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Login", Handler: _User_Login_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "user.proto", }
User_ServiceDesc is the grpc.ServiceDesc for User service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterUserServer ¶
func RegisterUserServer(s grpc.ServiceRegistrar, srv UserServer)
Types ¶
type LoginReponse ¶
type LoginReponse struct { // 用户id Id int32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` Email string `protobuf:"bytes,2,opt,name=email,proto3" json:"email,omitempty"` Username string `protobuf:"bytes,3,opt,name=username,proto3" json:"username,omitempty"` Nickname string `protobuf:"bytes,4,opt,name=nickname,proto3" json:"nickname,omitempty"` // contains filtered or unexported fields }
func (*LoginReponse) Descriptor
deprecated
func (*LoginReponse) Descriptor() ([]byte, []int)
Deprecated: Use LoginReponse.ProtoReflect.Descriptor instead.
func (*LoginReponse) GetEmail ¶
func (x *LoginReponse) GetEmail() string
func (*LoginReponse) GetId ¶
func (x *LoginReponse) GetId() int32
func (*LoginReponse) GetNickname ¶
func (x *LoginReponse) GetNickname() string
func (*LoginReponse) GetUsername ¶
func (x *LoginReponse) GetUsername() string
func (*LoginReponse) ProtoMessage ¶
func (*LoginReponse) ProtoMessage()
func (*LoginReponse) ProtoReflect ¶
func (x *LoginReponse) ProtoReflect() protoreflect.Message
func (*LoginReponse) Reset ¶
func (x *LoginReponse) Reset()
func (*LoginReponse) String ¶
func (x *LoginReponse) String() string
type LoginRequest ¶
type LoginRequest 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 (*LoginRequest) Descriptor
deprecated
func (*LoginRequest) Descriptor() ([]byte, []int)
Deprecated: Use LoginRequest.ProtoReflect.Descriptor instead.
func (*LoginRequest) GetEmail ¶
func (x *LoginRequest) GetEmail() string
func (*LoginRequest) GetPassword ¶
func (x *LoginRequest) GetPassword() string
func (*LoginRequest) ProtoMessage ¶
func (*LoginRequest) ProtoMessage()
func (*LoginRequest) ProtoReflect ¶
func (x *LoginRequest) ProtoReflect() protoreflect.Message
func (*LoginRequest) Reset ¶
func (x *LoginRequest) Reset()
func (*LoginRequest) String ¶
func (x *LoginRequest) String() string
type UnimplementedUserServer ¶
type UnimplementedUserServer struct { }
UnimplementedUserServer must be embedded to have forward compatible implementations.
func (UnimplementedUserServer) Login ¶
func (UnimplementedUserServer) Login(context.Context, *LoginRequest) (*LoginReponse, error)
type UnsafeUserServer ¶
type UnsafeUserServer interface {
// contains filtered or unexported methods
}
UnsafeUserServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to UserServer will result in compilation errors.
type UserClient ¶
type UserClient interface {
Login(ctx context.Context, in *LoginRequest, opts ...grpc.CallOption) (*LoginReponse, error)
}
UserClient is the client API for User 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 NewUserClient ¶
func NewUserClient(cc grpc.ClientConnInterface) UserClient
type UserServer ¶
type UserServer interface { Login(context.Context, *LoginRequest) (*LoginReponse, error) // contains filtered or unexported methods }
UserServer is the server API for User service. All implementations must embed UnimplementedUserServer for forward compatibility