api

package
v0.0.0-...-83adff0 Latest Latest
Warning

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

Go to latest
Published: Jul 6, 2020 License: GPL-3.0 Imports: 11 Imported by: 0

Documentation

Overview

Package api is a generated protocol buffer package.

It is generated from these files:

app/service/main/thumbup/api/api.proto

It has these top-level messages:

LikeReq
StatState
LikeReply
StatsReq
StatsReply
HasLikeReq
HasLikeReply
UserLikeState
UserLikesReq
ItemRecord
UserLikesReply
UserRecord
ItemLikesReq
ItemLikesReply
UpdateCountReq
RawStatReq
RawStatReply
MultiStatsReq
MultiStatsReply

Index

Constants

View Source
const AppID = "community.service.thumbup"

AppID .

Variables

View Source
var (
	ErrInvalidLengthApi = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowApi   = fmt.Errorf("proto: integer overflow")
)
View Source
var Action_name = map[int32]string{
	0: "ACTION_UNSPECIFIED",
	1: "ACTION_LIKE",
	2: "ACTION_CANCEL_LIKE",
	3: "ACTION_DISLIKE",
	4: "ACTION_CANCEL_DISLIKE",
}
View Source
var Action_value = map[string]int32{
	"ACTION_UNSPECIFIED":    0,
	"ACTION_LIKE":           1,
	"ACTION_CANCEL_LIKE":    2,
	"ACTION_DISLIKE":        3,
	"ACTION_CANCEL_DISLIKE": 4,
}
View Source
var State_name = map[int32]string{
	0: "STATE_UNSPECIFIED",
	1: "STATE_LIKE",
	2: "STATE_DISLIKE",
}
View Source
var State_value = map[string]int32{
	"STATE_UNSPECIFIED": 0,
	"STATE_LIKE":        1,
	"STATE_DISLIKE":     2,
}

Functions

func RegisterThumbupServer

func RegisterThumbupServer(s *grpc.Server, srv ThumbupServer)

Types

type Action

type Action int32
const (
	// The first value represents the default and must be == 0.
	Action_ACTION_UNSPECIFIED    Action = 0
	Action_ACTION_LIKE           Action = 1
	Action_ACTION_CANCEL_LIKE    Action = 2
	Action_ACTION_DISLIKE        Action = 3
	Action_ACTION_CANCEL_DISLIKE Action = 4
)

func (Action) EnumDescriptor

func (Action) EnumDescriptor() ([]byte, []int)

func (Action) String

func (x Action) String() string

type HasLikeReply

type HasLikeReply struct {
	States map[int64]*UserLikeState `` /* 140-byte string literal not displayed */
}

func (*HasLikeReply) Descriptor

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

func (*HasLikeReply) Marshal

func (m *HasLikeReply) Marshal() (dAtA []byte, err error)

func (*HasLikeReply) MarshalTo

func (m *HasLikeReply) MarshalTo(dAtA []byte) (int, error)

func (*HasLikeReply) ProtoMessage

func (*HasLikeReply) ProtoMessage()

func (*HasLikeReply) Reset

func (m *HasLikeReply) Reset()

func (*HasLikeReply) Size

func (m *HasLikeReply) Size() (n int)

func (*HasLikeReply) String

func (m *HasLikeReply) String() string

func (*HasLikeReply) Unmarshal

func (m *HasLikeReply) Unmarshal(dAtA []byte) error

type HasLikeReq

type HasLikeReq struct {
	// 业务
	Business string `protobuf:"bytes,1,opt,name=business,proto3" json:"business,omitempty" form:"business" validate:"required"`
	// 对象id
	MessageIds []int64 `` /* 131-byte string literal not displayed */
	// mid
	Mid int64 `protobuf:"varint,3,opt,name=mid,proto3" json:"mid,omitempty" form:"mid" validate:"required"`
	// ip
	IP string `protobuf:"bytes,4,opt,name=ip,proto3" json:"ip"`
}

func (*HasLikeReq) Descriptor

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

func (*HasLikeReq) Marshal

func (m *HasLikeReq) Marshal() (dAtA []byte, err error)

func (*HasLikeReq) MarshalTo

