Documentation ¶
Index ¶
- Variables
- func RegisterUserClientServer(s grpc.ServiceRegistrar, srv UserClientServer)
- 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 LoginResponse
- func (*LoginResponse) Descriptor() ([]byte, []int)deprecated
- func (x *LoginResponse) GetAccessExpire() int64
- func (x *LoginResponse) GetAccessToken() string
- func (*LoginResponse) ProtoMessage()
- func (x *LoginResponse) ProtoReflect() protoreflect.Message
- func (x *LoginResponse) Reset()
- func (x *LoginResponse) String() string
- type PersonalInfoRequest
- func (*PersonalInfoRequest) Descriptor() ([]byte, []int)deprecated
- func (x *PersonalInfoRequest) GetId() int64
- func (*PersonalInfoRequest) ProtoMessage()
- func (x *PersonalInfoRequest) ProtoReflect() protoreflect.Message
- func (x *PersonalInfoRequest) Reset()
- func (x *PersonalInfoRequest) String() string
- type PersonalInfoResponse
- func (*PersonalInfoResponse) Descriptor() ([]byte, []int)deprecated
- func (x *PersonalInfoResponse) GetAvatarUrl() string
- func (x *PersonalInfoResponse) GetEmail() string
- func (x *PersonalInfoResponse) GetGender() int64
- func (x *PersonalInfoResponse) GetNickName() string
- func (x *PersonalInfoResponse) GetUserId() int64
- func (*PersonalInfoResponse) ProtoMessage()
- func (x *PersonalInfoResponse) ProtoReflect() protoreflect.Message
- func (x *PersonalInfoResponse) Reset()
- func (x *PersonalInfoResponse) String() string
- type RegisterRequest
- func (*RegisterRequest) Descriptor() ([]byte, []int)deprecated
- func (x *RegisterRequest) GetEmail() string
- func (x *RegisterRequest) GetGender() int64
- func (x *RegisterRequest) GetNickName() string
- func (x *RegisterRequest) GetPassword() string
- func (*RegisterRequest) ProtoMessage()
- func (x *RegisterRequest) ProtoReflect() protoreflect.Message
- func (x *RegisterRequest) Reset()
- func (x *RegisterRequest) String() string
- type RegisterResponse
- type UnimplementedUserClientServer
- func (UnimplementedUserClientServer) Login(context.Context, *LoginRequest) (*LoginResponse, error)
- func (UnimplementedUserClientServer) PersonalInfo(context.Context, *PersonalInfoRequest) (*PersonalInfoResponse, error)
- func (UnimplementedUserClientServer) Register(context.Context, *RegisterRequest) (*RegisterResponse, error)
- type UnsafeUserClientServer
- type UserClientClient
- type UserClientServer
Constants ¶
This section is empty.
Variables ¶
var File_proto_user_user_proto protoreflect.FileDescriptor
var UserClient_ServiceDesc = grpc.ServiceDesc{ ServiceName: "user.UserClient", HandlerType: (*UserClientServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Login", Handler: _UserClient_Login_Handler, }, { MethodName: "Register", Handler: _UserClient_Register_Handler, }, { MethodName: "PersonalInfo", Handler: _UserClient_PersonalInfo_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "proto/user/user.proto", }
UserClient_ServiceDesc is the grpc.ServiceDesc for UserClient service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterUserClientServer ¶
func RegisterUserClientServer(s grpc.ServiceRegistrar, srv UserClientServer)
Types ¶
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 LoginResponse ¶
type LoginResponse struct { AccessToken string `protobuf:"bytes,1,opt,name=accessToken,proto3" json:"accessToken,omitempty"` AccessExpire int64 `protobuf:"varint,2,opt,name=accessExpire,proto3" json:"accessExpire,omitempty"` // contains filtered or unexported fields }
func (*LoginResponse) Descriptor
deprecated
func (*LoginResponse) Descriptor() ([]byte, []int)
Deprecated: Use LoginResponse.ProtoReflect.Descriptor instead.
func (*LoginResponse) GetAccessExpire ¶
func (x *LoginResponse) GetAccessExpire() int64
func (*LoginResponse) GetAccessToken ¶
func (x *LoginResponse) GetAccessToken() string
func (*LoginResponse) ProtoMessage ¶
func (*LoginResponse) ProtoMessage()
func (*LoginResponse) ProtoReflect ¶
func (x *LoginResponse) ProtoReflect() protoreflect.Message
func (*LoginResponse) Reset ¶
func (x *LoginResponse) Reset()
func (*LoginResponse) String ¶
func (x *LoginResponse) String() string
type PersonalInfoRequest ¶
type PersonalInfoRequest struct { Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` // contains filtered or unexported fields }
个人信息
func (*PersonalInfoRequest) Descriptor
deprecated
func (*PersonalInfoRequest) Descriptor() ([]byte, []int)
Deprecated: Use PersonalInfoRequest.ProtoReflect.Descriptor instead.
func (*PersonalInfoRequest) GetId ¶
func (x *PersonalInfoRequest) GetId() int64
func (*PersonalInfoRequest) ProtoMessage ¶
func (*PersonalInfoRequest) ProtoMessage()
func (*PersonalInfoRequest) ProtoReflect ¶
func (x *PersonalInfoRequest) ProtoReflect() protoreflect.Message
func (*PersonalInfoRequest) Reset ¶
func (x *PersonalInfoRequest) Reset()
func (*PersonalInfoRequest) String ¶
func (x *PersonalInfoRequest) String() string
type PersonalInfoResponse ¶
type PersonalInfoResponse struct { UserId int64 `protobuf:"varint,1,opt,name=userId,proto3" json:"userId,omitempty"` NickName string `protobuf:"bytes,2,opt,name=nickName,proto3" json:"nickName,omitempty"` Gender int64 `protobuf:"varint,3,opt,name=gender,proto3" json:"gender,omitempty"` Email string `protobuf:"bytes,4,opt,name=email,proto3" json:"email,omitempty"` AvatarUrl string `protobuf:"bytes,5,opt,name=avatarUrl,proto3" json:"avatarUrl,omitempty"` // contains filtered or unexported fields }
func (*PersonalInfoResponse) Descriptor
deprecated
func (*PersonalInfoResponse) Descriptor() ([]byte, []int)
Deprecated: Use PersonalInfoResponse.ProtoReflect.Descriptor instead.
func (*PersonalInfoResponse) GetAvatarUrl ¶
func (x *PersonalInfoResponse) GetAvatarUrl() string
func (*PersonalInfoResponse) GetEmail ¶
func (x *PersonalInfoResponse) GetEmail() string
func (*PersonalInfoResponse) GetGender ¶
func (x *PersonalInfoResponse) GetGender() int64
func (*PersonalInfoResponse) GetNickName ¶
func (x *PersonalInfoResponse) GetNickName() string
func (*PersonalInfoResponse) GetUserId ¶
func (x *PersonalInfoResponse) GetUserId() int64
func (*PersonalInfoResponse) ProtoMessage ¶
func (*PersonalInfoResponse) ProtoMessage()
func (*PersonalInfoResponse) ProtoReflect ¶
func (x *PersonalInfoResponse) ProtoReflect() protoreflect.Message
func (*PersonalInfoResponse) Reset ¶
func (x *PersonalInfoResponse) Reset()
func (*PersonalInfoResponse) String ¶
func (x *PersonalInfoResponse) String() string
type RegisterRequest ¶
type RegisterRequest 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"` NickName string `protobuf:"bytes,3,opt,name=nickName,proto3" json:"nickName,omitempty"` Gender int64 `protobuf:"varint,4,opt,name=gender,proto3" json:"gender,omitempty"` // contains filtered or unexported fields }
注册
func (*RegisterRequest) Descriptor
deprecated
func (*RegisterRequest) Descriptor() ([]byte, []int)
Deprecated: Use RegisterRequest.ProtoReflect.Descriptor instead.
func (*RegisterRequest) GetEmail ¶
func (x *RegisterRequest) GetEmail() string
func (*RegisterRequest) GetGender ¶
func (x *RegisterRequest) GetGender() int64
func (*RegisterRequest) GetNickName ¶
func (x *RegisterRequest) GetNickName() string
func (*RegisterRequest) GetPassword ¶
func (x *RegisterRequest) GetPassword() string
func (*RegisterRequest) ProtoMessage ¶
func (*RegisterRequest) ProtoMessage()
func (*RegisterRequest) ProtoReflect ¶
func (x *RegisterRequest) ProtoReflect() protoreflect.Message
func (*RegisterRequest) Reset ¶
func (x *RegisterRequest) Reset()
func (*RegisterRequest) String ¶
func (x *RegisterRequest) String() string
type RegisterResponse ¶
type RegisterResponse struct {
// contains filtered or unexported fields
}
func (*RegisterResponse) Descriptor
deprecated
func (*RegisterResponse) Descriptor() ([]byte, []int)
Deprecated: Use RegisterResponse.ProtoReflect.Descriptor instead.
func (*RegisterResponse) ProtoMessage ¶
func (*RegisterResponse) ProtoMessage()
func (*RegisterResponse) ProtoReflect ¶
func (x *RegisterResponse) ProtoReflect() protoreflect.Message
func (*RegisterResponse) Reset ¶
func (x *RegisterResponse) Reset()
func (*RegisterResponse) String ¶
func (x *RegisterResponse) String() string
type UnimplementedUserClientServer ¶
type UnimplementedUserClientServer struct { }
UnimplementedUserClientServer must be embedded to have forward compatible implementations.
func (UnimplementedUserClientServer) Login ¶
func (UnimplementedUserClientServer) Login(context.Context, *LoginRequest) (*LoginResponse, error)
func (UnimplementedUserClientServer) PersonalInfo ¶
func (UnimplementedUserClientServer) PersonalInfo(context.Context, *PersonalInfoRequest) (*PersonalInfoResponse, error)
func (UnimplementedUserClientServer) Register ¶
func (UnimplementedUserClientServer) Register(context.Context, *RegisterRequest) (*RegisterResponse, error)
type UnsafeUserClientServer ¶
type UnsafeUserClientServer interface {
// contains filtered or unexported methods
}
UnsafeUserClientServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to UserClientServer will result in compilation errors.
type UserClientClient ¶
type UserClientClient interface { Login(ctx context.Context, in *LoginRequest, opts ...grpc.CallOption) (*LoginResponse, error) Register(ctx context.Context, in *RegisterRequest, opts ...grpc.CallOption) (*RegisterResponse, error) PersonalInfo(ctx context.Context, in *PersonalInfoRequest, opts ...grpc.CallOption) (*PersonalInfoResponse, error) }
UserClientClient is the client API for UserClient 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 NewUserClientClient ¶
func NewUserClientClient(cc grpc.ClientConnInterface) UserClientClient
type UserClientServer ¶
type UserClientServer interface { Login(context.Context, *LoginRequest) (*LoginResponse, error) Register(context.Context, *RegisterRequest) (*RegisterResponse, error) PersonalInfo(context.Context, *PersonalInfoRequest) (*PersonalInfoResponse, error) // contains filtered or unexported methods }
UserClientServer is the server API for UserClient service. All implementations must embed UnimplementedUserClientServer for forward compatibility