Documentation ¶
Index ¶
- Variables
- func RegisterDemoUserServer(s grpc.ServiceRegistrar, srv DemoUserServer)
- type DemoUserClient
- type DemoUserServer
- type UnimplementedDemoUserServer
- func (UnimplementedDemoUserServer) UserInfo(context.Context, *UserInfoRequest) (*UserInfoResponse, error)
- func (UnimplementedDemoUserServer) UserLogin(context.Context, *UserLoginRequest) (*UserLoginResponse, error)
- func (UnimplementedDemoUserServer) UserRegister(context.Context, *UserRegisterRequest) (*UserRegisterResponse, error)
- type UnsafeDemoUserServer
- type UserInfoRequest
- type UserInfoResponse
- func (*UserInfoResponse) Descriptor() ([]byte, []int)deprecated
- func (x *UserInfoResponse) GetAccount() string
- func (x *UserInfoResponse) GetLoginTime() string
- func (*UserInfoResponse) ProtoMessage()
- func (x *UserInfoResponse) ProtoReflect() protoreflect.Message
- func (x *UserInfoResponse) Reset()
- func (x *UserInfoResponse) String() string
- type UserLoginRequest
- func (*UserLoginRequest) Descriptor() ([]byte, []int)deprecated
- func (x *UserLoginRequest) GetAccount() string
- func (x *UserLoginRequest) GetPwd() string
- func (*UserLoginRequest) ProtoMessage()
- func (x *UserLoginRequest) ProtoReflect() protoreflect.Message
- func (x *UserLoginRequest) Reset()
- func (x *UserLoginRequest) String() string
- type UserLoginResponse
- type UserRegisterRequest
- func (*UserRegisterRequest) Descriptor() ([]byte, []int)deprecated
- func (x *UserRegisterRequest) GetAccount() string
- func (x *UserRegisterRequest) GetPwd() string
- func (x *UserRegisterRequest) GetRegisterCode() string
- func (x *UserRegisterRequest) GetVerifyPwd() string
- func (*UserRegisterRequest) ProtoMessage()
- func (x *UserRegisterRequest) ProtoReflect() protoreflect.Message
- func (x *UserRegisterRequest) Reset()
- func (x *UserRegisterRequest) String() string
- type UserRegisterResponse
- func (*UserRegisterResponse) Descriptor() ([]byte, []int)deprecated
- func (x *UserRegisterResponse) GetTypes() string
- func (*UserRegisterResponse) ProtoMessage()
- func (x *UserRegisterResponse) ProtoReflect() protoreflect.Message
- func (x *UserRegisterResponse) Reset()
- func (x *UserRegisterResponse) String() string
Constants ¶
This section is empty.
Variables ¶
var DemoUser_ServiceDesc = grpc.ServiceDesc{ ServiceName: "user.DemoUser", HandlerType: (*DemoUserServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "UserRegister", Handler: _DemoUser_UserRegister_Handler, }, { MethodName: "UserLogin", Handler: _DemoUser_UserLogin_Handler, }, { MethodName: "UserInfo", Handler: _DemoUser_UserInfo_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "user.proto", }
DemoUser_ServiceDesc is the grpc.ServiceDesc for DemoUser service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var File_user_proto protoreflect.FileDescriptor
Functions ¶
func RegisterDemoUserServer ¶
func RegisterDemoUserServer(s grpc.ServiceRegistrar, srv DemoUserServer)
Types ¶
type DemoUserClient ¶
type DemoUserClient interface { UserRegister(ctx context.Context, in *UserRegisterRequest, opts ...grpc.CallOption) (*UserRegisterResponse, error) UserLogin(ctx context.Context, in *UserLoginRequest, opts ...grpc.CallOption) (*UserLoginResponse, error) UserInfo(ctx context.Context, in *UserInfoRequest, opts ...grpc.CallOption) (*UserInfoResponse, error) }
DemoUserClient is the client API for DemoUser 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 NewDemoUserClient ¶
func NewDemoUserClient(cc grpc.ClientConnInterface) DemoUserClient
type DemoUserServer ¶
type DemoUserServer interface { UserRegister(context.Context, *UserRegisterRequest) (*UserRegisterResponse, error) UserLogin(context.Context, *UserLoginRequest) (*UserLoginResponse, error) UserInfo(context.Context, *UserInfoRequest) (*UserInfoResponse, error) // contains filtered or unexported methods }
DemoUserServer is the server API for DemoUser service. All implementations must embed UnimplementedDemoUserServer for forward compatibility
type UnimplementedDemoUserServer ¶
type UnimplementedDemoUserServer struct { }
UnimplementedDemoUserServer must be embedded to have forward compatible implementations.
func (UnimplementedDemoUserServer) UserInfo ¶
func (UnimplementedDemoUserServer) UserInfo(context.Context, *UserInfoRequest) (*UserInfoResponse, error)
func (UnimplementedDemoUserServer) UserLogin ¶
func (UnimplementedDemoUserServer) UserLogin(context.Context, *UserLoginRequest) (*UserLoginResponse, error)
func (UnimplementedDemoUserServer) UserRegister ¶
func (UnimplementedDemoUserServer) UserRegister(context.Context, *UserRegisterRequest) (*UserRegisterResponse, error)
type UnsafeDemoUserServer ¶
type UnsafeDemoUserServer interface {
// contains filtered or unexported methods
}
UnsafeDemoUserServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to DemoUserServer will result in compilation errors.
type UserInfoRequest ¶
type UserInfoRequest struct { Token string `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"` // contains filtered or unexported fields }
func (*UserInfoRequest) Descriptor
deprecated
func (*UserInfoRequest) Descriptor() ([]byte, []int)
Deprecated: Use UserInfoRequest.ProtoReflect.Descriptor instead.
func (*UserInfoRequest) GetToken ¶
func (x *UserInfoRequest) GetToken() string
func (*UserInfoRequest) ProtoMessage ¶
func (*UserInfoRequest) ProtoMessage()
func (*UserInfoRequest) ProtoReflect ¶
func (x *UserInfoRequest) ProtoReflect() protoreflect.Message
func (*UserInfoRequest) Reset ¶
func (x *UserInfoRequest) Reset()
func (*UserInfoRequest) String ¶
func (x *UserInfoRequest) String() string
type UserInfoResponse ¶
type UserInfoResponse struct { Account string `protobuf:"bytes,1,opt,name=account,proto3" json:"account,omitempty"` LoginTime string `protobuf:"bytes,2,opt,name=login_time,json=loginTime,proto3" json:"login_time,omitempty"` // contains filtered or unexported fields }
func (*UserInfoResponse) Descriptor
deprecated
func (*UserInfoResponse) Descriptor() ([]byte, []int)
Deprecated: Use UserInfoResponse.ProtoReflect.Descriptor instead.
func (*UserInfoResponse) GetAccount ¶
func (x *UserInfoResponse) GetAccount() string
func (*UserInfoResponse) GetLoginTime ¶
func (x *UserInfoResponse) GetLoginTime() string
func (*UserInfoResponse) ProtoMessage ¶
func (*UserInfoResponse) ProtoMessage()
func (*UserInfoResponse) ProtoReflect ¶
func (x *UserInfoResponse) ProtoReflect() protoreflect.Message
func (*UserInfoResponse) Reset ¶
func (x *UserInfoResponse) Reset()
func (*UserInfoResponse) String ¶
func (x *UserInfoResponse) String() string
type UserLoginRequest ¶
type UserLoginRequest struct { Account string `protobuf:"bytes,1,opt,name=account,proto3" json:"account,omitempty"` Pwd string `protobuf:"bytes,2,opt,name=pwd,proto3" json:"pwd,omitempty"` // contains filtered or unexported fields }
func (*UserLoginRequest) Descriptor
deprecated
func (*UserLoginRequest) Descriptor() ([]byte, []int)
Deprecated: Use UserLoginRequest.ProtoReflect.Descriptor instead.
func (*UserLoginRequest) GetAccount ¶
func (x *UserLoginRequest) GetAccount() string
func (*UserLoginRequest) GetPwd ¶
func (x *UserLoginRequest) GetPwd() string
func (*UserLoginRequest) ProtoMessage ¶
func (*UserLoginRequest) ProtoMessage()
func (*UserLoginRequest) ProtoReflect ¶
func (x *UserLoginRequest) ProtoReflect() protoreflect.Message
func (*UserLoginRequest) Reset ¶
func (x *UserLoginRequest) Reset()
func (*UserLoginRequest) String ¶
func (x *UserLoginRequest) String() string
type UserLoginResponse ¶
type UserLoginResponse struct { Token string `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"` // contains filtered or unexported fields }
func (*UserLoginResponse) Descriptor
deprecated
func (*UserLoginResponse) Descriptor() ([]byte, []int)
Deprecated: Use UserLoginResponse.ProtoReflect.Descriptor instead.
func (*UserLoginResponse) GetToken ¶
func (x *UserLoginResponse) GetToken() string
func (*UserLoginResponse) ProtoMessage ¶
func (*UserLoginResponse) ProtoMessage()
func (*UserLoginResponse) ProtoReflect ¶
func (x *UserLoginResponse) ProtoReflect() protoreflect.Message
func (*UserLoginResponse) Reset ¶
func (x *UserLoginResponse) Reset()
func (*UserLoginResponse) String ¶
func (x *UserLoginResponse) String() string
type UserRegisterRequest ¶
type UserRegisterRequest struct { Account string `protobuf:"bytes,1,opt,name=account,proto3" json:"account,omitempty"` Pwd string `protobuf:"bytes,2,opt,name=pwd,proto3" json:"pwd,omitempty"` VerifyPwd string `protobuf:"bytes,3,opt,name=verify_pwd,json=verifyPwd,proto3" json:"verify_pwd,omitempty"` RegisterCode string `protobuf:"bytes,4,opt,name=register_code,json=registerCode,proto3" json:"register_code,omitempty"` // contains filtered or unexported fields }
func (*UserRegisterRequest) Descriptor
deprecated
func (*UserRegisterRequest) Descriptor() ([]byte, []int)
Deprecated: Use UserRegisterRequest.ProtoReflect.Descriptor instead.
func (*UserRegisterRequest) GetAccount ¶
func (x *UserRegisterRequest) GetAccount() string
func (*UserRegisterRequest) GetPwd ¶
func (x *UserRegisterRequest) GetPwd() string
func (*UserRegisterRequest) GetRegisterCode ¶
func (x *UserRegisterRequest) GetRegisterCode() string
func (*UserRegisterRequest) GetVerifyPwd ¶
func (x *UserRegisterRequest) GetVerifyPwd() string
func (*UserRegisterRequest) ProtoMessage ¶
func (*UserRegisterRequest) ProtoMessage()
func (*UserRegisterRequest) ProtoReflect ¶
func (x *UserRegisterRequest) ProtoReflect() protoreflect.Message
func (*UserRegisterRequest) Reset ¶
func (x *UserRegisterRequest) Reset()
func (*UserRegisterRequest) String ¶
func (x *UserRegisterRequest) String() string
type UserRegisterResponse ¶
type UserRegisterResponse struct { Types string `protobuf:"bytes,1,opt,name=types,proto3" json:"types,omitempty"` // contains filtered or unexported fields }
func (*UserRegisterResponse) Descriptor
deprecated
func (*UserRegisterResponse) Descriptor() ([]byte, []int)
Deprecated: Use UserRegisterResponse.ProtoReflect.Descriptor instead.
func (*UserRegisterResponse) GetTypes ¶
func (x *UserRegisterResponse) GetTypes() string
func (*UserRegisterResponse) ProtoMessage ¶
func (*UserRegisterResponse) ProtoMessage()
func (*UserRegisterResponse) ProtoReflect ¶
func (x *UserRegisterResponse) ProtoReflect() protoreflect.Message
func (*UserRegisterResponse) Reset ¶
func (x *UserRegisterResponse) Reset()
func (*UserRegisterResponse) String ¶
func (x *UserRegisterResponse) String() string