Documentation ¶
Index ¶
- Variables
- func NewGoogleEndpoints() []*api.Endpoint
- func RegisterGoogleHandler(s server.Server, hdlr GoogleHandler, opts ...server.HandlerOption) error
- type GoogleHandler
- type GoogleService
- type SearchRequest
- type SearchResponse
- type SearchResult
- func (*SearchResult) Descriptor() ([]byte, []int)deprecated
- func (x *SearchResult) GetDisplayUrl() string
- func (x *SearchResult) GetId() string
- func (x *SearchResult) GetKind() string
- func (x *SearchResult) GetSnippet() string
- func (x *SearchResult) GetTitle() string
- func (x *SearchResult) GetUrl() string
- func (*SearchResult) ProtoMessage()
- func (x *SearchResult) ProtoReflect() protoreflect.Message
- func (x *SearchResult) Reset()
- func (x *SearchResult) String() string
Constants ¶
This section is empty.
Variables ¶
View Source
var File_proto_google_proto protoreflect.FileDescriptor
Functions ¶
func NewGoogleEndpoints ¶
func RegisterGoogleHandler ¶
func RegisterGoogleHandler(s server.Server, hdlr GoogleHandler, opts ...server.HandlerOption) error
Types ¶
type GoogleHandler ¶
type GoogleHandler interface {
Search(context.Context, *SearchRequest, *SearchResponse) error
}
type GoogleService ¶
type GoogleService interface {
Search(ctx context.Context, in *SearchRequest, opts ...client.CallOption) (*SearchResponse, error)
}
func NewGoogleService ¶
func NewGoogleService(name string, c client.Client) GoogleService
type SearchRequest ¶
type SearchRequest struct { // Query to search for Query string `protobuf:"bytes,1,opt,name=query,proto3" json:"query,omitempty"` // contains filtered or unexported fields }
Search for videos on Google
func (*SearchRequest) Descriptor
deprecated
func (*SearchRequest) Descriptor() ([]byte, []int)
Deprecated: Use SearchRequest.ProtoReflect.Descriptor instead.
func (*SearchRequest) GetQuery ¶
func (x *SearchRequest) GetQuery() string
func (*SearchRequest) ProtoMessage ¶
func (*SearchRequest) ProtoMessage()
func (*SearchRequest) ProtoReflect ¶
func (x *SearchRequest) ProtoReflect() protoreflect.Message
func (*SearchRequest) Reset ¶
func (x *SearchRequest) Reset()
func (*SearchRequest) String ¶
func (x *SearchRequest) String() string
type SearchResponse ¶
type SearchResponse struct { // List of results for the query Results []*SearchResult `protobuf:"bytes,1,rep,name=results,proto3" json:"results,omitempty"` // contains filtered or unexported fields }
func (*SearchResponse) Descriptor
deprecated
func (*SearchResponse) Descriptor() ([]byte, []int)
Deprecated: Use SearchResponse.ProtoReflect.Descriptor instead.
func (*SearchResponse) GetResults ¶
func (x *SearchResponse) GetResults() []*SearchResult
func (*SearchResponse) ProtoMessage ¶
func (*SearchResponse) ProtoMessage()
func (*SearchResponse) ProtoReflect ¶
func (x *SearchResponse) ProtoReflect() protoreflect.Message
func (*SearchResponse) Reset ¶
func (x *SearchResponse) Reset()
func (*SearchResponse) String ¶
func (x *SearchResponse) String() string
type SearchResult ¶
type SearchResult struct { // id of the result Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // kind of result; "search" Kind string `protobuf:"bytes,2,opt,name=kind,proto3" json:"kind,omitempty"` // title of the result Title string `protobuf:"bytes,3,opt,name=title,proto3" json:"title,omitempty"` // the result snippet Snippet string `protobuf:"bytes,4,opt,name=snippet,proto3" json:"snippet,omitempty"` // the full url for the result Url string `protobuf:"bytes,5,opt,name=url,proto3" json:"url,omitempty"` // abridged version of this search result’s URL, e.g. www.exampe.com DisplayUrl string `protobuf:"bytes,6,opt,name=display_url,json=displayUrl,proto3" json:"display_url,omitempty"` // contains filtered or unexported fields }
func (*SearchResult) Descriptor
deprecated
func (*SearchResult) Descriptor() ([]byte, []int)
Deprecated: Use SearchResult.ProtoReflect.Descriptor instead.
func (*SearchResult) GetDisplayUrl ¶
func (x *SearchResult) GetDisplayUrl() string
func (*SearchResult) GetId ¶
func (x *SearchResult) GetId() string
func (*SearchResult) GetKind ¶
func (x *SearchResult) GetKind() string
func (*SearchResult) GetSnippet ¶
func (x *SearchResult) GetSnippet() string
func (*SearchResult) GetTitle ¶
func (x *SearchResult) GetTitle() string
func (*SearchResult) GetUrl ¶
func (x *SearchResult) GetUrl() string
func (*SearchResult) ProtoMessage ¶
func (*SearchResult) ProtoMessage()
func (*SearchResult) ProtoReflect ¶
func (x *SearchResult) ProtoReflect() protoreflect.Message
func (*SearchResult) Reset ¶
func (x *SearchResult) Reset()
func (*SearchResult) String ¶
func (x *SearchResult) String() string
Click to show internal directories.
Click to hide internal directories.