Documentation ¶
Index ¶
- Variables
- func RegisterUserServiceServer(s grpc.ServiceRegistrar, srv UserServiceServer)
- type BatchGetUsersReply
- func (*BatchGetUsersReply) Descriptor() ([]byte, []int)deprecated
- func (x *BatchGetUsersReply) GetUsers() []*User
- func (*BatchGetUsersReply) ProtoMessage()
- func (x *BatchGetUsersReply) ProtoReflect() protoreflect.Message
- func (x *BatchGetUsersReply) Reset()
- func (x *BatchGetUsersReply) String() string
- type BatchGetUsersRequest
- func (*BatchGetUsersRequest) Descriptor() ([]byte, []int)deprecated
- func (x *BatchGetUsersRequest) GetIds() []int64
- func (*BatchGetUsersRequest) ProtoMessage()
- func (x *BatchGetUsersRequest) ProtoReflect() protoreflect.Message
- func (x *BatchGetUsersRequest) Reset()
- func (x *BatchGetUsersRequest) String() string
- type CreateUserReply
- func (*CreateUserReply) Descriptor() ([]byte, []int)deprecated
- func (x *CreateUserReply) GetEmail() string
- func (x *CreateUserReply) GetId() int64
- func (x *CreateUserReply) GetUsername() string
- func (*CreateUserReply) ProtoMessage()
- func (x *CreateUserReply) ProtoReflect() protoreflect.Message
- func (x *CreateUserReply) Reset()
- func (x *CreateUserReply) String() string
- type CreateUserRequest
- func (*CreateUserRequest) Descriptor() ([]byte, []int)deprecated
- func (x *CreateUserRequest) GetEmail() string
- func (x *CreateUserRequest) GetPassword() string
- func (x *CreateUserRequest) GetUsername() string
- func (*CreateUserRequest) ProtoMessage()
- func (x *CreateUserRequest) ProtoReflect() protoreflect.Message
- func (x *CreateUserRequest) Reset()
- func (x *CreateUserRequest) String() string
- type GenderType
- type GetUserReply
- type GetUserRequest
- type LoginReply
- type LoginRequest
- func (*LoginRequest) Descriptor() ([]byte, []int)deprecated
- func (x *LoginRequest) GetEmail() string
- func (x *LoginRequest) GetPassword() string
- func (x *LoginRequest) GetUsername() string
- func (*LoginRequest) ProtoMessage()
- func (x *LoginRequest) ProtoReflect() protoreflect.Message
- func (x *LoginRequest) Reset()
- func (x *LoginRequest) String() string
- type LogoutRequest
- func (*LogoutRequest) Descriptor() ([]byte, []int)deprecated
- func (x *LogoutRequest) GetId() int64
- func (x *LogoutRequest) GetToken() string
- func (*LogoutRequest) ProtoMessage()
- func (x *LogoutRequest) ProtoReflect() protoreflect.Message
- func (x *LogoutRequest) Reset()
- func (x *LogoutRequest) String() string
- type RegisterReply
- func (*RegisterReply) Descriptor() ([]byte, []int)deprecated
- func (x *RegisterReply) GetId() int64
- func (x *RegisterReply) GetUsername() string
- func (*RegisterReply) ProtoMessage()
- func (x *RegisterReply) ProtoReflect() protoreflect.Message
- func (x *RegisterReply) Reset()
- func (x *RegisterReply) String() string
- type RegisterRequest
- func (*RegisterRequest) Descriptor() ([]byte, []int)deprecated
- func (x *RegisterRequest) GetEmail() string
- func (x *RegisterRequest) GetPassword() string
- func (x *RegisterRequest) GetUsername() string
- func (*RegisterRequest) ProtoMessage()
- func (x *RegisterRequest) ProtoReflect() protoreflect.Message
- func (x *RegisterRequest) Reset()
- func (x *RegisterRequest) String() string
- type StatusType
- type UnimplementedUserServiceServer
- func (UnimplementedUserServiceServer) BatchGetUsers(context.Context, *BatchGetUsersRequest) (*BatchGetUsersReply, error)
- func (UnimplementedUserServiceServer) CreateUser(context.Context, *CreateUserRequest) (*CreateUserReply, error)
- func (UnimplementedUserServiceServer) GetUser(context.Context, *GetUserRequest) (*GetUserReply, error)
- func (UnimplementedUserServiceServer) Login(context.Context, *LoginRequest) (*LoginReply, error)
- func (UnimplementedUserServiceServer) Logout(context.Context, *LogoutRequest) (*emptypb.Empty, error)
- func (UnimplementedUserServiceServer) Register(context.Context, *RegisterRequest) (*RegisterReply, error)
- func (UnimplementedUserServiceServer) UpdatePassword(context.Context, *UpdatePasswordRequest) (*UpdatePasswordReply, error)
- func (UnimplementedUserServiceServer) UpdateUser(context.Context, *UpdateUserRequest) (*UpdateUserReply, error)
- type UnsafeUserServiceServer
- type UpdatePasswordReply
- type UpdatePasswordRequest
- func (*UpdatePasswordRequest) Descriptor() ([]byte, []int)deprecated
- func (x *UpdatePasswordRequest) GetConfirmPassword() string
- func (x *UpdatePasswordRequest) GetId() string
- func (x *UpdatePasswordRequest) GetNewPassword() string
- func (x *UpdatePasswordRequest) GetOldPassword() string
- func (*UpdatePasswordRequest) ProtoMessage()
- func (x *UpdatePasswordRequest) ProtoReflect() protoreflect.Message
- func (x *UpdatePasswordRequest) Reset()
- func (x *UpdatePasswordRequest) String() string
- type UpdateUserReply
- func (*UpdateUserReply) Descriptor() ([]byte, []int)deprecated
- func (x *UpdateUserReply) GetAvatar() string
- func (x *UpdateUserReply) GetBio() string
- func (x *UpdateUserReply) GetBirthday() string
- func (x *UpdateUserReply) GetEmail() string
- func (x *UpdateUserReply) GetGender() GenderType
- func (x *UpdateUserReply) GetLoginAt() int64
- func (x *UpdateUserReply) GetNickname() string
- func (x *UpdateUserReply) GetPhone() string
- func (x *UpdateUserReply) GetStatus() StatusType
- func (x *UpdateUserReply) GetUpdatedAt() int64
- func (x *UpdateUserReply) GetUserId() int64
- func (x *UpdateUserReply) GetUsername() string
- func (*UpdateUserReply) ProtoMessage()
- func (x *UpdateUserReply) ProtoReflect() protoreflect.Message
- func (x *UpdateUserReply) Reset()
- func (x *UpdateUserReply) String() string
- type UpdateUserRequest
- func (*UpdateUserRequest) Descriptor() ([]byte, []int)deprecated
- func (x *UpdateUserRequest) GetAvatar() string
- func (x *UpdateUserRequest) GetBio() string
- func (x *UpdateUserRequest) GetBirthday() string
- func (x *UpdateUserRequest) GetEmail() string
- func (x *UpdateUserRequest) GetGender() GenderType
- func (x *UpdateUserRequest) GetLoginAt() int64
- func (x *UpdateUserRequest) GetNickname() string
- func (x *UpdateUserRequest) GetPhone() string
- func (x *UpdateUserRequest) GetStatus() StatusType
- func (x *UpdateUserRequest) GetUpdatedAt() int64
- func (x *UpdateUserRequest) GetUserId() int64
- func (x *UpdateUserRequest) GetUsername() string
- func (*UpdateUserRequest) ProtoMessage()
- func (x *UpdateUserRequest) ProtoReflect() protoreflect.Message
- func (x *UpdateUserRequest) Reset()
- func (x *UpdateUserRequest) String() string
- type User
- func (*User) Descriptor() ([]byte, []int)deprecated
- func (x *User) GetAvatar() string
- func (x *User) GetBio() string
- func (x *User) GetBirthday() string
- func (x *User) GetCreatedAt() int64
- func (x *User) GetEmail() string
- func (x *User) GetGender() GenderType
- func (x *User) GetId() int64
- func (x *User) GetLoginAt() int64
- func (x *User) GetNickname() string
- func (x *User) GetPhone() string
- func (x *User) GetStatus() StatusType
- func (x *User) GetUpdatedAt() int64
- func (x *User) GetUsername() string
- func (*User) ProtoMessage()
- func (x *User) ProtoReflect() protoreflect.Message
- func (x *User) Reset()
- func (x *User) String() string
- type UserServiceClient
- type UserServiceServer
Constants ¶
This section is empty.
Variables ¶
var ( StatusType_name = map[int32]string{ 0: "NORMAL", 1: "DELETE", 2: "Ban", } StatusType_value = map[string]int32{ "NORMAL": 0, "DELETE": 1, "Ban": 2, } )
Enum value maps for StatusType.
var ( GenderType_name = map[int32]string{ 0: "UNKNOWN", 1: "MALE", 2: "FEMALE", } GenderType_value = map[string]int32{ "UNKNOWN": 0, "MALE": 1, "FEMALE": 2, } )
Enum value maps for GenderType.
var File_api_proto_user_proto protoreflect.FileDescriptor
var UserService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "proto.UserService", HandlerType: (*UserServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Register", Handler: _UserService_Register_Handler, }, { MethodName: "Login", Handler: _UserService_Login_Handler, }, { MethodName: "Logout", Handler: _UserService_Logout_Handler, }, { MethodName: "CreateUser", Handler: _UserService_CreateUser_Handler, }, { MethodName: "GetUser", Handler: _UserService_GetUser_Handler, }, { MethodName: "BatchGetUsers", Handler: _UserService_BatchGetUsers_Handler, }, { MethodName: "UpdateUser", Handler: _UserService_UpdateUser_Handler, }, { MethodName: "UpdatePassword", Handler: _UserService_UpdatePassword_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "api/proto/user.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 BatchGetUsersReply ¶
type BatchGetUsersReply struct { Users []*User `protobuf:"bytes,1,rep,name=users,proto3" json:"users,omitempty"` // contains filtered or unexported fields }
func (*BatchGetUsersReply) Descriptor
deprecated
func (*BatchGetUsersReply) Descriptor() ([]byte, []int)
Deprecated: Use BatchGetUsersReply.ProtoReflect.Descriptor instead.
func (*BatchGetUsersReply) GetUsers ¶
func (x *BatchGetUsersReply) GetUsers() []*User
func (*BatchGetUsersReply) ProtoMessage ¶
func (*BatchGetUsersReply) ProtoMessage()
func (*BatchGetUsersReply) ProtoReflect ¶
func (x *BatchGetUsersReply) ProtoReflect() protoreflect.Message
func (*BatchGetUsersReply) Reset ¶
func (x *BatchGetUsersReply) Reset()
func (*BatchGetUsersReply) String ¶
func (x *BatchGetUsersReply) String() string
type BatchGetUsersRequest ¶
type BatchGetUsersRequest struct { Ids []int64 `protobuf:"varint,1,rep,packed,name=ids,proto3" json:"ids,omitempty"` // contains filtered or unexported fields }
func (*BatchGetUsersRequest) Descriptor
deprecated
func (*BatchGetUsersRequest) Descriptor() ([]byte, []int)
Deprecated: Use BatchGetUsersRequest.ProtoReflect.Descriptor instead.
func (*BatchGetUsersRequest) GetIds ¶
func (x *BatchGetUsersRequest) GetIds() []int64
func (*BatchGetUsersRequest) ProtoMessage ¶
func (*BatchGetUsersRequest) ProtoMessage()
func (*BatchGetUsersRequest) ProtoReflect ¶
func (x *BatchGetUsersRequest) ProtoReflect() protoreflect.Message
func (*BatchGetUsersRequest) Reset ¶
func (x *BatchGetUsersRequest) Reset()
func (*BatchGetUsersRequest) String ¶
func (x *BatchGetUsersRequest) String() string
type CreateUserReply ¶
type CreateUserReply struct { Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` Username string `protobuf:"bytes,2,opt,name=username,proto3" json:"username,omitempty"` Email string `protobuf:"bytes,3,opt,name=email,proto3" json:"email,omitempty"` // contains filtered or unexported fields }
func (*CreateUserReply) Descriptor
deprecated
func (*CreateUserReply) Descriptor() ([]byte, []int)
Deprecated: Use CreateUserReply.ProtoReflect.Descriptor instead.
func (*CreateUserReply) GetEmail ¶
func (x *CreateUserReply) GetEmail() string
func (*CreateUserReply) GetId ¶
func (x *CreateUserReply) GetId() int64
func (*CreateUserReply) GetUsername ¶
func (x *CreateUserReply) GetUsername() string
func (*CreateUserReply) ProtoMessage ¶
func (*CreateUserReply) ProtoMessage()
func (*CreateUserReply) ProtoReflect ¶
func (x *CreateUserReply) ProtoReflect() protoreflect.Message
func (*CreateUserReply) Reset ¶
func (x *CreateUserReply) Reset()
func (*CreateUserReply) String ¶
func (x *CreateUserReply) String() string
type CreateUserRequest ¶
type CreateUserRequest struct { Username string `protobuf:"bytes,1,opt,name=username,proto3" json:"username,omitempty"` Email string `protobuf:"bytes,2,opt,name=email,proto3" json:"email,omitempty"` Password string `protobuf:"bytes,3,opt,name=password,proto3" json:"password,omitempty"` // contains filtered or unexported fields }
func (*CreateUserRequest) Descriptor
deprecated
func (*CreateUserRequest) Descriptor() ([]byte, []int)
Deprecated: Use CreateUserRequest.ProtoReflect.Descriptor instead.
func (*CreateUserRequest) GetEmail ¶
func (x *CreateUserRequest) GetEmail() string
func (*CreateUserRequest) GetPassword ¶
func (x *CreateUserRequest) GetPassword() string
func (*CreateUserRequest) GetUsername ¶
func (x *CreateUserRequest) GetUsername() string
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 GenderType ¶
type GenderType int32
const ( GenderType_UNKNOWN GenderType = 0 GenderType_MALE GenderType = 1 GenderType_FEMALE 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 ¶
func (GenderType) Type() protoreflect.EnumType
type GetUserReply ¶
type GetUserReply struct { User *User `protobuf:"bytes,1,opt,name=user,proto3" json:"user,omitempty"` // contains filtered or unexported fields }
func (*GetUserReply) Descriptor
deprecated
func (*GetUserReply) Descriptor() ([]byte, []int)
Deprecated: Use GetUserReply.ProtoReflect.Descriptor instead.
func (*GetUserReply) GetUser ¶
func (x *GetUserReply) GetUser() *User
func (*GetUserReply) ProtoMessage ¶
func (*GetUserReply) ProtoMessage()
func (*GetUserReply) ProtoReflect ¶
func (x *GetUserReply) ProtoReflect() protoreflect.Message
func (*GetUserReply) Reset ¶
func (x *GetUserReply) Reset()
func (*GetUserReply) String ¶
func (x *GetUserReply) String() string
type GetUserRequest ¶
type GetUserRequest struct { Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` // contains filtered or unexported fields }
func (*GetUserRequest) Descriptor
deprecated
func (*GetUserRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetUserRequest.ProtoReflect.Descriptor instead.
func (*GetUserRequest) GetId ¶
func (x *GetUserRequest) GetId() int64
func (*GetUserRequest) ProtoMessage ¶
func (*GetUserRequest) ProtoMessage()
func (*GetUserRequest) ProtoReflect ¶
func (x *GetUserRequest) ProtoReflect() protoreflect.Message
func (*GetUserRequest) Reset ¶
func (x *GetUserRequest) Reset()
func (*GetUserRequest) String ¶
func (x *GetUserRequest) String() string
type LoginReply ¶
type LoginReply struct { Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` Token string `protobuf:"bytes,2,opt,name=token,proto3" json:"token,omitempty"` // contains filtered or unexported fields }
func (*LoginReply) Descriptor
deprecated
func (*LoginReply) Descriptor() ([]byte, []int)
Deprecated: Use LoginReply.ProtoReflect.Descriptor instead.
func (*LoginReply) GetId ¶
func (x *LoginReply) GetId() int64
func (*LoginReply) GetToken ¶
func (x *LoginReply) GetToken() string
func (*LoginReply) ProtoMessage ¶
func (*LoginReply) ProtoMessage()
func (*LoginReply) ProtoReflect ¶
func (x *LoginReply) ProtoReflect() protoreflect.Message
func (*LoginReply) Reset ¶
func (x *LoginReply) Reset()
func (*LoginReply) String ¶
func (x *LoginReply) String() string
type LoginRequest ¶
type LoginRequest struct { Username string `protobuf:"bytes,1,opt,name=username,proto3" json:"username,omitempty"` Email string `protobuf:"bytes,2,opt,name=email,proto3" json:"email,omitempty"` Password string `protobuf:"bytes,3,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) GetUsername ¶
func (x *LoginRequest) GetUsername() 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 LogoutRequest ¶
type LogoutRequest struct { Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` Token string `protobuf:"bytes,2,opt,name=token,proto3" json:"token,omitempty"` // contains filtered or unexported fields }
func (*LogoutRequest) Descriptor
deprecated
func (*LogoutRequest) Descriptor() ([]byte, []int)
Deprecated: Use LogoutRequest.ProtoReflect.Descriptor instead.
func (*LogoutRequest) GetId ¶
func (x *LogoutRequest) GetId() int64
func (*LogoutRequest) GetToken ¶
func (x *LogoutRequest) GetToken() string
func (*LogoutRequest) ProtoMessage ¶
func (*LogoutRequest) ProtoMessage()
func (*LogoutRequest) ProtoReflect ¶
func (x *LogoutRequest) ProtoReflect() protoreflect.Message
func (*LogoutRequest) Reset ¶
func (x *LogoutRequest) Reset()
func (*LogoutRequest) String ¶
func (x *LogoutRequest) String() string
type RegisterReply ¶
type RegisterReply struct { Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` Username string `protobuf:"bytes,2,opt,name=username,proto3" json:"username,omitempty"` // contains filtered or unexported fields }
func (*RegisterReply) Descriptor
deprecated
func (*RegisterReply) Descriptor() ([]byte, []int)
Deprecated: Use RegisterReply.ProtoReflect.Descriptor instead.
func (*RegisterReply) GetId ¶
func (x *RegisterReply) GetId() int64
func (*RegisterReply) GetUsername ¶
func (x *RegisterReply) GetUsername() string
func (*RegisterReply) ProtoMessage ¶
func (*RegisterReply) ProtoMessage()
func (*RegisterReply) ProtoReflect ¶
func (x *RegisterReply) ProtoReflect() protoreflect.Message
func (*RegisterReply) Reset ¶
func (x *RegisterReply) Reset()
func (*RegisterReply) String ¶
func (x *RegisterReply) String() string
type RegisterRequest ¶
type RegisterRequest struct { Username string `protobuf:"bytes,1,opt,name=username,proto3" json:"username,omitempty"` Email string `protobuf:"bytes,2,opt,name=email,proto3" json:"email,omitempty"` Password string `protobuf:"bytes,3,opt,name=password,proto3" json:"password,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) GetPassword ¶
func (x *RegisterRequest) GetPassword() string
func (*RegisterRequest) GetUsername ¶
func (x *RegisterRequest) GetUsername() 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 StatusType ¶
type StatusType int32
const ( StatusType_NORMAL StatusType = 0 StatusType_DELETE StatusType = 1 StatusType_Ban StatusType = 2 )
func (StatusType) Descriptor ¶
func (StatusType) Descriptor() protoreflect.EnumDescriptor
func (StatusType) Enum ¶
func (x StatusType) Enum() *StatusType
func (StatusType) EnumDescriptor
deprecated
func (StatusType) EnumDescriptor() ([]byte, []int)
Deprecated: Use StatusType.Descriptor instead.
func (StatusType) Number ¶
func (x StatusType) Number() protoreflect.EnumNumber
func (StatusType) String ¶
func (x StatusType) String() string
func (StatusType) Type ¶
func (StatusType) Type() protoreflect.EnumType
type UnimplementedUserServiceServer ¶
type UnimplementedUserServiceServer struct { }
UnimplementedUserServiceServer must be embedded to have forward compatible implementations.
func (UnimplementedUserServiceServer) BatchGetUsers ¶
func (UnimplementedUserServiceServer) BatchGetUsers(context.Context, *BatchGetUsersRequest) (*BatchGetUsersReply, error)
func (UnimplementedUserServiceServer) CreateUser ¶
func (UnimplementedUserServiceServer) CreateUser(context.Context, *CreateUserRequest) (*CreateUserReply, error)
func (UnimplementedUserServiceServer) GetUser ¶
func (UnimplementedUserServiceServer) GetUser(context.Context, *GetUserRequest) (*GetUserReply, error)
func (UnimplementedUserServiceServer) Login ¶
func (UnimplementedUserServiceServer) Login(context.Context, *LoginRequest) (*LoginReply, error)
func (UnimplementedUserServiceServer) Logout ¶
func (UnimplementedUserServiceServer) Logout(context.Context, *LogoutRequest) (*emptypb.Empty, error)
func (UnimplementedUserServiceServer) Register ¶
func (UnimplementedUserServiceServer) Register(context.Context, *RegisterRequest) (*RegisterReply, error)
func (UnimplementedUserServiceServer) UpdatePassword ¶
func (UnimplementedUserServiceServer) UpdatePassword(context.Context, *UpdatePasswordRequest) (*UpdatePasswordReply, error)
func (UnimplementedUserServiceServer) UpdateUser ¶
func (UnimplementedUserServiceServer) UpdateUser(context.Context, *UpdateUserRequest) (*UpdateUserReply, error)
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 UpdatePasswordReply ¶
type UpdatePasswordReply struct {
// contains filtered or unexported fields
}
func (*UpdatePasswordReply) Descriptor
deprecated
func (*UpdatePasswordReply) Descriptor() ([]byte, []int)
Deprecated: Use UpdatePasswordReply.ProtoReflect.Descriptor instead.
func (*UpdatePasswordReply) ProtoMessage ¶
func (*UpdatePasswordReply) ProtoMessage()
func (*UpdatePasswordReply) ProtoReflect ¶
func (x *UpdatePasswordReply) ProtoReflect() protoreflect.Message
func (*UpdatePasswordReply) Reset ¶
func (x *UpdatePasswordReply) Reset()
func (*UpdatePasswordReply) String ¶
func (x *UpdatePasswordReply) String() string
type UpdatePasswordRequest ¶
type UpdatePasswordRequest struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` OldPassword string `protobuf:"bytes,2,opt,name=old_password,json=oldPassword,proto3" json:"old_password,omitempty"` NewPassword string `protobuf:"bytes,3,opt,name=new_password,json=newPassword,proto3" json:"new_password,omitempty"` ConfirmPassword string `protobuf:"bytes,4,opt,name=confirm_password,json=confirmPassword,proto3" json:"confirm_password,omitempty"` // contains filtered or unexported fields }
func (*UpdatePasswordRequest) Descriptor
deprecated
func (*UpdatePasswordRequest) Descriptor() ([]byte, []int)
Deprecated: Use UpdatePasswordRequest.ProtoReflect.Descriptor instead.
func (*UpdatePasswordRequest) GetConfirmPassword ¶
func (x *UpdatePasswordRequest) GetConfirmPassword() string
func (*UpdatePasswordRequest) GetId ¶
func (x *UpdatePasswordRequest) GetId() string
func (*UpdatePasswordRequest) GetNewPassword ¶
func (x *UpdatePasswordRequest) GetNewPassword() string
func (*UpdatePasswordRequest) GetOldPassword ¶
func (x *UpdatePasswordRequest) GetOldPassword() string
func (*UpdatePasswordRequest) ProtoMessage ¶
func (*UpdatePasswordRequest) ProtoMessage()
func (*UpdatePasswordRequest) ProtoReflect ¶
func (x *UpdatePasswordRequest) ProtoReflect() protoreflect.Message
func (*UpdatePasswordRequest) Reset ¶
func (x *UpdatePasswordRequest) Reset()
func (*UpdatePasswordRequest) String ¶
func (x *UpdatePasswordRequest) String() string
type UpdateUserReply ¶
type UpdateUserReply struct { UserId int64 `protobuf:"varint,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"` Username string `protobuf:"bytes,2,opt,name=username,proto3" json:"username,omitempty"` Email string `protobuf:"bytes,3,opt,name=email,proto3" json:"email,omitempty"` Phone string `protobuf:"bytes,4,opt,name=phone,proto3" json:"phone,omitempty"` LoginAt int64 `protobuf:"varint,5,opt,name=login_at,json=loginAt,proto3" json:"login_at,omitempty"` Status StatusType `protobuf:"varint,6,opt,name=status,proto3,enum=proto.StatusType" json:"status,omitempty"` Nickname string `protobuf:"bytes,7,opt,name=nickname,proto3" json:"nickname,omitempty"` Avatar string `protobuf:"bytes,8,opt,name=avatar,proto3" json:"avatar,omitempty"` Gender GenderType `protobuf:"varint,9,opt,name=gender,proto3,enum=proto.GenderType" json:"gender,omitempty"` Birthday string `protobuf:"bytes,10,opt,name=birthday,proto3" json:"birthday,omitempty"` Bio string `protobuf:"bytes,11,opt,name=bio,proto3" json:"bio,omitempty"` UpdatedAt int64 `protobuf:"varint,13,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"` // contains filtered or unexported fields }
func (*UpdateUserReply) Descriptor
deprecated
func (*UpdateUserReply) Descriptor() ([]byte, []int)
Deprecated: Use UpdateUserReply.ProtoReflect.Descriptor instead.
func (*UpdateUserReply) GetAvatar ¶
func (x *UpdateUserReply) GetAvatar() string
func (*UpdateUserReply) GetBio ¶
func (x *UpdateUserReply) GetBio() string
func (*UpdateUserReply) GetBirthday ¶
func (x *UpdateUserReply) GetBirthday() string
func (*UpdateUserReply) GetEmail ¶
func (x *UpdateUserReply) GetEmail() string
func (*UpdateUserReply) GetGender ¶
func (x *UpdateUserReply) GetGender() GenderType
func (*UpdateUserReply) GetLoginAt ¶
func (x *UpdateUserReply) GetLoginAt() int64
func (*UpdateUserReply) GetNickname ¶
func (x *UpdateUserReply) GetNickname() string
func (*UpdateUserReply) GetPhone ¶
func (x *UpdateUserReply) GetPhone() string
func (*UpdateUserReply) GetStatus ¶
func (x *UpdateUserReply) GetStatus() StatusType
func (*UpdateUserReply) GetUpdatedAt ¶
func (x *UpdateUserReply) GetUpdatedAt() int64
func (*UpdateUserReply) GetUserId ¶
func (x *UpdateUserReply) GetUserId() int64
func (*UpdateUserReply) GetUsername ¶
func (x *UpdateUserReply) GetUsername() string
func (*UpdateUserReply) ProtoMessage ¶
func (*UpdateUserReply) ProtoMessage()
func (*UpdateUserReply) ProtoReflect ¶
func (x *UpdateUserReply) ProtoReflect() protoreflect.Message
func (*UpdateUserReply) Reset ¶
func (x *UpdateUserReply) Reset()
func (*UpdateUserReply) String ¶
func (x *UpdateUserReply) String() string
type UpdateUserRequest ¶
type UpdateUserRequest struct { UserId int64 `protobuf:"varint,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"` Username string `protobuf:"bytes,2,opt,name=username,proto3" json:"username,omitempty"` Email string `protobuf:"bytes,3,opt,name=email,proto3" json:"email,omitempty"` Phone string `protobuf:"bytes,4,opt,name=phone,proto3" json:"phone,omitempty"` LoginAt int64 `protobuf:"varint,5,opt,name=login_at,json=loginAt,proto3" json:"login_at,omitempty"` Status StatusType `protobuf:"varint,6,opt,name=status,proto3,enum=proto.StatusType" json:"status,omitempty"` Nickname string `protobuf:"bytes,7,opt,name=nickname,proto3" json:"nickname,omitempty"` Avatar string `protobuf:"bytes,8,opt,name=avatar,proto3" json:"avatar,omitempty"` Gender GenderType `protobuf:"varint,9,opt,name=gender,proto3,enum=proto.GenderType" json:"gender,omitempty"` Birthday string `protobuf:"bytes,10,opt,name=birthday,proto3" json:"birthday,omitempty"` Bio string `protobuf:"bytes,11,opt,name=bio,proto3" json:"bio,omitempty"` UpdatedAt int64 `protobuf:"varint,13,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"` // contains filtered or unexported fields }
func (*UpdateUserRequest) Descriptor
deprecated
func (*UpdateUserRequest) Descriptor() ([]byte, []int)
Deprecated: Use UpdateUserRequest.ProtoReflect.Descriptor instead.
func (*UpdateUserRequest) GetAvatar ¶
func (x *UpdateUserRequest) GetAvatar() string
func (*UpdateUserRequest) GetBio ¶
func (x *UpdateUserRequest) GetBio() string
func (*UpdateUserRequest) GetBirthday ¶
func (x *UpdateUserRequest) GetBirthday() string
func (*UpdateUserRequest) GetEmail ¶
func (x *UpdateUserRequest) GetEmail() string
func (*UpdateUserRequest) GetGender ¶
func (x *UpdateUserRequest) GetGender() GenderType
func (*UpdateUserRequest) GetLoginAt ¶
func (x *UpdateUserRequest) GetLoginAt() int64
func (*UpdateUserRequest) GetNickname ¶
func (x *UpdateUserRequest) GetNickname() string
func (*UpdateUserRequest) GetPhone ¶
func (x *UpdateUserRequest) GetPhone() string
func (*UpdateUserRequest) GetStatus ¶
func (x *UpdateUserRequest) GetStatus() StatusType
func (*UpdateUserRequest) GetUpdatedAt ¶
func (x *UpdateUserRequest) GetUpdatedAt() int64
func (*UpdateUserRequest) GetUserId ¶
func (x *UpdateUserRequest) GetUserId() int64
func (*UpdateUserRequest) GetUsername ¶
func (x *UpdateUserRequest) GetUsername() string
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 User ¶
type User struct { Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` Username string `protobuf:"bytes,2,opt,name=username,proto3" json:"username,omitempty"` Email string `protobuf:"bytes,3,opt,name=email,proto3" json:"email,omitempty"` Phone string `protobuf:"bytes,4,opt,name=phone,proto3" json:"phone,omitempty"` LoginAt int64 `protobuf:"varint,5,opt,name=login_at,json=loginAt,proto3" json:"login_at,omitempty"` Status StatusType `protobuf:"varint,6,opt,name=status,proto3,enum=proto.StatusType" json:"status,omitempty"` Nickname string `protobuf:"bytes,7,opt,name=nickname,proto3" json:"nickname,omitempty"` Avatar string `protobuf:"bytes,8,opt,name=avatar,proto3" json:"avatar,omitempty"` Gender GenderType `protobuf:"varint,9,opt,name=gender,proto3,enum=proto.GenderType" json:"gender,omitempty"` Birthday string `protobuf:"bytes,10,opt,name=birthday,proto3" json:"birthday,omitempty"` Bio string `protobuf:"bytes,11,opt,name=bio,proto3" json:"bio,omitempty"` CreatedAt int64 `protobuf:"varint,12,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` UpdatedAt int64 `protobuf:"varint,13,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"` // contains filtered or unexported fields }
user info
func (*User) Descriptor
deprecated
func (*User) GetBirthday ¶
func (*User) GetCreatedAt ¶
func (*User) GetGender ¶
func (x *User) GetGender() GenderType
func (*User) GetLoginAt ¶
func (*User) GetNickname ¶
func (*User) GetStatus ¶
func (x *User) GetStatus() StatusType
func (*User) GetUpdatedAt ¶
func (*User) GetUsername ¶
func (*User) ProtoMessage ¶
func (*User) ProtoMessage()
func (*User) ProtoReflect ¶
func (x *User) ProtoReflect() protoreflect.Message
type UserServiceClient ¶
type UserServiceClient interface { // auth Register(ctx context.Context, in *RegisterRequest, opts ...grpc.CallOption) (*RegisterReply, error) Login(ctx context.Context, in *LoginRequest, opts ...grpc.CallOption) (*LoginReply, error) Logout(ctx context.Context, in *LogoutRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) // user CreateUser(ctx context.Context, in *CreateUserRequest, opts ...grpc.CallOption) (*CreateUserReply, error) GetUser(ctx context.Context, in *GetUserRequest, opts ...grpc.CallOption) (*GetUserReply, error) BatchGetUsers(ctx context.Context, in *BatchGetUsersRequest, opts ...grpc.CallOption) (*BatchGetUsersReply, error) UpdateUser(ctx context.Context, in *UpdateUserRequest, opts ...grpc.CallOption) (*UpdateUserReply, error) UpdatePassword(ctx context.Context, in *UpdatePasswordRequest, opts ...grpc.CallOption) (*UpdatePasswordReply, 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.
func NewUserServiceClient ¶
func NewUserServiceClient(cc grpc.ClientConnInterface) UserServiceClient
type UserServiceServer ¶
type UserServiceServer interface { // auth Register(context.Context, *RegisterRequest) (*RegisterReply, error) Login(context.Context, *LoginRequest) (*LoginReply, error) Logout(context.Context, *LogoutRequest) (*emptypb.Empty, error) // user CreateUser(context.Context, *CreateUserRequest) (*CreateUserReply, error) GetUser(context.Context, *GetUserRequest) (*GetUserReply, error) BatchGetUsers(context.Context, *BatchGetUsersRequest) (*BatchGetUsersReply, error) UpdateUser(context.Context, *UpdateUserRequest) (*UpdateUserReply, error) UpdatePassword(context.Context, *UpdatePasswordRequest) (*UpdatePasswordReply, error) // contains filtered or unexported methods }
UserServiceServer is the server API for UserService service. All implementations must embed UnimplementedUserServiceServer for forward compatibility