func (m *HasLikeReq) MarshalTo(dAtA []byte) (int, error)

func (*HasLikeReq) ProtoMessage

func (*HasLikeReq) ProtoMessage()

func (*HasLikeReq) Reset

func (m *HasLikeReq) Reset()

func (*HasLikeReq) Size

func (m *HasLikeReq) Size() (n int)

func (*HasLikeReq) String

func (m *HasLikeReq) String() string

func (*HasLikeReq) Unmarshal

func (m *HasLikeReq) Unmarshal(dAtA []byte) error

type ItemLikesReply

type ItemLikesReply struct {
	Users []*UserRecord `protobuf:"bytes,1,rep,name=users" json:"users,omitempty"`
}

func (*ItemLikesReply) Descriptor

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

func (*ItemLikesReply) Marshal

func (m *ItemLikesReply) Marshal() (dAtA []byte, err error)

func (*ItemLikesReply) MarshalTo

func (m *ItemLikesReply) MarshalTo(dAtA []byte) (int, error)

func (*ItemLikesReply) ProtoMessage

func (*ItemLikesReply) ProtoMessage()

func (*ItemLikesReply) Reset

func (m *ItemLikesReply) Reset()

func (*ItemLikesReply) Size

func (m *ItemLikesReply) Size() (n int)

func (*ItemLikesReply) String

func (m *ItemLikesReply) String() string

func (*ItemLikesReply) Unmarshal

func (m *ItemLikesReply) Unmarshal(dAtA []byte) error

type ItemLikesReq

type ItemLikesReq struct {
	// 业务
	Business string `protobuf:"bytes,1,opt,name=business,proto3" json:"business,omitempty" form:"business" validate:"required"`
	// 来源id
	OriginID int64 `protobuf:"varint,2,opt,name=origin_id,json=originId,proto3" json:"origin_id,omitempty" form:"origin_id"`
	// 对象id
	MessageID int64 `` /* 127-byte string literal not displayed */
	// last_mid 上个mid 去重用
	LastMid int64 `protobuf:"varint,4,opt,name=last_mid,json=lastMid,proto3" json:"last_mid,omitempty" form:"last_mid" json:"last_mid"`
	// pn
	Pn int64 `protobuf:"varint,5,opt,name=pn,proto3" json:"pn,omitempty" form:"pn" validate:"required,min=1"`
	// ps
	Ps int64 `protobuf:"varint,6,opt,name=ps,proto3" json:"ps,omitempty" form:"ps" validate:"required,min=1"`
	// ip
	IP string `protobuf:"bytes,7,opt,name=ip,proto3" json:"ip"`
}

func (*ItemLikesReq) Descriptor

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

func (*ItemLikesReq) Marshal

func (m *ItemLikesReq) Marshal() (dAtA []byte, err error)

func (*ItemLikesReq) MarshalTo

func (m *ItemLikesReq) MarshalTo(dAtA []byte) (int, error)

func (*ItemLikesReq) ProtoMessage

func (*ItemLikesReq) ProtoMessage()

func (*ItemLikesReq) Reset

func (m *ItemLikesReq) Reset()

func (*ItemLikesReq) Size

func (m *ItemLikesReq) Size() (n int)

func (*ItemLikesReq) String

func (m *ItemLikesReq) String() string

func (*ItemLikesReq) Unmarshal

func (m *ItemLikesReq) Unmarshal(dAtA []byte) error

type ItemRecord

type ItemRecord struct {
	// 对象id
	MessageID int64 `protobuf:"varint,1,opt,name=message_id,json=messageId,proto3" json:"message_id,omitempty"`
	// 点赞时间
	Time go_common_library_time.Time `protobuf:"varint,2,opt,name=time,proto3,casttype=go-common/library/time.Time" json:"time,omitempty"`
}

func (*ItemRecord) Descriptor

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

func (*ItemRecord) Marshal

func (m *ItemRecord) Marshal() (dAtA []byte, err error)

func (*ItemRecord) MarshalTo

func (m *ItemRecord) MarshalTo(dAtA []byte) (int, error)

func (*ItemRecord) ProtoMessage

func (*ItemRecord) ProtoMessage()

func (*ItemRecord) Reset

