movie

package
v1.6.0 Latest Latest
Warning

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

Go to latest
Published: Jul 20, 2023 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_proto_movie_proto protoreflect.FileDescriptor

Functions

func NewMovieEndpoints

func NewMovieEndpoints() []*api.Endpoint

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) Descriptor() ([]byte, []int)

Deprecated: Use MovieInfo.ProtoReflect.Descriptor instead.

func (*MovieInfo) GetAdult

func (x *MovieInfo) GetAdult() bool

func (*MovieInfo) GetBackdropPath

func (x *MovieInfo) GetBackdropPath() string

func (*MovieInfo) GetGenreIds

func (x *MovieInfo) GetGenreIds() []int32

func (*MovieInfo) GetId

func (x *MovieInfo) GetId() int32

func (*MovieInfo) GetOriginalLanguage

func (x *MovieInfo) GetOriginalLanguage() string

func (*MovieInfo) GetOriginalTitle

func (x *MovieInfo) GetOriginalTitle() string

func (*MovieInfo) GetOverview

func (x *MovieInfo) GetOverview() string

func (*MovieInfo) GetPopularity

func (x *MovieInfo) GetPopularity() float64

func (*MovieInfo) GetPosterPath

func (x *MovieInfo) GetPosterPath() string

func (*MovieInfo) GetReleaseDate

func (x *MovieInfo) GetReleaseDate() string

func (*MovieInfo) GetTitle

func (x *MovieInfo) GetTitle() string

func (*MovieInfo) GetVideo

func (x *MovieInfo) GetVideo() bool

func (*MovieInfo) GetVoteAverage

func (x *MovieInfo) GetVoteAverage() float64

func (*MovieInfo) GetVoteCount

func (x *MovieInfo) GetVoteCount() int32

func (*MovieInfo) ProtoMessage

func (*MovieInfo) ProtoMessage()

func (*MovieInfo) ProtoReflect

func (x *MovieInfo) ProtoReflect() protoreflect.Message

func (*MovieInfo) Reset

func (x *MovieInfo) Reset()

func (*MovieInfo) String

func (x *MovieInfo) String() string

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

Jump to

Keyboard shortcuts

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