Documentation
¶
Overview ¶
Package rpc is a generated protocol buffer package.
It is generated from these files:
defs.proto
It has these top-level messages:
ID Nothing Query SearchResult YouTubeResult YouTubeSnippet Thumbnail YouTubeID SearchResults
Index ¶
- func RegisterGenIDServer(s *grpc.Server, srv GenIDServer)
- func RegisterSearchServer(s *grpc.Server, srv SearchServer)
- type GID
- type GenIDClient
- type GenIDServer
- type ID
- type Nothing
- type Query
- type Search
- type SearchClient
- type SearchInitOption
- type SearchResult
- type SearchResults
- type SearchServer
- type Thumbnail
- type YouTubeID
- type YouTubeResult
- func (*YouTubeResult) Descriptor() ([]byte, []int)
- func (m *YouTubeResult) GetEtag() string
- func (m *YouTubeResult) GetId() *YouTubeID
- func (m *YouTubeResult) GetItemId() *ID
- func (m *YouTubeResult) GetKind() string
- func (m *YouTubeResult) GetSnippet() *YouTubeSnippet
- func (*YouTubeResult) ProtoMessage()
- func (m *YouTubeResult) Reset()
- func (m *YouTubeResult) String() string
- type YouTubeSnippet
- func (*YouTubeSnippet) Descriptor() ([]byte, []int)
- func (m *YouTubeSnippet) GetChannelId() string
- func (m *YouTubeSnippet) GetChannelTitle() string
- func (m *YouTubeSnippet) GetDescription() string
- func (m *YouTubeSnippet) GetPublishedAt() string
- func (m *YouTubeSnippet) GetThumbnails() map[string]*Thumbnail
- func (m *YouTubeSnippet) GetTitle() string
- func (*YouTubeSnippet) ProtoMessage()
- func (m *YouTubeSnippet) Reset()
- func (m *YouTubeSnippet) String() string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterGenIDServer ¶
func RegisterGenIDServer(s *grpc.Server, srv GenIDServer)
func RegisterSearchServer ¶
func RegisterSearchServer(s *grpc.Server, srv SearchServer)
Types ¶
type GenIDClient ¶
type GenIDClient interface {
NewID(ctx context.Context, in *Nothing, opts ...grpc.CallOption) (*ID, error)
}
func NewGenIDClient ¶
func NewGenIDClient(cc *grpc.ClientConn) GenIDClient
type ID ¶
type ID struct {
Value string `protobuf:"bytes,1,opt,name=value" json:"value,omitempty"`
}
func (*ID) Descriptor ¶
func (*ID) ProtoMessage ¶
func (*ID) ProtoMessage()
type Nothing ¶
type Nothing struct {
}
func (*Nothing) Descriptor ¶
func (*Nothing) ProtoMessage ¶
func (*Nothing) ProtoMessage()
type Query ¶
type Query struct {
Keywords string `protobuf:"bytes,1,opt,name=keywords" json:"keywords,omitempty"`
MaxPages int32 `protobuf:"varint,2,opt,name=maxPages" json:"maxPages,omitempty"`
MaxResultsPerPage int32 `protobuf:"varint,3,opt,name=maxResultsPerPage" json:"maxResultsPerPage,omitempty"`
}
func (*Query) Descriptor ¶
func (*Query) GetKeywords ¶
func (*Query) GetMaxPages ¶
func (*Query) GetMaxResultsPerPage ¶
func (*Query) ProtoMessage ¶
func (*Query) ProtoMessage()
type Search ¶
type Search struct {
// contains filtered or unexported fields
}
func NewSearch ¶
func NewSearch(opts ...SearchInitOption) (*Search, error)
type SearchClient ¶
type SearchClient interface {
SearchIt(ctx context.Context, in *Query, opts ...grpc.CallOption) (*SearchResults, error)
}
func NewSearchClient ¶
func NewSearchClient(cc *grpc.ClientConn) SearchClient
type SearchInitOption ¶
type SearchInitOption interface {
// contains filtered or unexported methods
}
func WithYouTubeAPIKey ¶
func WithYouTubeAPIKey(apiKey string) SearchInitOption
type SearchResult ¶
type SearchResult struct {
Index uint64 `protobuf:"varint,1,opt,name=index" json:"index,omitempty"`
Items []*YouTubeResult `protobuf:"bytes,2,rep,name=items" json:"items,omitempty"`
Err string `protobuf:"bytes,3,opt,name=err" json:"err,omitempty"`
}
func (*SearchResult) Descriptor ¶
func (*SearchResult) Descriptor() ([]byte, []int)
func (*SearchResult) GetErr ¶
func (m *SearchResult) GetErr() string
func (*SearchResult) GetIndex ¶
func (m *SearchResult) GetIndex() uint64
func (*SearchResult) GetItems ¶
func (m *SearchResult) GetItems() []*YouTubeResult
func (*SearchResult) ProtoMessage ¶
func (*SearchResult) ProtoMessage()
func (*SearchResult) Reset ¶
func (m *SearchResult) Reset()
func (*SearchResult) String ¶
func (m *SearchResult) String() string
type SearchResults ¶
type SearchResults struct {
Results []*SearchResult `protobuf:"bytes,1,rep,name=Results" json:"Results,omitempty"`
}
func (*SearchResults) Descriptor ¶
func (*SearchResults) Descriptor() ([]byte, []int)
func (*SearchResults) GetResults ¶
func (m *SearchResults) GetResults() []*SearchResult
func (*SearchResults) ProtoMessage ¶
func (*SearchResults) ProtoMessage()
func (*SearchResults) Reset ¶
func (m *SearchResults) Reset()
func (*SearchResults) String ¶
func (m *SearchResults) String() string
type SearchServer ¶
type SearchServer interface {
SearchIt(context.Context, *Query) (*SearchResults, error)
}
type Thumbnail ¶
type Thumbnail struct {
Height int64 `protobuf:"varint,1,opt,name=height" json:"height,omitempty"`
Width int64 `protobuf:"varint,2,opt,name=width" json:"width,omitempty"`
Url string `protobuf:"bytes,3,opt,name=url" json:"url,omitempty"`
}
func (*Thumbnail) Descriptor ¶
func (*Thumbnail) ProtoMessage ¶
func (*Thumbnail) ProtoMessage()
type YouTubeID ¶
type YouTubeID struct {
Kind string `protobuf:"bytes,1,opt,name=kind" json:"kind,omitempty"`
VideoId string `protobuf:"bytes,2,opt,name=videoId" json:"videoId,omitempty"`
PlaylistId string `protobuf:"bytes,3,opt,name=playlistId" json:"playlistId,omitempty"`
}
func (*YouTubeID) Descriptor ¶
func (*YouTubeID) GetPlaylistId ¶
func (*YouTubeID) GetVideoId ¶
func (*YouTubeID) ProtoMessage ¶
func (*YouTubeID) ProtoMessage()
type YouTubeResult ¶
type YouTubeResult struct {
ItemId *ID `protobuf:"bytes,1,opt,name=itemId" json:"itemId,omitempty"`
Etag string `protobuf:"bytes,2,opt,name=etag" json:"etag,omitempty"`
Id *YouTubeID `protobuf:"bytes,3,opt,name=id" json:"id,omitempty"`
Kind string `protobuf:"bytes,4,opt,name=kind" json:"kind,omitempty"`
Snippet *YouTubeSnippet `protobuf:"bytes,5,opt,name=snippet" json:"snippet,omitempty"`
}
func (*YouTubeResult) Descriptor ¶
func (*YouTubeResult) Descriptor() ([]byte, []int)
func (*YouTubeResult) GetEtag ¶
func (m *YouTubeResult) GetEtag() string
func (*YouTubeResult) GetId ¶
func (m *YouTubeResult) GetId() *YouTubeID
func (*YouTubeResult) GetItemId ¶
func (m *YouTubeResult) GetItemId() *ID
func (*YouTubeResult) GetKind ¶
func (m *YouTubeResult) GetKind() string
func (*YouTubeResult) GetSnippet ¶
func (m *YouTubeResult) GetSnippet() *YouTubeSnippet
func (*YouTubeResult) ProtoMessage ¶
func (*YouTubeResult) ProtoMessage()
func (*YouTubeResult) Reset ¶
func (m *YouTubeResult) Reset()
func (*YouTubeResult) String ¶
func (m *YouTubeResult) String() string
type YouTubeSnippet ¶
type YouTubeSnippet struct {
ChannelId string `protobuf:"bytes,1,opt,name=channelId" json:"channelId,omitempty"`
ChannelTitle string `protobuf:"bytes,2,opt,name=channelTitle" json:"channelTitle,omitempty"`
Description string `protobuf:"bytes,3,opt,name=description" json:"description,omitempty"`
PublishedAt string `protobuf:"bytes,4,opt,name=publishedAt" json:"publishedAt,omitempty"`
Thumbnails map[string]*Thumbnail `` /* 140-byte string literal not displayed */
Title string `protobuf:"bytes,6,opt,name=title" json:"title,omitempty"`
}
func (*YouTubeSnippet) Descriptor ¶
func (*YouTubeSnippet) Descriptor() ([]byte, []int)
func (*YouTubeSnippet) GetChannelId ¶
func (m *YouTubeSnippet) GetChannelId() string
func (*YouTubeSnippet) GetChannelTitle ¶
func (m *YouTubeSnippet) GetChannelTitle() string
func (*YouTubeSnippet) GetDescription ¶
func (m *YouTubeSnippet) GetDescription() string
func (*YouTubeSnippet) GetPublishedAt ¶
func (m *YouTubeSnippet) GetPublishedAt() string
func (*YouTubeSnippet) GetThumbnails ¶
func (m *YouTubeSnippet) GetThumbnails() map[string]*Thumbnail
func (*YouTubeSnippet) GetTitle ¶
func (m *YouTubeSnippet) GetTitle() string
func (*YouTubeSnippet) ProtoMessage ¶
func (*YouTubeSnippet) ProtoMessage()
func (*YouTubeSnippet) Reset ¶
func (m *YouTubeSnippet) Reset()
func (*YouTubeSnippet) String ¶
func (m *YouTubeSnippet) String() string
Click to show internal directories.
Click to hide internal directories.