func (m *ItemRecord) Reset()

func (*ItemRecord) Size

func (m *ItemRecord) Size() (n int)

func (*ItemRecord) String

func (m *ItemRecord) String() string

func (*ItemRecord) Unmarshal

func (m *ItemRecord) Unmarshal(dAtA []byte) error

type LikeReply

type LikeReply struct {
	// 来源id
	OriginID int64 `protobuf:"varint,1,opt,name=origin_id,json=originId,proto3" json:"origin_id,omitempty"`
	// 对象id
	MessageID int64 `protobuf:"varint,2,opt,name=message_id,json=messageId,proto3" json:"message_id,omitempty"`
	// 点赞数
	LikeNumber int64 `protobuf:"varint,3,opt,name=like_number,json=likeNumber,proto3" json:"like_number,omitempty"`
	// 点踩数
	DislikeNumber int64 `protobuf:"varint,4,opt,name=dislike_number,json=dislikeNumber,proto3" json:"dislike_number,omitempty"`
}

func (*LikeReply) Descriptor

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

func (*LikeReply) Marshal

func (m *LikeReply) Marshal() (dAtA []byte, err error)

func (*LikeReply) MarshalTo

func (m *LikeReply) MarshalTo(dAtA []byte) (int, error)

func (*LikeReply) ProtoMessage

func (*LikeReply) ProtoMessage()

func (*LikeReply) Reset

func (m *LikeReply) Reset()

func (*LikeReply) Size

func (m *LikeReply) Size() (n int)

func (*LikeReply) String

func (m *LikeReply) String() string

func (*LikeReply) Unmarshal

func (m *LikeReply) Unmarshal(dAtA []byte) error

type LikeReq

type LikeReq struct {
	// 业务
	Business string `protobuf:"bytes,1,opt,name=business,proto3" json:"business,omitempty" form:"business" validate:"required"`
	// mid
	Mid int64 `protobuf:"varint,2,opt,name=mid,proto3" json:"mid,omitempty" form:"mid" validate:"required,min=1"`
	// up 主mid
	UpMid int64 `protobuf:"varint,3,opt,name=up_mid,json=upMid,proto3" json:"up_mid,omitempty" form:"up_mid"`
	// 来源id
	OriginID int64 `protobuf:"varint,4,opt,name=origin_id,json=originId,proto3" json:"origin_id,omitempty" form:"origin_id"`
	// 对象id
	MessageID int64  `` /* 127-byte string literal not displayed */
	Action    Action `` /* 144-byte string literal not displayed */
	// ip
	IP string `protobuf:"bytes,7,opt,name=ip,proto3" json:"ip"`
}

func (*LikeReq) Descriptor

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

func (*LikeReq) Marshal

func (m *LikeReq) Marshal() (dAtA []byte, err error)

func (*LikeReq) MarshalTo

func (m *LikeReq) MarshalTo(dAtA []byte) (int, error)

func (*LikeReq) ProtoMessage

func (*LikeReq) ProtoMessage()

func (*LikeReq) Reset

func (m *LikeReq) Reset()

func (*LikeReq) Size

func (m *LikeReq) Size() (n int)

func (*LikeReq) String

func (m *LikeReq) String() string

func (*LikeReq) Unmarshal

func (m *LikeReq) Unmarshal(dAtA []byte) error

type MultiStatsReply

type MultiStatsReply struct {
	// business and records
	Business map[string]*MultiStatsReply_Records `` /* 143-byte string literal not displayed */
}

func (*MultiStatsReply) Descriptor

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

func (*MultiStatsReply) Marshal

func (m *MultiStatsReply) Marshal() (dAtA []byte, err error)

func (*MultiStatsReply) MarshalTo

func (m *MultiStatsReply) MarshalTo(dAtA []byte) (int, error)

func (*MultiStatsReply) ProtoMessage

func (*MultiStatsReply) ProtoMessage()

func (*MultiStatsReply) Reset

func (m *MultiStatsReply) Reset()

func (*MultiStatsReply) Size

func (m *MultiStatsReply) Size() (n int)

func (*MultiStatsReply) String

func (m *MultiStatsReply) String() string

func (*MultiStatsReply) Unmarshal

