Documentation ¶
Index ¶
- Constants
- Variables
- func RegisterUserServiceServer(s grpc.ServiceRegistrar, srv UserServiceServer)
- type CodeResp
- type GetInfoByIdReq
- func (*GetInfoByIdReq) Descriptor() ([]byte, []int)deprecated
- func (x *GetInfoByIdReq) GetTargetUserId() int64
- func (x *GetInfoByIdReq) GetUserId() int64
- func (*GetInfoByIdReq) ProtoMessage()
- func (x *GetInfoByIdReq) ProtoReflect() protoreflect.Message
- func (x *GetInfoByIdReq) Reset()
- func (x *GetInfoByIdReq) String() string
- type GetInfoByIdResp
- func (*GetInfoByIdResp) Descriptor() ([]byte, []int)deprecated
- func (x *GetInfoByIdResp) GetCode() int64
- func (x *GetInfoByIdResp) GetUser() *User
- func (*GetInfoByIdResp) ProtoMessage()
- func (x *GetInfoByIdResp) ProtoReflect() protoreflect.Message
- func (x *GetInfoByIdResp) Reset()
- func (x *GetInfoByIdResp) String() string
- type GetInfoListReq
- func (*GetInfoListReq) Descriptor() ([]byte, []int)deprecated
- func (x *GetInfoListReq) GetTargetUserIds() []int64
- func (x *GetInfoListReq) GetUserId() int64
- func (*GetInfoListReq) ProtoMessage()
- func (x *GetInfoListReq) ProtoReflect() protoreflect.Message
- func (x *GetInfoListReq) Reset()
- func (x *GetInfoListReq) String() string
- type GetInfoListResp
- func (*GetInfoListResp) Descriptor() ([]byte, []int)deprecated
- func (x *GetInfoListResp) GetCode() int64
- func (x *GetInfoListResp) GetUsers() []*User
- func (*GetInfoListResp) ProtoMessage()
- func (x *GetInfoListResp) ProtoReflect() protoreflect.Message
- func (x *GetInfoListResp) Reset()
- func (x *GetInfoListResp) String() string
- type UnimplementedUserServiceServer
- func (UnimplementedUserServiceServer) GetInfoById(context.Context, *GetInfoByIdReq) (*GetInfoByIdResp, error)
- func (UnimplementedUserServiceServer) GetInfoList(context.Context, *GetInfoListReq) (*GetInfoListResp, error)
- func (UnimplementedUserServiceServer) UpdateWorkCnt(context.Context, *UpdateWorkCntReq) (*CodeResp, error)
- type UnsafeUserServiceServer
- type UpdateWorkCntReq
- func (*UpdateWorkCntReq) Descriptor() ([]byte, []int)deprecated
- func (x *UpdateWorkCntReq) GetIsAdd() int64
- func (x *UpdateWorkCntReq) GetUserId() int64
- func (*UpdateWorkCntReq) ProtoMessage()
- func (x *UpdateWorkCntReq) ProtoReflect() protoreflect.Message
- func (x *UpdateWorkCntReq) Reset()
- func (x *UpdateWorkCntReq) String() string
- type User
- func (*User) Descriptor() ([]byte, []int)deprecated
- 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) String() string
- type UserServiceClient
- type UserServiceServer
Constants ¶
const ( UserService_GetInfoById_FullMethodName = "/user.UserService/GetInfoById" UserService_GetInfoList_FullMethodName = "/user.UserService/GetInfoList" UserService_UpdateWorkCnt_FullMethodName = "/user.UserService/UpdateWorkCnt" )
Variables ¶
var File_user_proto protoreflect.FileDescriptor
var UserService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "user.UserService", HandlerType: (*UserServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "GetInfoById", Handler: _UserService_GetInfoById_Handler, }, { MethodName: "GetInfoList", Handler: _UserService_GetInfoList_Handler, }, { MethodName: "UpdateWorkCnt", Handler: _UserService_UpdateWorkCnt_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "user.proto", }
UserService_ServiceDesc is the grpc.ServiceDesc for UserService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterUserServiceServer ¶
func RegisterUserServiceServer(s grpc.ServiceRegistrar, srv UserServiceServer)
Types ¶
type CodeResp ¶
type CodeResp struct { Code int64 `protobuf:"varint,1,opt,name=Code,proto3" json:"Code,omitempty"` // contains filtered or unexported fields }
func (*CodeResp) Descriptor
deprecated
func (*CodeResp) ProtoMessage ¶
func (*CodeResp) ProtoMessage()
func (*CodeResp) ProtoReflect ¶
func (x *CodeResp) ProtoReflect() protoreflect.Message
type GetInfoByIdReq ¶
type GetInfoByIdReq struct { UserId int64 `protobuf:"varint,1,opt,name=UserId,proto3" json:"UserId,omitempty"` TargetUserId int64 `protobuf:"varint,2,opt,name=TargetUserId,proto3" json:"TargetUserId,omitempty"` // contains filtered or unexported fields }
func (*GetInfoByIdReq) Descriptor
deprecated
func (*GetInfoByIdReq) Descriptor() ([]byte, []int)
Deprecated: Use GetInfoByIdReq.ProtoReflect.Descriptor instead.
func (*GetInfoByIdReq) GetTargetUserId ¶
func (x *GetInfoByIdReq) GetTargetUserId() int64
func (*GetInfoByIdReq) GetUserId ¶
func (x *GetInfoByIdReq) GetUserId() int64
func (*GetInfoByIdReq) ProtoMessage ¶
func (*GetInfoByIdReq) ProtoMessage()
func (*GetInfoByIdReq) ProtoReflect ¶
func (x *GetInfoByIdReq) ProtoReflect() protoreflect.Message
func (*GetInfoByIdReq) Reset ¶
func (x *GetInfoByIdReq) Reset()
func (*GetInfoByIdReq) String ¶
func (x *GetInfoByIdReq) String() string
type GetInfoByIdResp ¶
type GetInfoByIdResp struct { Code int64 `protobuf:"varint,1,opt,name=Code,proto3" json:"Code,omitempty"` User *User `protobuf:"bytes,2,opt,name=User,proto3" json:"User,omitempty"` // contains filtered or unexported fields }
func (*GetInfoByIdResp) Descriptor
deprecated
func (*GetInfoByIdResp) Descriptor() ([]byte, []int)
Deprecated: Use GetInfoByIdResp.ProtoReflect.Descriptor instead.
func (*GetInfoByIdResp) GetCode ¶
func (x *GetInfoByIdResp) GetCode() int64
func (*GetInfoByIdResp) GetUser ¶
func (x *GetInfoByIdResp) GetUser() *User
func (*GetInfoByIdResp) ProtoMessage ¶
func (*GetInfoByIdResp) ProtoMessage()
func (*GetInfoByIdResp) ProtoReflect ¶
func (x *GetInfoByIdResp) ProtoReflect() protoreflect.Message
func (*GetInfoByIdResp) Reset ¶
func (x *GetInfoByIdResp) Reset()
func (*GetInfoByIdResp) String ¶
func (x *GetInfoByIdResp) String() string
type GetInfoListReq ¶
type GetInfoListReq struct { TargetUserIds []int64 `protobuf:"varint,1,rep,packed,name=TargetUserIds,proto3" json:"TargetUserIds,omitempty"` UserId int64 `protobuf:"varint,2,opt,name=UserId,proto3" json:"UserId,omitempty"` // contains filtered or unexported fields }
func (*GetInfoListReq) Descriptor
deprecated
func (*GetInfoListReq) Descriptor() ([]byte, []int)
Deprecated: Use GetInfoListReq.ProtoReflect.Descriptor instead.
func (*GetInfoListReq) GetTargetUserIds ¶
func (x *GetInfoListReq) GetTargetUserIds() []int64
func (*GetInfoListReq) GetUserId ¶
func (x *GetInfoListReq) GetUserId() int64
func (*GetInfoListReq) ProtoMessage ¶
func (*GetInfoListReq) ProtoMessage()
func (*GetInfoListReq) ProtoReflect ¶
func (x *GetInfoListReq) ProtoReflect() protoreflect.Message
func (*GetInfoListReq) Reset ¶
func (x *GetInfoListReq) Reset()
func (*GetInfoListReq) String ¶
func (x *GetInfoListReq) String() string
type GetInfoListResp ¶
type GetInfoListResp struct { Code int64 `protobuf:"varint,1,opt,name=Code,proto3" json:"Code,omitempty"` Users []*User `protobuf:"bytes,2,rep,name=Users,proto3" json:"Users,omitempty"` // contains filtered or unexported fields }
func (*GetInfoListResp) Descriptor
deprecated
func (*GetInfoListResp) Descriptor() ([]byte, []int)
Deprecated: Use GetInfoListResp.ProtoReflect.Descriptor instead.
func (*GetInfoListResp) GetCode ¶
func (x *GetInfoListResp) GetCode() int64
func (*GetInfoListResp) GetUsers ¶
func (x *GetInfoListResp) GetUsers() []*User
func (*GetInfoListResp) ProtoMessage ¶
func (*GetInfoListResp) ProtoMessage()
func (*GetInfoListResp) ProtoReflect ¶
func (x *GetInfoListResp) ProtoReflect() protoreflect.Message
func (*GetInfoListResp) Reset ¶
func (x *GetInfoListResp) Reset()
func (*GetInfoListResp) String ¶
func (x *GetInfoListResp) String() string
type UnimplementedUserServiceServer ¶
type UnimplementedUserServiceServer struct { }
UnimplementedUserServiceServer must be embedded to have forward compatible implementations.
func (UnimplementedUserServiceServer) GetInfoById ¶
func (UnimplementedUserServiceServer) GetInfoById(context.Context, *GetInfoByIdReq) (*GetInfoByIdResp, error)
func (UnimplementedUserServiceServer) GetInfoList ¶
func (UnimplementedUserServiceServer) GetInfoList(context.Context, *GetInfoListReq) (*GetInfoListResp, error)
func (UnimplementedUserServiceServer) UpdateWorkCnt ¶
func (UnimplementedUserServiceServer) UpdateWorkCnt(context.Context, *UpdateWorkCntReq) (*CodeResp, error)
type UnsafeUserServiceServer ¶
type UnsafeUserServiceServer interface {
// contains filtered or unexported methods
}
UnsafeUserServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to UserServiceServer will result in compilation errors.
type UpdateWorkCntReq ¶
type UpdateWorkCntReq struct { UserId int64 `protobuf:"varint,1,opt,name=userId,proto3" json:"userId,omitempty"` IsAdd int64 `protobuf:"varint,2,opt,name=isAdd,proto3" json:"isAdd,omitempty"` // contains filtered or unexported fields }
func (*UpdateWorkCntReq) Descriptor
deprecated
func (*UpdateWorkCntReq) Descriptor() ([]byte, []int)
Deprecated: Use UpdateWorkCntReq.ProtoReflect.Descriptor instead.
func (*UpdateWorkCntReq) GetIsAdd ¶
func (x *UpdateWorkCntReq) GetIsAdd() int64
func (*UpdateWorkCntReq) GetUserId ¶
func (x *UpdateWorkCntReq) GetUserId() int64
func (*UpdateWorkCntReq) ProtoMessage ¶
func (*UpdateWorkCntReq) ProtoMessage()
func (*UpdateWorkCntReq) ProtoReflect ¶
func (x *UpdateWorkCntReq) ProtoReflect() protoreflect.Message
func (*UpdateWorkCntReq) Reset ¶
func (x *UpdateWorkCntReq) Reset()
func (*UpdateWorkCntReq) String ¶
func (x *UpdateWorkCntReq) 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,oneof" json:"follow_count,omitempty"` // 关注总数 FollowerCount *int64 `protobuf:"varint,4,opt,name=follower_count,json=followerCount,proto3,oneof" 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,oneof" json:"avatar,omitempty"` //用户头像 BackgroundImage *string `protobuf:"bytes,7,opt,name=background_image,json=backgroundImage,proto3,oneof" json:"background_image,omitempty"` //用户个人页顶部大图 Signature *string `protobuf:"bytes,8,opt,name=signature,proto3,oneof" json:"signature,omitempty"` //个人简介 TotalFavorited *int64 `protobuf:"varint,9,opt,name=total_favorited,json=totalFavorited,proto3,oneof" json:"total_favorited,omitempty"` //获赞数量 WorkCount *int64 `protobuf:"varint,10,opt,name=work_count,json=workCount,proto3,oneof" json:"work_count,omitempty"` //作品数量 FavoriteCount *int64 `protobuf:"varint,11,opt,name=favorite_count,json=favoriteCount,proto3,oneof" 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 UserServiceClient ¶
type UserServiceClient interface { GetInfoById(ctx context.Context, in *GetInfoByIdReq, opts ...grpc.CallOption) (*GetInfoByIdResp, error) GetInfoList(ctx context.Context, in *GetInfoListReq, opts ...grpc.CallOption) (*GetInfoListResp, error) UpdateWorkCnt(ctx context.Context, in *UpdateWorkCntReq, opts ...grpc.CallOption) (*CodeResp, error) }
UserServiceClient is the client API for UserService service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
func NewUserServiceClient ¶
func NewUserServiceClient(cc grpc.ClientConnInterface) UserServiceClient
type UserServiceServer ¶
type UserServiceServer interface { GetInfoById(context.Context, *GetInfoByIdReq) (*GetInfoByIdResp, error) GetInfoList(context.Context, *GetInfoListReq) (*GetInfoListResp, error) UpdateWorkCnt(context.Context, *UpdateWorkCntReq) (*CodeResp, error) // contains filtered or unexported methods }
UserServiceServer is the server API for UserService service. All implementations must embed UnimplementedUserServiceServer for forward compatibility