Documentation ¶
Index ¶
- Variables
- func NewMovieEndpoints() []*api.Endpoint
- func RegisterMovieHandler(s server.Server, hdlr MovieHandler, opts ...server.HandlerOption) error
- type MovieHandler
- type MovieInfo
- func (*MovieInfo) Descriptor() ([]byte, []int)deprecated
- func (x *MovieInfo) GetAdult() bool
- func (x *MovieInfo) GetBackdropPath() string
- func (x *MovieInfo) GetGenreIds() []int32
- func (x *MovieInfo) GetId() int32
- func (x *MovieInfo) GetOriginalLanguage() string
- func (x *MovieInfo) GetOriginalTitle() string
- func (x *MovieInfo) GetOverview() string
- func (x *MovieInfo) GetPopularity() float64
- func (x *MovieInfo) GetPosterPath() string
- func (x *MovieInfo) GetReleaseDate() string
- func (x *MovieInfo) GetTitle() string
- func (x *MovieInfo) GetVideo() bool
- func (x *MovieInfo) GetVoteAverage() float64
- func (x *MovieInfo) GetVoteCount() int32
- func (*MovieInfo) ProtoMessage()
- func (x *MovieInfo) ProtoReflect() protoreflect.Message
- func (x *MovieInfo) Reset()
- func (x *MovieInfo) String() string
- type MovieService
- type SearchRequest
- func (*SearchRequest) Descriptor() ([]byte, []int)deprecated
- func (x *SearchRequest) GetLanguage() string
- func (x *SearchRequest) GetPage() int32
- func (x *SearchRequest) GetPrimaryReleaseYear() int32
- func (x *SearchRequest) GetQuery() string
- func (x *SearchRequest) GetRegion() string
- func (x *SearchRequest) GetYear() int32
- func (*SearchRequest) ProtoMessage()
- func (x *SearchRequest) ProtoReflect() protoreflect.Message
- func (x *SearchRequest) Reset()
- func (x *SearchRequest) String() string
- type SearchResponse
- func (*SearchResponse) Descriptor() ([]byte, []int)deprecated
- func (x *SearchResponse) GetPage() int32
- func (x *SearchResponse) GetResults() []*MovieInfo
- func (x *SearchResponse) GetTotalPages() int32
- func (x *SearchResponse) GetTotalResults() int32
- func (*SearchResponse) ProtoMessage()
- func (x *SearchResponse) ProtoReflect() protoreflect.Message
- func (x *SearchResponse) Reset()
- func (x *SearchResponse) String() string
Constants ¶
This section is empty.
Variables ¶
View Source
var File_proto_movie_proto protoreflect.FileDescriptor
Functions ¶
func NewMovieEndpoints ¶
func RegisterMovieHandler ¶
func RegisterMovieHandler(s server.Server, hdlr MovieHandler, opts ...server.HandlerOption) error
Types ¶
type MovieHandler ¶
type MovieHandler interface {
Search(context.Context, *SearchRequest, *SearchResponse) error
}
type MovieInfo ¶
type MovieInfo struct { PosterPath string `protobuf:"bytes,1,opt,name=poster_path,json=posterPath,proto3" json:"poster_path,omitempty"` Adult bool `protobuf:"varint,2,opt,name=adult,proto3" json:"adult,omitempty"` Overview string `protobuf:"bytes,3,opt,name=overview,proto3" json:"overview,omitempty"` ReleaseDate string `protobuf:"bytes,4,opt,name=release_date,json=releaseDate,proto3" json:"release_date,omitempty"` GenreIds []int32 `protobuf:"varint,5,rep,packed,name=genre_ids,json=genreIds,proto3" json:"genre_ids,omitempty"` Id int32 `protobuf:"varint,6,opt,name=id,proto3" json:"id,omitempty"` OriginalTitle string `protobuf:"bytes,7,opt,name=original_title,json=originalTitle,proto3" json:"original_title,omitempty"` OriginalLanguage string `protobuf:"bytes,8,opt,name=original_language,json=originalLanguage,proto3" json:"original_language,omitempty"` Title string `protobuf:"bytes,9,opt,name=title,proto3" json:"title,omitempty"` BackdropPath string `protobuf:"bytes,10,opt,name=backdrop_path,json=backdropPath,proto3" json:"backdrop_path,omitempty"` Popularity float64 `protobuf:"fixed64,11,opt,name=popularity,proto3" json:"popularity,omitempty"` VoteCount int32 `protobuf:"varint,12,opt,name=vote_count,json=voteCount,proto3" json:"vote_count,omitempty"` Video bool `protobuf:"varint,13,opt,name=video,proto3" json:"video,omitempty"` VoteAverage float64 `protobuf:"fixed64,14,opt,name=vote_average,json=voteAverage,proto3" json:"vote_average,omitempty"` // contains filtered or unexported fields }
func (*MovieInfo) Descriptor
deprecated
func (*MovieInfo) GetBackdropPath ¶
func (*MovieInfo) GetGenreIds ¶
func (*MovieInfo) GetOriginalLanguage ¶
func (*MovieInfo) GetOriginalTitle ¶
func (*MovieInfo) GetOverview ¶
func (*MovieInfo) GetPopularity ¶
func (*MovieInfo) GetPosterPath ¶
func (*MovieInfo) GetReleaseDate ¶
func (*MovieInfo) GetVoteAverage ¶
func (*MovieInfo) GetVoteCount ¶
func (*MovieInfo) ProtoMessage ¶
func (*MovieInfo) ProtoMessage()
func (*MovieInfo) ProtoReflect ¶
func (x *MovieInfo) ProtoReflect() protoreflect.Message
type MovieService ¶
type MovieService interface {
Search(ctx context.Context, in *SearchRequest, opts ...client.CallOption) (*SearchResponse, error)
}
func NewMovieService ¶
func NewMovieService(name string, c client.Client) MovieService
type SearchRequest ¶
type SearchRequest struct { // a ISO 639-1 value to display translated data Language string `protobuf:"bytes,1,opt,name=language,proto3" json:"language,omitempty"` // a text query to search Query string `protobuf:"bytes,2,opt,name=query,proto3" json:"query,omitempty"` // page to query Page int32 `protobuf:"varint,3,opt,name=page,proto3" json:"page,omitempty"` // a ISO 3166-1 code to filter release dates. Region string `protobuf:"bytes,4,opt,name=region,proto3" json:"region,omitempty"` Year int32 `protobuf:"varint,5,opt,name=year,proto3" json:"year,omitempty"` PrimaryReleaseYear int32 `protobuf:"varint,6,opt,name=primary_release_year,json=primaryReleaseYear,proto3" json:"primary_release_year,omitempty"` // contains filtered or unexported fields }
func (*SearchRequest) Descriptor
deprecated
func (*SearchRequest) Descriptor() ([]byte, []int)
Deprecated: Use SearchRequest.ProtoReflect.Descriptor instead.
func (*SearchRequest) GetLanguage ¶
func (x *SearchRequest) GetLanguage() string
func (*SearchRequest) GetPage ¶
func (x *SearchRequest) GetPage() int32
func (*SearchRequest) GetPrimaryReleaseYear ¶
func (x *SearchRequest) GetPrimaryReleaseYear() int32
func (*SearchRequest) GetQuery ¶
func (x *SearchRequest) GetQuery() string
func (*SearchRequest) GetRegion ¶
func (x *SearchRequest) GetRegion() string
func (*SearchRequest) GetYear ¶
func (x *SearchRequest) GetYear() int32
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 { TotalResults int32 `protobuf:"varint,1,opt,name=total_results,json=totalResults,proto3" json:"total_results,omitempty"` TotalPages int32 `protobuf:"varint,2,opt,name=total_pages,json=totalPages,proto3" json:"total_pages,omitempty"` Page int32 `protobuf:"varint,3,opt,name=page,proto3" json:"page,omitempty"` Results []*MovieInfo `protobuf:"bytes,4,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) GetPage ¶
func (x *SearchResponse) GetPage() int32
func (*SearchResponse) GetResults ¶
func (x *SearchResponse) GetResults() []*MovieInfo
func (*SearchResponse) GetTotalPages ¶
func (x *SearchResponse) GetTotalPages() int32
func (*SearchResponse) GetTotalResults ¶
func (x *SearchResponse) GetTotalResults() int32
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
Click to show internal directories.
Click to hide internal directories.