func (m *MultiStatsReply) Unmarshal(dAtA []byte) error

type MultiStatsReply_Records

type MultiStatsReply_Records struct {
	Records map[int64]*StatState `` /* 142-byte string literal not displayed */
}

func (*MultiStatsReply_Records) Descriptor

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

func (*MultiStatsReply_Records) Marshal

func (m *MultiStatsReply_Records) Marshal() (dAtA []byte, err error)

func (*MultiStatsReply_Records) MarshalTo

func (m *MultiStatsReply_Records) MarshalTo(dAtA []byte) (int, error)

func (*MultiStatsReply_Records) ProtoMessage

func (*MultiStatsReply_Records) ProtoMessage()

func (*MultiStatsReply_Records) Reset

func (m *MultiStatsReply_Records) Reset()

func (*MultiStatsReply_Records) Size

func (m *MultiStatsReply_Records) Size() (n int)

func (*MultiStatsReply_Records) String

func (m *MultiStatsReply_Records) String() string

func (*MultiStatsReply_Records) Unmarshal

func (m *MultiStatsReply_Records) Unmarshal(dAtA []byte) error

type MultiStatsReq

type MultiStatsReq struct {
	// mid
	Mid int64 `protobuf:"varint,1,opt,name=mid,proto3" json:"mid,omitempty" form:"mid" validate:"required"`
	// business and records
	Business map[string]*MultiStatsReq_Business `` /* 143-byte string literal not displayed */
	// ip
	IP string `protobuf:"bytes,3,opt,name=ip,proto3" json:"ip"`
}

func (*MultiStatsReq) Descriptor

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

func (*MultiStatsReq) Marshal

func (m *MultiStatsReq) Marshal() (dAtA []byte, err error)

func (*MultiStatsReq) MarshalTo

func (m *MultiStatsReq) MarshalTo(dAtA []byte) (int, error)

func (*MultiStatsReq) ProtoMessage

func (*MultiStatsReq) ProtoMessage()

func (*MultiStatsReq) Reset

func (m *MultiStatsReq) Reset()

func (*MultiStatsReq) Size

func (m *MultiStatsReq) Size() (n int)

func (*MultiStatsReq) String

func (m *MultiStatsReq) String() string

func (*MultiStatsReq) Unmarshal

func (m *MultiStatsReq) Unmarshal(dAtA []byte) error

type MultiStatsReq_Business

type MultiStatsReq_Business struct {
	Records []*MultiStatsReq_Record `protobuf:"bytes,1,rep,name=records" json:"records,omitempty"`
}

func (*MultiStatsReq_Business) Descriptor

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

func (*MultiStatsReq_Business) Marshal

func (m *MultiStatsReq_Business) Marshal() (dAtA []byte, err error)

func (*MultiStatsReq_Business) MarshalTo

func (m *MultiStatsReq_Business) MarshalTo(dAtA []byte) (int, error)

func (*MultiStatsReq_Business) ProtoMessage

func (*MultiStatsReq_Business) ProtoMessage()

func (*MultiStatsReq_Business) Reset

func (m *MultiStatsReq_Business) Reset()

func (*MultiStatsReq_Business) Size

func (m *MultiStatsReq_Business) Size() (n int)

func (*MultiStatsReq_Business) String

func (m *MultiStatsReq_Business) String() string

func (*MultiStatsReq_Business) Unmarshal

func (m *MultiStatsReq_Business) Unmarshal(dAtA []byte) error

type MultiStatsReq_Record

type MultiStatsReq_Record struct {
	// 来源id
	OriginID int64 `protobuf:"varint,1,opt,name=origin_id,json=originId,proto3" json:"origin_id,omitempty" form:"origin_id"`
	// 对象id
	MessageID int64 `` /* 127-byte string literal not displayed */
}

func (*MultiStatsReq_Record) Descriptor

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

func (*MultiStatsReq_Record) Marshal

func (m *MultiStatsReq_Record) Marshal() (dAtA []byte, err error)

func (*MultiStatsReq_Record) MarshalTo

func (m *MultiStatsReq_Record) MarshalTo(dAtA []byte) (int, error)

func (*MultiStatsReq_Record) ProtoMessage

