Documentation ¶
Index ¶
- Variables
- func RegisterUserServer(s grpc.ServiceRegistrar, srv UserServer)
- type CheckResponse
- type CreateUserRequest
- func (*CreateUserRequest) Descriptor() ([]byte, []int)deprecated
- func (x *CreateUserRequest) GetMobile() *wrapperspb.StringValue
- func (x *CreateUserRequest) GetNickName() *wrapperspb.StringValue
- func (x *CreateUserRequest) GetPasswd() *wrapperspb.StringValue
- func (*CreateUserRequest) ProtoMessage()
- func (x *CreateUserRequest) ProtoReflect() protoreflect.Message
- func (x *CreateUserRequest) Reset()
- func (x *CreateUserRequest) String() string
- type IdRequest
- type MobileRequest
- type PageInfo
- type PasswordCheckRequest
- func (*PasswordCheckRequest) Descriptor() ([]byte, []int)deprecated
- func (x *PasswordCheckRequest) GetId() *wrapperspb.Int64Value
- func (x *PasswordCheckRequest) GetPassword() *wrapperspb.StringValue
- func (*PasswordCheckRequest) ProtoMessage()
- func (x *PasswordCheckRequest) ProtoReflect() protoreflect.Message
- func (x *PasswordCheckRequest) Reset()
- func (x *PasswordCheckRequest) String() string
- type UnimplementedUserServer
- func (UnimplementedUserServer) CheckPassWord(context.Context, *PasswordCheckRequest) (*CheckResponse, error)
- func (UnimplementedUserServer) CreateUser(context.Context, *CreateUserRequest) (*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, *UpdateUserRequest) (*emptypb.Empty, error)
- type UnsafeUserServer
- type UpdateUserRequest
- func (*UpdateUserRequest) Descriptor() ([]byte, []int)deprecated
- func (x *UpdateUserRequest) GetBirthday() *timestamppb.Timestamp
- func (x *UpdateUserRequest) GetGender() *wrapperspb.BoolValue
- func (x *UpdateUserRequest) GetId() *wrapperspb.Int64Value
- func (x *UpdateUserRequest) GetNickName() *wrapperspb.StringValue
- func (*UpdateUserRequest) ProtoMessage()
- func (x *UpdateUserRequest) ProtoReflect() protoreflect.Message
- func (x *UpdateUserRequest) Reset()
- func (x *UpdateUserRequest) String() string
- type UserClient
- type UserInfoResponse
- func (*UserInfoResponse) Descriptor() ([]byte, []int)deprecated
- func (x *UserInfoResponse) GetBirthday() *timestamppb.Timestamp
- func (x *UserInfoResponse) GetGender() *wrapperspb.BoolValue
- func (x *UserInfoResponse) GetId() *wrapperspb.Int64Value
- func (x *UserInfoResponse) GetMobile() *wrapperspb.StringValue
- func (x *UserInfoResponse) GetNickName() *wrapperspb.StringValue
- func (x *UserInfoResponse) GetRoleId() *wrapperspb.Int64Value
- 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) GetCount() int32
- func (x *UserListResponse) GetData() []*UserInfoResponse
- 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
var User_ServiceDesc = grpc.ServiceDesc{ ServiceName: "User", HandlerType: (*UserServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "GetUserByMobile", Handler: _User_GetUserByMobile_Handler, }, { MethodName: "GetUserById", Handler: _User_GetUserById_Handler, }, { MethodName: "GetUserList", Handler: _User_GetUserList_Handler, }, { MethodName: "CreateUser", Handler: _User_CreateUser_Handler, }, { MethodName: "UpdateUser", Handler: _User_UpdateUser_Handler, }, { MethodName: "CheckPassWord", Handler: _User_CheckPassWord_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 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 CreateUserRequest ¶
type CreateUserRequest struct { Mobile *wrapperspb.StringValue `protobuf:"bytes,1,opt,name=mobile,proto3" json:"mobile,omitempty"` Passwd *wrapperspb.StringValue `protobuf:"bytes,2,opt,name=passwd,proto3" json:"passwd,omitempty"` NickName *wrapperspb.StringValue `protobuf:"bytes,3,opt,name=nickName,proto3" json:"nickName,omitempty"` // contains filtered or unexported fields }
func (*CreateUserRequest) Descriptor
deprecated
func (*CreateUserRequest) Descriptor() ([]byte, []int)
Deprecated: Use CreateUserRequest.ProtoReflect.Descriptor instead.
func (*CreateUserRequest) GetMobile ¶
func (x *CreateUserRequest) GetMobile() *wrapperspb.StringValue
func (*CreateUserRequest) GetNickName ¶
func (x *CreateUserRequest) GetNickName() *wrapperspb.StringValue
func (*CreateUserRequest) GetPasswd ¶
func (x *CreateUserRequest) GetPasswd() *wrapperspb.StringValue
func (*CreateUserRequest) ProtoMessage ¶
func (*CreateUserRequest) ProtoMessage()
func (*CreateUserRequest) ProtoReflect ¶
func (x *CreateUserRequest) ProtoReflect() protoreflect.Message
func (*CreateUserRequest) Reset ¶
func (x *CreateUserRequest) Reset()
func (*CreateUserRequest) String ¶
func (x *CreateUserRequest) String() string
type IdRequest ¶
type IdRequest struct { Id *wrapperspb.Int64Value `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // contains filtered or unexported fields }
func (*IdRequest) Descriptor
deprecated
func (*IdRequest) GetId ¶
func (x *IdRequest) GetId() *wrapperspb.Int64Value
func (*IdRequest) ProtoMessage ¶
func (*IdRequest) ProtoMessage()
func (*IdRequest) ProtoReflect ¶
func (x *IdRequest) ProtoReflect() protoreflect.Message
type MobileRequest ¶
type MobileRequest struct { Mobile *wrapperspb.StringValue `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() *wrapperspb.StringValue
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 int32 `protobuf:"varint,1,opt,name=pn,proto3" json:"pn,omitempty"` PSize int32 `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 PasswordCheckRequest ¶
type PasswordCheckRequest struct { Password *wrapperspb.StringValue `protobuf:"bytes,1,opt,name=password,proto3" json:"password,omitempty"` Id *wrapperspb.Int64Value `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"` // contains filtered or unexported fields }
func (*PasswordCheckRequest) Descriptor
deprecated
func (*PasswordCheckRequest) Descriptor() ([]byte, []int)
Deprecated: Use PasswordCheckRequest.ProtoReflect.Descriptor instead.
func (*PasswordCheckRequest) GetId ¶
func (x *PasswordCheckRequest) GetId() *wrapperspb.Int64Value
func (*PasswordCheckRequest) GetPassword ¶
func (x *PasswordCheckRequest) GetPassword() *wrapperspb.StringValue
func (*PasswordCheckRequest) ProtoMessage ¶
func (*PasswordCheckRequest) ProtoMessage()
func (*PasswordCheckRequest) ProtoReflect ¶
func (x *PasswordCheckRequest) ProtoReflect() protoreflect.Message
func (*PasswordCheckRequest) Reset ¶
func (x *PasswordCheckRequest) Reset()
func (*PasswordCheckRequest) String ¶
func (x *PasswordCheckRequest) String() string
type UnimplementedUserServer ¶
type UnimplementedUserServer struct { }
UnimplementedUserServer must be embedded to have forward compatible implementations.
func (UnimplementedUserServer) CheckPassWord ¶
func (UnimplementedUserServer) CheckPassWord(context.Context, *PasswordCheckRequest) (*CheckResponse, error)
func (UnimplementedUserServer) CreateUser ¶
func (UnimplementedUserServer) CreateUser(context.Context, *CreateUserRequest) (*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, *UpdateUserRequest) (*emptypb.Empty, 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 UpdateUserRequest ¶
type UpdateUserRequest struct { Id *wrapperspb.Int64Value `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` NickName *wrapperspb.StringValue `protobuf:"bytes,2,opt,name=nickName,proto3" json:"nickName,omitempty"` Birthday *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=birthday,proto3" json:"birthday,omitempty"` Gender *wrapperspb.BoolValue `protobuf:"bytes,4,opt,name=gender,proto3" json:"gender,omitempty"` // contains filtered or unexported fields }
func (*UpdateUserRequest) Descriptor
deprecated
func (*UpdateUserRequest) Descriptor() ([]byte, []int)
Deprecated: Use UpdateUserRequest.ProtoReflect.Descriptor instead.
func (*UpdateUserRequest) GetBirthday ¶
func (x *UpdateUserRequest) GetBirthday() *timestamppb.Timestamp
func (*UpdateUserRequest) GetGender ¶
func (x *UpdateUserRequest) GetGender() *wrapperspb.BoolValue
func (*UpdateUserRequest) GetId ¶
func (x *UpdateUserRequest) GetId() *wrapperspb.Int64Value
func (*UpdateUserRequest) GetNickName ¶
func (x *UpdateUserRequest) GetNickName() *wrapperspb.StringValue
func (*UpdateUserRequest) ProtoMessage ¶
func (*UpdateUserRequest) ProtoMessage()
func (*UpdateUserRequest) ProtoReflect ¶
func (x *UpdateUserRequest) ProtoReflect() protoreflect.Message
func (*UpdateUserRequest) Reset ¶
func (x *UpdateUserRequest) Reset()
func (*UpdateUserRequest) String ¶
func (x *UpdateUserRequest) String() string
type UserClient ¶
type UserClient interface { GetUserByMobile(ctx context.Context, in *MobileRequest, opts ...grpc.CallOption) (*UserInfoResponse, error) GetUserById(ctx context.Context, in *IdRequest, opts ...grpc.CallOption) (*UserInfoResponse, error) GetUserList(ctx context.Context, in *PageInfo, opts ...grpc.CallOption) (*UserListResponse, error) CreateUser(ctx context.Context, in *CreateUserRequest, opts ...grpc.CallOption) (*UserInfoResponse, error) UpdateUser(ctx context.Context, in *UpdateUserRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) CheckPassWord(ctx context.Context, in *PasswordCheckRequest, 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://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
func NewUserClient ¶
func NewUserClient(cc grpc.ClientConnInterface) UserClient
type UserInfoResponse ¶
type UserInfoResponse struct { Id *wrapperspb.Int64Value `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` Mobile *wrapperspb.StringValue `protobuf:"bytes,2,opt,name=mobile,proto3" json:"mobile,omitempty"` NickName *wrapperspb.StringValue `protobuf:"bytes,3,opt,name=nickName,proto3" json:"nickName,omitempty"` Birthday *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=birthday,proto3" json:"birthday,omitempty"` Gender *wrapperspb.BoolValue `protobuf:"bytes,5,opt,name=gender,proto3" json:"gender,omitempty"` RoleId *wrapperspb.Int64Value `protobuf:"bytes,6,opt,name=roleId,proto3" json:"roleId,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() *timestamppb.Timestamp
func (*UserInfoResponse) GetGender ¶
func (x *UserInfoResponse) GetGender() *wrapperspb.BoolValue
func (*UserInfoResponse) GetId ¶
func (x *UserInfoResponse) GetId() *wrapperspb.Int64Value
func (*UserInfoResponse) GetMobile ¶
func (x *UserInfoResponse) GetMobile() *wrapperspb.StringValue
func (*UserInfoResponse) GetNickName ¶
func (x *UserInfoResponse) GetNickName() *wrapperspb.StringValue
func (*UserInfoResponse) GetRoleId ¶
func (x *UserInfoResponse) GetRoleId() *wrapperspb.Int64Value
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 { Count int32 `protobuf:"varint,1,opt,name=count,proto3" json:"count,omitempty"` Data []*UserInfoResponse `protobuf:"bytes,2,rep,name=data,proto3" json:"data,omitempty"` // contains filtered or unexported fields }
func (*UserListResponse) Descriptor
deprecated
func (*UserListResponse) Descriptor() ([]byte, []int)
Deprecated: Use UserListResponse.ProtoReflect.Descriptor instead.
func (*UserListResponse) GetCount ¶
func (x *UserListResponse) GetCount() int32
func (*UserListResponse) GetData ¶
func (x *UserListResponse) GetData() []*UserInfoResponse
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 { GetUserByMobile(context.Context, *MobileRequest) (*UserInfoResponse, error) GetUserById(context.Context, *IdRequest) (*UserInfoResponse, error) GetUserList(context.Context, *PageInfo) (*UserListResponse, error) CreateUser(context.Context, *CreateUserRequest) (*UserInfoResponse, error) UpdateUser(context.Context, *UpdateUserRequest) (*emptypb.Empty, error) CheckPassWord(context.Context, *PasswordCheckRequest) (*CheckResponse, error) // contains filtered or unexported methods }
UserServer is the server API for User service. All implementations must embed UnimplementedUserServer for forward compatibility