user

package
v0.0.0-...-49721f6 Latest Latest
Warning

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

Go to latest
Published: Sep 1, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Functions

This section is empty.

Types

type User

type User struct {
	Id              int64  `protobuf:"varint,1,opt,name=id,proto3" json:"id"`                                                 // 用户id
	Name            string `protobuf:"bytes,2,opt,name=name,proto3" json:"name"`                                              // 用户名称
	FollowCount     int64  `protobuf:"varint,3,opt,name=follow_count,json=followCount,proto3" json:"follow_count"`            // 关注总数
	FollowerCount   int64  `protobuf:"varint,4,opt,name=follower_count,json=followerCount,proto3" json:"follower_count"`      // 粉丝总数
	IsFollow        bool   `protobuf:"varint,5,opt,name=is_follow,json=isFollow,proto3" json:"is_follow"`                     // true-已关注,false-未关注
	Avatar          string `protobuf:"bytes,6,opt,name=avatar,proto3" json:"avatar"`                                          //用户头像
	BackgroundImage string `protobuf:"bytes,7,opt,name=background_image,json=backgroundImage,proto3" json:"background_image"` //用户个人页顶部大图
	Signature       string `protobuf:"bytes,8,opt,name=signature,proto3" json:"signature"`                                    //个人简介
	TotalFavorited  int64  `protobuf:"varint,9,opt,name=total_favorited,json=totalFavorited,proto3" json:"total_favorited"`   //获赞数量
	WorkCount       int64  `protobuf:"varint,10,opt,name=work_count,json=workCount,proto3" json:"work_count"`                 //作品数量
	FavoriteCount   int64  `protobuf:"varint,11,opt,name=favorite_count,json=favoriteCount,proto3" json:"favorite_count"`     //点赞数量
	// contains filtered or unexported fields
}

func (*User) Descriptor deprecated

func (*User) Descriptor() ([]byte, []int)

Deprecated: Use User.ProtoReflect.Descriptor instead.

func (*User) FastRead

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

func (*User) FastWrite

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

func (*User) GetAvatar

func (x *User) GetAvatar() string

func (*User) GetBackgroundImage

func (x *User) GetBackgroundImage() string

func (*User) GetFavoriteCount

func (x *User) GetFavoriteCount() int64

func (*User) GetFollowCount

func (x *User) GetFollowCount() int64

func (*User) GetFollowerCount

func (x *User) GetFollowerCount() int64

func (*User) GetId

func (x *User) GetId() int64

func (*User) GetIsFollow

func (x *User) GetIsFollow() bool

func (*User) GetName

func (x *User) GetName() string

func (*User) GetSignature

func (x *User) GetSignature() string

func (*User) GetTotalFavorited

func (x *User) GetTotalFavorited() int64

func (*User) GetWorkCount

func (x *User) GetWorkCount() int64

func (*User) ProtoMessage

func (*User) ProtoMessage()

func (*User) ProtoReflect

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

func (*User) Reset

func (x *User) Reset()

func (*User) Size

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

func (*User) String

func (x *User) String() string

type UserLoRegRequest

type UserLoRegRequest struct {
	Username string `protobuf:"bytes,1,opt,name=username,proto3" json:"username" query:"username" vd:"len($) > 0 && len($) <= 32"` // 用户名
	Password string `protobuf:"bytes,2,opt,name=password,proto3" json:"password" query:"password" vd:"len($) > 0 && len($) <= 32"` // 密码
	// contains filtered or unexported fields
}

用户登录和注册的message是一样的,所以尝试将文档中的IDL合并在一起。

func (*UserLoRegRequest) Descriptor deprecated

func (*UserLoRegRequest) Descriptor() ([]byte, []int)

Deprecated: Use UserLoRegRequest.ProtoReflect.Descriptor instead.

func (*UserLoRegRequest) FastRead

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

func (*UserLoRegRequest) FastWrite

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

func (*UserLoRegRequest) GetPassword

func (x *UserLoRegRequest) GetPassword() string

func (*UserLoRegRequest) GetUsername

func (x *UserLoRegRequest) GetUsername() string

func (*UserLoRegRequest) ProtoMessage

func (*UserLoRegRequest) ProtoMessage()

func (*UserLoRegRequest) ProtoReflect

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

func (*UserLoRegRequest) Reset

func (x *UserLoRegRequest) Reset()

func (*UserLoRegRequest) Size

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

func (*UserLoRegRequest) String

func (x *UserLoRegRequest) String() string

type UserLoRegResponse