func (*MultiStatsReq_Record) ProtoMessage()

func (*MultiStatsReq_Record) Reset

func (m *MultiStatsReq_Record) Reset()

func (*MultiStatsReq_Record) Size

func (m *MultiStatsReq_Record) Size() (n int)

func (*MultiStatsReq_Record) String

func (m *MultiStatsReq_Record) String() string

func (*MultiStatsReq_Record) Unmarshal

func (m *MultiStatsReq_Record) Unmarshal(dAtA []byte) error

type RawStatReply

type RawStatReply struct {
	// 来源id
	OriginID int64 `protobuf:"varint,1,opt,name=origin_id,json=originId,proto3" json:"origin_id,omitempty" form:"origin_id"`
	// 对象id
	MessageID int64 `` /* 127-byte string literal not displayed */
	// 点赞数
	LikeNumber int64 `protobuf:"varint,3,opt,name=like_number,json=likeNumber,proto3" json:"like_number,omitempty"`
	// 点踩数
	DislikeNumber int64 `protobuf:"varint,4,opt,name=dislike_number,json=dislikeNumber,proto3" json:"dislike_number,omitempty"`
	// 点赞数修改(增量)
	LikeChange int64 `protobuf:"varint,5,opt,name=like_change,json=likeChange,proto3" json:"like_change,omitempty"`
	// 点踩数修改(增量)
	DislikeChange int64 `protobuf:"varint,6,opt,name=dislike_change,json=dislikeChange,proto3" json:"dislike_change,omitempty"`
}

func (*RawStatReply) Descriptor

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

func (*RawStatReply) Marshal

func (m *RawStatReply) Marshal() (dAtA []byte, err error)

func (*RawStatReply) MarshalTo

func (m *RawStatReply) MarshalTo(dAtA []byte) (int, error)

func (*RawStatReply) ProtoMessage

func (*RawStatReply) ProtoMessage()

func (*RawStatReply) Reset

func (m *RawStatReply) Reset()

func (*RawStatReply) Size

func (m *RawStatReply) Size() (n int)

func (*RawStatReply) String

func (m *RawStatReply) String() string

func (*RawStatReply) Unmarshal

func (m *RawStatReply) Unmarshal(dAtA []byte) error

type RawStatReq

type RawStatReq struct {
	// 业务
	Business string `protobuf:"bytes,1,opt,name=business,proto3" json:"business,omitempty" form:"business" validate:"required"`
	// 来源id
	OriginID int64 `protobuf:"varint,2,opt,name=origin_id,json=originId,proto3" json:"origin_id,omitempty" form:"origin_id"`
	// 对象id
	MessageID int64 `` /* 127-byte string literal not displayed */
	// ip
	IP string `protobuf:"bytes,4,opt,name=ip,proto3" json:"ip"`
}

func (*RawStatReq) Descriptor

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

func (*RawStatReq) Marshal

func (m *RawStatReq) Marshal() (dAtA []byte, err error)

func (*RawStatReq) MarshalTo

func (m *RawStatReq) MarshalTo(dAtA []byte) (int, error)

func (*RawStatReq) ProtoMessage

func (*RawStatReq) ProtoMessage()

func (*RawStatReq) Reset

func (m *RawStatReq) Reset()

func (*RawStatReq) Size

func (m *RawStatReq) Size() (n int)

func (*RawStatReq) String

func (m *RawStatReq) String() string

func (*RawStatReq) Unmarshal

func (m *RawStatReq) Unmarshal(dAtA []byte) error

type StatState

type StatState struct {
	// 来源id
	OriginID int64 `protobuf:"varint,1,opt,name=origin_id,json=originId,proto3" json:"origin_id,omitempty"`
	// 对象id
	MessageID int64 `protobuf:"varint,2,opt,name=message_id,json=messageId,proto3" json:"message_id,omitempty"`
	// 点赞数
	LikeNumber int64 `protobuf:"varint,3,opt,name=like_number,json=likeNumber,proto3" json:"like_number,omitempty"`
	// 点踩数
	DislikeNumber int64 `protobuf:"varint,4,opt,name=dislike_number,json=dislikeNumber,proto3" json:"dislike_number,omitempty"`
	// 点赞状态
	LikeState State `` /* 129-byte string literal not displayed */
}

