search

package
v0.0.0-...-2824937 Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2020 License: MIT, BSD-3-Clause Imports: 5 Imported by: 0

README

protoc ./search.proto --go_out=plugins=grpc:.

Documentation

Overview

Package search is a generated protocol buffer package.

It is generated from these files:

search.proto

It has these top-level messages:

Request
Result

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterGoogleServer

func RegisterGoogleServer(s *grpc.Server, srv GoogleServer)

Types

type GoogleClient

type GoogleClient interface {
	// Search returns a Google search result for the query.
	Search(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Result, error)
	// Watch returns a stream of Google search results for the query.
	Watch(ctx context.Context, in *Request, opts ...grpc.CallOption) (Google_WatchClient, error)
}

func NewGoogleClient

func NewGoogleClient(cc *grpc.ClientConn) GoogleClient

type GoogleServer

type GoogleServer interface {
	// Search returns a Google search result for the query.
	Search(context.Context, *Request) (*Result, error)
	// Watch returns a stream of Google search results for the query.
	Watch(*Request, Google_WatchServer) error
}

type Google_WatchClient

type Google_WatchClient interface {
	Recv() (*Result, error)
	grpc.ClientStream
}

type Google_WatchServer

type Google_WatchServer interface {
	Send(*Result) error
	grpc.ServerStream
}

type Request

type Request struct {
	Query string `protobuf:"bytes,1,opt,name=query" json:"query,omitempty"`
}

func (*Request) ProtoMessage

func (*Request) ProtoMessage()

func (*Request) Reset

func (m *Request) Reset()

func (*Request) String

func (m *Request) String() string

type Result

type Result struct {
	Title   string `protobuf:"bytes,1,opt,name=title" json:"title,omitempty"`
	Url     string `protobuf:"bytes,2,opt,name=url" json:"url,omitempty"`
	Snippet string `protobuf:"bytes,3,opt,name=snippet" json:"snippet,omitempty"`
}

func (*Result) ProtoMessage

func (*Result) ProtoMessage()

func (*Result) Reset

func (m *Result) Reset()

func (*Result) String

func (m *Result) String() string

Jump to

Keyboard shortcuts

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