Documentation ¶
Overview ¶
Package feeds is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- Variables
- func RegisterFeedsServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterFeedsServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client FeedsServiceClient) error
- func RegisterFeedsServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterFeedsServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server FeedsServiceServer) error
- func RegisterFeedsServiceServer(s *grpc.Server, srv FeedsServiceServer)
- type Feed
- func (*Feed) Descriptor() ([]byte, []int)deprecated
- func (x *Feed) GetIconUrl() *wrappers.StringValue
- func (x *Feed) GetId() string
- func (x *Feed) GetLastFetched() *timestamp.Timestamp
- func (x *Feed) GetTitle() string
- func (x *Feed) GetUrl() string
- func (x *Feed) GetUserId() string
- func (*Feed) ProtoMessage()
- func (x *Feed) ProtoReflect() protoreflect.Message
- func (x *Feed) Reset()
- func (x *Feed) String() string
- type FeedsServiceClient
- type FeedsServiceServer
- type GetFeedRequest
- type ListFeedsRequest
- func (*ListFeedsRequest) Descriptor() ([]byte, []int)deprecated
- func (x *ListFeedsRequest) GetPageSize() int64
- func (x *ListFeedsRequest) GetPageToken() string
- func (*ListFeedsRequest) ProtoMessage()
- func (x *ListFeedsRequest) ProtoReflect() protoreflect.Message
- func (x *ListFeedsRequest) Reset()
- func (x *ListFeedsRequest) String() string
- type ListFeedsResponse
- func (*ListFeedsResponse) Descriptor() ([]byte, []int)deprecated
- func (x *ListFeedsResponse) GetFeeds() []*Feed
- func (x *ListFeedsResponse) GetNextPageToken() string
- func (*ListFeedsResponse) ProtoMessage()
- func (x *ListFeedsResponse) ProtoReflect() protoreflect.Message
- func (x *ListFeedsResponse) Reset()
- func (x *ListFeedsResponse) String() string
- type UnimplementedFeedsServiceServer
Constants ¶
This section is empty.
Variables ¶
var File_feeds_v1_feeds_service_proto protoreflect.FileDescriptor
Functions ¶
func RegisterFeedsServiceHandler ¶
func RegisterFeedsServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
RegisterFeedsServiceHandler registers the http handlers for service FeedsService to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterFeedsServiceHandlerClient ¶
func RegisterFeedsServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client FeedsServiceClient) error
RegisterFeedsServiceHandlerClient registers the http handlers for service FeedsService to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "FeedsServiceClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "FeedsServiceClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "FeedsServiceClient" to call the correct interceptors.
func RegisterFeedsServiceHandlerFromEndpoint ¶
func RegisterFeedsServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterFeedsServiceHandlerFromEndpoint is same as RegisterFeedsServiceHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterFeedsServiceHandlerServer ¶
func RegisterFeedsServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server FeedsServiceServer) error
RegisterFeedsServiceHandlerServer registers the http handlers for service FeedsService to "mux". UnaryRPC :call FeedsServiceServer directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterFeedsServiceHandlerFromEndpoint instead.
func RegisterFeedsServiceServer ¶
func RegisterFeedsServiceServer(s *grpc.Server, srv FeedsServiceServer)
Types ¶
type Feed ¶
type Feed struct { // Id of the resource. Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // Id of user who owns this feed. UserId string `protobuf:"bytes,2,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"` // Time of the last feed fetch by the reader. LastFetched *timestamp.Timestamp `protobuf:"bytes,3,opt,name=last_fetched,json=lastFetched,proto3" json:"last_fetched,omitempty"` // Url is the feed's url. Url string `protobuf:"bytes,4,opt,name=url,proto3" json:"url,omitempty"` // Title is the feed's title. Title string `protobuf:"bytes,5,opt,name=title,proto3" json:"title,omitempty"` // Url with a feed's icon. IconUrl *wrappers.StringValue `protobuf:"bytes,6,opt,name=icon_url,json=iconUrl,proto3" json:"icon_url,omitempty"` // contains filtered or unexported fields }
func (*Feed) Descriptor
deprecated
func (*Feed) GetIconUrl ¶
func (x *Feed) GetIconUrl() *wrappers.StringValue
func (*Feed) GetLastFetched ¶
func (*Feed) ProtoMessage ¶
func (*Feed) ProtoMessage()
func (*Feed) ProtoReflect ¶
func (x *Feed) ProtoReflect() protoreflect.Message
type FeedsServiceClient ¶
type FeedsServiceClient interface { GetFeed(ctx context.Context, in *GetFeedRequest, opts ...grpc.CallOption) (*Feed, error) ListFeeds(ctx context.Context, in *ListFeedsRequest, opts ...grpc.CallOption) (*ListFeedsResponse, error) }
FeedsServiceClient is the client API for FeedsService 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 NewFeedsServiceClient ¶
func NewFeedsServiceClient(cc grpc.ClientConnInterface) FeedsServiceClient
type FeedsServiceServer ¶
type FeedsServiceServer interface { GetFeed(context.Context, *GetFeedRequest) (*Feed, error) ListFeeds(context.Context, *ListFeedsRequest) (*ListFeedsResponse, error) }
FeedsServiceServer is the server API for FeedsService service.
type GetFeedRequest ¶
type GetFeedRequest struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // contains filtered or unexported fields }
func (*GetFeedRequest) Descriptor
deprecated
func (*GetFeedRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetFeedRequest.ProtoReflect.Descriptor instead.
func (*GetFeedRequest) GetId ¶
func (x *GetFeedRequest) GetId() string
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 ListFeedsRequest ¶
type ListFeedsRequest struct { // The maximum number of feeds to return. PageSize int64 `protobuf:"varint,1,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` // The next_page_token value returned from a previous List request, if any. PageToken string `protobuf:"bytes,2,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"` // contains filtered or unexported fields }
func (*ListFeedsRequest) Descriptor
deprecated
func (*ListFeedsRequest) Descriptor() ([]byte, []int)
Deprecated: Use ListFeedsRequest.ProtoReflect.Descriptor instead.
func (*ListFeedsRequest) GetPageSize ¶
func (x *ListFeedsRequest) GetPageSize() int64
func (*ListFeedsRequest) GetPageToken ¶
func (x *ListFeedsRequest) GetPageToken() string
func (*ListFeedsRequest) ProtoMessage ¶
func (*ListFeedsRequest) ProtoMessage()
func (*ListFeedsRequest) ProtoReflect ¶
func (x *ListFeedsRequest) ProtoReflect() protoreflect.Message
func (*ListFeedsRequest) Reset ¶
func (x *ListFeedsRequest) Reset()
func (*ListFeedsRequest) String ¶
func (x *ListFeedsRequest) String() string
type ListFeedsResponse ¶
type ListFeedsResponse struct { // There will be a maximum number of feeds returned based on the page_size field int the request. Feeds []*Feed `protobuf:"bytes,1,rep,name=feeds,proto3" json:"feeds,omitempty"` // Token to retrieve the next page of results, or empty if there are no more results in the list. NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"` // contains filtered or unexported fields }
func (*ListFeedsResponse) Descriptor
deprecated
func (*ListFeedsResponse) Descriptor() ([]byte, []int)
Deprecated: Use ListFeedsResponse.ProtoReflect.Descriptor instead.
func (*ListFeedsResponse) GetFeeds ¶
func (x *ListFeedsResponse) GetFeeds() []*Feed
func (*ListFeedsResponse) GetNextPageToken ¶
func (x *ListFeedsResponse) GetNextPageToken() string
func (*ListFeedsResponse) ProtoMessage ¶
func (*ListFeedsResponse) ProtoMessage()
func (*ListFeedsResponse) ProtoReflect ¶
func (x *ListFeedsResponse) ProtoReflect() protoreflect.Message
func (*ListFeedsResponse) Reset ¶
func (x *ListFeedsResponse) Reset()
func (*ListFeedsResponse) String ¶
func (x *ListFeedsResponse) String() string
type UnimplementedFeedsServiceServer ¶
type UnimplementedFeedsServiceServer struct { }
UnimplementedFeedsServiceServer can be embedded to have forward compatible implementations.
func (*UnimplementedFeedsServiceServer) GetFeed ¶
func (*UnimplementedFeedsServiceServer) GetFeed(context.Context, *GetFeedRequest) (*Feed, error)
func (*UnimplementedFeedsServiceServer) ListFeeds ¶
func (*UnimplementedFeedsServiceServer) ListFeeds(context.Context, *ListFeedsRequest) (*ListFeedsResponse, error)