func (*StatState) Descriptor

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

func (*StatState) Marshal

func (m *StatState) Marshal() (dAtA []byte, err error)

func (*StatState) MarshalTo

func (m *StatState) MarshalTo(dAtA []byte) (int, error)

func (*StatState) ProtoMessage

func (*StatState) ProtoMessage()

func (*StatState) Reset

func (m *StatState) Reset()

func (*StatState) Size

func (m *StatState) Size() (n int)

func (*StatState) String

func (m *StatState) String() string

func (*StatState) Unmarshal

func (m *StatState) Unmarshal(dAtA []byte) error

type State

type State int32
const (
	// The first value represents the default and must be == 0.
	State_STATE_UNSPECIFIED State = 0
	State_STATE_LIKE        State = 1
	State_STATE_DISLIKE     State = 2
)

func (State) EnumDescriptor

func (State) EnumDescriptor() ([]byte, []int)

func (State) String

func (x State) String() string

type StatsReply

type StatsReply struct {
	Stats map[int64]*StatState `` /* 138-byte string literal not displayed */
}

func (*StatsReply) Descriptor

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

func (*StatsReply) Marshal

func (m *StatsReply) Marshal() (dAtA []byte, err error)

func (*StatsReply) MarshalTo

func (m *StatsReply) MarshalTo(dAtA []byte) (int, error)

func (*StatsReply) ProtoMessage

func (*StatsReply) ProtoMessage()

func (*StatsReply) Reset

func (m *StatsReply) Reset()

func (*StatsReply) Size

func (m *StatsReply) Size() (n int)

func (*StatsReply) String

func (m *StatsReply) String() string

func (*StatsReply) Unmarshal

func (m *StatsReply) Unmarshal(dAtA []byte) error

type StatsReq

type StatsReq struct {
	// 业务
	Business string `protobuf:"bytes,1,opt,name=business,proto3" json:"business,omitempty" form:"business" validate:"required"`
	// 来源id
	OriginID int64 `protobuf:"varint,2,opt,name=origin_id,json=originId,proto3" json:"origin_id,omitempty" form:"origin_id"`
	// 对象id
	MessageIds []int64 `` /* 131-byte string literal not displayed */
	// mid 可选参数 不需要返回like_state不要填
	Mid int64 `protobuf:"varint,4,opt,name=mid,proto3" json:"mid,omitempty" form:"mid"`
	// ip
	IP string `protobuf:"bytes,5,opt,name=ip,proto3" json:"ip"`
}

func (*StatsReq) Descriptor

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

func (*StatsReq) Marshal

func (m *StatsReq) Marshal() (dAtA []byte, err error)

func (*StatsReq) MarshalTo

func (m *StatsReq) MarshalTo(dAtA []byte) (int, error)

func (*StatsReq) ProtoMessage

func (*StatsReq) ProtoMessage()

func (*StatsReq) Reset

func (m *StatsReq) Reset()

func (*StatsReq) Size

func (m *StatsReq) Size() (n int)

func (*StatsReq) String

func (m *StatsReq) String() string

func (*StatsReq) Unmarshal

func (m *StatsReq) Unmarshal(dAtA []byte) error

type ThumbupClient

type ThumbupClient interface {
	// 点赞接口
	Like(ctx context.Context, in *LikeReq, opts ...grpc.CallOption) (*LikeReply, error)
	// 查询计数接口
	Stats(ctx context.Context, in *StatsReq, opts ...grpc.CallOption) (*StatsReply, error)
	// 批量查询计数接口
	MultiStats(ctx context.Context, in *MultiStatsReq, opts ...grpc.CallOption) (*MultiStatsReply, error)
	// 查询是否点赞接口
	HasLike(ctx context.Context, in *HasLikeReq, opts ...grpc.CallOption) (*HasLikeReply, error)
	// 用户对业务的点赞列表
	UserLikes(ctx context.Context, in *UserLikesReq, opts ...grpc.CallOption) (*UserLikesReply, error)
	// 对象的点赞人列表
	ItemLikes(ctx context.Context, in *ItemLikesReq, opts ...grpc.CallOption) (*ItemLikesReply, error)
	// 修改计数的值
	UpdateCount(ctx context.Context, in *UpdateCountReq, opts ...grpc.CallOption) (*google_protobuf1.Empty, error)
	// 查询原始计数 未修改的值
	RawStat(ctx context.Context, in *RawStatReq, opts ...grpc.CallOption) (*RawStatReply, error)
}

