Documentation ¶
Index ¶
- Variables
- type BaseResp
- func (*BaseResp) Descriptor() ([]byte, []int)deprecated
- func (x *BaseResp) GetServiceTime() int64
- func (x *BaseResp) GetStatusCode() int32
- func (x *BaseResp) GetStatusMessage() string
- func (*BaseResp) ProtoMessage()
- func (x *BaseResp) ProtoReflect() protoreflect.Message
- func (x *BaseResp) Reset()
- func (x *BaseResp) String() string
- type CheckUserRequest
- func (*CheckUserRequest) Descriptor() ([]byte, []int)deprecated
- func (x *CheckUserRequest) GetPassword() string
- func (x *CheckUserRequest) GetUsername() string
- func (*CheckUserRequest) ProtoMessage()
- func (x *CheckUserRequest) ProtoReflect() protoreflect.Message
- func (x *CheckUserRequest) Reset()
- func (x *CheckUserRequest) String() string
- type CheckUserResponse
- func (*CheckUserResponse) Descriptor() ([]byte, []int)deprecated
- func (x *CheckUserResponse) GetBaseResp() *BaseResp
- func (x *CheckUserResponse) GetUserId() int64
- func (*CheckUserResponse) ProtoMessage()
- func (x *CheckUserResponse) ProtoReflect() protoreflect.Message
- func (x *CheckUserResponse) Reset()
- func (x *CheckUserResponse) String() string
- type RegisterUserRequest
- func (*RegisterUserRequest) Descriptor() ([]byte, []int)deprecated
- func (x *RegisterUserRequest) GetPassword() string
- func (x *RegisterUserRequest) GetUsername() string
- func (*RegisterUserRequest) ProtoMessage()
- func (x *RegisterUserRequest) ProtoReflect() protoreflect.Message
- func (x *RegisterUserRequest) Reset()
- func (x *RegisterUserRequest) String() string
- type RegisterUserResponse
- func (*RegisterUserResponse) Descriptor() ([]byte, []int)deprecated
- func (x *RegisterUserResponse) GetBaseResp() *BaseResp
- func (x *RegisterUserResponse) GetToken() string
- func (x *RegisterUserResponse) GetUserId() int64
- func (*RegisterUserResponse) ProtoMessage()
- func (x *RegisterUserResponse) ProtoReflect() protoreflect.Message
- func (x *RegisterUserResponse) Reset()
- func (x *RegisterUserResponse) String() string
- type User
- func (*User) Descriptor() ([]byte, []int)deprecated
- 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 (*User) ProtoMessage()
- func (x *User) ProtoReflect() protoreflect.Message
- func (x *User) Reset()
- func (x *User) String() string
- type UserInfoRequest
- func (*UserInfoRequest) Descriptor() ([]byte, []int)deprecated
- 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) String() string
- type UserInfoResponse
- func (*UserInfoResponse) Descriptor() ([]byte, []int)deprecated
- func (x *UserInfoResponse) GetBaseResp() *BaseResp
- func (x *UserInfoResponse) GetUser() *User
- func (*UserInfoResponse) ProtoMessage()
- func (x *UserInfoResponse) ProtoReflect() protoreflect.Message
- func (x *UserInfoResponse) Reset()
- func (x *UserInfoResponse) 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 BaseResp ¶
type BaseResp struct { StatusCode int32 `protobuf:"varint,1,opt,name=status_code,json=statusCode,proto3" json:"status_code,omitempty"` //状态码 StatusMessage string `protobuf:"bytes,2,opt,name=status_message,json=statusMessage,proto3" json:"status_message,omitempty"` //状态描述 ServiceTime int64 `protobuf:"varint,3,opt,name=service_time,json=serviceTime,proto3" json:"service_time,omitempty"` //服务时间 // contains filtered or unexported fields }
func (*BaseResp) Descriptor
deprecated
func (*BaseResp) GetServiceTime ¶
func (*BaseResp) GetStatusCode ¶
func (*BaseResp) GetStatusMessage ¶
func (*BaseResp) ProtoMessage ¶
func (*BaseResp) ProtoMessage()
func (*BaseResp) ProtoReflect ¶
func (x *BaseResp) ProtoReflect() protoreflect.Message
type CheckUserRequest ¶
type CheckUserRequest 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 (*CheckUserRequest) Descriptor
deprecated
func (*CheckUserRequest) Descriptor() ([]byte, []int)
Deprecated: Use CheckUserRequest.ProtoReflect.Descriptor instead.
func (*CheckUserRequest) GetPassword ¶
func (x *CheckUserRequest) GetPassword() string
func (*CheckUserRequest) GetUsername ¶
func (x *CheckUserRequest) GetUsername() string
func (*CheckUserRequest) ProtoMessage ¶
func (*CheckUserRequest) ProtoMessage()
func (*CheckUserRequest) ProtoReflect ¶
func (x *CheckUserRequest) ProtoReflect() protoreflect.Message
func (*CheckUserRequest) Reset ¶
func (x *CheckUserRequest) Reset()
func (*CheckUserRequest) String ¶
func (x *CheckUserRequest) String() string
type CheckUserResponse ¶
type CheckUserResponse struct { BaseResp *BaseResp `protobuf:"bytes,1,opt,name=base_resp,json=baseResp,proto3" json:"base_resp,omitempty"` UserId int64 `protobuf:"varint,2,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"` //用户id // contains filtered or unexported fields }
func (*CheckUserResponse) Descriptor
deprecated
func (*CheckUserResponse) Descriptor() ([]byte, []int)
Deprecated: Use CheckUserResponse.ProtoReflect.Descriptor instead.
func (*CheckUserResponse) GetBaseResp ¶
func (x *CheckUserResponse) GetBaseResp() *BaseResp
func (*CheckUserResponse) GetUserId ¶
func (x *CheckUserResponse) GetUserId() int64
func (*CheckUserResponse) ProtoMessage ¶
func (*CheckUserResponse) ProtoMessage()
func (*CheckUserResponse) ProtoReflect ¶
func (x *CheckUserResponse) ProtoReflect() protoreflect.Message
func (*CheckUserResponse) Reset ¶
func (x *CheckUserResponse) Reset()
func (*CheckUserResponse) String ¶
func (x *CheckUserResponse) String() string
type RegisterUserRequest ¶
type RegisterUserRequest 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 (*RegisterUserRequest) Descriptor
deprecated
func (*RegisterUserRequest) Descriptor() ([]byte, []int)
Deprecated: Use RegisterUserRequest.ProtoReflect.Descriptor instead.
func (*RegisterUserRequest) GetPassword ¶
func (x *RegisterUserRequest) GetPassword() string
func (*RegisterUserRequest) GetUsername ¶
func (x *RegisterUserRequest) GetUsername() string
func (*RegisterUserRequest) ProtoMessage ¶
func (*RegisterUserRequest) ProtoMessage()
func (*RegisterUserRequest) ProtoReflect ¶
func (x *RegisterUserRequest) ProtoReflect() protoreflect.Message
func (*RegisterUserRequest) Reset ¶
func (x *RegisterUserRequest) Reset()
func (*RegisterUserRequest) String ¶
func (x *RegisterUserRequest) String() string
type RegisterUserResponse ¶
type RegisterUserResponse struct { BaseResp *BaseResp `protobuf:"bytes,1,opt,name=base_resp,json=baseResp,proto3" json:"base_resp,omitempty"` UserId int64 `protobuf:"varint,2,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"` //用户id Token string `protobuf:"bytes,3,opt,name=token,proto3" json:"token,omitempty"` //用户鉴权token // contains filtered or unexported fields }
func (*RegisterUserResponse) Descriptor
deprecated
func (*RegisterUserResponse) Descriptor() ([]byte, []int)
Deprecated: Use RegisterUserResponse.ProtoReflect.Descriptor instead.
func (*RegisterUserResponse) GetBaseResp ¶
func (x *RegisterUserResponse) GetBaseResp() *BaseResp
func (*RegisterUserResponse) GetToken ¶
func (x *RegisterUserResponse) GetToken() string
func (*RegisterUserResponse) GetUserId ¶
func (x *RegisterUserResponse) GetUserId() int64
func (*RegisterUserResponse) ProtoMessage ¶
func (*RegisterUserResponse) ProtoMessage()
func (*RegisterUserResponse) ProtoReflect ¶
func (x *RegisterUserResponse) ProtoReflect() protoreflect.Message
func (*RegisterUserResponse) Reset ¶
func (x *RegisterUserResponse) Reset()
func (*RegisterUserResponse) String ¶
func (x *RegisterUserResponse) String() string
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-未关注 // contains filtered or unexported fields }
func (*User) Descriptor
deprecated
func (*User) GetFollowCount ¶
func (*User) GetFollowerCount ¶
func (*User) GetIsFollow ¶
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"` //用户id Token string `protobuf:"bytes,2,opt,name=token,proto3" json:"token,omitempty"` //用户鉴权token // contains filtered or unexported fields }
func (*UserInfoRequest) Descriptor
deprecated
func (*UserInfoRequest) Descriptor() ([]byte, []int)
Deprecated: Use UserInfoRequest.ProtoReflect.Descriptor instead.
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) String ¶
func (x *UserInfoRequest) String() string
type UserInfoResponse ¶
type UserInfoResponse struct { BaseResp *BaseResp `protobuf:"bytes,1,opt,name=base_resp,json=baseResp,proto3" json:"base_resp,omitempty"` User *User `protobuf:"bytes,2,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) GetBaseResp ¶
func (x *UserInfoResponse) GetBaseResp() *BaseResp
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) String ¶
func (x *UserInfoResponse) String() string
type UserService ¶
type UserService interface { CheckUser(ctx context.Context, req *CheckUserRequest) (res *CheckUserResponse, err error) RegisterUser(ctx context.Context, req *RegisterUserRequest) (res *RegisterUserResponse, err error) UserInfo(ctx context.Context, req *UserInfoRequest) (res *UserInfoResponse, err error) }
Click to show internal directories.
Click to hide internal directories.