Documentation
¶
Index ¶
- Constants
- Variables
- func RegisterFeedServiceServer(s grpc.ServiceRegistrar, srv FeedServiceServer)
- type FeedItem
- func (*FeedItem) Descriptor() ([]byte, []int)deprecated
- func (x *FeedItem) GetContent() []byte
- func (x *FeedItem) GetCreatedAt() uint64
- func (x *FeedItem) GetType() string
- func (*FeedItem) ProtoMessage()
- func (x *FeedItem) ProtoReflect() protoreflect.Message
- func (x *FeedItem) Reset()
- func (x *FeedItem) String() string
- type FeedServiceClient
- type FeedServiceServer
- type GetFeedRequest
- func (*GetFeedRequest) Descriptor() ([]byte, []int)deprecated
- func (x *GetFeedRequest) GetCursor() uint64
- func (x *GetFeedRequest) GetLimit() int64
- func (x *GetFeedRequest) GetUserId() uint64
- func (*GetFeedRequest) ProtoMessage()
- func (x *GetFeedRequest) ProtoReflect() protoreflect.Message
- func (x *GetFeedRequest) Reset()
- func (x *GetFeedRequest) String() string
- type GetFeedResponse
- type UnimplementedFeedServiceServer
- type UnsafeFeedServiceServer
Constants ¶
const (
FeedService_GetFeed_FullMethodName = "/proto.FeedService/GetFeed"
)
Variables ¶
var FeedService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "proto.FeedService", HandlerType: (*FeedServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "GetFeed", Handler: _FeedService_GetFeed_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "feed.proto", }
FeedService_ServiceDesc is the grpc.ServiceDesc for FeedService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var File_feed_proto protoreflect.FileDescriptor
Functions ¶
func RegisterFeedServiceServer ¶
func RegisterFeedServiceServer(s grpc.ServiceRegistrar, srv FeedServiceServer)
Types ¶
type FeedItem ¶
type FeedItem struct {
Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"`
CreatedAt uint64 `protobuf:"varint,2,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"`
Content []byte `protobuf:"bytes,3,opt,name=content,proto3" json:"content,omitempty"`
// contains filtered or unexported fields
}
func (*FeedItem) Descriptor
deprecated
func (*FeedItem) GetContent ¶
func (*FeedItem) GetCreatedAt ¶
func (*FeedItem) ProtoMessage ¶
func (*FeedItem) ProtoMessage()
func (*FeedItem) ProtoReflect ¶
func (x *FeedItem) ProtoReflect() protoreflect.Message
type FeedServiceClient ¶
type FeedServiceClient interface {
GetFeed(ctx context.Context, in *GetFeedRequest, opts ...grpc.CallOption) (*GetFeedResponse, error)
}
FeedServiceClient is the client API for FeedService 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 NewFeedServiceClient ¶
func NewFeedServiceClient(cc grpc.ClientConnInterface) FeedServiceClient
type FeedServiceServer ¶
type FeedServiceServer interface {
GetFeed(context.Context, *GetFeedRequest) (*GetFeedResponse, error)
// contains filtered or unexported methods
}
FeedServiceServer is the server API for FeedService service. All implementations must embed UnimplementedFeedServiceServer for forward compatibility.
type GetFeedRequest ¶
type GetFeedRequest struct {
Limit int64 `protobuf:"varint,1,opt,name=limit,proto3" json:"limit,omitempty"`
UserId uint64 `protobuf:"varint,2,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
Cursor *uint64 `protobuf:"varint,3,opt,name=cursor,proto3,oneof" json:"cursor,omitempty"`
// contains filtered or unexported fields
}
func (*GetFeedRequest) Descriptor
deprecated
func (*GetFeedRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetFeedRequest.ProtoReflect.Descriptor instead.
func (*GetFeedRequest) GetCursor ¶
func (x *GetFeedRequest) GetCursor() uint64
func (*GetFeedRequest) GetLimit ¶
func (x *GetFeedRequest) GetLimit() int64
func (*GetFeedRequest) GetUserId ¶
func (x *GetFeedRequest) GetUserId() uint64
func (*GetFeedRequest) ProtoMessage ¶
func (*GetFeedRequest) ProtoMessage()
func (*GetFeedRequest) ProtoReflect ¶
func (x *GetFeedRequest) ProtoReflect() protoreflect.Message
func (*GetFeedRequest) Reset ¶
func (x *GetFeedRequest) Reset()
func (*GetFeedRequest) String ¶
func (x *GetFeedRequest) String() string
type GetFeedResponse ¶
type GetFeedResponse struct {
Items []*FeedItem `protobuf:"bytes,1,rep,name=items,proto3" json:"items,omitempty"`
// contains filtered or unexported fields
}
func (*GetFeedResponse) Descriptor
deprecated
func (*GetFeedResponse) Descriptor() ([]byte, []int)
Deprecated: Use GetFeedResponse.ProtoReflect.Descriptor instead.
func (*GetFeedResponse) GetItems ¶
func (x *GetFeedResponse) GetItems() []*FeedItem
func (*GetFeedResponse) ProtoMessage ¶
func (*GetFeedResponse) ProtoMessage()
func (*GetFeedResponse) ProtoReflect ¶
func (x *GetFeedResponse) ProtoReflect() protoreflect.Message
func (*GetFeedResponse) Reset ¶
func (x *GetFeedResponse) Reset()
func (*GetFeedResponse) String ¶
func (x *GetFeedResponse) String() string
type UnimplementedFeedServiceServer ¶
type UnimplementedFeedServiceServer struct{}
UnimplementedFeedServiceServer must be embedded to have forward compatible implementations.
NOTE: this should be embedded by value instead of pointer to avoid a nil pointer dereference when methods are called.
func (UnimplementedFeedServiceServer) GetFeed ¶
func (UnimplementedFeedServiceServer) GetFeed(context.Context, *GetFeedRequest) (*GetFeedResponse, error)
type UnsafeFeedServiceServer ¶
type UnsafeFeedServiceServer interface {
// contains filtered or unexported methods
}
UnsafeFeedServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to FeedServiceServer will result in compilation errors.