func NewClient

func NewClient(cfg *warden.ClientConfig, opts ...grpc.DialOption) (ThumbupClient, error)

NewClient new grpc client

func NewThumbupClient

func NewThumbupClient(cc *grpc.ClientConn) ThumbupClient

type ThumbupServer

type ThumbupServer interface {
	// 点赞接口
	Like(context.Context, *LikeReq) (*LikeReply, error)
	// 查询计数接口
	Stats(context.Context, *StatsReq) (*StatsReply, error)
	// 批量查询计数接口
	MultiStats(context.Context, *MultiStatsReq) (*MultiStatsReply, error)
	// 查询是否点赞接口
	HasLike(context.Context, *HasLikeReq) (*HasLikeReply, error)
	// 用户对业务的点赞列表
	UserLikes(context.Context, *UserLikesReq) (*UserLikesReply, error)
	// 对象的点赞人列表
	ItemLikes(context.Context, *ItemLikesReq) (*ItemLikesReply, error)
	// 修改计数的值
	UpdateCount(context.Context, *UpdateCountReq) (*google_protobuf1.Empty, error)
	// 查询原始计数 未修改的值
	RawStat(context.Context, *RawStatReq) (*RawStatReply, error)
}

type UpdateCountReq

type UpdateCountReq struct {
	// 业务
	Business string `protobuf:"bytes,1,opt,name=business,proto3" json:"business,omitempty" form:"business" validate:"required"`
	// 来源id
	OriginID int64 `protobuf:"varint,2,opt,name=origin_id,json=originId,proto3" json:"origin_id,omitempty" form:"origin_id"`
	// 对象id
	MessageID int64 `` /* 127-byte string literal not displayed */
	// 点赞数修改(增量)
	LikeChange int64 `protobuf:"varint,4,opt,name=like_change,json=likeChange,proto3" json:"like_change,omitempty"`
	// 点踩数修改(增量)
	DislikeChange int64 `protobuf:"varint,5,opt,name=dislike_change,json=dislikeChange,proto3" json:"dislike_change,omitempty"`
	// 操作人
	Operator string `protobuf:"bytes,6,opt,name=operator,proto3" json:"operator,omitempty"`
	// ip
	IP string `protobuf:"bytes,7,opt,name=ip,proto3" json:"ip"`
}

func (*UpdateCountReq) Descriptor

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

func (*UpdateCountReq) Marshal

func (m *UpdateCountReq) Marshal() (dAtA []byte, err error)

func (*UpdateCountReq) MarshalTo

func (m *UpdateCountReq) MarshalTo(dAtA []byte) (int, error)

func (*UpdateCountReq) ProtoMessage

func (*UpdateCountReq) ProtoMessage()

func (*UpdateCountReq) Reset

func (m *UpdateCountReq) Reset()

func (*UpdateCountReq) Size

func (m *UpdateCountReq) Size() (n int)

func (*UpdateCountReq) String

func (m *UpdateCountReq) String() string

func (*UpdateCountReq) Unmarshal

func (m *UpdateCountReq) Unmarshal(dAtA []byte) error

type UserLikeState

type UserLikeState struct {
	// mid
	Mid int64 `protobuf:"varint,1,opt,name=mid,proto3" json:"mid,omitempty"`
	// 点赞时间
	Time  go_common_library_time.Time `protobuf:"varint,2,opt,name=time,proto3,casttype=go-common/library/time.Time" json:"time,omitempty"`
	State State                       `protobuf:"varint,3,opt,name=state,proto3,enum=community.service.thumbup.v1.State" json:"state,omitempty"`
}

func (*UserLikeState) Descriptor

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

func (*UserLikeState) Marshal

func (m *UserLikeState) Marshal() (dAtA []byte, err error)

