google

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jul 16, 2022 License: Apache-2.0 Imports: 11 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_proto_google_proto protoreflect.FileDescriptor

Functions

func NewGoogleEndpoints

func NewGoogleEndpoints() []*api.Endpoint

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

Jump to

Keyboard shortcuts

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