Documentation ¶
Overview ¶
Package feed is a generated protocol buffer package.
It is generated from these files:
feed.proto
It has these top-level messages:
GetFeedsRequest GetFeedsResponse FeedRecord OkResponse
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterFeedServer ¶
func RegisterFeedServer(s *grpc.Server, srv FeedServer)
Types ¶
type FeedClient ¶
type FeedClient interface { GetFeeds(ctx context.Context, in *GetFeedsRequest, opts ...grpc.CallOption) (*GetFeedsResponse, error) CreateFeed(ctx context.Context, in *FeedRecord, opts ...grpc.CallOption) (*OkResponse, error) }
func NewFeedClient ¶
func NewFeedClient(cc *grpc.ClientConn) FeedClient
type FeedRecord ¶
type FeedRecord struct { Id int64 `protobuf:"varint,1,opt,name=id" json:"id,omitempty"` UserId int64 `protobuf:"varint,2,opt,name=user_id,json=userId" json:"user_id,omitempty"` Content string `protobuf:"bytes,3,opt,name=content" json:"content,omitempty"` }
func (*FeedRecord) Descriptor ¶
func (*FeedRecord) Descriptor() ([]byte, []int)
func (*FeedRecord) GetContent ¶
func (m *FeedRecord) GetContent() string
func (*FeedRecord) GetId ¶
func (m *FeedRecord) GetId() int64
func (*FeedRecord) GetUserId ¶
func (m *FeedRecord) GetUserId() int64
func (*FeedRecord) ProtoMessage ¶
func (*FeedRecord) ProtoMessage()
func (*FeedRecord) Reset ¶
func (m *FeedRecord) Reset()
func (*FeedRecord) String ¶
func (m *FeedRecord) String() string
type FeedServer ¶
type FeedServer interface { GetFeeds(context.Context, *GetFeedsRequest) (*GetFeedsResponse, error) CreateFeed(context.Context, *FeedRecord) (*OkResponse, error) }
type GetFeedsRequest ¶
type GetFeedsRequest struct { UserId int64 `protobuf:"varint,1,opt,name=user_id,json=userId" json:"user_id,omitempty"` Size int64 `protobuf:"varint,2,opt,name=size" json:"size,omitempty"` }
func (*GetFeedsRequest) Descriptor ¶
func (*GetFeedsRequest) Descriptor() ([]byte, []int)
func (*GetFeedsRequest) GetSize ¶
func (m *GetFeedsRequest) GetSize() int64
func (*GetFeedsRequest) GetUserId ¶
func (m *GetFeedsRequest) GetUserId() int64
func (*GetFeedsRequest) ProtoMessage ¶
func (*GetFeedsRequest) ProtoMessage()
func (*GetFeedsRequest) Reset ¶
func (m *GetFeedsRequest) Reset()
func (*GetFeedsRequest) String ¶
func (m *GetFeedsRequest) String() string
type GetFeedsResponse ¶
type GetFeedsResponse struct {
Feeds []*FeedRecord `protobuf:"bytes,1,rep,name=feeds" json:"feeds,omitempty"`
}
func (*GetFeedsResponse) Descriptor ¶
func (*GetFeedsResponse) Descriptor() ([]byte, []int)
func (*GetFeedsResponse) GetFeeds ¶
func (m *GetFeedsResponse) GetFeeds() []*FeedRecord
func (*GetFeedsResponse) ProtoMessage ¶
func (*GetFeedsResponse) ProtoMessage()
func (*GetFeedsResponse) Reset ¶
func (m *GetFeedsResponse) Reset()
func (*GetFeedsResponse) String ¶
func (m *GetFeedsResponse) String() string
type OkResponse ¶
type OkResponse struct { }
func (*OkResponse) Descriptor ¶
func (*OkResponse) Descriptor() ([]byte, []int)
func (*OkResponse) ProtoMessage ¶
func (*OkResponse) ProtoMessage()
func (*OkResponse) Reset ¶
func (m *OkResponse) Reset()
func (*OkResponse) String ¶
func (m *OkResponse) String() string
Click to show internal directories.
Click to hide internal directories.