Documentation
¶
Index ¶
- Variables
- func RegisterUserServer(s *grpc.Server, srv UserServer)
- type CheckResponse
- type CreateUserInfo
- func (*CreateUserInfo) Descriptor() ([]byte, []int)deprecated
- func (x *CreateUserInfo) GetMobile() string
- func (x *CreateUserInfo) GetNickName() string
- func (x *CreateUserInfo) GetPassWord() string
- func (*CreateUserInfo) ProtoMessage()
- func (x *CreateUserInfo) ProtoReflect() protoreflect.Message
- func (x *CreateUserInfo) Reset()
- func (x *CreateUserInfo) String() string
- type IdRequest
- type MobileRequest
- type PageInfo
- type PasswordCheckInfo
- func (*PasswordCheckInfo) Descriptor() ([]byte, []int)deprecated
- func (x *PasswordCheckInfo) GetEncryptedPassword() string
- func (x *PasswordCheckInfo) GetPassword() string
- func (*PasswordCheckInfo) ProtoMessage()
- func (x *PasswordCheckInfo) ProtoReflect() protoreflect.Message
- func (x *PasswordCheckInfo) Reset()
- func (x *PasswordCheckInfo) String() string
- type UnimplementedUserServer
- func (*UnimplementedUserServer) CheckPassword(context.Context, *PasswordCheckInfo) (*CheckResponse, error)
- func (*UnimplementedUserServer) CreateUser(context.Context, *CreateUserInfo) (*UserInfoResponse, error)
- func (*UnimplementedUserServer) GetUserById(context.Context, *IdRequest) (*UserInfoResponse, error)
- func (*UnimplementedUserServer) GetUserByMobile(context.Context, *MobileRequest) (*UserInfoResponse, error)
- func (*UnimplementedUserServer) GetUserList(context.Context, *PageInfo) (*UserListResponse, error)
- func (*UnimplementedUserServer) UpdateUser(context.Context, *UpdateUserInfo) (*emptypb.Empty, error)
- type UpdateUserInfo
- func (*UpdateUserInfo) Descriptor() ([]byte, []int)deprecated
- func (x *UpdateUserInfo) GetBirthday() uint64
- func (x *UpdateUserInfo) GetGender() string
- func (x *UpdateUserInfo) GetId() int32
- func (x *UpdateUserInfo) GetNickName() string
- func (*UpdateUserInfo) ProtoMessage()
- func (x *UpdateUserInfo) ProtoReflect() protoreflect.Message
- func (x *UpdateUserInfo) Reset()
- func (x *UpdateUserInfo) String() string
- type UserClient
- type UserInfoResponse
- func (*UserInfoResponse) Descriptor() ([]byte, []int)deprecated
- func (x *UserInfoResponse) GetBirthDay() uint64
- func (x *UserInfoResponse) GetGender() string
- func (x *UserInfoResponse) GetId() int32
- func (x *UserInfoResponse) GetMobile() string
- func (x *UserInfoResponse) GetNickName() string
- func (x *UserInfoResponse) GetPassWord() string
- func (x *UserInfoResponse) GetRole() int32
- func (*UserInfoResponse) ProtoMessage()
- func (x *UserInfoResponse) ProtoReflect() protoreflect.Message
- func (x *UserInfoResponse) Reset()
- func (x *UserInfoResponse) String() string
- type UserListResponse
- func (*UserListResponse) Descriptor() ([]byte, []int)deprecated
- func (x *UserListResponse) GetData() []*UserInfoResponse
- func (x *UserListResponse) GetTotal() int32
- func (*UserListResponse) ProtoMessage()
- func (x *UserListResponse) ProtoReflect() protoreflect.Message
- func (x *UserListResponse) Reset()
- func (x *UserListResponse) String() string
- type UserServer
Constants ¶
This section is empty.
Variables ¶
var File_user_proto protoreflect.FileDescriptor
Functions ¶
func RegisterUserServer ¶
func RegisterUserServer(s *grpc.Server, srv UserServer)
Types ¶
type CheckResponse ¶
type CheckResponse struct { Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"` // contains filtered or unexported fields }
func (*CheckResponse) Descriptor
deprecated
func (*CheckResponse) Descriptor() ([]byte, []int)
Deprecated: Use CheckResponse.ProtoReflect.Descriptor instead.
func (*CheckResponse) GetSuccess ¶
func (x *CheckResponse) GetSuccess() bool
func (*CheckResponse) ProtoMessage ¶
func (*CheckResponse) ProtoMessage()
func (*CheckResponse) ProtoReflect ¶
func (x *CheckResponse) ProtoReflect() protoreflect.Message
func (*CheckResponse) Reset ¶
func (x *CheckResponse) Reset()
func (*CheckResponse) String ¶
func (x *CheckResponse) String() string
type CreateUserInfo ¶
type CreateUserInfo struct { NickName string `protobuf:"bytes,1,opt,name=nickName,proto3" json:"nickName,omitempty"` PassWord string `protobuf:"bytes,2,opt,name=passWord,proto3" json:"passWord,omitempty"` Mobile string `protobuf:"bytes,3,opt,name=mobile,proto3" json:"mobile,omitempty"` // contains filtered or unexported fields }
func (*CreateUserInfo) Descriptor
deprecated
func (*CreateUserInfo) Descriptor() ([]byte, []int)
Deprecated: Use CreateUserInfo.ProtoReflect.Descriptor instead.
func (*CreateUserInfo) GetMobile ¶
func (x *CreateUserInfo) GetMobile() string
func (*CreateUserInfo) GetNickName ¶
func (x *CreateUserInfo) GetNickName() string
func (*CreateUserInfo) GetPassWord ¶
func (x *CreateUserInfo) GetPassWord() string
func (*CreateUserInfo) ProtoMessage ¶
func (*CreateUserInfo) ProtoMessage()
func (*CreateUserInfo) ProtoReflect ¶
func (x *CreateUserInfo) ProtoReflect() protoreflect.Message
func (*CreateUserInfo) Reset ¶
func (x *CreateUserInfo) Reset()
func (*CreateUserInfo) String ¶
func (x *CreateUserInfo) String() string
type IdRequest ¶
type IdRequest struct { Id int32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` // contains filtered or unexported fields }
func (*IdRequest) Descriptor
deprecated
func (*IdRequest) ProtoMessage ¶
func (*IdRequest) ProtoMessage()
func (*IdRequest) ProtoReflect ¶
func (x *IdRequest) ProtoReflect() protoreflect.Message
type MobileRequest ¶
type MobileRequest struct { Mobile string `protobuf:"bytes,1,opt,name=mobile,proto3" json:"mobile,omitempty"` // contains filtered or unexported fields }
func (*MobileRequest) Descriptor
deprecated
func (*MobileRequest) Descriptor() ([]byte, []int)
Deprecated: Use MobileRequest.ProtoReflect.Descriptor instead.
func (*MobileRequest) GetMobile ¶
func (x *MobileRequest) GetMobile() string
func (*MobileRequest) ProtoMessage ¶
func (*MobileRequest) ProtoMessage()
func (*MobileRequest) ProtoReflect ¶
func (x *MobileRequest) ProtoReflect() protoreflect.Message
func (*MobileRequest) Reset ¶
func (x *MobileRequest) Reset()
func (*MobileRequest) String ¶
func (x *MobileRequest) String() string
type PageInfo ¶
type PageInfo struct { Pn uint32 `protobuf:"varint,1,opt,name=pn,proto3" json:"pn,omitempty"` PSize uint32 `protobuf:"varint,2,opt,name=pSize,proto3" json:"pSize,omitempty"` // contains filtered or unexported fields }
func (*PageInfo) Descriptor
deprecated
func (*PageInfo) ProtoMessage ¶
func (*PageInfo) ProtoMessage()
func (*PageInfo) ProtoReflect ¶
func (x *PageInfo) ProtoReflect() protoreflect.Message
type PasswordCheckInfo ¶
type PasswordCheckInfo struct { Password string `protobuf:"bytes,1,opt,name=password,proto3" json:"password,omitempty"` EncryptedPassword string `protobuf:"bytes,2,opt,name=encryptedPassword,proto3" json:"encryptedPassword,omitempty"` // contains filtered or unexported fields }
func (*PasswordCheckInfo) Descriptor
deprecated
func (*PasswordCheckInfo) Descriptor() ([]byte, []int)
Deprecated: Use PasswordCheckInfo.ProtoReflect.Descriptor instead.
func (*PasswordCheckInfo) GetEncryptedPassword ¶
func (x *PasswordCheckInfo) GetEncryptedPassword() string
func (*PasswordCheckInfo) GetPassword ¶
func (x *PasswordCheckInfo) GetPassword() string
func (*PasswordCheckInfo) ProtoMessage ¶
func (*PasswordCheckInfo) ProtoMessage()
func (*PasswordCheckInfo) ProtoReflect ¶
func (x *PasswordCheckInfo) ProtoReflect() protoreflect.Message
func (*PasswordCheckInfo) Reset ¶
func (x *PasswordCheckInfo) Reset()
func (*PasswordCheckInfo) String ¶
func (x *PasswordCheckInfo) String() string
type UnimplementedUserServer ¶
type UnimplementedUserServer struct { }
UnimplementedUserServer can be embedded to have forward compatible implementations.
func (*UnimplementedUserServer) CheckPassword ¶
func (*UnimplementedUserServer) CheckPassword(context.Context, *PasswordCheckInfo) (*CheckResponse, error)
func (*UnimplementedUserServer) CreateUser ¶
func (*UnimplementedUserServer) CreateUser(context.Context, *CreateUserInfo) (*UserInfoResponse, error)
func (*UnimplementedUserServer) GetUserById ¶
func (*UnimplementedUserServer) GetUserById(context.Context, *IdRequest) (*UserInfoResponse, error)
func (*UnimplementedUserServer) GetUserByMobile ¶
func (*UnimplementedUserServer) GetUserByMobile(context.Context, *MobileRequest) (*UserInfoResponse, error)
func (*UnimplementedUserServer) GetUserList ¶
func (*UnimplementedUserServer) GetUserList(context.Context, *PageInfo) (*UserListResponse, error)
func (*UnimplementedUserServer) UpdateUser ¶
func (*UnimplementedUserServer) UpdateUser(context.Context, *UpdateUserInfo) (*emptypb.Empty, error)
type UpdateUserInfo ¶
type UpdateUserInfo struct { Id int32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` NickName string `protobuf:"bytes,2,opt,name=nickName,proto3" json:"nickName,omitempty"` Gender string `protobuf:"bytes,3,opt,name=gender,proto3" json:"gender,omitempty"` Birthday uint64 `protobuf:"varint,4,opt,name=birthday,proto3" json:"birthday,omitempty"` //timestamp // contains filtered or unexported fields }
func (*UpdateUserInfo) Descriptor
deprecated
func (*UpdateUserInfo) Descriptor() ([]byte, []int)
Deprecated: Use UpdateUserInfo.ProtoReflect.Descriptor instead.
func (*UpdateUserInfo) GetBirthday ¶
func (x *UpdateUserInfo) GetBirthday() uint64
func (*UpdateUserInfo) GetGender ¶
func (x *UpdateUserInfo) GetGender() string
func (*UpdateUserInfo) GetId ¶
func (x *UpdateUserInfo) GetId() int32
func (*UpdateUserInfo) GetNickName ¶
func (x *UpdateUserInfo) GetNickName() string
func (*UpdateUserInfo) ProtoMessage ¶
func (*UpdateUserInfo) ProtoMessage()
func (*UpdateUserInfo) ProtoReflect ¶
func (x *UpdateUserInfo) ProtoReflect() protoreflect.Message
func (*UpdateUserInfo) Reset ¶
func (x *UpdateUserInfo) Reset()
func (*UpdateUserInfo) String ¶
func (x *UpdateUserInfo) String() string
type UserClient ¶
type UserClient interface { GetUserList(ctx context.Context, in *PageInfo, opts ...grpc.CallOption) (*UserListResponse, error) GetUserByMobile(ctx context.Context, in *MobileRequest, opts ...grpc.CallOption) (*UserInfoResponse, error) GetUserById(ctx context.Context, in *IdRequest, opts ...grpc.CallOption) (*UserInfoResponse, error) CreateUser(ctx context.Context, in *CreateUserInfo, opts ...grpc.CallOption) (*UserInfoResponse, error) UpdateUser(ctx context.Context, in *UpdateUserInfo, opts ...grpc.CallOption) (*emptypb.Empty, error) CheckPassword(ctx context.Context, in *PasswordCheckInfo, opts ...grpc.CallOption) (*CheckResponse, error) }
UserClient is the client API for User service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewUserClient ¶
func NewUserClient(cc grpc.ClientConnInterface) UserClient
type UserInfoResponse ¶
type UserInfoResponse struct { Id int32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` PassWord string `protobuf:"bytes,2,opt,name=passWord,proto3" json:"passWord,omitempty"` Mobile string `protobuf:"bytes,3,opt,name=mobile,proto3" json:"mobile,omitempty"` NickName string `protobuf:"bytes,4,opt,name=nickName,proto3" json:"nickName,omitempty"` BirthDay uint64 `protobuf:"varint,5,opt,name=birthDay,proto3" json:"birthDay,omitempty"` Gender string `protobuf:"bytes,6,opt,name=gender,proto3" json:"gender,omitempty"` Role int32 `protobuf:"varint,7,opt,name=role,proto3" json:"role,omitempty"` // contains filtered or unexported fields }
func (*UserInfoResponse) Descriptor
deprecated
func (*UserInfoResponse) Descriptor() ([]byte, []int)
Deprecated: Use UserInfoResponse.ProtoReflect.Descriptor instead.
func (*UserInfoResponse) GetBirthDay ¶
func (x *UserInfoResponse) GetBirthDay() uint64
func (*UserInfoResponse) GetGender ¶
func (x *UserInfoResponse) GetGender() string
func (*UserInfoResponse) GetId ¶
func (x *UserInfoResponse) GetId() int32
func (*UserInfoResponse) GetMobile ¶
func (x *UserInfoResponse) GetMobile() string
func (*UserInfoResponse) GetNickName ¶
func (x *UserInfoResponse) GetNickName() string
func (*UserInfoResponse) GetPassWord ¶
func (x *UserInfoResponse) GetPassWord() string
func (*UserInfoResponse) GetRole ¶
func (x *UserInfoResponse) GetRole() int32
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 UserListResponse ¶
type UserListResponse struct { Data []*UserInfoResponse `protobuf:"bytes,1,rep,name=data,proto3" json:"data,omitempty"` Total int32 `protobuf:"varint,2,opt,name=total,proto3" json:"total,omitempty"` // contains filtered or unexported fields }
func (*UserListResponse) Descriptor
deprecated
func (*UserListResponse) Descriptor() ([]byte, []int)
Deprecated: Use UserListResponse.ProtoReflect.Descriptor instead.
func (*UserListResponse) GetData ¶
func (x *UserListResponse) GetData() []*UserInfoResponse
func (*UserListResponse) GetTotal ¶
func (x *UserListResponse) GetTotal() int32
func (*UserListResponse) ProtoMessage ¶
func (*UserListResponse) ProtoMessage()
func (*UserListResponse) ProtoReflect ¶
func (x *UserListResponse) ProtoReflect() protoreflect.Message
func (*UserListResponse) Reset ¶
func (x *UserListResponse) Reset()
func (*UserListResponse) String ¶
func (x *UserListResponse) String() string
type UserServer ¶
type UserServer interface { GetUserList(context.Context, *PageInfo) (*UserListResponse, error) GetUserByMobile(context.Context, *MobileRequest) (*UserInfoResponse, error) GetUserById(context.Context, *IdRequest) (*UserInfoResponse, error) CreateUser(context.Context, *CreateUserInfo) (*UserInfoResponse, error) UpdateUser(context.Context, *UpdateUserInfo) (*emptypb.Empty, error) CheckPassword(context.Context, *PasswordCheckInfo) (*CheckResponse, error) }
UserServer is the server API for User service.