user_info_server

package module
v0.0.0-...-9b45bd6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 18, 2023 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	UserType_name = map[int32]string{
		0: "USER_TYPE_RESEARCHER",
		1: "USER_TYPE_PARTICIPANT",
	}
	UserType_value = map[string]int32{
		"USER_TYPE_RESEARCHER":  0,
		"USER_TYPE_PARTICIPANT": 1,
	}
)

Enum value maps for UserType.

View Source
var (
	GenderType_name = map[int32]string{
		0: "GENDER_TYPE_INVALID",
		1: "GENDER_TYPE_MAN",
		2: "GENDER_TYPE_WOMAN",
	}
	GenderType_value = map[string]int32{
		"GENDER_TYPE_INVALID": 0,
		"GENDER_TYPE_MAN":     1,
		"GENDER_TYPE_WOMAN":   2,
	}
)

Enum value maps for GenderType.

View Source
var File_user_info_server_user_info_server_proto protoreflect.FileDescriptor
View Source
var UserService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "grpc.psychological_experiment.user_info_server.UserService",
	HandlerType: (*UserServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Register",
			Handler:    _UserService_Register_Handler,
		},
		{
			MethodName: "Login",
			Handler:    _UserService_Login_Handler,
		},
		{
			MethodName: "GetUserInfoBySearchKey",
			Handler:    _UserService_GetUserInfoBySearchKey_Handler,
		},
		{
			MethodName: "BatchGetUserInfos",
			Handler:    _UserService_BatchGetUserInfos_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "user_info_server/user_info_server.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 BatchGetUserInfoReq

type BatchGetUserInfoReq struct {
	UserId []int64 `protobuf:"varint,1,rep,packed,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
	// contains filtered or unexported fields
}

func (*BatchGetUserInfoReq) Descriptor deprecated

func (*BatchGetUserInfoReq) Descriptor() ([]byte, []int)

Deprecated: Use BatchGetUserInfoReq.ProtoReflect.Descriptor instead.

func (*BatchGetUserInfoReq) GetUserId

func (x *BatchGetUserInfoReq) GetUserId() []int64

func (*BatchGetUserInfoReq) ProtoMessage

func (*BatchGetUserInfoReq) ProtoMessage()

func (*BatchGetUserInfoReq) ProtoReflect

func (x *BatchGetUserInfoReq) ProtoReflect() protoreflect.Message

func (*BatchGetUserInfoReq) Reset

func (x *BatchGetUserInfoReq) Reset()

func (*BatchGetUserInfoReq) String

func (x *BatchGetUserInfoReq) String() string

func (*BatchGetUserInfoReq) Validate

func (this *BatchGetUserInfoReq) Validate() error

type BatchGetUserInfoRsp

type BatchGetUserInfoRsp struct {
	CommonRsp *CommonRsp  `protobuf:"bytes,1,opt,name=common_rsp,json=commonRsp,proto3" json:"common_rsp,omitempty"`
	UserInfo  []*UserInfo `protobuf:"bytes,2,rep,name=user_info,json=userInfo,proto3" json:"user_info,omitempty"`
	// contains filtered or unexported fields
}

func (*BatchGetUserInfoRsp) Descriptor deprecated

func (*BatchGetUserInfoRsp) Descriptor() ([]byte, []int)

Deprecated: Use BatchGetUserInfoRsp.ProtoReflect.Descriptor instead.

func (*BatchGetUserInfoRsp) GetCommonRsp

func (x *BatchGetUserInfoRsp) GetCommonRsp() *CommonRsp

func (*BatchGetUserInfoRsp) GetUserInfo

func (x *BatchGetUserInfoRsp) GetUserInfo() []*UserInfo

func (*BatchGetUserInfoRsp) ProtoMessage

func (*BatchGetUserInfoRsp) ProtoMessage()

func (*BatchGetUserInfoRsp) ProtoReflect

func (x *BatchGetUserInfoRsp) ProtoReflect() protoreflect.Message

func (*BatchGetUserInfoRsp) Reset

func (x *BatchGetUserInfoRsp) Reset()

func (*BatchGetUserInfoRsp) String

func (x *BatchGetUserInfoRsp) String() string

func (*BatchGetUserInfoRsp) Validate

func (this *BatchGetUserInfoRsp) Validate() error

type CommonHead

type CommonHead struct {

	// token 用户标识
	Token string `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"`
	// contains filtered or unexported fields
}

func (*CommonHead) Descriptor deprecated

func (*CommonHead) Descriptor() ([]byte, []int)

Deprecated: Use CommonHead.ProtoReflect.Descriptor instead.

func (*CommonHead) GetToken

func (x *CommonHead) GetToken() string

func (*CommonHead) ProtoMessage

func (*CommonHead) ProtoMessage()

func (*CommonHead) ProtoReflect

func (x *CommonHead) ProtoReflect() protoreflect.Message

func (*CommonHead) Reset

func (x *CommonHead) Reset()

func (*CommonHead) String

func (x *CommonHead) String() string

func (*CommonHead) Validate

func (this *CommonHead) Validate() error

type CommonRsp

type CommonRsp struct {

	// error_code
	Code uint32 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"`
	// msg
	Msg string `protobuf:"bytes,2,opt,name=msg,proto3" json:"msg,omitempty"`
	// contains filtered or unexported fields
}

func (*CommonRsp) Descriptor deprecated

func (*CommonRsp) Descriptor() ([]byte, []int)

Deprecated: Use CommonRsp.ProtoReflect.Descriptor instead.

func (*CommonRsp) GetCode

func (x *CommonRsp) GetCode() uint32

func (*CommonRsp) GetMsg

func (x *CommonRsp) GetMsg() string

func (*CommonRsp) ProtoMessage

func (*CommonRsp) ProtoMessage()

func (*CommonRsp) ProtoReflect

func (x *CommonRsp) ProtoReflect() protoreflect.Message

func (*CommonRsp) Reset

func (x *CommonRsp) Reset()

func (*CommonRsp) String

func (x *CommonRsp) String() string

func (*CommonRsp) Validate

func (this *CommonRsp) Validate() error

type GenderType

type GenderType int32
const (
	GenderType_GENDER_TYPE_INVALID GenderType = 0
	// man
	GenderType_GENDER_TYPE_MAN GenderType = 1
	// woman
	GenderType_GENDER_TYPE_WOMAN GenderType = 2
)

func (GenderType) Descriptor

func (GenderType) Descriptor() protoreflect.EnumDescriptor

func (GenderType) Enum

func (x GenderType) Enum() *GenderType

func (GenderType) EnumDescriptor deprecated

func (GenderType) EnumDescriptor() ([]byte, []int)

Deprecated: Use GenderType.Descriptor instead.

func (GenderType) Number

func (x GenderType) Number() protoreflect.EnumNumber

func (GenderType) String

func (x GenderType) String() string

func (GenderType) Type

type GetUserInfoBySearchKeyReq

type GetUserInfoBySearchKeyReq struct {
	Email       string `protobuf:"bytes,1,opt,name=email,proto3" json:"email,omitempty"`
	PhoneNumber string `protobuf:"bytes,2,opt,name=phone_number,json=phoneNumber,proto3" json:"phone_number,omitempty"`
	UserId      int64  `protobuf:"varint,3,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
	// contains filtered or unexported fields
}

func (*GetUserInfoBySearchKeyReq) Descriptor deprecated

func (*GetUserInfoBySearchKeyReq) Descriptor() ([]byte, []int)

Deprecated: Use GetUserInfoBySearchKeyReq.ProtoReflect.Descriptor instead.

func (*GetUserInfoBySearchKeyReq) GetEmail

func (x *GetUserInfoBySearchKeyReq) GetEmail() string

func (*GetUserInfoBySearchKeyReq) GetPhoneNumber

func (x *GetUserInfoBySearchKeyReq) GetPhoneNumber() string

func (*GetUserInfoBySearchKeyReq) GetUserId

func (x *GetUserInfoBySearchKeyReq) GetUserId() int64

func (*GetUserInfoBySearchKeyReq) ProtoMessage

func (*GetUserInfoBySearchKeyReq) ProtoMessage()

func (*GetUserInfoBySearchKeyReq) ProtoReflect

func (*GetUserInfoBySearchKeyReq) Reset

func (x *GetUserInfoBySearchKeyReq) Reset()

func (*GetUserInfoBySearchKeyReq) String

func (x *GetUserInfoBySearchKeyReq) String() string

func (*GetUserInfoBySearchKeyReq) Validate

func (this *GetUserInfoBySearchKeyReq) Validate() error

type GetUserInfoBySearchKeyRsp

type GetUserInfoBySearchKeyRsp struct {

	// common rsp
	CommonRsp *CommonRsp `protobuf:"bytes,1,opt,name=common_rsp,json=commonRsp,proto3" json:"common_rsp,omitempty"`
	// user info
	UserInfo *UserInfo `protobuf:"bytes,2,opt,name=user_info,json=userInfo,proto3" json:"user_info,omitempty"`
	// contains filtered or unexported fields
}

func (*GetUserInfoBySearchKeyRsp) Descriptor deprecated

func (*GetUserInfoBySearchKeyRsp) Descriptor() ([]byte, []int)

Deprecated: Use GetUserInfoBySearchKeyRsp.ProtoReflect.Descriptor instead.

func (*GetUserInfoBySearchKeyRsp) GetCommonRsp

func (x *GetUserInfoBySearchKeyRsp) GetCommonRsp() *CommonRsp

func (*GetUserInfoBySearchKeyRsp) GetUserInfo

func (x *GetUserInfoBySearchKeyRsp) GetUserInfo() *UserInfo

func (*GetUserInfoBySearchKeyRsp) ProtoMessage

func (*GetUserInfoBySearchKeyRsp) ProtoMessage()

func (*GetUserInfoBySearchKeyRsp) ProtoReflect

func (*GetUserInfoBySearchKeyRsp) Reset

func (x *GetUserInfoBySearchKeyRsp) Reset()

func (*GetUserInfoBySearchKeyRsp) String

func (x *GetUserInfoBySearchKeyRsp) String() string

func (*GetUserInfoBySearchKeyRsp) Validate

func (this *GetUserInfoBySearchKeyRsp) Validate() error

type LoginReq

type LoginReq struct {

	// email
	Email string `protobuf:"bytes,1,opt,name=email,proto3" json:"email,omitempty"`
	// phone number
	PhoneNumber string `protobuf:"bytes,2,opt,name=phone_number,json=phoneNumber,proto3" json:"phone_number,omitempty"`
	// password
	Password string `protobuf:"bytes,3,opt,name=password,proto3" json:"password,omitempty"`
	// contains filtered or unexported fields
}

func (*LoginReq) Descriptor deprecated

func (*LoginReq) Descriptor() ([]byte, []int)

Deprecated: Use LoginReq.ProtoReflect.Descriptor instead.

func (*LoginReq) GetEmail

func (x *LoginReq) GetEmail() string

func (*LoginReq) GetPassword

func (x *LoginReq) GetPassword() string

func (*LoginReq) GetPhoneNumber

func (x *LoginReq) GetPhoneNumber() string

func (*LoginReq) ProtoMessage

func (*LoginReq) ProtoMessage()

func (*LoginReq) ProtoReflect

func (x *LoginReq) ProtoReflect() protoreflect.Message

func (*LoginReq) Reset

func (x *LoginReq) Reset()

func (*LoginReq) String

func (x *LoginReq) String() string

func (*LoginReq) Validate

func (this *LoginReq) Validate() error

type LoginRsp

type LoginRsp struct {

	// common rsp
	CommonRsp *CommonRsp `protobuf:"bytes,1,opt,name=common_rsp,json=commonRsp,proto3" json:"common_rsp,omitempty"`
	// user info
	UserInfo *UserInfo `protobuf:"bytes,2,opt,name=user_info,json=userInfo,proto3" json:"user_info,omitempty"`
	// contains filtered or unexported fields
}

func (*LoginRsp) Descriptor deprecated

func (*LoginRsp) Descriptor() ([]byte, []int)

Deprecated: Use LoginRsp.ProtoReflect.Descriptor instead.

func (*LoginRsp) GetCommonRsp

func (x *LoginRsp) GetCommonRsp() *CommonRsp

func (*LoginRsp) GetUserInfo

func (x *LoginRsp) GetUserInfo() *UserInfo

func (*LoginRsp) ProtoMessage

func (*LoginRsp) ProtoMessage()

func (*LoginRsp) ProtoReflect

func (x *LoginRsp) ProtoReflect() protoreflect.Message

func (*LoginRsp) Reset

func (x *LoginRsp) Reset()

func (*LoginRsp) String

func (x *LoginRsp) String() string

func (*LoginRsp) Validate

func (this *LoginRsp) Validate() error

type RegisterReq

type RegisterReq struct {

	// user info
	UserInfo *UserInfo `protobuf:"bytes,1,opt,name=user_info,json=userInfo,proto3" json:"user_info,omitempty"`
	// password
	Password string `protobuf:"bytes,2,opt,name=password,proto3" json:"password,omitempty"`
	// contains filtered or unexported fields
}

func (*RegisterReq) Descriptor deprecated

func (*RegisterReq) Descriptor() ([]byte, []int)

Deprecated: Use RegisterReq.ProtoReflect.Descriptor instead.

func (*RegisterReq) GetPassword

func (x *RegisterReq) GetPassword() string

func (*RegisterReq) GetUserInfo

func (x *RegisterReq) GetUserInfo() *UserInfo

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

func (*RegisterReq) Validate

func (this *RegisterReq) Validate() error

type RegisterRsp

type RegisterRsp struct {

	// common rsp
	CommonRsp *CommonRsp `protobuf:"bytes,1,opt,name=common_rsp,json=commonRsp,proto3" json:"common_rsp,omitempty"`
	// uin
	Uin string `protobuf:"bytes,2,opt,name=uin,proto3" json:"uin,omitempty"`
	// contains filtered or unexported fields
}

func (*RegisterRsp) Descriptor deprecated

func (*RegisterRsp) Descriptor() ([]byte, []int)

Deprecated: Use RegisterRsp.ProtoReflect.Descriptor instead.

func (*RegisterRsp) GetCommonRsp

func (x *RegisterRsp) GetCommonRsp() *CommonRsp

func (*RegisterRsp) GetUin

func (x *RegisterRsp) GetUin() string

func (*RegisterRsp) ProtoMessage

func (*RegisterRsp) ProtoMessage()

func (*RegisterRsp) ProtoReflect

func (x *RegisterRsp) ProtoReflect() protoreflect.Message

func (*RegisterRsp) Reset

func (x *RegisterRsp) Reset()

func (*RegisterRsp) String

func (x *RegisterRsp) String() string

func (*RegisterRsp) Validate

func (this *RegisterRsp) Validate() error

type UnimplementedUserServiceServer

type UnimplementedUserServiceServer struct {
}

UnimplementedUserServiceServer should be embedded to have forward compatible implementations.

func (UnimplementedUserServiceServer) BatchGetUserInfos

func (UnimplementedUserServiceServer) GetUserInfoBySearchKey

func (UnimplementedUserServiceServer) Login

func (UnimplementedUserServiceServer) Register

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 UserInfo

type UserInfo struct {

	// email
	Email string `protobuf:"bytes,1,opt,name=email,proto3" json:"email,omitempty"`
	// phone number
	PhoneNumber string `protobuf:"bytes,2,opt,name=phone_number,json=phoneNumber,proto3" json:"phone_number,omitempty"`
	// user name
	UserName string `protobuf:"bytes,3,opt,name=user_name,json=userName,proto3" json:"user_name,omitempty"`
	// gender
	Gender GenderType `` /* 129-byte string literal not displayed */
	// user type
	UserType UserType `` /* 147-byte string literal not displayed */
	// custom user form
	Extra string `protobuf:"bytes,6,opt,name=extra,proto3" json:"extra,omitempty"`
	// user id
	Uid int64 `protobuf:"varint,7,opt,name=uid,proto3" json:"uid,omitempty"`
	// contains filtered or unexported fields
}

func (*UserInfo) Descriptor deprecated

func (*UserInfo) Descriptor() ([]byte, []int)

Deprecated: Use UserInfo.ProtoReflect.Descriptor instead.

func (*UserInfo) GetEmail

func (x *UserInfo) GetEmail() string

func (*UserInfo) GetExtra

func (x *UserInfo) GetExtra() string

func (*UserInfo) GetGender

func (x *UserInfo) GetGender() GenderType

func (*UserInfo) GetPhoneNumber

func (x *UserInfo) GetPhoneNumber() string

func (*UserInfo) GetUid

func (x *UserInfo) GetUid() int64

func (*UserInfo) GetUserName

func (x *UserInfo) GetUserName() string

func (*UserInfo) GetUserType

func (x *UserInfo) GetUserType() UserType

func (*UserInfo) ProtoMessage

func (*UserInfo) ProtoMessage()

func (*UserInfo) ProtoReflect

func (x *UserInfo) ProtoReflect() protoreflect.Message

func (*UserInfo) Reset

func (x *UserInfo) Reset()

func (*UserInfo) String

func (x *UserInfo) String() string

func (*UserInfo) Validate

func (this *UserInfo) Validate() error

type UserServiceClient

type UserServiceClient interface {
	// register a user
	Register(ctx context.Context, in *RegisterReq, opts ...grpc.CallOption) (*RegisterRsp, error)
	// login a user
	Login(ctx context.Context, in *LoginReq, opts ...grpc.CallOption) (*LoginRsp, error)
	// 查询用户信息
	GetUserInfoBySearchKey(ctx context.Context, in *GetUserInfoBySearchKeyReq, opts ...grpc.CallOption) (*GetUserInfoBySearchKeyRsp, error)
	// 批量查询用户信息
	BatchGetUserInfos(ctx context.Context, in *BatchGetUserInfoReq, opts ...grpc.CallOption) (*BatchGetUserInfoRsp, 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.

type UserServiceServer

type UserServiceServer interface {
	// register a user
	Register(context.Context, *RegisterReq) (*RegisterRsp, error)
	// login a user
	Login(context.Context, *LoginReq) (*LoginRsp, error)
	// 查询用户信息
	GetUserInfoBySearchKey(context.Context, *GetUserInfoBySearchKeyReq) (*GetUserInfoBySearchKeyRsp, error)
	// 批量查询用户信息
	BatchGetUserInfos(context.Context, *BatchGetUserInfoReq) (*BatchGetUserInfoRsp, error)
}

UserServiceServer is the server API for UserService service. All implementations should embed UnimplementedUserServiceServer for forward compatibility

type UserType

type UserType int32
const (
	// 主试类型
	UserType_USER_TYPE_RESEARCHER UserType = 0
	// 被试类型
	UserType_USER_TYPE_PARTICIPANT UserType = 1
)

func (UserType) Descriptor

func (UserType) Descriptor() protoreflect.EnumDescriptor

func (UserType) Enum

func (x UserType) Enum() *UserType

func (UserType) EnumDescriptor deprecated

func (UserType) EnumDescriptor() ([]byte, []int)

Deprecated: Use UserType.Descriptor instead.

func (UserType) Number

func (x UserType) Number() protoreflect.EnumNumber

func (UserType) String

func (x UserType) String() string

func (UserType) Type

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL