Documentation ¶
Index ¶
- Variables
- type User
- func (*User) Descriptor() ([]byte, []int)deprecated
- func (x *User) FastRead(buf []byte, _type int8, number int32) (offset int, err error)
- func (x *User) FastWrite(buf []byte) (offset int)
- func (x *User) GetAvatar() string
- func (x *User) GetBackgroundImage() string
- func (x *User) GetFavoriteCount() int64
- func (x *User) GetFollowCount() int64
- func (x *User) GetFollowerCount() int64
- func (x *User) GetId() int64
- func (x *User) GetIsFollow() bool
- func (x *User) GetName() string
- func (x *User) GetSignature() string
- func (x *User) GetTotalFavorited() int64
- func (x *User) GetWorkCount() int64
- func (*User) ProtoMessage()
- func (x *User) ProtoReflect() protoreflect.Message
- func (x *User) Reset()
- func (x *User) Size() (n int)
- func (x *User) String() string
- type UserInfoRequest
- func (*UserInfoRequest) Descriptor() ([]byte, []int)deprecated
- func (x *UserInfoRequest) FastRead(buf []byte, _type int8, number int32) (offset int, err error)
- func (x *UserInfoRequest) FastWrite(buf []byte) (offset int)
- func (x *UserInfoRequest) GetToken() string
- func (x *UserInfoRequest) GetUserId() int64
- func (*UserInfoRequest) ProtoMessage()
- func (x *UserInfoRequest) ProtoReflect() protoreflect.Message
- func (x *UserInfoRequest) Reset()
- func (x *UserInfoRequest) Size() (n int)
- func (x *UserInfoRequest) String() string
- type UserInfoResponse
- func (*UserInfoResponse) Descriptor() ([]byte, []int)deprecated
- func (x *UserInfoResponse) FastRead(buf []byte, _type int8, number int32) (offset int, err error)
- func (x *UserInfoResponse) FastWrite(buf []byte) (offset int)
- func (x *UserInfoResponse) GetStatusCode() int32
- func (x *UserInfoResponse) GetStatusMsg() string
- func (x *UserInfoResponse) GetUser() *User
- func (*UserInfoResponse) ProtoMessage()
- func (x *UserInfoResponse) ProtoReflect() protoreflect.Message
- func (x *UserInfoResponse) Reset()
- func (x *UserInfoResponse) Size() (n int)
- func (x *UserInfoResponse) String() string
- type UserLoginRequest
- func (*UserLoginRequest) Descriptor() ([]byte, []int)deprecated
- func (x *UserLoginRequest) FastRead(buf []byte, _type int8, number int32) (offset int, err error)
- func (x *UserLoginRequest) FastWrite(buf []byte) (offset int)
- func (x *UserLoginRequest) GetPassword() string
- func (x *UserLoginRequest) GetUsername() string
- func (*UserLoginRequest) ProtoMessage()
- func (x *UserLoginRequest) ProtoReflect() protoreflect.Message
- func (x *UserLoginRequest) Reset()
- func (x *UserLoginRequest) Size() (n int)
- func (x *UserLoginRequest) String() string
- type UserLoginResponse
- func (*UserLoginResponse) Descriptor() ([]byte, []int)deprecated
- func (x *UserLoginResponse) FastRead(buf []byte, _type int8, number int32) (offset int, err error)
- func (x *UserLoginResponse) FastWrite(buf []byte) (offset int)
- func (x *UserLoginResponse) GetStatusCode() int32
- func (x *UserLoginResponse) GetStatusMsg() string
- func (x *UserLoginResponse) GetToken() string
- func (x *UserLoginResponse) GetUserId() int64
- func (*UserLoginResponse) ProtoMessage()
- func (x *UserLoginResponse) ProtoReflect() protoreflect.Message
- func (x *UserLoginResponse) Reset()
- func (x *UserLoginResponse) Size() (n int)
- func (x *UserLoginResponse) String() string
- type UserRegisterRequest
- func (*UserRegisterRequest) Descriptor() ([]byte, []int)deprecated
- func (x *UserRegisterRequest) FastRead(buf []byte, _type int8, number int32) (offset int, err error)
- func (x *UserRegisterRequest) FastWrite(buf []byte) (offset int)
- func (x *UserRegisterRequest) GetPassword() string
- func (x *UserRegisterRequest) GetUsername() string
- func (*UserRegisterRequest) ProtoMessage()
- func (x *UserRegisterRequest) ProtoReflect() protoreflect.Message
- func (x *UserRegisterRequest) Reset()
- func (x *UserRegisterRequest) Size() (n int)
- func (x *UserRegisterRequest) String() string
- type UserRegisterResponse
- func (*UserRegisterResponse) Descriptor() ([]byte, []int)deprecated
- func (x *UserRegisterResponse) FastRead(buf []byte, _type int8, number int32) (offset int, err error)
- func (x *UserRegisterResponse) FastWrite(buf []byte) (offset int)
- func (x *UserRegisterResponse) GetStatusCode() int32
- func (x *UserRegisterResponse) GetStatusMsg() string
- func (x *UserRegisterResponse) GetToken() string
- func (x *UserRegisterResponse) GetUserId() int64
- func (*UserRegisterResponse) ProtoMessage()
- func (x *UserRegisterResponse) ProtoReflect() protoreflect.Message
- func (x *UserRegisterResponse) Reset()
- func (x *UserRegisterResponse) Size() (n int)
- func (x *UserRegisterResponse) String() string
- type UserService
Constants ¶
This section is empty.
Variables ¶
View Source
var File_user_proto protoreflect.FileDescriptor
Functions ¶
This section is empty.
Types ¶
type User ¶
type User struct { Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` // 用户id Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` // 用户名称 FollowCount int64 `protobuf:"varint,3,opt,name=follow_count,json=followCount,proto3" json:"follow_count,omitempty"` // 关注总数 FollowerCount int64 `protobuf:"varint,4,opt,name=follower_count,json=followerCount,proto3" json:"follower_count,omitempty"` // 粉丝总数 IsFollow bool `protobuf:"varint,5,opt,name=is_follow,json=isFollow,proto3" json:"is_follow,omitempty"` // true-已关注,false-未关注 Avatar string `protobuf:"bytes,6,opt,name=avatar,proto3" json:"avatar,omitempty"` // 用户头像 BackgroundImage string `protobuf:"bytes,7,opt,name=background_image,json=backgroundImage,proto3" json:"background_image,omitempty"` // 用户个人页顶部大图 Signature string `protobuf:"bytes,8,opt,name=signature,proto3" json:"signature,omitempty"` // 个人简介 TotalFavorited int64 `protobuf:"varint,9,opt,name=total_favorited,json=totalFavorited,proto3" json:"total_favorited,omitempty"` // 获赞数量 WorkCount int64 `protobuf:"varint,10,opt,name=work_count,json=workCount,proto3" json:"work_count,omitempty"` // 作品数量 FavoriteCount int64 `protobuf:"varint,11,opt,name=favorite_count,json=favoriteCount,proto3" json:"favorite_count,omitempty"` // 点赞数量 // contains filtered or unexported fields }
===========================用户信息===========================
func (*User) Descriptor
deprecated
func (*User) GetBackgroundImage ¶
func (*User) GetFavoriteCount ¶
func (*User) GetFollowCount ¶
func (*User) GetFollowerCount ¶
func (*User) GetIsFollow ¶
func (*User) GetSignature ¶
func (*User) GetTotalFavorited ¶
func (*User) GetWorkCount ¶
func (*User) ProtoMessage ¶
func (*User) ProtoMessage()
func (*User) ProtoReflect ¶
func (x *User) ProtoReflect() protoreflect.Message
type UserInfoRequest ¶
type UserInfoRequest struct { UserId int64 `protobuf:"varint,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"` Token string `protobuf:"bytes,2,opt,name=token,proto3" json:"token,omitempty"` // contains filtered or unexported fields }
func (*UserInfoRequest) Descriptor
deprecated
func (*UserInfoRequest) Descriptor() ([]byte, []int)
Deprecated: Use UserInfoRequest.ProtoReflect.Descriptor instead.
func (*UserInfoRequest) FastWrite ¶
func (x *UserInfoRequest) FastWrite(buf []byte) (offset int)
func (*UserInfoRequest) GetToken ¶
func (x *UserInfoRequest) GetToken() string
func (*UserInfoRequest) GetUserId ¶
func (x *UserInfoRequest) GetUserId() int64
func (*UserInfoRequest) ProtoMessage ¶
func (*UserInfoRequest) ProtoMessage()
func (*UserInfoRequest) ProtoReflect ¶
func (x *UserInfoRequest) ProtoReflect() protoreflect.Message
func (*UserInfoRequest) Reset ¶
func (x *UserInfoRequest) Reset()
func (*UserInfoRequest) Size ¶
func (x *UserInfoRequest) Size() (n int)
func (*UserInfoRequest) String ¶
func (x *UserInfoRequest) String() string
type UserInfoResponse ¶
type UserInfoResponse struct { StatusCode int32 `protobuf:"varint,1,opt,name=status_code,json=statusCode,proto3" json:"status_code,omitempty"` StatusMsg string `protobuf:"bytes,2,opt,name=status_msg,json=statusMsg,proto3" json:"status_msg,omitempty"` User *User `protobuf:"bytes,3,opt,name=user,proto3" json:"user,omitempty"` // contains filtered or unexported fields }
func (*UserInfoResponse) Descriptor
deprecated
func (*UserInfoResponse) Descriptor() ([]byte, []int)
Deprecated: Use UserInfoResponse.ProtoReflect.Descriptor instead.
func (*UserInfoResponse) FastWrite ¶
func (x *UserInfoResponse) FastWrite(buf []byte) (offset int)
func (*UserInfoResponse) GetStatusCode ¶
func (x *UserInfoResponse) GetStatusCode() int32
func (*UserInfoResponse) GetStatusMsg ¶
func (x *UserInfoResponse) GetStatusMsg() string
func (*UserInfoResponse) GetUser ¶
func (x *UserInfoResponse) GetUser() *User
func (*UserInfoResponse) ProtoMessage ¶
func (*UserInfoResponse) ProtoMessage()
func (*UserInfoResponse) ProtoReflect ¶
func (x *UserInfoResponse) ProtoReflect() protoreflect.Message
func (*UserInfoResponse) Reset ¶
func (x *UserInfoResponse) Reset()
func (*UserInfoResponse) Size ¶
func (x *UserInfoResponse) Size() (n int)
func (*UserInfoResponse) String ¶
func (x *UserInfoResponse) String() string
type UserLoginRequest ¶
type UserLoginRequest struct { Username string `protobuf:"bytes,1,opt,name=username,proto3" json:"username,omitempty"` Password string `protobuf:"bytes,2,opt,name=password,proto3" json:"password,omitempty"` // contains filtered or unexported fields }
==========================用户登录============================
func (*UserLoginRequest) Descriptor
deprecated
func (*UserLoginRequest) Descriptor() ([]byte, []int)
Deprecated: Use UserLoginRequest.ProtoReflect.Descriptor instead.
func (*UserLoginRequest) FastWrite ¶
func (x *UserLoginRequest) FastWrite(buf []byte) (offset int)
func (*UserLoginRequest) GetPassword ¶
func (x *UserLoginRequest) GetPassword() string
func (*UserLoginRequest) GetUsername ¶
func (x *UserLoginRequest) GetUsername() string
func (*UserLoginRequest) ProtoMessage ¶
func (*UserLoginRequest) ProtoMessage()
func (*UserLoginRequest) ProtoReflect ¶
func (x *UserLoginRequest) ProtoReflect() protoreflect.Message
func (*UserLoginRequest) Reset ¶
func (x *UserLoginRequest) Reset()
func (*UserLoginRequest) Size ¶
func (x *UserLoginRequest) Size() (n int)
func (*UserLoginRequest) String ¶
func (x *UserLoginRequest) String() string
type UserLoginResponse ¶
type UserLoginResponse struct { StatusCode int32 `protobuf:"varint,1,opt,name=status_code,json=statusCode,proto3" json:"status_code,omitempty"` 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"` Token string `protobuf:"bytes,4,opt,name=token,proto3" json:"token,omitempty"` // contains filtered or unexported fields }
func (*UserLoginResponse) Descriptor
deprecated
func (*UserLoginResponse) Descriptor() ([]byte, []int)
Deprecated: Use UserLoginResponse.ProtoReflect.Descriptor instead.
func (*UserLoginResponse) FastWrite ¶
func (x *UserLoginResponse) FastWrite(buf []byte) (offset int)
func (*UserLoginResponse) GetStatusCode ¶
func (x *UserLoginResponse) GetStatusCode() int32
func (*UserLoginResponse) GetStatusMsg ¶
func (x *UserLoginResponse) GetStatusMsg() string
func (*UserLoginResponse) GetToken ¶
func (x *UserLoginResponse) GetToken() string
func (*UserLoginResponse) GetUserId ¶
func (x *UserLoginResponse) GetUserId() int64
func (*UserLoginResponse) ProtoMessage ¶
func (*UserLoginResponse) ProtoMessage()
func (*UserLoginResponse) ProtoReflect ¶
func (x *UserLoginResponse) ProtoReflect() protoreflect.Message
func (*UserLoginResponse) Reset ¶
func (x *UserLoginResponse) Reset()
func (*UserLoginResponse) Size ¶
func (x *UserLoginResponse) Size() (n int)
func (*UserLoginResponse) String ¶
func (x *UserLoginResponse) String() string
type UserRegisterRequest ¶
type UserRegisterRequest struct { Username string `protobuf:"bytes,1,opt,name=username,proto3" json:"username,omitempty"` // 注册用户名,最长32个字符 Password string `protobuf:"bytes,2,opt,name=password,proto3" json:"password,omitempty"` // 密码,最长32个字符 // contains filtered or unexported fields }
=========================用户注册============================
func (*UserRegisterRequest) Descriptor
deprecated
func (*UserRegisterRequest) Descriptor() ([]byte, []int)
Deprecated: Use UserRegisterRequest.ProtoReflect.Descriptor instead.
func (*UserRegisterRequest) FastWrite ¶
func (x *UserRegisterRequest) FastWrite(buf []byte) (offset int)
func (*UserRegisterRequest) GetPassword ¶
func (x *UserRegisterRequest) GetPassword() string
func (*UserRegisterRequest) GetUsername ¶
func (x *UserRegisterRequest) GetUsername() string
func (*UserRegisterRequest) ProtoMessage ¶
func (*UserRegisterRequest) ProtoMessage()
func (*UserRegisterRequest) ProtoReflect ¶
func (x *UserRegisterRequest) ProtoReflect() protoreflect.Message
func (*UserRegisterRequest) Reset ¶
func (x *UserRegisterRequest) Reset()
func (*UserRegisterRequest) Size ¶
func (x *UserRegisterRequest) Size() (n int)
func (*UserRegisterRequest) String ¶
func (x *UserRegisterRequest) String() string
type UserRegisterResponse ¶
type UserRegisterResponse struct { StatusCode int32 `protobuf:"varint,1,opt,name=status_code,json=statusCode,proto3" json:"status_code,omitempty"` 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"` Token string `protobuf:"bytes,4,opt,name=token,proto3" json:"token,omitempty"` // contains filtered or unexported fields }
func (*UserRegisterResponse) Descriptor
deprecated
func (*UserRegisterResponse) Descriptor() ([]byte, []int)
Deprecated: Use UserRegisterResponse.ProtoReflect.Descriptor instead.
func (*UserRegisterResponse) FastWrite ¶
func (x *UserRegisterResponse) FastWrite(buf []byte) (offset int)
func (*UserRegisterResponse) GetStatusCode ¶
func (x *UserRegisterResponse) GetStatusCode() int32
func (*UserRegisterResponse) GetStatusMsg ¶
func (x *UserRegisterResponse) GetStatusMsg() string
func (*UserRegisterResponse) GetToken ¶
func (x *UserRegisterResponse) GetToken() string
func (*UserRegisterResponse) GetUserId ¶
func (x *UserRegisterResponse) GetUserId() int64
func (*UserRegisterResponse) ProtoMessage ¶
func (*UserRegisterResponse) ProtoMessage()
func (*UserRegisterResponse) ProtoReflect ¶
func (x *UserRegisterResponse) ProtoReflect() protoreflect.Message
func (*UserRegisterResponse) Reset ¶
func (x *UserRegisterResponse) Reset()
func (*UserRegisterResponse) Size ¶
func (x *UserRegisterResponse) Size() (n int)
func (*UserRegisterResponse) String ¶
func (x *UserRegisterResponse) String() string
type UserService ¶
type UserService interface { Register(ctx context.Context, req *UserRegisterRequest) (res *UserRegisterResponse, err error) Login(ctx context.Context, req *UserLoginRequest) (res *UserLoginResponse, err error) UserInfo(ctx context.Context, req *UserInfoRequest) (res *UserInfoResponse, err error) }
Click to show internal directories.
Click to hide internal directories.