func (*UserLikeState) MarshalTo

func (m *UserLikeState) MarshalTo(dAtA []byte) (int, error)

func (*UserLikeState) ProtoMessage

func (*UserLikeState) ProtoMessage()

func (*UserLikeState) Reset

func (m *UserLikeState) Reset()

func (*UserLikeState) Size

func (m *UserLikeState) Size() (n int)

func (*UserLikeState) String

func (m *UserLikeState) String() string

func (*UserLikeState) Unmarshal

func (m *UserLikeState) Unmarshal(dAtA []byte) error

type UserLikesReply

type UserLikesReply struct {
	Total int64         `protobuf:"varint,1,opt,name=total,proto3" json:"total,omitempty"`
	Items []*ItemRecord `protobuf:"bytes,2,rep,name=items" json:"items,omitempty"`
}

func (*UserLikesReply) Descriptor

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

func (*UserLikesReply) Marshal

func (m *UserLikesReply) Marshal() (dAtA []byte, err error)

func (*UserLikesReply) MarshalTo

func (m *UserLikesReply) MarshalTo(dAtA []byte) (int, error)

func (*UserLikesReply) ProtoMessage

func (*UserLikesReply) ProtoMessage()

func (*UserLikesReply) Reset

func (m *UserLikesReply) Reset()

func (*UserLikesReply) Size

func (m *UserLikesReply) Size() (n int)

func (*UserLikesReply) String

func (m *UserLikesReply) String() string

func (*UserLikesReply) Unmarshal

func (m *UserLikesReply) Unmarshal(dAtA []byte) error

type UserLikesReq

type UserLikesReq struct {
	// 业务
	Business string `protobuf:"bytes,1,opt,name=business,proto3" json:"business,omitempty" form:"business" validate:"required"`
	// mid
	Mid int64 `protobuf:"varint,2,opt,name=mid,proto3" json:"mid,omitempty" form:"mid" validate:"required"`
	// pn
	Pn int64 `protobuf:"varint,3,opt,name=pn,proto3" json:"pn,omitempty" form:"pn" validate:"required,min=1"`
	// ps
	Ps int64 `protobuf:"varint,4,opt,name=ps,proto3" json:"ps,omitempty" form:"ps" validate:"required,min=1"`
	// ip
	IP string `protobuf:"bytes,5,opt,name=ip,proto3" json:"ip"`
}

func (*UserLikesReq) Descriptor

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

func (*UserLikesReq) Marshal

func (m *UserLikesReq) Marshal() (dAtA []byte, err error)

func (*UserLikesReq) MarshalTo

func (m *UserLikesReq) MarshalTo(dAtA []byte) (int, error)

func (*UserLikesReq) ProtoMessage

func (*UserLikesReq) ProtoMessage()

func (*UserLikesReq) Reset

func (m *UserLikesReq) Reset()

func (*UserLikesReq) Size

func (m *UserLikesReq) Size() (n int)

func (*UserLikesReq) String

func (m *UserLikesReq) String() string

func (*UserLikesReq) Unmarshal

func (m *UserLikesReq) Unmarshal(dAtA []byte) error

type UserRecord

type UserRecord struct {
	// mid
	Mid int64 `protobuf:"varint,1,opt,name=mid,proto3" json:"mid,omitempty"`
	// 点赞时间
	Time go_common_library_time.Time `protobuf:"varint,2,opt,name=time,proto3,casttype=go-common/library/time.Time" json:"time,omitempty"`
}

func (*UserRecord) Descriptor

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

func (*UserRecord) Marshal

func (m *UserRecord) Marshal() (dAtA []byte, err error)

func (*UserRecord) MarshalTo

func (m *UserRecord) MarshalTo(dAtA []byte) (int, error)

func (*UserRecord) ProtoMessage

func (*UserRecord) ProtoMessage()

func (*UserRecord) Reset

func (m *UserRecord) Reset()

func (*UserRecord) Size

func (m *UserRecord) Size() (n int)

func (*UserRecord) String

func (m *UserRecord) String() string

func (*UserRecord) Unmarshal

func (m *UserRecord) Unmarshal(dAtA []byte) error

Jump to

Keyboard shortcuts

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