clipper/backend/generated/pb/media_set/media_set_grpc.pb.go

301 lines
10 KiB
Go

// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
package media_set
import (
context "context"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status"
)
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
// Requires gRPC-Go v1.32.0 or later.
const _ = grpc.SupportPackageIsVersion7
// MediaSetServiceClient is the client API for MediaSetService 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.
type MediaSetServiceClient interface {
Get(ctx context.Context, in *GetRequest, opts ...grpc.CallOption) (*MediaSet, error)
GetAudio(ctx context.Context, in *GetAudioRequest, opts ...grpc.CallOption) (MediaSetService_GetAudioClient, error)
GetAudioSegment(ctx context.Context, in *GetAudioSegmentRequest, opts ...grpc.CallOption) (*GetAudioSegmentResponse, error)
GetVideo(ctx context.Context, in *GetVideoRequest, opts ...grpc.CallOption) (MediaSetService_GetVideoClient, error)
GetVideoThumbnail(ctx context.Context, in *GetVideoThumbnailRequest, opts ...grpc.CallOption) (*GetVideoThumbnailResponse, error)
}
type mediaSetServiceClient struct {
cc grpc.ClientConnInterface
}
func NewMediaSetServiceClient(cc grpc.ClientConnInterface) MediaSetServiceClient {
return &mediaSetServiceClient{cc}
}
func (c *mediaSetServiceClient) Get(ctx context.Context, in *GetRequest, opts ...grpc.CallOption) (*MediaSet, error) {
out := new(MediaSet)
err := c.cc.Invoke(ctx, "/media_set.MediaSetService/Get", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *mediaSetServiceClient) GetAudio(ctx context.Context, in *GetAudioRequest, opts ...grpc.CallOption) (MediaSetService_GetAudioClient, error) {
stream, err := c.cc.NewStream(ctx, &MediaSetService_ServiceDesc.Streams[0], "/media_set.MediaSetService/GetAudio", opts...)
if err != nil {
return nil, err
}
x := &mediaSetServiceGetAudioClient{stream}
if err := x.ClientStream.SendMsg(in); err != nil {
return nil, err
}
if err := x.ClientStream.CloseSend(); err != nil {
return nil, err
}
return x, nil
}
type MediaSetService_GetAudioClient interface {
Recv() (*GetAudioProgress, error)
grpc.ClientStream
}
type mediaSetServiceGetAudioClient struct {
grpc.ClientStream
}
func (x *mediaSetServiceGetAudioClient) Recv() (*GetAudioProgress, error) {
m := new(GetAudioProgress)
if err := x.ClientStream.RecvMsg(m); err != nil {
return nil, err
}
return m, nil
}
func (c *mediaSetServiceClient) GetAudioSegment(ctx context.Context, in *GetAudioSegmentRequest, opts ...grpc.CallOption) (*GetAudioSegmentResponse, error) {
out := new(GetAudioSegmentResponse)
err := c.cc.Invoke(ctx, "/media_set.MediaSetService/GetAudioSegment", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *mediaSetServiceClient) GetVideo(ctx context.Context, in *GetVideoRequest, opts ...grpc.CallOption) (MediaSetService_GetVideoClient, error) {
stream, err := c.cc.NewStream(ctx, &MediaSetService_ServiceDesc.Streams[1], "/media_set.MediaSetService/GetVideo", opts...)
if err != nil {
return nil, err
}
x := &mediaSetServiceGetVideoClient{stream}
if err := x.ClientStream.SendMsg(in); err != nil {
return nil, err
}
if err := x.ClientStream.CloseSend(); err != nil {
return nil, err
}
return x, nil
}
type MediaSetService_GetVideoClient interface {
Recv() (*GetVideoProgress, error)
grpc.ClientStream
}
type mediaSetServiceGetVideoClient struct {
grpc.ClientStream
}
func (x *mediaSetServiceGetVideoClient) Recv() (*GetVideoProgress, error) {
m := new(GetVideoProgress)
if err := x.ClientStream.RecvMsg(m); err != nil {
return nil, err
}
return m, nil
}
func (c *mediaSetServiceClient) GetVideoThumbnail(ctx context.Context, in *GetVideoThumbnailRequest, opts ...grpc.CallOption) (*GetVideoThumbnailResponse, error) {
out := new(GetVideoThumbnailResponse)
err := c.cc.Invoke(ctx, "/media_set.MediaSetService/GetVideoThumbnail", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// MediaSetServiceServer is the server API for MediaSetService service.
// All implementations must embed UnimplementedMediaSetServiceServer
// for forward compatibility
type MediaSetServiceServer interface {
Get(context.Context, *GetRequest) (*MediaSet, error)
GetAudio(*GetAudioRequest, MediaSetService_GetAudioServer) error
GetAudioSegment(context.Context, *GetAudioSegmentRequest) (*GetAudioSegmentResponse, error)
GetVideo(*GetVideoRequest, MediaSetService_GetVideoServer) error
GetVideoThumbnail(context.Context, *GetVideoThumbnailRequest) (*GetVideoThumbnailResponse, error)
mustEmbedUnimplementedMediaSetServiceServer()
}
// UnimplementedMediaSetServiceServer must be embedded to have forward compatible implementations.
type UnimplementedMediaSetServiceServer struct {
}
func (UnimplementedMediaSetServiceServer) Get(context.Context, *GetRequest) (*MediaSet, error) {
return nil, status.Errorf(codes.Unimplemented, "method Get not implemented")
}
func (UnimplementedMediaSetServiceServer) GetAudio(*GetAudioRequest, MediaSetService_GetAudioServer) error {
return status.Errorf(codes.Unimplemented, "method GetAudio not implemented")
}
func (UnimplementedMediaSetServiceServer) GetAudioSegment(context.Context, *GetAudioSegmentRequest) (*GetAudioSegmentResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetAudioSegment not implemented")
}
func (UnimplementedMediaSetServiceServer) GetVideo(*GetVideoRequest, MediaSetService_GetVideoServer) error {
return status.Errorf(codes.Unimplemented, "method GetVideo not implemented")
}
func (UnimplementedMediaSetServiceServer) GetVideoThumbnail(context.Context, *GetVideoThumbnailRequest) (*GetVideoThumbnailResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetVideoThumbnail not implemented")
}
func (UnimplementedMediaSetServiceServer) mustEmbedUnimplementedMediaSetServiceServer() {}
// UnsafeMediaSetServiceServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to MediaSetServiceServer will
// result in compilation errors.
type UnsafeMediaSetServiceServer interface {
mustEmbedUnimplementedMediaSetServiceServer()
}
func RegisterMediaSetServiceServer(s grpc.ServiceRegistrar, srv MediaSetServiceServer) {
s.RegisterService(&MediaSetService_ServiceDesc, srv)
}
func _MediaSetService_Get_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(MediaSetServiceServer).Get(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/media_set.MediaSetService/Get",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(MediaSetServiceServer).Get(ctx, req.(*GetRequest))
}
return interceptor(ctx, in, info, handler)
}
func _MediaSetService_GetAudio_Handler(srv interface{}, stream grpc.ServerStream) error {
m := new(GetAudioRequest)
if err := stream.RecvMsg(m); err != nil {
return err
}
return srv.(MediaSetServiceServer).GetAudio(m, &mediaSetServiceGetAudioServer{stream})
}
type MediaSetService_GetAudioServer interface {
Send(*GetAudioProgress) error
grpc.ServerStream
}
type mediaSetServiceGetAudioServer struct {
grpc.ServerStream
}
func (x *mediaSetServiceGetAudioServer) Send(m *GetAudioProgress) error {
return x.ServerStream.SendMsg(m)
}
func _MediaSetService_GetAudioSegment_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetAudioSegmentRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(MediaSetServiceServer).GetAudioSegment(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/media_set.MediaSetService/GetAudioSegment",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(MediaSetServiceServer).GetAudioSegment(ctx, req.(*GetAudioSegmentRequest))
}
return interceptor(ctx, in, info, handler)
}
func _MediaSetService_GetVideo_Handler(srv interface{}, stream grpc.ServerStream) error {
m := new(GetVideoRequest)
if err := stream.RecvMsg(m); err != nil {
return err
}
return srv.(MediaSetServiceServer).GetVideo(m, &mediaSetServiceGetVideoServer{stream})
}
type MediaSetService_GetVideoServer interface {
Send(*GetVideoProgress) error
grpc.ServerStream
}
type mediaSetServiceGetVideoServer struct {
grpc.ServerStream
}
func (x *mediaSetServiceGetVideoServer) Send(m *GetVideoProgress) error {
return x.ServerStream.SendMsg(m)
}
func _MediaSetService_GetVideoThumbnail_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetVideoThumbnailRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(MediaSetServiceServer).GetVideoThumbnail(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/media_set.MediaSetService/GetVideoThumbnail",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(MediaSetServiceServer).GetVideoThumbnail(ctx, req.(*GetVideoThumbnailRequest))
}
return interceptor(ctx, in, info, handler)
}
// MediaSetService_ServiceDesc is the grpc.ServiceDesc for MediaSetService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var MediaSetService_ServiceDesc = grpc.ServiceDesc{
ServiceName: "media_set.MediaSetService",
HandlerType: (*MediaSetServiceServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "Get",
Handler: _MediaSetService_Get_Handler,
},
{
MethodName: "GetAudioSegment",
Handler: _MediaSetService_GetAudioSegment_Handler,
},
{
MethodName: "GetVideoThumbnail",
Handler: _MediaSetService_GetVideoThumbnail_Handler,
},
},
Streams: []grpc.StreamDesc{
{
StreamName: "GetAudio",
Handler: _MediaSetService_GetAudio_Handler,
ServerStreams: true,
},
{
StreamName: "GetVideo",
Handler: _MediaSetService_GetVideo_Handler,
ServerStreams: true,
},
},
Metadata: "media_set.proto",
}