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

364 lines
12 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)
GetPeaks(ctx context.Context, in *GetPeaksRequest, opts ...grpc.CallOption) (MediaSetService_GetPeaksClient, error)
GetPeaksForSegment(ctx context.Context, in *GetPeaksForSegmentRequest, opts ...grpc.CallOption) (*GetPeaksForSegmentResponse, error)
GetAudioSegment(ctx context.Context, in *GetAudioSegmentRequest, opts ...grpc.CallOption) (MediaSetService_GetAudioSegmentClient, 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) GetPeaks(ctx context.Context, in *GetPeaksRequest, opts ...grpc.CallOption) (MediaSetService_GetPeaksClient, error) {
stream, err := c.cc.NewStream(ctx, &MediaSetService_ServiceDesc.Streams[0], "/media_set.MediaSetService/GetPeaks", opts...)
if err != nil {
return nil, err
}
x := &mediaSetServiceGetPeaksClient{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_GetPeaksClient interface {
Recv() (*GetPeaksProgress, error)
grpc.ClientStream
}
type mediaSetServiceGetPeaksClient struct {
grpc.ClientStream
}
func (x *mediaSetServiceGetPeaksClient) Recv() (*GetPeaksProgress, error) {
m := new(GetPeaksProgress)
if err := x.ClientStream.RecvMsg(m); err != nil {
return nil, err
}
return m, nil
}
func (c *mediaSetServiceClient) GetPeaksForSegment(ctx context.Context, in *GetPeaksForSegmentRequest, opts ...grpc.CallOption) (*GetPeaksForSegmentResponse, error) {
out := new(GetPeaksForSegmentResponse)
err := c.cc.Invoke(ctx, "/media_set.MediaSetService/GetPeaksForSegment", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *mediaSetServiceClient) GetAudioSegment(ctx context.Context, in *GetAudioSegmentRequest, opts ...grpc.CallOption) (MediaSetService_GetAudioSegmentClient, error) {
stream, err := c.cc.NewStream(ctx, &MediaSetService_ServiceDesc.Streams[1], "/media_set.MediaSetService/GetAudioSegment", opts...)
if err != nil {
return nil, err
}
x := &mediaSetServiceGetAudioSegmentClient{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_GetAudioSegmentClient interface {
Recv() (*GetAudioSegmentProgress, error)
grpc.ClientStream
}
type mediaSetServiceGetAudioSegmentClient struct {
grpc.ClientStream
}
func (x *mediaSetServiceGetAudioSegmentClient) Recv() (*GetAudioSegmentProgress, error) {
m := new(GetAudioSegmentProgress)
if err := x.ClientStream.RecvMsg(m); err != nil {
return nil, err
}
return m, 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[2], "/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)
GetPeaks(*GetPeaksRequest, MediaSetService_GetPeaksServer) error
GetPeaksForSegment(context.Context, *GetPeaksForSegmentRequest) (*GetPeaksForSegmentResponse, error)
GetAudioSegment(*GetAudioSegmentRequest, MediaSetService_GetAudioSegmentServer) 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) GetPeaks(*GetPeaksRequest, MediaSetService_GetPeaksServer) error {
return status.Errorf(codes.Unimplemented, "method GetPeaks not implemented")
}
func (UnimplementedMediaSetServiceServer) GetPeaksForSegment(context.Context, *GetPeaksForSegmentRequest) (*GetPeaksForSegmentResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetPeaksForSegment not implemented")
}
func (UnimplementedMediaSetServiceServer) GetAudioSegment(*GetAudioSegmentRequest, MediaSetService_GetAudioSegmentServer) error {
return 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_GetPeaks_Handler(srv interface{}, stream grpc.ServerStream) error {
m := new(GetPeaksRequest)
if err := stream.RecvMsg(m); err != nil {
return err
}
return srv.(MediaSetServiceServer).GetPeaks(m, &mediaSetServiceGetPeaksServer{stream})
}
type MediaSetService_GetPeaksServer interface {
Send(*GetPeaksProgress) error
grpc.ServerStream
}
type mediaSetServiceGetPeaksServer struct {
grpc.ServerStream
}
func (x *mediaSetServiceGetPeaksServer) Send(m *GetPeaksProgress) error {
return x.ServerStream.SendMsg(m)
}
func _MediaSetService_GetPeaksForSegment_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetPeaksForSegmentRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(MediaSetServiceServer).GetPeaksForSegment(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/media_set.MediaSetService/GetPeaksForSegment",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(MediaSetServiceServer).GetPeaksForSegment(ctx, req.(*GetPeaksForSegmentRequest))
}
return interceptor(ctx, in, info, handler)
}
func _MediaSetService_GetAudioSegment_Handler(srv interface{}, stream grpc.ServerStream) error {
m := new(GetAudioSegmentRequest)
if err := stream.RecvMsg(m); err != nil {
return err
}
return srv.(MediaSetServiceServer).GetAudioSegment(m, &mediaSetServiceGetAudioSegmentServer{stream})
}
type MediaSetService_GetAudioSegmentServer interface {
Send(*GetAudioSegmentProgress) error
grpc.ServerStream
}
type mediaSetServiceGetAudioSegmentServer struct {
grpc.ServerStream
}
func (x *mediaSetServiceGetAudioSegmentServer) Send(m *GetAudioSegmentProgress) error {
return x.ServerStream.SendMsg(m)
}
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: "GetPeaksForSegment",
Handler: _MediaSetService_GetPeaksForSegment_Handler,
},
{
MethodName: "GetVideoThumbnail",
Handler: _MediaSetService_GetVideoThumbnail_Handler,
},
},
Streams: []grpc.StreamDesc{
{
StreamName: "GetPeaks",
Handler: _MediaSetService_GetPeaks_Handler,
ServerStreams: true,
},
{
StreamName: "GetAudioSegment",
Handler: _MediaSetService_GetAudioSegment_Handler,
ServerStreams: true,
},
{
StreamName: "GetVideo",
Handler: _MediaSetService_GetVideo_Handler,
ServerStreams: true,
},
},
Metadata: "media_set.proto",
}