Documentation
¶
Index ¶
- Variables
- type DeleteUserReq
- func (*DeleteUserReq) Descriptor() ([]byte, []int)deprecated
- func (x *DeleteUserReq) FastRead(buf []byte, _type int8, number int32) (offset int, err error)
- func (x *DeleteUserReq) FastWrite(buf []byte) (offset int)
- func (x *DeleteUserReq) GetUserId() int32
- func (*DeleteUserReq) ProtoMessage()
- func (x *DeleteUserReq) ProtoReflect() protoreflect.Message
- func (x *DeleteUserReq) Reset()
- func (x *DeleteUserReq) Size() (n int)
- func (x *DeleteUserReq) String() string
- type DeleteUserResp
- func (*DeleteUserResp) Descriptor() ([]byte, []int)deprecated
- func (x *DeleteUserResp) FastRead(buf []byte, _type int8, number int32) (offset int, err error)
- func (x *DeleteUserResp) FastWrite(buf []byte) (offset int)
- func (x *DeleteUserResp) GetSuccess() bool
- func (*DeleteUserResp) ProtoMessage()
- func (x *DeleteUserResp) ProtoReflect() protoreflect.Message
- func (x *DeleteUserResp) Reset()
- func (x *DeleteUserResp) Size() (n int)
- func (x *DeleteUserResp) String() string
- type GetUserInfoReq
- func (*GetUserInfoReq) Descriptor() ([]byte, []int)deprecated
- func (x *GetUserInfoReq) FastRead(buf []byte, _type int8, number int32) (offset int, err error)
- func (x *GetUserInfoReq) FastWrite(buf []byte) (offset int)
- func (x *GetUserInfoReq) GetUserId() int32
- func (*GetUserInfoReq) ProtoMessage()
- func (x *GetUserInfoReq) ProtoReflect() protoreflect.Message
- func (x *GetUserInfoReq) Reset()
- func (x *GetUserInfoReq) Size() (n int)
- func (x *GetUserInfoReq) String() string
- type GetUserInfoResp
- func (*GetUserInfoResp) Descriptor() ([]byte, []int)deprecated
- func (x *GetUserInfoResp) FastRead(buf []byte, _type int8, number int32) (offset int, err error)
- func (x *GetUserInfoResp) FastWrite(buf []byte) (offset int)
- func (x *GetUserInfoResp) GetAddress() string
- func (x *GetUserInfoResp) GetCreatedAt() string
- func (x *GetUserInfoResp) GetEmail() string
- func (x *GetUserInfoResp) GetPhoneNumber() string
- func (x *GetUserInfoResp) GetRole() string
- func (x *GetUserInfoResp) GetStatus() string
- func (x *GetUserInfoResp) GetUpdatedAt() string
- func (x *GetUserInfoResp) GetUserId() int32
- func (x *GetUserInfoResp) GetUsername() string
- func (*GetUserInfoResp) ProtoMessage()
- func (x *GetUserInfoResp) ProtoReflect() protoreflect.Message
- func (x *GetUserInfoResp) Reset()
- func (x *GetUserInfoResp) Size() (n int)
- func (x *GetUserInfoResp) String() string
- type LoginReq
- func (*LoginReq) Descriptor() ([]byte, []int)deprecated
- func (x *LoginReq) FastRead(buf []byte, _type int8, number int32) (offset int, err error)
- func (x *LoginReq) FastWrite(buf []byte) (offset int)
- func (x *LoginReq) GetEmail() string
- func (x *LoginReq) GetPassword() string
- func (*LoginReq) ProtoMessage()
- func (x *LoginReq) ProtoReflect() protoreflect.Message
- func (x *LoginReq) Reset()
- func (x *LoginReq) Size() (n int)
- func (x *LoginReq) String() string
- type LoginResp
- func (*LoginResp) Descriptor() ([]byte, []int)deprecated
- func (x *LoginResp) FastRead(buf []byte, _type int8, number int32) (offset int, err error)
- func (x *LoginResp) FastWrite(buf []byte) (offset int)
- func (x *LoginResp) GetToken() string
- func (*LoginResp) ProtoMessage()
- func (x *LoginResp) ProtoReflect() protoreflect.Message
- func (x *LoginResp) Reset()
- func (x *LoginResp) Size() (n int)
- func (x *LoginResp) String() string
- type LogoutReq
- func (*LogoutReq) Descriptor() ([]byte, []int)deprecated
- func (x *LogoutReq) FastRead(buf []byte, _type int8, number int32) (offset int, err error)
- func (x *LogoutReq) FastWrite(buf []byte) (offset int)
- func (x *LogoutReq) GetUserId() int32
- func (*LogoutReq) ProtoMessage()
- func (x *LogoutReq) ProtoReflect() protoreflect.Message
- func (x *LogoutReq) Reset()
- func (x *LogoutReq) Size() (n int)
- func (x *LogoutReq) String() string
- type LogoutResp
- func (*LogoutResp) Descriptor() ([]byte, []int)deprecated
- func (x *LogoutResp) FastRead(buf []byte, _type int8, number int32) (offset int, err error)
- func (x *LogoutResp) FastWrite(buf []byte) (offset int)
- func (x *LogoutResp) GetSuccess() bool
- func (*LogoutResp) ProtoMessage()
- func (x *LogoutResp) ProtoReflect() protoreflect.Message
- func (x *LogoutResp) Reset()
- func (x *LogoutResp) Size() (n int)
- func (x *LogoutResp) String() string
- type RegisterReq
- func (*RegisterReq) Descriptor() ([]byte, []int)deprecated
- func (x *RegisterReq) FastRead(buf []byte, _type int8, number int32) (offset int, err error)
- func (x *RegisterReq) FastWrite(buf []byte) (offset int)
- func (x *RegisterReq) GetConfirmPassword() string
- func (x *RegisterReq) GetEmail() string
- func (x *RegisterReq) GetPassword() string
- func (*RegisterReq) ProtoMessage()
- func (x *RegisterReq) ProtoReflect() protoreflect.Message
- func (x *RegisterReq) Reset()
- func (x *RegisterReq) Size() (n int)
- func (x *RegisterReq) String() string
- type RegisterResp
- func (*RegisterResp) Descriptor() ([]byte, []int)deprecated
- func (x *RegisterResp) FastRead(buf []byte, _type int8, number int32) (offset int, err error)
- func (x *RegisterResp) FastWrite(buf []byte) (offset int)
- func (x *RegisterResp) GetUserId() int32
- func (*RegisterResp) ProtoMessage()
- func (x *RegisterResp) ProtoReflect() protoreflect.Message
- func (x *RegisterResp) Reset()
- func (x *RegisterResp) Size() (n int)
- func (x *RegisterResp) String() string
- type UpdateUserReq
- func (*UpdateUserReq) Descriptor() ([]byte, []int)deprecated
- func (x *UpdateUserReq) FastRead(buf []byte, _type int8, number int32) (offset int, err error)
- func (x *UpdateUserReq) FastWrite(buf []byte) (offset int)
- func (x *UpdateUserReq) GetAddress() string
- func (x *UpdateUserReq) GetEmail() string
- func (x *UpdateUserReq) GetPassword() string
- func (x *UpdateUserReq) GetPhoneNumber() string
- func (x *UpdateUserReq) GetToken() string
- func (*UpdateUserReq) ProtoMessage()
- func (x *UpdateUserReq) ProtoReflect() protoreflect.Message
- func (x *UpdateUserReq) Reset()
- func (x *UpdateUserReq) Size() (n int)
- func (x *UpdateUserReq) String() string
- type UpdateUserResp
- func (*UpdateUserResp) Descriptor() ([]byte, []int)deprecated
- func (x *UpdateUserResp) FastRead(buf []byte, _type int8, number int32) (offset int, err error)
- func (x *UpdateUserResp) FastWrite(buf []byte) (offset int)
- func (x *UpdateUserResp) GetSuccess() bool
- func (*UpdateUserResp) ProtoMessage()
- func (x *UpdateUserResp) ProtoReflect() protoreflect.Message
- func (x *UpdateUserResp) Reset()
- func (x *UpdateUserResp) Size() (n int)
- func (x *UpdateUserResp) String() string
- type UserService
Constants ¶
This section is empty.
Variables ¶
var File_user_proto protoreflect.FileDescriptor
Functions ¶
This section is empty.
Types ¶
type DeleteUserReq ¶
type DeleteUserReq struct { UserId int32 `protobuf:"varint,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"` // 需要删除的用户 ID // contains filtered or unexported fields }
删除用户的请求消息
func (*DeleteUserReq) Descriptor
deprecated
func (*DeleteUserReq) Descriptor() ([]byte, []int)
Deprecated: Use DeleteUserReq.ProtoReflect.Descriptor instead.
func (*DeleteUserReq) FastWrite ¶
func (x *DeleteUserReq) FastWrite(buf []byte) (offset int)
func (*DeleteUserReq) GetUserId ¶
func (x *DeleteUserReq) GetUserId() int32
func (*DeleteUserReq) ProtoMessage ¶
func (*DeleteUserReq) ProtoMessage()
func (*DeleteUserReq) ProtoReflect ¶
func (x *DeleteUserReq) ProtoReflect() protoreflect.Message
func (*DeleteUserReq) Reset ¶
func (x *DeleteUserReq) Reset()
func (*DeleteUserReq) Size ¶
func (x *DeleteUserReq) Size() (n int)
func (*DeleteUserReq) String ¶
func (x *DeleteUserReq) String() string
type DeleteUserResp ¶
type DeleteUserResp struct { Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"` // 删除是否成功 // contains filtered or unexported fields }
删除用户的响应消息
func (*DeleteUserResp) Descriptor
deprecated
func (*DeleteUserResp) Descriptor() ([]byte, []int)
Deprecated: Use DeleteUserResp.ProtoReflect.Descriptor instead.
func (*DeleteUserResp) FastWrite ¶
func (x *DeleteUserResp) FastWrite(buf []byte) (offset int)
func (*DeleteUserResp) GetSuccess ¶
func (x *DeleteUserResp) GetSuccess() bool
func (*DeleteUserResp) ProtoMessage ¶
func (*DeleteUserResp) ProtoMessage()
func (*DeleteUserResp) ProtoReflect ¶
func (x *DeleteUserResp) ProtoReflect() protoreflect.Message
func (*DeleteUserResp) Reset ¶
func (x *DeleteUserResp) Reset()
func (*DeleteUserResp) Size ¶
func (x *DeleteUserResp) Size() (n int)
func (*DeleteUserResp) String ¶
func (x *DeleteUserResp) String() string
type GetUserInfoReq ¶
type GetUserInfoReq struct { UserId int32 `protobuf:"varint,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"` // 需要查询的用户 ID // contains filtered or unexported fields }
获取用户身份信息的请求消息
func (*GetUserInfoReq) Descriptor
deprecated
func (*GetUserInfoReq) Descriptor() ([]byte, []int)
Deprecated: Use GetUserInfoReq.ProtoReflect.Descriptor instead.
func (*GetUserInfoReq) FastWrite ¶
func (x *GetUserInfoReq) FastWrite(buf []byte) (offset int)
func (*GetUserInfoReq) GetUserId ¶
func (x *GetUserInfoReq) GetUserId() int32
func (*GetUserInfoReq) ProtoMessage ¶
func (*GetUserInfoReq) ProtoMessage()
func (*GetUserInfoReq) ProtoReflect ¶
func (x *GetUserInfoReq) ProtoReflect() protoreflect.Message
func (*GetUserInfoReq) Reset ¶
func (x *GetUserInfoReq) Reset()
func (*GetUserInfoReq) Size ¶
func (x *GetUserInfoReq) Size() (n int)
func (*GetUserInfoReq) String ¶
func (x *GetUserInfoReq) String() string
type GetUserInfoResp ¶
type GetUserInfoResp struct { UserId int32 `protobuf:"varint,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"` // 用户 ID Email string `protobuf:"bytes,2,opt,name=email,proto3" json:"email,omitempty"` // 用户邮箱 Username string `protobuf:"bytes,3,opt,name=username,proto3" json:"username,omitempty"` // 用户名 PhoneNumber string `protobuf:"bytes,4,opt,name=phone_number,json=phoneNumber,proto3" json:"phone_number,omitempty"` // 手机号 Address string `protobuf:"bytes,5,opt,name=address,proto3" json:"address,omitempty"` // 地址 Role string `protobuf:"bytes,6,opt,name=role,proto3" json:"role,omitempty"` // 角色(如"admin", "user") Status string `protobuf:"bytes,7,opt,name=status,proto3" json:"status,omitempty"` // 账户状态(如"active", "banned", "pending") CreatedAt string `protobuf:"bytes,8,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` // 账户创建时间 UpdatedAt string `protobuf:"bytes,9,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"` // 账户最近更新时间 // contains filtered or unexported fields }
获取用户身份信息的响应消息
func (*GetUserInfoResp) Descriptor
deprecated
func (*GetUserInfoResp) Descriptor() ([]byte, []int)
Deprecated: Use GetUserInfoResp.ProtoReflect.Descriptor instead.
func (*GetUserInfoResp) FastWrite ¶
func (x *GetUserInfoResp) FastWrite(buf []byte) (offset int)
func (*GetUserInfoResp) GetAddress ¶
func (x *GetUserInfoResp) GetAddress() string
func (*GetUserInfoResp) GetCreatedAt ¶
func (x *GetUserInfoResp) GetCreatedAt() string
func (*GetUserInfoResp) GetEmail ¶
func (x *GetUserInfoResp) GetEmail() string
func (*GetUserInfoResp) GetPhoneNumber ¶
func (x *GetUserInfoResp) GetPhoneNumber() string
func (*GetUserInfoResp) GetRole ¶
func (x *GetUserInfoResp) GetRole() string
func (*GetUserInfoResp) GetStatus ¶
func (x *GetUserInfoResp) GetStatus() string
func (*GetUserInfoResp) GetUpdatedAt ¶
func (x *GetUserInfoResp) GetUpdatedAt() string
func (*GetUserInfoResp) GetUserId ¶
func (x *GetUserInfoResp) GetUserId() int32
func (*GetUserInfoResp) GetUsername ¶
func (x *GetUserInfoResp) GetUsername() string
func (*GetUserInfoResp) ProtoMessage ¶
func (*GetUserInfoResp) ProtoMessage()
func (*GetUserInfoResp) ProtoReflect ¶
func (x *GetUserInfoResp) ProtoReflect() protoreflect.Message
func (*GetUserInfoResp) Reset ¶
func (x *GetUserInfoResp) Reset()
func (*GetUserInfoResp) Size ¶
func (x *GetUserInfoResp) Size() (n int)
func (*GetUserInfoResp) String ¶
func (x *GetUserInfoResp) String() string
type LoginReq ¶
type LoginReq struct { Email string `protobuf:"bytes,1,opt,name=email,proto3" json:"email,omitempty"` // 用户邮箱 Password string `protobuf:"bytes,2,opt,name=password,proto3" json:"password,omitempty"` // 用户密码 // contains filtered or unexported fields }
用户登录的请求消息
func (*LoginReq) Descriptor
deprecated
func (*LoginReq) GetPassword ¶
func (*LoginReq) ProtoMessage ¶
func (*LoginReq) ProtoMessage()
func (*LoginReq) ProtoReflect ¶
func (x *LoginReq) ProtoReflect() protoreflect.Message
type LoginResp ¶
type LoginResp struct { Token string `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"` // 登录成功后返回的 token // contains filtered or unexported fields }
用户登录的响应消息。
func (*LoginResp) Descriptor
deprecated
func (*LoginResp) ProtoMessage ¶
func (*LoginResp) ProtoMessage()
func (*LoginResp) ProtoReflect ¶
func (x *LoginResp) ProtoReflect() protoreflect.Message
type LogoutReq ¶
type LogoutReq struct { UserId int32 `protobuf:"varint,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"` // 需要登出的用户 ID // contains filtered or unexported fields }
用户登出的请求消息
func (*LogoutReq) Descriptor
deprecated
func (*LogoutReq) ProtoMessage ¶
func (*LogoutReq) ProtoMessage()
func (*LogoutReq) ProtoReflect ¶
func (x *LogoutReq) ProtoReflect() protoreflect.Message
type LogoutResp ¶
type LogoutResp struct { Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"` // 登出是否成功 // contains filtered or unexported fields }
用户登出的响应消息
func (*LogoutResp) Descriptor
deprecated
func (*LogoutResp) Descriptor() ([]byte, []int)
Deprecated: Use LogoutResp.ProtoReflect.Descriptor instead.
func (*LogoutResp) FastWrite ¶
func (x *LogoutResp) FastWrite(buf []byte) (offset int)
func (*LogoutResp) GetSuccess ¶
func (x *LogoutResp) GetSuccess() bool
func (*LogoutResp) ProtoMessage ¶
func (*LogoutResp) ProtoMessage()
func (*LogoutResp) ProtoReflect ¶
func (x *LogoutResp) ProtoReflect() protoreflect.Message
func (*LogoutResp) Reset ¶
func (x *LogoutResp) Reset()
func (*LogoutResp) Size ¶
func (x *LogoutResp) Size() (n int)
func (*LogoutResp) String ¶
func (x *LogoutResp) String() string
type RegisterReq ¶
type RegisterReq struct { Email string `protobuf:"bytes,1,opt,name=email,proto3" json:"email,omitempty"` // 用户邮箱 Password string `protobuf:"bytes,2,opt,name=password,proto3" json:"password,omitempty"` // 用户密码 ConfirmPassword string `protobuf:"bytes,3,opt,name=confirm_password,json=confirmPassword,proto3" json:"confirm_password,omitempty"` // 确认密码 // contains filtered or unexported fields }
注册用户的请求消息
func (*RegisterReq) Descriptor
deprecated
func (*RegisterReq) Descriptor() ([]byte, []int)
Deprecated: Use RegisterReq.ProtoReflect.Descriptor instead.
func (*RegisterReq) FastWrite ¶
func (x *RegisterReq) FastWrite(buf []byte) (offset int)
func (*RegisterReq) GetConfirmPassword ¶
func (x *RegisterReq) GetConfirmPassword() string
func (*RegisterReq) GetEmail ¶
func (x *RegisterReq) GetEmail() string
func (*RegisterReq) GetPassword ¶
func (x *RegisterReq) GetPassword() string
func (*RegisterReq) ProtoMessage ¶
func (*RegisterReq) ProtoMessage()
func (*RegisterReq) ProtoReflect ¶
func (x *RegisterReq) ProtoReflect() protoreflect.Message
func (*RegisterReq) Reset ¶
func (x *RegisterReq) Reset()
func (*RegisterReq) Size ¶
func (x *RegisterReq) Size() (n int)
func (*RegisterReq) String ¶
func (x *RegisterReq) String() string
type RegisterResp ¶
type RegisterResp struct { UserId int32 `protobuf:"varint,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"` // 用户 ID // contains filtered or unexported fields }
注册用户的响应消息
func (*RegisterResp) Descriptor
deprecated
func (*RegisterResp) Descriptor() ([]byte, []int)
Deprecated: Use RegisterResp.ProtoReflect.Descriptor instead.
func (*RegisterResp) FastWrite ¶
func (x *RegisterResp) FastWrite(buf []byte) (offset int)
func (*RegisterResp) GetUserId ¶
func (x *RegisterResp) GetUserId() int32
func (*RegisterResp) ProtoMessage ¶
func (*RegisterResp) ProtoMessage()
func (*RegisterResp) ProtoReflect ¶
func (x *RegisterResp) ProtoReflect() protoreflect.Message
func (*RegisterResp) Reset ¶
func (x *RegisterResp) Reset()
func (*RegisterResp) Size ¶
func (x *RegisterResp) Size() (n int)
func (*RegisterResp) String ¶
func (x *RegisterResp) String() string
type UpdateUserReq ¶
type UpdateUserReq struct { Token string `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"` // 需要更新的用户 token Email string `protobuf:"bytes,2,opt,name=email,proto3" json:"email,omitempty"` // 新邮箱(可选) Password string `protobuf:"bytes,3,opt,name=password,proto3" json:"password,omitempty"` // 新密码(可选) PhoneNumber string `protobuf:"bytes,4,opt,name=phone_number,json=phoneNumber,proto3" json:"phone_number,omitempty"` // 新手机号(可选) Address string `protobuf:"bytes,5,opt,name=address,proto3" json:"address,omitempty"` // 新地址(可选) // contains filtered or unexported fields }
更新用户的请求消息
func (*UpdateUserReq) Descriptor
deprecated
func (*UpdateUserReq) Descriptor() ([]byte, []int)
Deprecated: Use UpdateUserReq.ProtoReflect.Descriptor instead.
func (*UpdateUserReq) FastWrite ¶
func (x *UpdateUserReq) FastWrite(buf []byte) (offset int)
func (*UpdateUserReq) GetAddress ¶
func (x *UpdateUserReq) GetAddress() string
func (*UpdateUserReq) GetEmail ¶
func (x *UpdateUserReq) GetEmail() string
func (*UpdateUserReq) GetPassword ¶
func (x *UpdateUserReq) GetPassword() string
func (*UpdateUserReq) GetPhoneNumber ¶
func (x *UpdateUserReq) GetPhoneNumber() string
func (*UpdateUserReq) GetToken ¶
func (x *UpdateUserReq) GetToken() string
func (*UpdateUserReq) ProtoMessage ¶
func (*UpdateUserReq) ProtoMessage()
func (*UpdateUserReq) ProtoReflect ¶
func (x *UpdateUserReq) ProtoReflect() protoreflect.Message
func (*UpdateUserReq) Reset ¶
func (x *UpdateUserReq) Reset()
func (*UpdateUserReq) Size ¶
func (x *UpdateUserReq) Size() (n int)
func (*UpdateUserReq) String ¶
func (x *UpdateUserReq) String() string
type UpdateUserResp ¶
type UpdateUserResp struct { Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"` // 更新是否成功 // contains filtered or unexported fields }
更新用户的响应消息
func (*UpdateUserResp) Descriptor
deprecated
func (*UpdateUserResp) Descriptor() ([]byte, []int)
Deprecated: Use UpdateUserResp.ProtoReflect.Descriptor instead.
func (*UpdateUserResp) FastWrite ¶
func (x *UpdateUserResp) FastWrite(buf []byte) (offset int)
func (*UpdateUserResp) GetSuccess ¶
func (x *UpdateUserResp) GetSuccess() bool
func (*UpdateUserResp) ProtoMessage ¶
func (*UpdateUserResp) ProtoMessage()
func (*UpdateUserResp) ProtoReflect ¶
func (x *UpdateUserResp) ProtoReflect() protoreflect.Message
func (*UpdateUserResp) Reset ¶
func (x *UpdateUserResp) Reset()
func (*UpdateUserResp) Size ¶
func (x *UpdateUserResp) Size() (n int)
func (*UpdateUserResp) String ¶
func (x *UpdateUserResp) String() string
type UserService ¶
type UserService interface { Register(ctx context.Context, req *RegisterReq) (res *RegisterResp, err error) Login(ctx context.Context, req *LoginReq) (res *LoginResp, err error) Logout(ctx context.Context, req *LogoutReq) (res *LogoutResp, err error) DeleteUser(ctx context.Context, req *DeleteUserReq) (res *DeleteUserResp, err error) UpdateUser(ctx context.Context, req *UpdateUserReq) (res *UpdateUserResp, err error) GetUserInfo(ctx context.Context, req *GetUserInfoReq) (res *GetUserInfoResp, err error) }