type UserLoRegResponse struct {
	StatusCode int32  `protobuf:"varint,1,opt,name=status_code,json=statusCode,proto3" json:"status_code"`       // 状态码,0-成功,其他值-失败
	StatusMsg  string `protobuf:"bytes,2,opt,name=status_msg,json=statusMsg,proto3" json:"status_msg,omitempty"` // 返回状态描述
	UserId     int64  `protobuf:"varint,3,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`         // 用户id
	Token      string `protobuf:"bytes,4,opt,name=token,proto3" json:"token"`                                    // 用户鉴权token
	// contains filtered or unexported fields
}

func (*UserLoRegResponse) Descriptor deprecated

func (*UserLoRegResponse) Descriptor() ([]byte, []int)

Deprecated: Use UserLoRegResponse.ProtoReflect.Descriptor instead.

func (*UserLoRegResponse) FastRead

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

func (*UserLoRegResponse) FastWrite

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

func (*UserLoRegResponse) GetStatusCode

func (x *UserLoRegResponse) GetStatusCode() int32

func (*UserLoRegResponse) GetStatusMsg

func (x *UserLoRegResponse) GetStatusMsg() string

func (*UserLoRegResponse) GetToken

func (x *UserLoRegResponse) GetToken() string

func (*UserLoRegResponse) GetUserId

func (x *UserLoRegResponse) GetUserId() int64

func (*UserLoRegResponse) ProtoMessage

func (*UserLoRegResponse) ProtoMessage()

func (*UserLoRegResponse) ProtoReflect

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

func (*UserLoRegResponse) Reset

func (x *UserLoRegResponse) Reset()

func (*UserLoRegResponse) Size

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

func (*UserLoRegResponse) String

func (x *UserLoRegResponse) String() string

type UserRequest

type UserRequest struct {
	UserId int64  `protobuf:"varint,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty" query:"user_id"` // 用户id
	Token  string `protobuf:"bytes,2,opt,name=token,proto3" json:"token,omitempty" query:"token"`                    // 用户鉴权token
	// contains filtered or unexported fields
}

func (*UserRequest) Descriptor deprecated

func (*UserRequest) Descriptor() ([]byte, []int)

Deprecated: Use UserRequest.ProtoReflect.Descriptor instead.

func (*UserRequest) FastRead

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

func (*UserRequest) FastWrite

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

func (*UserRequest) GetToken

func (x *UserRequest) GetToken() string

func (*UserRequest) GetUserId

func (x *UserRequest) GetUserId() int64

func (*UserRequest) ProtoMessage

func (*UserRequest) ProtoMessage()

func (*UserRequest) ProtoReflect

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

func (*UserRequest) Reset

func (x *UserRequest) Reset()

func (*UserRequest) Size

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

func (*UserRequest) String

func (x *UserRequest) String() string

type UserResponse

type UserResponse struct {
	StatusCode int32  `protobuf:"varint,1,opt,name=status_code,json=statusCode,proto3" json:"status_code"` // 状态码,0-成功,其他值-失败
	StatusMsg  string `protobuf:"bytes,2,opt,name=status_msg,json=statusMsg,proto3" json:"status_msg"`     // 返回状态描述
	User       *User  `protobuf:"bytes,3,opt,name=user,proto3" json:"user"`                                // 用户信息
	// contains filtered or unexported fields
}

func (*UserResponse) Descriptor deprecated

func (*UserResponse) Descriptor() ([]byte, []int)

Deprecated: Use UserResponse.ProtoReflect.Descriptor instead.

func (*UserResponse) FastRead

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

func (*UserResponse) FastWrite

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

func (*UserResponse) GetStatusCode

func (x *UserResponse) GetStatusCode() int32

func (*UserResponse) GetStatusMsg

func (x *UserResponse) GetStatusMsg() string

func (*UserResponse) GetUser

func (x *UserResponse) GetUser() *User

func (*UserResponse) ProtoMessage

func (*UserResponse) ProtoMessage()

func (*UserResponse) ProtoReflect

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

func (*UserResponse) Reset

func (x *UserResponse) Reset()

func (*UserResponse) Size

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

func (*UserResponse) String

func (x *UserResponse) String() string

type UserService

type UserService interface {
	GetUser(ctx context.Context, req *UserRequest) (res *UserResponse, err error)
	UserLogin(ctx context.Context, req *UserLoRegRequest) (res *UserLoRegResponse, err error)
	UserRegister(ctx context.Context, req *UserLoRegRequest) (res *UserLoRegResponse, err error)
}

Directories

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

Jump to

Keyboard shortcuts

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