user

package
v0.0.0-...-d5476ae Latest Latest
Warning

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

Go to latest
Published: Mar 5, 2025 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

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) FastRead

func (x *DeleteUserReq) FastRead(buf []byte, _type int8, number int32) (offset int, err error)

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) FastRead

func (x *DeleteUserResp) FastRead(buf []byte, _type int8, number int32) (offset int, err error)

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) FastRead

func (x *GetUserInfoReq) FastRead(buf []byte, _type int8, number int32) (offset int, err error)

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) FastRead

func (x *GetUserInfoResp) FastRead(buf []byte, _type int8, number int32) (offset int, err error)

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) Descriptor() ([]byte, []int)

Deprecated: Use LoginReq.ProtoReflect.Descriptor instead.

func (*LoginReq) FastRead

func (x *LoginReq) FastRead(buf []byte, _type int8, number int32) (offset int, err error)

func (*LoginReq) FastWrite

func (x *LoginReq) FastWrite(buf []byte) (offset int)

func (*LoginReq) GetEmail

func (x *LoginReq) GetEmail() string

func (*LoginReq) GetPassword

func (x *LoginReq) GetPassword() 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) Size

func (x *LoginReq) Size() (n int)

func (*LoginReq) String

func (x *LoginReq) String() string

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) Descriptor() ([]byte, []int)

Deprecated: Use LoginResp.ProtoReflect.Descriptor instead.

func (*LoginResp) FastRead

func (x *LoginResp) FastRead(buf []byte, _type int8, number int32) (offset int, err error)

func (*LoginResp) FastWrite

func (x *LoginResp) FastWrite(buf []byte) (offset int)

func (*LoginResp) GetToken

func (x *LoginResp) GetToken() string

func (*LoginResp) ProtoMessage

func (*LoginResp) ProtoMessage()

func (*LoginResp) ProtoReflect

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

func (*LoginResp) Reset

func (x *LoginResp) Reset()

func (*LoginResp) Size

func (x *LoginResp) Size() (n int)

func (*LoginResp) String

func (x *LoginResp) String() string

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) Descriptor() ([]byte, []int)

Deprecated: Use LogoutReq.ProtoReflect.Descriptor instead.

func (*LogoutReq) FastRead

func (x *LogoutReq) FastRead(buf []byte, _type int8, number int32) (offset int, err error)

func (*LogoutReq) FastWrite

func (x *LogoutReq) FastWrite(buf []byte) (offset int)

func (*LogoutReq) GetUserId

func (x *LogoutReq) GetUserId() int32

func (*LogoutReq) ProtoMessage

func (*LogoutReq) ProtoMessage()

func (*LogoutReq) ProtoReflect

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

func (*LogoutReq) Reset

func (x *LogoutReq) Reset()

func (*LogoutReq) Size

func (x *LogoutReq) Size() (n int)

func (*LogoutReq) String

func (x *LogoutReq) String() string

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) FastRead

func (x *LogoutResp) FastRead(buf []byte, _type int8, number int32) (offset int, err error)

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) FastRead

func (x *RegisterReq) FastRead(buf []byte, _type int8, number int32) (offset int, err error)

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) FastRead

func (x *RegisterResp) FastRead(buf []byte, _type int8, number int32) (offset int, err error)

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) FastRead

func (x *UpdateUserReq) FastRead(buf []byte, _type int8, number int32) (offset int, err error)

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) FastRead

func (x *UpdateUserResp) FastRead(buf []byte, _type int8, number int32) (offset int, err error)

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)
}

Directories

Path Synopsis
Code generated by Kitex v0.9.1.
Code generated by Kitex v0.9.1.

Jump to

Keyboard shortcuts

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