pb

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2020 License: AGPL-3.0 Imports: 9 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	TitleType_name = map[int32]string{
		0: "MOVIE",
		1: "SHORT",
		2: "TV_EPISODE",
		3: "TV_MINI_SERIES",
		4: "TV_MOVIE",
		5: "TV_SERIES",
		6: "TV_SHORT",
		7: "TV_SPECIAL",
		8: "VIDEO",
		9: "VIDEO_GAME",
	}
	TitleType_value = map[string]int32{
		"MOVIE":          0,
		"SHORT":          1,
		"TV_EPISODE":     2,
		"TV_MINI_SERIES": 3,
		"TV_MOVIE":       4,
		"TV_SERIES":      5,
		"TV_SHORT":       6,
		"TV_SPECIAL":     7,
		"VIDEO":          8,
		"VIDEO_GAME":     9,
	}
)

Enum value maps for TitleType.

View Source
var File_service_proto protoreflect.FileDescriptor
View Source
var MetaFetcher_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "imdb2meta.MetaFetcher",
	HandlerType: (*MetaFetcherServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Get",
			Handler:    _MetaFetcher_Get_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "service.proto",
}

MetaFetcher_ServiceDesc is the grpc.ServiceDesc for MetaFetcher service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

Functions

func RegisterMetaFetcherServer added in v0.2.0

func RegisterMetaFetcherServer(s grpc.ServiceRegistrar, srv MetaFetcherServer)

Types

type Meta

type Meta struct {
	Id            string    `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // IMDb ID, including "tt" prefix
	TitleType     TitleType `protobuf:"varint,2,opt,name=title_type,json=titleType,proto3,enum=imdb2meta.TitleType" json:"title_type,omitempty"`
	PrimaryTitle  string    `protobuf:"bytes,3,opt,name=primary_title,json=primaryTitle,proto3" json:"primary_title,omitempty"`
	OriginalTitle string    `protobuf:"bytes,4,opt,name=original_title,json=originalTitle,proto3" json:"original_title,omitempty"` // Only filled if different from the primary title
	IsAdult       bool      `protobuf:"varint,5,opt,name=is_adult,json=isAdult,proto3" json:"is_adult,omitempty"`
	StartYear     int32     `protobuf:"varint,6,opt,name=start_year,json=startYear,proto3" json:"start_year,omitempty"` // Start year for TV shows, release year for movies. Can be 0.
	EndYear       int32     `protobuf:"varint,7,opt,name=end_year,json=endYear,proto3" json:"end_year,omitempty"`       // Only relevant for TV shows
	Runtime       int32     `protobuf:"varint,8,opt,name=runtime,proto3" json:"runtime,omitempty"`                      // In minutes. Can be 0.
	Genres        []string  `protobuf:"bytes,9,rep,name=genres,proto3" json:"genres,omitempty"`                         // Up to three genres. Can be empty.
	// contains filtered or unexported fields
}

func (*Meta) Descriptor deprecated

func (*Meta) Descriptor() ([]byte, []int)

Deprecated: Use Meta.ProtoReflect.Descriptor instead.

func (*Meta) GetEndYear

func (x *Meta) GetEndYear() int32

func (*Meta) GetGenres

func (x *Meta) GetGenres() []string

func (*Meta) GetId

func (x *Meta) GetId() string

func (*Meta) GetIsAdult

func (x *Meta) GetIsAdult() bool

func (*Meta) GetOriginalTitle

func (x *Meta) GetOriginalTitle() string

func (*Meta) GetPrimaryTitle

func (x *Meta) GetPrimaryTitle() string

func (*Meta) GetRuntime

func (x *Meta) GetRuntime() int32

func (*Meta) GetStartYear

func (x *Meta) GetStartYear() int32

func (*Meta) GetTitleType

func (x *Meta) GetTitleType() TitleType

func (*Meta) ProtoMessage

func (*Meta) ProtoMessage()

func (*Meta) ProtoReflect

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

func (*Meta) Reset

func (x *Meta) Reset()

func (*Meta) String

func (x *Meta) String() string

type MetaFetcherClient added in v0.2.0

type MetaFetcherClient interface {
	Get(ctx context.Context, in *MetaRequest, opts ...grpc.CallOption) (*Meta, error)
}

MetaFetcherClient is the client API for MetaFetcher service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.

func NewMetaFetcherClient added in v0.2.0

func NewMetaFetcherClient(cc grpc.ClientConnInterface) MetaFetcherClient

type MetaFetcherServer added in v0.2.0

type MetaFetcherServer interface {
	Get(context.Context, *MetaRequest) (*Meta, error)
	// contains filtered or unexported methods
}

MetaFetcherServer is the server API for MetaFetcher service. All implementations must embed UnimplementedMetaFetcherServer for forward compatibility

type MetaRequest added in v0.2.0

type MetaRequest struct {
	Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	// contains filtered or unexported fields
}

func (*MetaRequest) Descriptor deprecated added in v0.2.0

func (*MetaRequest) Descriptor() ([]byte, []int)

Deprecated: Use MetaRequest.ProtoReflect.Descriptor instead.

func (*MetaRequest) GetId added in v0.2.0

func (x *MetaRequest) GetId() string

func (*MetaRequest) ProtoMessage added in v0.2.0

func (*MetaRequest) ProtoMessage()

func (*MetaRequest) ProtoReflect added in v0.2.0

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

func (*MetaRequest) Reset added in v0.2.0

func (x *MetaRequest) Reset()

func (*MetaRequest) String added in v0.2.0

func (x *MetaRequest) String() string

type TitleType

type TitleType int32

All title types in the title.basics.tsv.gz dataset as of 2020-11-21.

const (
	TitleType_MOVIE          TitleType = 0
	TitleType_SHORT          TitleType = 1
	TitleType_TV_EPISODE     TitleType = 2
	TitleType_TV_MINI_SERIES TitleType = 3
	TitleType_TV_MOVIE       TitleType = 4
	TitleType_TV_SERIES      TitleType = 5
	TitleType_TV_SHORT       TitleType = 6
	TitleType_TV_SPECIAL     TitleType = 7
	TitleType_VIDEO          TitleType = 8
	TitleType_VIDEO_GAME     TitleType = 9
)

func (TitleType) Descriptor

func (TitleType) Descriptor() protoreflect.EnumDescriptor

func (TitleType) Enum

func (x TitleType) Enum() *TitleType

func (TitleType) EnumDescriptor deprecated

func (TitleType) EnumDescriptor() ([]byte, []int)

Deprecated: Use TitleType.Descriptor instead.

func (TitleType) Number

func (x TitleType) Number() protoreflect.EnumNumber

func (TitleType) String

func (x TitleType) String() string

func (TitleType) Type

type UnimplementedMetaFetcherServer added in v0.2.0

type UnimplementedMetaFetcherServer struct {
}

UnimplementedMetaFetcherServer must be embedded to have forward compatible implementations.

func (UnimplementedMetaFetcherServer) Get added in v0.2.0

type UnsafeMetaFetcherServer added in v0.2.0

type UnsafeMetaFetcherServer interface {
	// contains filtered or unexported methods
}

UnsafeMetaFetcherServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to MetaFetcherServer will result in compilation errors.

Jump to

Keyboard shortcuts

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