Documentation ¶
Index ¶
- Constants
- Variables
- func RegisterLikeServer(s grpc.ServiceRegistrar, srv LikeServer)
- type IsThumbupRequest
- func (*IsThumbupRequest) Descriptor() ([]byte, []int)deprecated
- func (x *IsThumbupRequest) GetBizId() string
- func (x *IsThumbupRequest) GetTargetId() int64
- func (x *IsThumbupRequest) GetUserId() int64
- func (*IsThumbupRequest) ProtoMessage()
- func (x *IsThumbupRequest) ProtoReflect() protoreflect.Message
- func (x *IsThumbupRequest) Reset()
- func (x *IsThumbupRequest) String() string
- type IsThumbupResponse
- func (*IsThumbupResponse) Descriptor() ([]byte, []int)deprecated
- func (x *IsThumbupResponse) GetUserThumbups() map[int64]*UserThumbup
- func (*IsThumbupResponse) ProtoMessage()
- func (x *IsThumbupResponse) ProtoReflect() protoreflect.Message
- func (x *IsThumbupResponse) Reset()
- func (x *IsThumbupResponse) String() string
- type LikeClient
- type LikeServer
- type ThumbupRequest
- func (*ThumbupRequest) Descriptor() ([]byte, []int)deprecated
- func (x *ThumbupRequest) GetBizId() string
- func (x *ThumbupRequest) GetLikeType() int32
- func (x *ThumbupRequest) GetObjId() int64
- func (x *ThumbupRequest) GetUserId() int64
- func (*ThumbupRequest) ProtoMessage()
- func (x *ThumbupRequest) ProtoReflect() protoreflect.Message
- func (x *ThumbupRequest) Reset()
- func (x *ThumbupRequest) String() string
- type ThumbupResponse
- func (*ThumbupResponse) Descriptor() ([]byte, []int)deprecated
- func (x *ThumbupResponse) GetBizId() string
- func (x *ThumbupResponse) GetDislikeNum() int64
- func (x *ThumbupResponse) GetLikeNum() int64
- func (x *ThumbupResponse) GetObjId() int64
- func (*ThumbupResponse) ProtoMessage()
- func (x *ThumbupResponse) ProtoReflect() protoreflect.Message
- func (x *ThumbupResponse) Reset()
- func (x *ThumbupResponse) String() string
- type UnimplementedLikeServer
- type UnsafeLikeServer
- type UserThumbup
- func (*UserThumbup) Descriptor() ([]byte, []int)deprecated
- func (x *UserThumbup) GetLikeType() int32
- func (x *UserThumbup) GetThumbupTime() int64
- func (x *UserThumbup) GetUserId() int64
- func (*UserThumbup) ProtoMessage()
- func (x *UserThumbup) ProtoReflect() protoreflect.Message
- func (x *UserThumbup) Reset()
- func (x *UserThumbup) String() string
Constants ¶
const ( Like_Thumbup_FullMethodName = "/pb.Like/Thumbup" Like_IsThumbup_FullMethodName = "/pb.Like/IsThumbup" )
Variables ¶
var File_like_proto protoreflect.FileDescriptor
var Like_ServiceDesc = grpc.ServiceDesc{ ServiceName: "pb.Like", HandlerType: (*LikeServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Thumbup", Handler: _Like_Thumbup_Handler, }, { MethodName: "IsThumbup", Handler: _Like_IsThumbup_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "like.proto", }
Like_ServiceDesc is the grpc.ServiceDesc for Like service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterLikeServer ¶
func RegisterLikeServer(s grpc.ServiceRegistrar, srv LikeServer)
Types ¶
type IsThumbupRequest ¶
type IsThumbupRequest struct { BizId string `protobuf:"bytes,1,opt,name=bizId,proto3" json:"bizId,omitempty"` // 业务id TargetId int64 `protobuf:"varint,2,opt,name=targetId,proto3" json:"targetId,omitempty"` // 点赞对象id UserId int64 `protobuf:"varint,3,opt,name=userId,proto3" json:"userId,omitempty"` // 用户id // contains filtered or unexported fields }
func (*IsThumbupRequest) Descriptor
deprecated
func (*IsThumbupRequest) Descriptor() ([]byte, []int)
Deprecated: Use IsThumbupRequest.ProtoReflect.Descriptor instead.
func (*IsThumbupRequest) GetBizId ¶
func (x *IsThumbupRequest) GetBizId() string
func (*IsThumbupRequest) GetTargetId ¶
func (x *IsThumbupRequest) GetTargetId() int64
func (*IsThumbupRequest) GetUserId ¶
func (x *IsThumbupRequest) GetUserId() int64
func (*IsThumbupRequest) ProtoMessage ¶
func (*IsThumbupRequest) ProtoMessage()
func (*IsThumbupRequest) ProtoReflect ¶
func (x *IsThumbupRequest) ProtoReflect() protoreflect.Message
func (*IsThumbupRequest) Reset ¶
func (x *IsThumbupRequest) Reset()
func (*IsThumbupRequest) String ¶
func (x *IsThumbupRequest) String() string
type IsThumbupResponse ¶
type IsThumbupResponse struct { UserThumbups map[int64]*UserThumbup `` /* 166-byte string literal not displayed */ // contains filtered or unexported fields }
func (*IsThumbupResponse) Descriptor
deprecated
func (*IsThumbupResponse) Descriptor() ([]byte, []int)
Deprecated: Use IsThumbupResponse.ProtoReflect.Descriptor instead.
func (*IsThumbupResponse) GetUserThumbups ¶
func (x *IsThumbupResponse) GetUserThumbups() map[int64]*UserThumbup
func (*IsThumbupResponse) ProtoMessage ¶
func (*IsThumbupResponse) ProtoMessage()
func (*IsThumbupResponse) ProtoReflect ¶
func (x *IsThumbupResponse) ProtoReflect() protoreflect.Message
func (*IsThumbupResponse) Reset ¶
func (x *IsThumbupResponse) Reset()
func (*IsThumbupResponse) String ¶
func (x *IsThumbupResponse) String() string
type LikeClient ¶
type LikeClient interface { Thumbup(ctx context.Context, in *ThumbupRequest, opts ...grpc.CallOption) (*ThumbupResponse, error) IsThumbup(ctx context.Context, in *IsThumbupRequest, opts ...grpc.CallOption) (*IsThumbupResponse, error) }
LikeClient is the client API for Like 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 NewLikeClient ¶
func NewLikeClient(cc grpc.ClientConnInterface) LikeClient
type LikeServer ¶
type LikeServer interface { Thumbup(context.Context, *ThumbupRequest) (*ThumbupResponse, error) IsThumbup(context.Context, *IsThumbupRequest) (*IsThumbupResponse, error) // contains filtered or unexported methods }
LikeServer is the server API for Like service. All implementations must embed UnimplementedLikeServer for forward compatibility
type ThumbupRequest ¶
type ThumbupRequest struct { BizId string `protobuf:"bytes,1,opt,name=bizId,proto3" json:"bizId,omitempty"` // 业务id ObjId int64 `protobuf:"varint,2,opt,name=objId,proto3" json:"objId,omitempty"` // 点赞对象id UserId int64 `protobuf:"varint,3,opt,name=userId,proto3" json:"userId,omitempty"` // 用户id LikeType int32 `protobuf:"varint,4,opt,name=likeType,proto3" json:"likeType,omitempty"` // 类型 // contains filtered or unexported fields }
func (*ThumbupRequest) Descriptor
deprecated
func (*ThumbupRequest) Descriptor() ([]byte, []int)
Deprecated: Use ThumbupRequest.ProtoReflect.Descriptor instead.
func (*ThumbupRequest) GetBizId ¶
func (x *ThumbupRequest) GetBizId() string
func (*ThumbupRequest) GetLikeType ¶
func (x *ThumbupRequest) GetLikeType() int32
func (*ThumbupRequest) GetObjId ¶
func (x *ThumbupRequest) GetObjId() int64
func (*ThumbupRequest) GetUserId ¶
func (x *ThumbupRequest) GetUserId() int64
func (*ThumbupRequest) ProtoMessage ¶
func (*ThumbupRequest) ProtoMessage()
func (*ThumbupRequest) ProtoReflect ¶
func (x *ThumbupRequest) ProtoReflect() protoreflect.Message
func (*ThumbupRequest) Reset ¶
func (x *ThumbupRequest) Reset()
func (*ThumbupRequest) String ¶
func (x *ThumbupRequest) String() string
type ThumbupResponse ¶
type ThumbupResponse struct { BizId string `protobuf:"bytes,1,opt,name=bizId,proto3" json:"bizId,omitempty"` // 业务id ObjId int64 `protobuf:"varint,2,opt,name=objId,proto3" json:"objId,omitempty"` // 点赞对象id LikeNum int64 `protobuf:"varint,3,opt,name=likeNum,proto3" json:"likeNum,omitempty"` // 点赞数 DislikeNum int64 `protobuf:"varint,4,opt,name=dislikeNum,proto3" json:"dislikeNum,omitempty"` // 点踩数 // contains filtered or unexported fields }
func (*ThumbupResponse) Descriptor
deprecated
func (*ThumbupResponse) Descriptor() ([]byte, []int)
Deprecated: Use ThumbupResponse.ProtoReflect.Descriptor instead.
func (*ThumbupResponse) GetBizId ¶
func (x *ThumbupResponse) GetBizId() string
func (*ThumbupResponse) GetDislikeNum ¶
func (x *ThumbupResponse) GetDislikeNum() int64
func (*ThumbupResponse) GetLikeNum ¶
func (x *ThumbupResponse) GetLikeNum() int64
func (*ThumbupResponse) GetObjId ¶
func (x *ThumbupResponse) GetObjId() int64
func (*ThumbupResponse) ProtoMessage ¶
func (*ThumbupResponse) ProtoMessage()
func (*ThumbupResponse) ProtoReflect ¶
func (x *ThumbupResponse) ProtoReflect() protoreflect.Message
func (*ThumbupResponse) Reset ¶
func (x *ThumbupResponse) Reset()
func (*ThumbupResponse) String ¶
func (x *ThumbupResponse) String() string
type UnimplementedLikeServer ¶
type UnimplementedLikeServer struct { }
UnimplementedLikeServer must be embedded to have forward compatible implementations.
func (UnimplementedLikeServer) IsThumbup ¶
func (UnimplementedLikeServer) IsThumbup(context.Context, *IsThumbupRequest) (*IsThumbupResponse, error)
func (UnimplementedLikeServer) Thumbup ¶
func (UnimplementedLikeServer) Thumbup(context.Context, *ThumbupRequest) (*ThumbupResponse, error)
type UnsafeLikeServer ¶
type UnsafeLikeServer interface {
// contains filtered or unexported methods
}
UnsafeLikeServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to LikeServer will result in compilation errors.
type UserThumbup ¶
type UserThumbup struct { UserId int64 `protobuf:"varint,1,opt,name=userId,proto3" json:"userId,omitempty"` ThumbupTime int64 `protobuf:"varint,2,opt,name=thumbupTime,proto3" json:"thumbupTime,omitempty"` LikeType int32 `protobuf:"varint,3,opt,name=likeType,proto3" json:"likeType,omitempty"` // 类型 // contains filtered or unexported fields }
func (*UserThumbup) Descriptor
deprecated
func (*UserThumbup) Descriptor() ([]byte, []int)
Deprecated: Use UserThumbup.ProtoReflect.Descriptor instead.
func (*UserThumbup) GetLikeType ¶
func (x *UserThumbup) GetLikeType() int32
func (*UserThumbup) GetThumbupTime ¶
func (x *UserThumbup) GetThumbupTime() int64
func (*UserThumbup) GetUserId ¶
func (x *UserThumbup) GetUserId() int64
func (*UserThumbup) ProtoMessage ¶
func (*UserThumbup) ProtoMessage()
func (*UserThumbup) ProtoReflect ¶
func (x *UserThumbup) ProtoReflect() protoreflect.Message
func (*UserThumbup) Reset ¶
func (x *UserThumbup) Reset()
func (*UserThumbup) String ¶
func (x *UserThumbup) String() string