Add generated code to Git
This commit is contained in:
parent
75e09c05cf
commit
935c2add2a
|
@ -0,0 +1,942 @@
|
|||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.27.1
|
||||
// protoc v3.17.3
|
||||
// source: media_set.proto
|
||||
|
||||
package media_set
|
||||
|
||||
import (
|
||||
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||
durationpb "google.golang.org/protobuf/types/known/durationpb"
|
||||
reflect "reflect"
|
||||
sync "sync"
|
||||
)
|
||||
|
||||
const (
|
||||
// Verify that this generated code is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
|
||||
// Verify that runtime/protoimpl is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
|
||||
)
|
||||
|
||||
type MediaSet struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
|
||||
YoutubeId string `protobuf:"bytes,2,opt,name=youtube_id,json=youtubeId,proto3" json:"youtube_id,omitempty"`
|
||||
AudioChannels int32 `protobuf:"varint,3,opt,name=audio_channels,json=audioChannels,proto3" json:"audio_channels,omitempty"`
|
||||
AudioApproxFrames int64 `protobuf:"varint,4,opt,name=audio_approx_frames,json=audioApproxFrames,proto3" json:"audio_approx_frames,omitempty"`
|
||||
AudioFrames int64 `protobuf:"varint,5,opt,name=audio_frames,json=audioFrames,proto3" json:"audio_frames,omitempty"`
|
||||
AudioSampleRate int32 `protobuf:"varint,6,opt,name=audio_sample_rate,json=audioSampleRate,proto3" json:"audio_sample_rate,omitempty"`
|
||||
AudioYoutubeItag int32 `protobuf:"varint,7,opt,name=audio_youtube_itag,json=audioYoutubeItag,proto3" json:"audio_youtube_itag,omitempty"`
|
||||
AudioMimeType string `protobuf:"bytes,8,opt,name=audio_mime_type,json=audioMimeType,proto3" json:"audio_mime_type,omitempty"`
|
||||
VideoDuration *durationpb.Duration `protobuf:"bytes,9,opt,name=video_duration,json=videoDuration,proto3" json:"video_duration,omitempty"`
|
||||
VideoYoutubeItag int32 `protobuf:"varint,10,opt,name=video_youtube_itag,json=videoYoutubeItag,proto3" json:"video_youtube_itag,omitempty"`
|
||||
VideoMimeType string `protobuf:"bytes,11,opt,name=video_mime_type,json=videoMimeType,proto3" json:"video_mime_type,omitempty"`
|
||||
}
|
||||
|
||||
func (x *MediaSet) Reset() {
|
||||
*x = MediaSet{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_media_set_proto_msgTypes[0]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *MediaSet) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*MediaSet) ProtoMessage() {}
|
||||
|
||||
func (x *MediaSet) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_media_set_proto_msgTypes[0]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use MediaSet.ProtoReflect.Descriptor instead.
|
||||
func (*MediaSet) Descriptor() ([]byte, []int) {
|
||||
return file_media_set_proto_rawDescGZIP(), []int{0}
|
||||
}
|
||||
|
||||
func (x *MediaSet) GetId() string {
|
||||
if x != nil {
|
||||
return x.Id
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *MediaSet) GetYoutubeId() string {
|
||||
if x != nil {
|
||||
return x.YoutubeId
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *MediaSet) GetAudioChannels() int32 {
|
||||
if x != nil {
|
||||
return x.AudioChannels
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *MediaSet) GetAudioApproxFrames() int64 {
|
||||
if x != nil {
|
||||
return x.AudioApproxFrames
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *MediaSet) GetAudioFrames() int64 {
|
||||
if x != nil {
|
||||
return x.AudioFrames
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *MediaSet) GetAudioSampleRate() int32 {
|
||||
if x != nil {
|
||||
return x.AudioSampleRate
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *MediaSet) GetAudioYoutubeItag() int32 {
|
||||
if x != nil {
|
||||
return x.AudioYoutubeItag
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *MediaSet) GetAudioMimeType() string {
|
||||
if x != nil {
|
||||
return x.AudioMimeType
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *MediaSet) GetVideoDuration() *durationpb.Duration {
|
||||
if x != nil {
|
||||
return x.VideoDuration
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *MediaSet) GetVideoYoutubeItag() int32 {
|
||||
if x != nil {
|
||||
return x.VideoYoutubeItag
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *MediaSet) GetVideoMimeType() string {
|
||||
if x != nil {
|
||||
return x.VideoMimeType
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
type GetAudioProgress struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Peaks []int32 `protobuf:"varint,1,rep,packed,name=peaks,proto3" json:"peaks,omitempty"`
|
||||
PercentComplete float32 `protobuf:"fixed32,2,opt,name=percent_complete,json=percentComplete,proto3" json:"percent_complete,omitempty"`
|
||||
Url string `protobuf:"bytes,3,opt,name=url,proto3" json:"url,omitempty"`
|
||||
}
|
||||
|
||||
func (x *GetAudioProgress) Reset() {
|
||||
*x = GetAudioProgress{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_media_set_proto_msgTypes[1]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *GetAudioProgress) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*GetAudioProgress) ProtoMessage() {}
|
||||
|
||||
func (x *GetAudioProgress) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_media_set_proto_msgTypes[1]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use GetAudioProgress.ProtoReflect.Descriptor instead.
|
||||
func (*GetAudioProgress) Descriptor() ([]byte, []int) {
|
||||
return file_media_set_proto_rawDescGZIP(), []int{1}
|
||||
}
|
||||
|
||||
func (x *GetAudioProgress) GetPeaks() []int32 {
|
||||
if x != nil {
|
||||
return x.Peaks
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *GetAudioProgress) GetPercentComplete() float32 {
|
||||
if x != nil {
|
||||
return x.PercentComplete
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *GetAudioProgress) GetUrl() string {
|
||||
if x != nil {
|
||||
return x.Url
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
type GetRequest struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
YoutubeId string `protobuf:"bytes,1,opt,name=youtube_id,json=youtubeId,proto3" json:"youtube_id,omitempty"`
|
||||
}
|
||||
|
||||
func (x *GetRequest) Reset() {
|
||||
*x = GetRequest{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_media_set_proto_msgTypes[2]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *GetRequest) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*GetRequest) ProtoMessage() {}
|
||||
|
||||
func (x *GetRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_media_set_proto_msgTypes[2]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use GetRequest.ProtoReflect.Descriptor instead.
|
||||
func (*GetRequest) Descriptor() ([]byte, []int) {
|
||||
return file_media_set_proto_rawDescGZIP(), []int{2}
|
||||
}
|
||||
|
||||
func (x *GetRequest) GetYoutubeId() string {
|
||||
if x != nil {
|
||||
return x.YoutubeId
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
type GetAudioRequest struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
|
||||
NumBins int32 `protobuf:"varint,2,opt,name=num_bins,json=numBins,proto3" json:"num_bins,omitempty"`
|
||||
}
|
||||
|
||||
func (x *GetAudioRequest) Reset() {
|
||||
*x = GetAudioRequest{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_media_set_proto_msgTypes[3]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *GetAudioRequest) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*GetAudioRequest) ProtoMessage() {}
|
||||
|
||||
func (x *GetAudioRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_media_set_proto_msgTypes[3]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use GetAudioRequest.ProtoReflect.Descriptor instead.
|
||||
func (*GetAudioRequest) Descriptor() ([]byte, []int) {
|
||||
return file_media_set_proto_rawDescGZIP(), []int{3}
|
||||
}
|
||||
|
||||
func (x *GetAudioRequest) GetId() string {
|
||||
if x != nil {
|
||||
return x.Id
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *GetAudioRequest) GetNumBins() int32 {
|
||||
if x != nil {
|
||||
return x.NumBins
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
type GetAudioSegmentRequest struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
|
||||
NumBins int32 `protobuf:"varint,2,opt,name=num_bins,json=numBins,proto3" json:"num_bins,omitempty"`
|
||||
StartFrame int64 `protobuf:"varint,3,opt,name=start_frame,json=startFrame,proto3" json:"start_frame,omitempty"`
|
||||
EndFrame int64 `protobuf:"varint,4,opt,name=end_frame,json=endFrame,proto3" json:"end_frame,omitempty"`
|
||||
}
|
||||
|
||||
func (x *GetAudioSegmentRequest) Reset() {
|
||||
*x = GetAudioSegmentRequest{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_media_set_proto_msgTypes[4]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *GetAudioSegmentRequest) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*GetAudioSegmentRequest) ProtoMessage() {}
|
||||
|
||||
func (x *GetAudioSegmentRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_media_set_proto_msgTypes[4]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use GetAudioSegmentRequest.ProtoReflect.Descriptor instead.
|
||||
func (*GetAudioSegmentRequest) Descriptor() ([]byte, []int) {
|
||||
return file_media_set_proto_rawDescGZIP(), []int{4}
|
||||
}
|
||||
|
||||
func (x *GetAudioSegmentRequest) GetId() string {
|
||||
if x != nil {
|
||||
return x.Id
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *GetAudioSegmentRequest) GetNumBins() int32 {
|
||||
if x != nil {
|
||||
return x.NumBins
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *GetAudioSegmentRequest) GetStartFrame() int64 {
|
||||
if x != nil {
|
||||
return x.StartFrame
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *GetAudioSegmentRequest) GetEndFrame() int64 {
|
||||
if x != nil {
|
||||
return x.EndFrame
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
type GetAudioSegmentResponse struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Peaks []int32 `protobuf:"varint,1,rep,packed,name=peaks,proto3" json:"peaks,omitempty"`
|
||||
}
|
||||
|
||||
func (x *GetAudioSegmentResponse) Reset() {
|
||||
*x = GetAudioSegmentResponse{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_media_set_proto_msgTypes[5]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *GetAudioSegmentResponse) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*GetAudioSegmentResponse) ProtoMessage() {}
|
||||
|
||||
func (x *GetAudioSegmentResponse) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_media_set_proto_msgTypes[5]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use GetAudioSegmentResponse.ProtoReflect.Descriptor instead.
|
||||
func (*GetAudioSegmentResponse) Descriptor() ([]byte, []int) {
|
||||
return file_media_set_proto_rawDescGZIP(), []int{5}
|
||||
}
|
||||
|
||||
func (x *GetAudioSegmentResponse) GetPeaks() []int32 {
|
||||
if x != nil {
|
||||
return x.Peaks
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
type GetVideoRequest struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
|
||||
}
|
||||
|
||||
func (x *GetVideoRequest) Reset() {
|
||||
*x = GetVideoRequest{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_media_set_proto_msgTypes[6]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *GetVideoRequest) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*GetVideoRequest) ProtoMessage() {}
|
||||
|
||||
func (x *GetVideoRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_media_set_proto_msgTypes[6]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use GetVideoRequest.ProtoReflect.Descriptor instead.
|
||||
func (*GetVideoRequest) Descriptor() ([]byte, []int) {
|
||||
return file_media_set_proto_rawDescGZIP(), []int{6}
|
||||
}
|
||||
|
||||
func (x *GetVideoRequest) GetId() string {
|
||||
if x != nil {
|
||||
return x.Id
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
type GetVideoProgress struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
PercentComplete float32 `protobuf:"fixed32,1,opt,name=percent_complete,json=percentComplete,proto3" json:"percent_complete,omitempty"`
|
||||
Url string `protobuf:"bytes,2,opt,name=url,proto3" json:"url,omitempty"`
|
||||
}
|
||||
|
||||
func (x *GetVideoProgress) Reset() {
|
||||
*x = GetVideoProgress{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_media_set_proto_msgTypes[7]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *GetVideoProgress) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*GetVideoProgress) ProtoMessage() {}
|
||||
|
||||
func (x *GetVideoProgress) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_media_set_proto_msgTypes[7]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use GetVideoProgress.ProtoReflect.Descriptor instead.
|
||||
func (*GetVideoProgress) Descriptor() ([]byte, []int) {
|
||||
return file_media_set_proto_rawDescGZIP(), []int{7}
|
||||
}
|
||||
|
||||
func (x *GetVideoProgress) GetPercentComplete() float32 {
|
||||
if x != nil {
|
||||
return x.PercentComplete
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *GetVideoProgress) GetUrl() string {
|
||||
if x != nil {
|
||||
return x.Url
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
type GetVideoThumbnailRequest struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
|
||||
}
|
||||
|
||||
func (x *GetVideoThumbnailRequest) Reset() {
|
||||
*x = GetVideoThumbnailRequest{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_media_set_proto_msgTypes[8]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *GetVideoThumbnailRequest) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*GetVideoThumbnailRequest) ProtoMessage() {}
|
||||
|
||||
func (x *GetVideoThumbnailRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_media_set_proto_msgTypes[8]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use GetVideoThumbnailRequest.ProtoReflect.Descriptor instead.
|
||||
func (*GetVideoThumbnailRequest) Descriptor() ([]byte, []int) {
|
||||
return file_media_set_proto_rawDescGZIP(), []int{8}
|
||||
}
|
||||
|
||||
func (x *GetVideoThumbnailRequest) GetId() string {
|
||||
if x != nil {
|
||||
return x.Id
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
type GetVideoThumbnailResponse struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Image []byte `protobuf:"bytes,1,opt,name=image,proto3" json:"image,omitempty"`
|
||||
Width int32 `protobuf:"varint,2,opt,name=width,proto3" json:"width,omitempty"`
|
||||
Height int32 `protobuf:"varint,3,opt,name=height,proto3" json:"height,omitempty"`
|
||||
}
|
||||
|
||||
func (x *GetVideoThumbnailResponse) Reset() {
|
||||
*x = GetVideoThumbnailResponse{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_media_set_proto_msgTypes[9]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *GetVideoThumbnailResponse) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*GetVideoThumbnailResponse) ProtoMessage() {}
|
||||
|
||||
func (x *GetVideoThumbnailResponse) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_media_set_proto_msgTypes[9]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use GetVideoThumbnailResponse.ProtoReflect.Descriptor instead.
|
||||
func (*GetVideoThumbnailResponse) Descriptor() ([]byte, []int) {
|
||||
return file_media_set_proto_rawDescGZIP(), []int{9}
|
||||
}
|
||||
|
||||
func (x *GetVideoThumbnailResponse) GetImage() []byte {
|
||||
if x != nil {
|
||||
return x.Image
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *GetVideoThumbnailResponse) GetWidth() int32 {
|
||||
if x != nil {
|
||||
return x.Width
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *GetVideoThumbnailResponse) GetHeight() int32 {
|
||||
if x != nil {
|
||||
return x.Height
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
var File_media_set_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_media_set_proto_rawDesc = []byte{
|
||||
0x0a, 0x0f, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x5f, 0x73, 0x65, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74,
|
||||
0x6f, 0x12, 0x09, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x5f, 0x73, 0x65, 0x74, 0x1a, 0x1e, 0x67, 0x6f,
|
||||
0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x75,
|
||||
0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xcd, 0x03, 0x0a,
|
||||
0x08, 0x4d, 0x65, 0x64, 0x69, 0x61, 0x53, 0x65, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18,
|
||||
0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x79, 0x6f, 0x75,
|
||||
0x74, 0x75, 0x62, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x79,
|
||||
0x6f, 0x75, 0x74, 0x75, 0x62, 0x65, 0x49, 0x64, 0x12, 0x25, 0x0a, 0x0e, 0x61, 0x75, 0x64, 0x69,
|
||||
0x6f, 0x5f, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05,
|
||||
0x52, 0x0d, 0x61, 0x75, 0x64, 0x69, 0x6f, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x73, 0x12,
|
||||
0x2e, 0x0a, 0x13, 0x61, 0x75, 0x64, 0x69, 0x6f, 0x5f, 0x61, 0x70, 0x70, 0x72, 0x6f, 0x78, 0x5f,
|
||||
0x66, 0x72, 0x61, 0x6d, 0x65, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x11, 0x61, 0x75,
|
||||
0x64, 0x69, 0x6f, 0x41, 0x70, 0x70, 0x72, 0x6f, 0x78, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x73, 0x12,
|
||||
0x21, 0x0a, 0x0c, 0x61, 0x75, 0x64, 0x69, 0x6f, 0x5f, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x73, 0x18,
|
||||
0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0b, 0x61, 0x75, 0x64, 0x69, 0x6f, 0x46, 0x72, 0x61, 0x6d,
|
||||
0x65, 0x73, 0x12, 0x2a, 0x0a, 0x11, 0x61, 0x75, 0x64, 0x69, 0x6f, 0x5f, 0x73, 0x61, 0x6d, 0x70,
|
||||
0x6c, 0x65, 0x5f, 0x72, 0x61, 0x74, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0f, 0x61,
|
||||
0x75, 0x64, 0x69, 0x6f, 0x53, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x52, 0x61, 0x74, 0x65, 0x12, 0x2c,
|
||||
0x0a, 0x12, 0x61, 0x75, 0x64, 0x69, 0x6f, 0x5f, 0x79, 0x6f, 0x75, 0x74, 0x75, 0x62, 0x65, 0x5f,
|
||||
0x69, 0x74, 0x61, 0x67, 0x18, 0x07, 0x20, 0x01, 0x28, 0x05, 0x52, 0x10, 0x61, 0x75, 0x64, 0x69,
|
||||
0x6f, 0x59, 0x6f, 0x75, 0x74, 0x75, 0x62, 0x65, 0x49, 0x74, 0x61, 0x67, 0x12, 0x26, 0x0a, 0x0f,
|
||||
0x61, 0x75, 0x64, 0x69, 0x6f, 0x5f, 0x6d, 0x69, 0x6d, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18,
|
||||
0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x61, 0x75, 0x64, 0x69, 0x6f, 0x4d, 0x69, 0x6d, 0x65,
|
||||
0x54, 0x79, 0x70, 0x65, 0x12, 0x40, 0x0a, 0x0e, 0x76, 0x69, 0x64, 0x65, 0x6f, 0x5f, 0x64, 0x75,
|
||||
0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67,
|
||||
0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44,
|
||||
0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0d, 0x76, 0x69, 0x64, 0x65, 0x6f, 0x44, 0x75,
|
||||
0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2c, 0x0a, 0x12, 0x76, 0x69, 0x64, 0x65, 0x6f, 0x5f,
|
||||
0x79, 0x6f, 0x75, 0x74, 0x75, 0x62, 0x65, 0x5f, 0x69, 0x74, 0x61, 0x67, 0x18, 0x0a, 0x20, 0x01,
|
||||
0x28, 0x05, 0x52, 0x10, 0x76, 0x69, 0x64, 0x65, 0x6f, 0x59, 0x6f, 0x75, 0x74, 0x75, 0x62, 0x65,
|
||||
0x49, 0x74, 0x61, 0x67, 0x12, 0x26, 0x0a, 0x0f, 0x76, 0x69, 0x64, 0x65, 0x6f, 0x5f, 0x6d, 0x69,
|
||||
0x6d, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x76,
|
||||
0x69, 0x64, 0x65, 0x6f, 0x4d, 0x69, 0x6d, 0x65, 0x54, 0x79, 0x70, 0x65, 0x22, 0x65, 0x0a, 0x10,
|
||||
0x47, 0x65, 0x74, 0x41, 0x75, 0x64, 0x69, 0x6f, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x65, 0x73, 0x73,
|
||||
0x12, 0x14, 0x0a, 0x05, 0x70, 0x65, 0x61, 0x6b, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x05, 0x52,
|
||||
0x05, 0x70, 0x65, 0x61, 0x6b, 0x73, 0x12, 0x29, 0x0a, 0x10, 0x70, 0x65, 0x72, 0x63, 0x65, 0x6e,
|
||||
0x74, 0x5f, 0x63, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x02,
|
||||
0x52, 0x0f, 0x70, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74,
|
||||
0x65, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x72, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03,
|
||||
0x75, 0x72, 0x6c, 0x22, 0x2b, 0x0a, 0x0a, 0x47, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
|
||||
0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x79, 0x6f, 0x75, 0x74, 0x75, 0x62, 0x65, 0x5f, 0x69, 0x64, 0x18,
|
||||
0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x79, 0x6f, 0x75, 0x74, 0x75, 0x62, 0x65, 0x49, 0x64,
|
||||
0x22, 0x3c, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x41, 0x75, 0x64, 0x69, 0x6f, 0x52, 0x65, 0x71, 0x75,
|
||||
0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52,
|
||||
0x02, 0x69, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x6e, 0x75, 0x6d, 0x5f, 0x62, 0x69, 0x6e, 0x73, 0x18,
|
||||
0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x6e, 0x75, 0x6d, 0x42, 0x69, 0x6e, 0x73, 0x22, 0x81,
|
||||
0x01, 0x0a, 0x16, 0x47, 0x65, 0x74, 0x41, 0x75, 0x64, 0x69, 0x6f, 0x53, 0x65, 0x67, 0x6d, 0x65,
|
||||
0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18,
|
||||
0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x6e, 0x75, 0x6d,
|
||||
0x5f, 0x62, 0x69, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x6e, 0x75, 0x6d,
|
||||
0x42, 0x69, 0x6e, 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, 0x66, 0x72,
|
||||
0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x73, 0x74, 0x61, 0x72, 0x74,
|
||||
0x46, 0x72, 0x61, 0x6d, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x65, 0x6e, 0x64, 0x5f, 0x66, 0x72, 0x61,
|
||||
0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x65, 0x6e, 0x64, 0x46, 0x72, 0x61,
|
||||
0x6d, 0x65, 0x22, 0x2f, 0x0a, 0x17, 0x47, 0x65, 0x74, 0x41, 0x75, 0x64, 0x69, 0x6f, 0x53, 0x65,
|
||||
0x67, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x14, 0x0a,
|
||||
0x05, 0x70, 0x65, 0x61, 0x6b, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x05, 0x52, 0x05, 0x70, 0x65,
|
||||
0x61, 0x6b, 0x73, 0x22, 0x21, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x56, 0x69, 0x64, 0x65, 0x6f, 0x52,
|
||||
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01,
|
||||
0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0x4f, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x56, 0x69, 0x64,
|
||||
0x65, 0x6f, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x65, 0x73, 0x73, 0x12, 0x29, 0x0a, 0x10, 0x70, 0x65,
|
||||
0x72, 0x63, 0x65, 0x6e, 0x74, 0x5f, 0x63, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x18, 0x01,
|
||||
0x20, 0x01, 0x28, 0x02, 0x52, 0x0f, 0x70, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6d,
|
||||
0x70, 0x6c, 0x65, 0x74, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x72, 0x6c, 0x18, 0x02, 0x20, 0x01,
|
||||
0x28, 0x09, 0x52, 0x03, 0x75, 0x72, 0x6c, 0x22, 0x2a, 0x0a, 0x18, 0x47, 0x65, 0x74, 0x56, 0x69,
|
||||
0x64, 0x65, 0x6f, 0x54, 0x68, 0x75, 0x6d, 0x62, 0x6e, 0x61, 0x69, 0x6c, 0x52, 0x65, 0x71, 0x75,
|
||||
0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52,
|
||||
0x02, 0x69, 0x64, 0x22, 0x5f, 0x0a, 0x19, 0x47, 0x65, 0x74, 0x56, 0x69, 0x64, 0x65, 0x6f, 0x54,
|
||||
0x68, 0x75, 0x6d, 0x62, 0x6e, 0x61, 0x69, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
|
||||
0x12, 0x14, 0x0a, 0x05, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52,
|
||||
0x05, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x77, 0x69, 0x64, 0x74, 0x68, 0x18,
|
||||
0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x77, 0x69, 0x64, 0x74, 0x68, 0x12, 0x16, 0x0a, 0x06,
|
||||
0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x68, 0x65,
|
||||
0x69, 0x67, 0x68, 0x74, 0x32, 0x96, 0x03, 0x0a, 0x0f, 0x4d, 0x65, 0x64, 0x69, 0x61, 0x53, 0x65,
|
||||
0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x33, 0x0a, 0x03, 0x47, 0x65, 0x74, 0x12,
|
||||
0x15, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x5f, 0x73, 0x65, 0x74, 0x2e, 0x47, 0x65, 0x74, 0x52,
|
||||
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x13, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x5f, 0x73,
|
||||
0x65, 0x74, 0x2e, 0x4d, 0x65, 0x64, 0x69, 0x61, 0x53, 0x65, 0x74, 0x22, 0x00, 0x12, 0x47, 0x0a,
|
||||
0x08, 0x47, 0x65, 0x74, 0x41, 0x75, 0x64, 0x69, 0x6f, 0x12, 0x1a, 0x2e, 0x6d, 0x65, 0x64, 0x69,
|
||||
0x61, 0x5f, 0x73, 0x65, 0x74, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x75, 0x64, 0x69, 0x6f, 0x52, 0x65,
|
||||
0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x5f, 0x73, 0x65,
|
||||
0x74, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x75, 0x64, 0x69, 0x6f, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x65,
|
||||
0x73, 0x73, 0x22, 0x00, 0x30, 0x01, 0x12, 0x5a, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x41, 0x75, 0x64,
|
||||
0x69, 0x6f, 0x53, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x21, 0x2e, 0x6d, 0x65, 0x64, 0x69,
|
||||
0x61, 0x5f, 0x73, 0x65, 0x74, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x75, 0x64, 0x69, 0x6f, 0x53, 0x65,
|
||||
0x67, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x6d,
|
||||
0x65, 0x64, 0x69, 0x61, 0x5f, 0x73, 0x65, 0x74, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x75, 0x64, 0x69,
|
||||
0x6f, 0x53, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
|
||||
0x22, 0x00, 0x12, 0x47, 0x0a, 0x08, 0x47, 0x65, 0x74, 0x56, 0x69, 0x64, 0x65, 0x6f, 0x12, 0x1a,
|
||||
0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x5f, 0x73, 0x65, 0x74, 0x2e, 0x47, 0x65, 0x74, 0x56, 0x69,
|
||||
0x64, 0x65, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x6d, 0x65, 0x64,
|
||||
0x69, 0x61, 0x5f, 0x73, 0x65, 0x74, 0x2e, 0x47, 0x65, 0x74, 0x56, 0x69, 0x64, 0x65, 0x6f, 0x50,
|
||||
0x72, 0x6f, 0x67, 0x72, 0x65, 0x73, 0x73, 0x22, 0x00, 0x30, 0x01, 0x12, 0x60, 0x0a, 0x11, 0x47,
|
||||
0x65, 0x74, 0x56, 0x69, 0x64, 0x65, 0x6f, 0x54, 0x68, 0x75, 0x6d, 0x62, 0x6e, 0x61, 0x69, 0x6c,
|
||||
0x12, 0x23, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x5f, 0x73, 0x65, 0x74, 0x2e, 0x47, 0x65, 0x74,
|
||||
0x56, 0x69, 0x64, 0x65, 0x6f, 0x54, 0x68, 0x75, 0x6d, 0x62, 0x6e, 0x61, 0x69, 0x6c, 0x52, 0x65,
|
||||
0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x5f, 0x73, 0x65,
|
||||
0x74, 0x2e, 0x47, 0x65, 0x74, 0x56, 0x69, 0x64, 0x65, 0x6f, 0x54, 0x68, 0x75, 0x6d, 0x62, 0x6e,
|
||||
0x61, 0x69, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0x0e, 0x5a,
|
||||
0x0c, 0x70, 0x62, 0x2f, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x5f, 0x73, 0x65, 0x74, 0x62, 0x06, 0x70,
|
||||
0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
file_media_set_proto_rawDescOnce sync.Once
|
||||
file_media_set_proto_rawDescData = file_media_set_proto_rawDesc
|
||||
)
|
||||
|
||||
func file_media_set_proto_rawDescGZIP() []byte {
|
||||
file_media_set_proto_rawDescOnce.Do(func() {
|
||||
file_media_set_proto_rawDescData = protoimpl.X.CompressGZIP(file_media_set_proto_rawDescData)
|
||||
})
|
||||
return file_media_set_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_media_set_proto_msgTypes = make([]protoimpl.MessageInfo, 10)
|
||||
var file_media_set_proto_goTypes = []interface{}{
|
||||
(*MediaSet)(nil), // 0: media_set.MediaSet
|
||||
(*GetAudioProgress)(nil), // 1: media_set.GetAudioProgress
|
||||
(*GetRequest)(nil), // 2: media_set.GetRequest
|
||||
(*GetAudioRequest)(nil), // 3: media_set.GetAudioRequest
|
||||
(*GetAudioSegmentRequest)(nil), // 4: media_set.GetAudioSegmentRequest
|
||||
(*GetAudioSegmentResponse)(nil), // 5: media_set.GetAudioSegmentResponse
|
||||
(*GetVideoRequest)(nil), // 6: media_set.GetVideoRequest
|
||||
(*GetVideoProgress)(nil), // 7: media_set.GetVideoProgress
|
||||
(*GetVideoThumbnailRequest)(nil), // 8: media_set.GetVideoThumbnailRequest
|
||||
(*GetVideoThumbnailResponse)(nil), // 9: media_set.GetVideoThumbnailResponse
|
||||
(*durationpb.Duration)(nil), // 10: google.protobuf.Duration
|
||||
}
|
||||
var file_media_set_proto_depIdxs = []int32{
|
||||
10, // 0: media_set.MediaSet.video_duration:type_name -> google.protobuf.Duration
|
||||
2, // 1: media_set.MediaSetService.Get:input_type -> media_set.GetRequest
|
||||
3, // 2: media_set.MediaSetService.GetAudio:input_type -> media_set.GetAudioRequest
|
||||
4, // 3: media_set.MediaSetService.GetAudioSegment:input_type -> media_set.GetAudioSegmentRequest
|
||||
6, // 4: media_set.MediaSetService.GetVideo:input_type -> media_set.GetVideoRequest
|
||||
8, // 5: media_set.MediaSetService.GetVideoThumbnail:input_type -> media_set.GetVideoThumbnailRequest
|
||||
0, // 6: media_set.MediaSetService.Get:output_type -> media_set.MediaSet
|
||||
1, // 7: media_set.MediaSetService.GetAudio:output_type -> media_set.GetAudioProgress
|
||||
5, // 8: media_set.MediaSetService.GetAudioSegment:output_type -> media_set.GetAudioSegmentResponse
|
||||
7, // 9: media_set.MediaSetService.GetVideo:output_type -> media_set.GetVideoProgress
|
||||
9, // 10: media_set.MediaSetService.GetVideoThumbnail:output_type -> media_set.GetVideoThumbnailResponse
|
||||
6, // [6:11] is the sub-list for method output_type
|
||||
1, // [1:6] is the sub-list for method input_type
|
||||
1, // [1:1] is the sub-list for extension type_name
|
||||
1, // [1:1] is the sub-list for extension extendee
|
||||
0, // [0:1] is the sub-list for field type_name
|
||||
}
|
||||
|
||||
func init() { file_media_set_proto_init() }
|
||||
func file_media_set_proto_init() {
|
||||
if File_media_set_proto != nil {
|
||||
return
|
||||
}
|
||||
if !protoimpl.UnsafeEnabled {
|
||||
file_media_set_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*MediaSet); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_media_set_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*GetAudioProgress); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_media_set_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*GetRequest); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_media_set_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*GetAudioRequest); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_media_set_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*GetAudioSegmentRequest); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_media_set_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*GetAudioSegmentResponse); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_media_set_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*GetVideoRequest); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_media_set_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*GetVideoProgress); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_media_set_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*GetVideoThumbnailRequest); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_media_set_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*GetVideoThumbnailResponse); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
}
|
||||
type x struct{}
|
||||
out := protoimpl.TypeBuilder{
|
||||
File: protoimpl.DescBuilder{
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: file_media_set_proto_rawDesc,
|
||||
NumEnums: 0,
|
||||
NumMessages: 10,
|
||||
NumExtensions: 0,
|
||||
NumServices: 1,
|
||||
},
|
||||
GoTypes: file_media_set_proto_goTypes,
|
||||
DependencyIndexes: file_media_set_proto_depIdxs,
|
||||
MessageInfos: file_media_set_proto_msgTypes,
|
||||
}.Build()
|
||||
File_media_set_proto = out.File
|
||||
file_media_set_proto_rawDesc = nil
|
||||
file_media_set_proto_goTypes = nil
|
||||
file_media_set_proto_depIdxs = nil
|
||||
}
|
|
@ -0,0 +1,300 @@
|
|||
// 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",
|
||||
}
|
|
@ -0,0 +1,30 @@
|
|||
// Code generated by sqlc. DO NOT EDIT.
|
||||
|
||||
package store
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/jackc/pgconn"
|
||||
"github.com/jackc/pgx/v4"
|
||||
)
|
||||
|
||||
type DBTX interface {
|
||||
Exec(context.Context, string, ...interface{}) (pgconn.CommandTag, error)
|
||||
Query(context.Context, string, ...interface{}) (pgx.Rows, error)
|
||||
QueryRow(context.Context, string, ...interface{}) pgx.Row
|
||||
}
|
||||
|
||||
func New(db DBTX) *Queries {
|
||||
return &Queries{db: db}
|
||||
}
|
||||
|
||||
type Queries struct {
|
||||
db DBTX
|
||||
}
|
||||
|
||||
func (q *Queries) WithTx(tx pgx.Tx) *Queries {
|
||||
return &Queries{
|
||||
db: tx,
|
||||
}
|
||||
}
|
|
@ -0,0 +1,43 @@
|
|||
// Code generated by sqlc. DO NOT EDIT.
|
||||
|
||||
package store
|
||||
|
||||
import (
|
||||
"database/sql"
|
||||
"time"
|
||||
|
||||
"github.com/google/uuid"
|
||||
)
|
||||
|
||||
type MediaSet struct {
|
||||
ID uuid.UUID
|
||||
YoutubeID string
|
||||
AudioYoutubeItag int32
|
||||
AudioChannels int32
|
||||
AudioFramesApprox int64
|
||||
AudioFrames sql.NullInt64
|
||||
AudioSampleRate int32
|
||||
AudioRawS3Bucket sql.NullString
|
||||
AudioRawS3Key sql.NullString
|
||||
AudioRawS3UploadedAt sql.NullTime
|
||||
AudioEncodedMimeType string
|
||||
VideoYoutubeItag int32
|
||||
VideoS3Bucket sql.NullString
|
||||
VideoS3Key sql.NullString
|
||||
VideoS3UploadedAt sql.NullTime
|
||||
VideoMimeType string
|
||||
VideoDurationNanos int64
|
||||
VideoThumbnailS3Bucket sql.NullString
|
||||
VideoThumbnailS3Key sql.NullString
|
||||
VideoThumbnailS3UploadedAt sql.NullTime
|
||||
VideoThumbnailMimeType sql.NullString
|
||||
VideoThumbnailWidth sql.NullInt32
|
||||
VideoThumbnailHeight sql.NullInt32
|
||||
CreatedAt time.Time
|
||||
UpdatedAt time.Time
|
||||
AudioContentLength int64
|
||||
VideoContentLength int64
|
||||
AudioEncodedS3Bucket sql.NullString
|
||||
AudioEncodedS3Key sql.NullString
|
||||
AudioEncodedS3UploadedAt sql.NullTime
|
||||
}
|
|
@ -0,0 +1,385 @@
|
|||
// Code generated by sqlc. DO NOT EDIT.
|
||||
// source: queries.sql
|
||||
|
||||
package store
|
||||
|
||||
import (
|
||||
"context"
|
||||
"database/sql"
|
||||
|
||||
"github.com/google/uuid"
|
||||
)
|
||||
|
||||
const createMediaSet = `-- name: CreateMediaSet :one
|
||||
INSERT INTO media_sets (youtube_id, audio_youtube_itag, audio_channels, audio_frames_approx, audio_sample_rate, audio_content_length, audio_encoded_mime_type, video_youtube_itag, video_content_length, video_mime_type, video_duration_nanos, created_at, updated_at)
|
||||
VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, NOW(), NOW())
|
||||
RETURNING id, youtube_id, audio_youtube_itag, audio_channels, audio_frames_approx, audio_frames, audio_sample_rate, audio_raw_s3_bucket, audio_raw_s3_key, audio_raw_s3_uploaded_at, audio_encoded_mime_type, video_youtube_itag, video_s3_bucket, video_s3_key, video_s3_uploaded_at, video_mime_type, video_duration_nanos, video_thumbnail_s3_bucket, video_thumbnail_s3_key, video_thumbnail_s3_uploaded_at, video_thumbnail_mime_type, video_thumbnail_width, video_thumbnail_height, created_at, updated_at, audio_content_length, video_content_length, audio_encoded_s3_bucket, audio_encoded_s3_key, audio_encoded_s3_uploaded_at
|
||||
`
|
||||
|
||||
type CreateMediaSetParams struct {
|
||||
YoutubeID string
|
||||
AudioYoutubeItag int32
|
||||
AudioChannels int32
|
||||
AudioFramesApprox int64
|
||||
AudioSampleRate int32
|
||||
AudioContentLength int64
|
||||
AudioEncodedMimeType string
|
||||
VideoYoutubeItag int32
|
||||
VideoContentLength int64
|
||||
VideoMimeType string
|
||||
VideoDurationNanos int64
|
||||
}
|
||||
|
||||
func (q *Queries) CreateMediaSet(ctx context.Context, arg CreateMediaSetParams) (MediaSet, error) {
|
||||
row := q.db.QueryRow(ctx, createMediaSet,
|
||||
arg.YoutubeID,
|
||||
arg.AudioYoutubeItag,
|
||||
arg.AudioChannels,
|
||||
arg.AudioFramesApprox,
|
||||
arg.AudioSampleRate,
|
||||
arg.AudioContentLength,
|
||||
arg.AudioEncodedMimeType,
|
||||
arg.VideoYoutubeItag,
|
||||
arg.VideoContentLength,
|
||||
arg.VideoMimeType,
|
||||
arg.VideoDurationNanos,
|
||||
)
|
||||
var i MediaSet
|
||||
err := row.Scan(
|
||||
&i.ID,
|
||||
&i.YoutubeID,
|
||||
&i.AudioYoutubeItag,
|
||||
&i.AudioChannels,
|
||||
&i.AudioFramesApprox,
|
||||
&i.AudioFrames,
|
||||
&i.AudioSampleRate,
|
||||
&i.AudioRawS3Bucket,
|
||||
&i.AudioRawS3Key,
|
||||
&i.AudioRawS3UploadedAt,
|
||||
&i.AudioEncodedMimeType,
|
||||
&i.VideoYoutubeItag,
|
||||
&i.VideoS3Bucket,
|
||||
&i.VideoS3Key,
|
||||
&i.VideoS3UploadedAt,
|
||||
&i.VideoMimeType,
|
||||
&i.VideoDurationNanos,
|
||||
&i.VideoThumbnailS3Bucket,
|
||||
&i.VideoThumbnailS3Key,
|
||||
&i.VideoThumbnailS3UploadedAt,
|
||||
&i.VideoThumbnailMimeType,
|
||||
&i.VideoThumbnailWidth,
|
||||
&i.VideoThumbnailHeight,
|
||||
&i.CreatedAt,
|
||||
&i.UpdatedAt,
|
||||
&i.AudioContentLength,
|
||||
&i.VideoContentLength,
|
||||
&i.AudioEncodedS3Bucket,
|
||||
&i.AudioEncodedS3Key,
|
||||
&i.AudioEncodedS3UploadedAt,
|
||||
)
|
||||
return i, err
|
||||
}
|
||||
|
||||
const getMediaSet = `-- name: GetMediaSet :one
|
||||
SELECT id, youtube_id, audio_youtube_itag, audio_channels, audio_frames_approx, audio_frames, audio_sample_rate, audio_raw_s3_bucket, audio_raw_s3_key, audio_raw_s3_uploaded_at, audio_encoded_mime_type, video_youtube_itag, video_s3_bucket, video_s3_key, video_s3_uploaded_at, video_mime_type, video_duration_nanos, video_thumbnail_s3_bucket, video_thumbnail_s3_key, video_thumbnail_s3_uploaded_at, video_thumbnail_mime_type, video_thumbnail_width, video_thumbnail_height, created_at, updated_at, audio_content_length, video_content_length, audio_encoded_s3_bucket, audio_encoded_s3_key, audio_encoded_s3_uploaded_at FROM media_sets WHERE id = $1
|
||||
`
|
||||
|
||||
func (q *Queries) GetMediaSet(ctx context.Context, id uuid.UUID) (MediaSet, error) {
|
||||
row := q.db.QueryRow(ctx, getMediaSet, id)
|
||||
var i MediaSet
|
||||
err := row.Scan(
|
||||
&i.ID,
|
||||
&i.YoutubeID,
|
||||
&i.AudioYoutubeItag,
|
||||
&i.AudioChannels,
|
||||
&i.AudioFramesApprox,
|
||||
&i.AudioFrames,
|
||||
&i.AudioSampleRate,
|
||||
&i.AudioRawS3Bucket,
|
||||
&i.AudioRawS3Key,
|
||||
&i.AudioRawS3UploadedAt,
|
||||
&i.AudioEncodedMimeType,
|
||||
&i.VideoYoutubeItag,
|
||||
&i.VideoS3Bucket,
|
||||
&i.VideoS3Key,
|
||||
&i.VideoS3UploadedAt,
|
||||
&i.VideoMimeType,
|
||||
&i.VideoDurationNanos,
|
||||
&i.VideoThumbnailS3Bucket,
|
||||
&i.VideoThumbnailS3Key,
|
||||
&i.VideoThumbnailS3UploadedAt,
|
||||
&i.VideoThumbnailMimeType,
|
||||
&i.VideoThumbnailWidth,
|
||||
&i.VideoThumbnailHeight,
|
||||
&i.CreatedAt,
|
||||
&i.UpdatedAt,
|
||||
&i.AudioContentLength,
|
||||
&i.VideoContentLength,
|
||||
&i.AudioEncodedS3Bucket,
|
||||
&i.AudioEncodedS3Key,
|
||||
&i.AudioEncodedS3UploadedAt,
|
||||
)
|
||||
return i, err
|
||||
}
|
||||
|
||||
const getMediaSetByYoutubeID = `-- name: GetMediaSetByYoutubeID :one
|
||||
SELECT id, youtube_id, audio_youtube_itag, audio_channels, audio_frames_approx, audio_frames, audio_sample_rate, audio_raw_s3_bucket, audio_raw_s3_key, audio_raw_s3_uploaded_at, audio_encoded_mime_type, video_youtube_itag, video_s3_bucket, video_s3_key, video_s3_uploaded_at, video_mime_type, video_duration_nanos, video_thumbnail_s3_bucket, video_thumbnail_s3_key, video_thumbnail_s3_uploaded_at, video_thumbnail_mime_type, video_thumbnail_width, video_thumbnail_height, created_at, updated_at, audio_content_length, video_content_length, audio_encoded_s3_bucket, audio_encoded_s3_key, audio_encoded_s3_uploaded_at FROM media_sets WHERE youtube_id = $1
|
||||
`
|
||||
|
||||
func (q *Queries) GetMediaSetByYoutubeID(ctx context.Context, youtubeID string) (MediaSet, error) {
|
||||
row := q.db.QueryRow(ctx, getMediaSetByYoutubeID, youtubeID)
|
||||
var i MediaSet
|
||||
err := row.Scan(
|
||||
&i.ID,
|
||||
&i.YoutubeID,
|
||||
&i.AudioYoutubeItag,
|
||||
&i.AudioChannels,
|
||||
&i.AudioFramesApprox,
|
||||
&i.AudioFrames,
|
||||
&i.AudioSampleRate,
|
||||
&i.AudioRawS3Bucket,
|
||||
&i.AudioRawS3Key,
|
||||
&i.AudioRawS3UploadedAt,
|
||||
&i.AudioEncodedMimeType,
|
||||
&i.VideoYoutubeItag,
|
||||
&i.VideoS3Bucket,
|
||||
&i.VideoS3Key,
|
||||
&i.VideoS3UploadedAt,
|
||||
&i.VideoMimeType,
|
||||
&i.VideoDurationNanos,
|
||||
&i.VideoThumbnailS3Bucket,
|
||||
&i.VideoThumbnailS3Key,
|
||||
&i.VideoThumbnailS3UploadedAt,
|
||||
&i.VideoThumbnailMimeType,
|
||||
&i.VideoThumbnailWidth,
|
||||
&i.VideoThumbnailHeight,
|
||||
&i.CreatedAt,
|
||||
&i.UpdatedAt,
|
||||
&i.AudioContentLength,
|
||||
&i.VideoContentLength,
|
||||
&i.AudioEncodedS3Bucket,
|
||||
&i.AudioEncodedS3Key,
|
||||
&i.AudioEncodedS3UploadedAt,
|
||||
)
|
||||
return i, err
|
||||
}
|
||||
|
||||
const setEncodedAudioUploaded = `-- name: SetEncodedAudioUploaded :one
|
||||
UPDATE media_sets
|
||||
SET audio_encoded_s3_bucket = $2, audio_encoded_s3_key = $3, audio_encoded_s3_uploaded_at = NOW(), updated_at = NOW()
|
||||
WHERE id = $1
|
||||
RETURNING id, youtube_id, audio_youtube_itag, audio_channels, audio_frames_approx, audio_frames, audio_sample_rate, audio_raw_s3_bucket, audio_raw_s3_key, audio_raw_s3_uploaded_at, audio_encoded_mime_type, video_youtube_itag, video_s3_bucket, video_s3_key, video_s3_uploaded_at, video_mime_type, video_duration_nanos, video_thumbnail_s3_bucket, video_thumbnail_s3_key, video_thumbnail_s3_uploaded_at, video_thumbnail_mime_type, video_thumbnail_width, video_thumbnail_height, created_at, updated_at, audio_content_length, video_content_length, audio_encoded_s3_bucket, audio_encoded_s3_key, audio_encoded_s3_uploaded_at
|
||||
`
|
||||
|
||||
type SetEncodedAudioUploadedParams struct {
|
||||
ID uuid.UUID
|
||||
AudioEncodedS3Bucket sql.NullString
|
||||
AudioEncodedS3Key sql.NullString
|
||||
}
|
||||
|
||||
func (q *Queries) SetEncodedAudioUploaded(ctx context.Context, arg SetEncodedAudioUploadedParams) (MediaSet, error) {
|
||||
row := q.db.QueryRow(ctx, setEncodedAudioUploaded, arg.ID, arg.AudioEncodedS3Bucket, arg.AudioEncodedS3Key)
|
||||
var i MediaSet
|
||||
err := row.Scan(
|
||||
&i.ID,
|
||||
&i.YoutubeID,
|
||||
&i.AudioYoutubeItag,
|
||||
&i.AudioChannels,
|
||||
&i.AudioFramesApprox,
|
||||
&i.AudioFrames,
|
||||
&i.AudioSampleRate,
|
||||
&i.AudioRawS3Bucket,
|
||||
&i.AudioRawS3Key,
|
||||
&i.AudioRawS3UploadedAt,
|
||||
&i.AudioEncodedMimeType,
|
||||
&i.VideoYoutubeItag,
|
||||
&i.VideoS3Bucket,
|
||||
&i.VideoS3Key,
|
||||
&i.VideoS3UploadedAt,
|
||||
&i.VideoMimeType,
|
||||
&i.VideoDurationNanos,
|
||||
&i.VideoThumbnailS3Bucket,
|
||||
&i.VideoThumbnailS3Key,
|
||||
&i.VideoThumbnailS3UploadedAt,
|
||||
&i.VideoThumbnailMimeType,
|
||||
&i.VideoThumbnailWidth,
|
||||
&i.VideoThumbnailHeight,
|
||||
&i.CreatedAt,
|
||||
&i.UpdatedAt,
|
||||
&i.AudioContentLength,
|
||||
&i.VideoContentLength,
|
||||
&i.AudioEncodedS3Bucket,
|
||||
&i.AudioEncodedS3Key,
|
||||
&i.AudioEncodedS3UploadedAt,
|
||||
)
|
||||
return i, err
|
||||
}
|
||||
|
||||
const setRawAudioUploaded = `-- name: SetRawAudioUploaded :one
|
||||
UPDATE media_sets
|
||||
SET audio_raw_s3_bucket = $2, audio_raw_s3_key = $3, audio_frames = $4, audio_raw_s3_uploaded_at = NOW(), updated_at = NOW()
|
||||
WHERE id = $1
|
||||
RETURNING id, youtube_id, audio_youtube_itag, audio_channels, audio_frames_approx, audio_frames, audio_sample_rate, audio_raw_s3_bucket, audio_raw_s3_key, audio_raw_s3_uploaded_at, audio_encoded_mime_type, video_youtube_itag, video_s3_bucket, video_s3_key, video_s3_uploaded_at, video_mime_type, video_duration_nanos, video_thumbnail_s3_bucket, video_thumbnail_s3_key, video_thumbnail_s3_uploaded_at, video_thumbnail_mime_type, video_thumbnail_width, video_thumbnail_height, created_at, updated_at, audio_content_length, video_content_length, audio_encoded_s3_bucket, audio_encoded_s3_key, audio_encoded_s3_uploaded_at
|
||||
`
|
||||
|
||||
type SetRawAudioUploadedParams struct {
|
||||
ID uuid.UUID
|
||||
AudioRawS3Bucket sql.NullString
|
||||
AudioRawS3Key sql.NullString
|
||||
AudioFrames sql.NullInt64
|
||||
}
|
||||
|
||||
func (q *Queries) SetRawAudioUploaded(ctx context.Context, arg SetRawAudioUploadedParams) (MediaSet, error) {
|
||||
row := q.db.QueryRow(ctx, setRawAudioUploaded,
|
||||
arg.ID,
|
||||
arg.AudioRawS3Bucket,
|
||||
arg.AudioRawS3Key,
|
||||
arg.AudioFrames,
|
||||
)
|
||||
var i MediaSet
|
||||
err := row.Scan(
|
||||
&i.ID,
|
||||
&i.YoutubeID,
|
||||
&i.AudioYoutubeItag,
|
||||
&i.AudioChannels,
|
||||
&i.AudioFramesApprox,
|
||||
&i.AudioFrames,
|
||||
&i.AudioSampleRate,
|
||||
&i.AudioRawS3Bucket,
|
||||
&i.AudioRawS3Key,
|
||||
&i.AudioRawS3UploadedAt,
|
||||
&i.AudioEncodedMimeType,
|
||||
&i.VideoYoutubeItag,
|
||||
&i.VideoS3Bucket,
|
||||
&i.VideoS3Key,
|
||||
&i.VideoS3UploadedAt,
|
||||
&i.VideoMimeType,
|
||||
&i.VideoDurationNanos,
|
||||
&i.VideoThumbnailS3Bucket,
|
||||
&i.VideoThumbnailS3Key,
|
||||
&i.VideoThumbnailS3UploadedAt,
|
||||
&i.VideoThumbnailMimeType,
|
||||
&i.VideoThumbnailWidth,
|
||||
&i.VideoThumbnailHeight,
|
||||
&i.CreatedAt,
|
||||
&i.UpdatedAt,
|
||||
&i.AudioContentLength,
|
||||
&i.VideoContentLength,
|
||||
&i.AudioEncodedS3Bucket,
|
||||
&i.AudioEncodedS3Key,
|
||||
&i.AudioEncodedS3UploadedAt,
|
||||
)
|
||||
return i, err
|
||||
}
|
||||
|
||||
const setVideoThumbnailUploaded = `-- name: SetVideoThumbnailUploaded :one
|
||||
UPDATE media_sets
|
||||
SET video_thumbnail_width = $2, video_thumbnail_height = $3, video_thumbnail_mime_type = $4, video_thumbnail_s3_bucket = $5, video_thumbnail_s3_key = $6, video_thumbnail_s3_uploaded_at = NOW(), updated_at = NOW()
|
||||
WHERE id = $1
|
||||
RETURNING id, youtube_id, audio_youtube_itag, audio_channels, audio_frames_approx, audio_frames, audio_sample_rate, audio_raw_s3_bucket, audio_raw_s3_key, audio_raw_s3_uploaded_at, audio_encoded_mime_type, video_youtube_itag, video_s3_bucket, video_s3_key, video_s3_uploaded_at, video_mime_type, video_duration_nanos, video_thumbnail_s3_bucket, video_thumbnail_s3_key, video_thumbnail_s3_uploaded_at, video_thumbnail_mime_type, video_thumbnail_width, video_thumbnail_height, created_at, updated_at, audio_content_length, video_content_length, audio_encoded_s3_bucket, audio_encoded_s3_key, audio_encoded_s3_uploaded_at
|
||||
`
|
||||
|
||||
type SetVideoThumbnailUploadedParams struct {
|
||||
ID uuid.UUID
|
||||
VideoThumbnailWidth sql.NullInt32
|
||||
VideoThumbnailHeight sql.NullInt32
|
||||
VideoThumbnailMimeType sql.NullString
|
||||
VideoThumbnailS3Bucket sql.NullString
|
||||
VideoThumbnailS3Key sql.NullString
|
||||
}
|
||||
|
||||
func (q *Queries) SetVideoThumbnailUploaded(ctx context.Context, arg SetVideoThumbnailUploadedParams) (MediaSet, error) {
|
||||
row := q.db.QueryRow(ctx, setVideoThumbnailUploaded,
|
||||
arg.ID,
|
||||
arg.VideoThumbnailWidth,
|
||||
arg.VideoThumbnailHeight,
|
||||
arg.VideoThumbnailMimeType,
|
||||
arg.VideoThumbnailS3Bucket,
|
||||
arg.VideoThumbnailS3Key,
|
||||
)
|
||||
var i MediaSet
|
||||
err := row.Scan(
|
||||
&i.ID,
|
||||
&i.YoutubeID,
|
||||
&i.AudioYoutubeItag,
|
||||
&i.AudioChannels,
|
||||
&i.AudioFramesApprox,
|
||||
&i.AudioFrames,
|
||||
&i.AudioSampleRate,
|
||||
&i.AudioRawS3Bucket,
|
||||
&i.AudioRawS3Key,
|
||||
&i.AudioRawS3UploadedAt,
|
||||
&i.AudioEncodedMimeType,
|
||||
&i.VideoYoutubeItag,
|
||||
&i.VideoS3Bucket,
|
||||
&i.VideoS3Key,
|
||||
&i.VideoS3UploadedAt,
|
||||
&i.VideoMimeType,
|
||||
&i.VideoDurationNanos,
|
||||
&i.VideoThumbnailS3Bucket,
|
||||
&i.VideoThumbnailS3Key,
|
||||
&i.VideoThumbnailS3UploadedAt,
|
||||
&i.VideoThumbnailMimeType,
|
||||
&i.VideoThumbnailWidth,
|
||||
&i.VideoThumbnailHeight,
|
||||
&i.CreatedAt,
|
||||
&i.UpdatedAt,
|
||||
&i.AudioContentLength,
|
||||
&i.VideoContentLength,
|
||||
&i.AudioEncodedS3Bucket,
|
||||
&i.AudioEncodedS3Key,
|
||||
&i.AudioEncodedS3UploadedAt,
|
||||
)
|
||||
return i, err
|
||||
}
|
||||
|
||||
const setVideoUploaded = `-- name: SetVideoUploaded :one
|
||||
UPDATE media_sets
|
||||
SET video_s3_bucket = $2, video_s3_key = $3, video_s3_uploaded_at = NOW(), updated_at = NOW()
|
||||
WHERE id = $1
|
||||
RETURNING id, youtube_id, audio_youtube_itag, audio_channels, audio_frames_approx, audio_frames, audio_sample_rate, audio_raw_s3_bucket, audio_raw_s3_key, audio_raw_s3_uploaded_at, audio_encoded_mime_type, video_youtube_itag, video_s3_bucket, video_s3_key, video_s3_uploaded_at, video_mime_type, video_duration_nanos, video_thumbnail_s3_bucket, video_thumbnail_s3_key, video_thumbnail_s3_uploaded_at, video_thumbnail_mime_type, video_thumbnail_width, video_thumbnail_height, created_at, updated_at, audio_content_length, video_content_length, audio_encoded_s3_bucket, audio_encoded_s3_key, audio_encoded_s3_uploaded_at
|
||||
`
|
||||
|
||||
type SetVideoUploadedParams struct {
|
||||
ID uuid.UUID
|
||||
VideoS3Bucket sql.NullString
|
||||
VideoS3Key sql.NullString
|
||||
}
|
||||
|
||||
func (q *Queries) SetVideoUploaded(ctx context.Context, arg SetVideoUploadedParams) (MediaSet, error) {
|
||||
row := q.db.QueryRow(ctx, setVideoUploaded, arg.ID, arg.VideoS3Bucket, arg.VideoS3Key)
|
||||
var i MediaSet
|
||||
err := row.Scan(
|
||||
&i.ID,
|
||||
&i.YoutubeID,
|
||||
&i.AudioYoutubeItag,
|
||||
&i.AudioChannels,
|
||||
&i.AudioFramesApprox,
|
||||
&i.AudioFrames,
|
||||
&i.AudioSampleRate,
|
||||
&i.AudioRawS3Bucket,
|
||||
&i.AudioRawS3Key,
|
||||
&i.AudioRawS3UploadedAt,
|
||||
&i.AudioEncodedMimeType,
|
||||
&i.VideoYoutubeItag,
|
||||
&i.VideoS3Bucket,
|
||||
&i.VideoS3Key,
|
||||
&i.VideoS3UploadedAt,
|
||||
&i.VideoMimeType,
|
||||
&i.VideoDurationNanos,
|
||||
&i.VideoThumbnailS3Bucket,
|
||||
&i.VideoThumbnailS3Key,
|
||||
&i.VideoThumbnailS3UploadedAt,
|
||||
&i.VideoThumbnailMimeType,
|
||||
&i.VideoThumbnailWidth,
|
||||
&i.VideoThumbnailHeight,
|
||||
&i.CreatedAt,
|
||||
&i.UpdatedAt,
|
||||
&i.AudioContentLength,
|
||||
&i.VideoContentLength,
|
||||
&i.AudioEncodedS3Bucket,
|
||||
&i.AudioEncodedS3Key,
|
||||
&i.AudioEncodedS3UploadedAt,
|
||||
)
|
||||
return i, err
|
||||
}
|
|
@ -0,0 +1,189 @@
|
|||
/* eslint-disable */
|
||||
import Long from "long";
|
||||
import _m0 from "protobufjs/minimal";
|
||||
|
||||
export const protobufPackage = "google.protobuf";
|
||||
|
||||
/**
|
||||
* A Duration represents a signed, fixed-length span of time represented
|
||||
* as a count of seconds and fractions of seconds at nanosecond
|
||||
* resolution. It is independent of any calendar and concepts like "day"
|
||||
* or "month". It is related to Timestamp in that the difference between
|
||||
* two Timestamp values is a Duration and it can be added or subtracted
|
||||
* from a Timestamp. Range is approximately +-10,000 years.
|
||||
*
|
||||
* # Examples
|
||||
*
|
||||
* Example 1: Compute Duration from two Timestamps in pseudo code.
|
||||
*
|
||||
* Timestamp start = ...;
|
||||
* Timestamp end = ...;
|
||||
* Duration duration = ...;
|
||||
*
|
||||
* duration.seconds = end.seconds - start.seconds;
|
||||
* duration.nanos = end.nanos - start.nanos;
|
||||
*
|
||||
* if (duration.seconds < 0 && duration.nanos > 0) {
|
||||
* duration.seconds += 1;
|
||||
* duration.nanos -= 1000000000;
|
||||
* } else if (duration.seconds > 0 && duration.nanos < 0) {
|
||||
* duration.seconds -= 1;
|
||||
* duration.nanos += 1000000000;
|
||||
* }
|
||||
*
|
||||
* Example 2: Compute Timestamp from Timestamp + Duration in pseudo code.
|
||||
*
|
||||
* Timestamp start = ...;
|
||||
* Duration duration = ...;
|
||||
* Timestamp end = ...;
|
||||
*
|
||||
* end.seconds = start.seconds + duration.seconds;
|
||||
* end.nanos = start.nanos + duration.nanos;
|
||||
*
|
||||
* if (end.nanos < 0) {
|
||||
* end.seconds -= 1;
|
||||
* end.nanos += 1000000000;
|
||||
* } else if (end.nanos >= 1000000000) {
|
||||
* end.seconds += 1;
|
||||
* end.nanos -= 1000000000;
|
||||
* }
|
||||
*
|
||||
* Example 3: Compute Duration from datetime.timedelta in Python.
|
||||
*
|
||||
* td = datetime.timedelta(days=3, minutes=10)
|
||||
* duration = Duration()
|
||||
* duration.FromTimedelta(td)
|
||||
*
|
||||
* # JSON Mapping
|
||||
*
|
||||
* In JSON format, the Duration type is encoded as a string rather than an
|
||||
* object, where the string ends in the suffix "s" (indicating seconds) and
|
||||
* is preceded by the number of seconds, with nanoseconds expressed as
|
||||
* fractional seconds. For example, 3 seconds with 0 nanoseconds should be
|
||||
* encoded in JSON format as "3s", while 3 seconds and 1 nanosecond should
|
||||
* be expressed in JSON format as "3.000000001s", and 3 seconds and 1
|
||||
* microsecond should be expressed in JSON format as "3.000001s".
|
||||
*/
|
||||
export interface Duration {
|
||||
/**
|
||||
* Signed seconds of the span of time. Must be from -315,576,000,000
|
||||
* to +315,576,000,000 inclusive. Note: these bounds are computed from:
|
||||
* 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
|
||||
*/
|
||||
seconds: number;
|
||||
/**
|
||||
* Signed fractions of a second at nanosecond resolution of the span
|
||||
* of time. Durations less than one second are represented with a 0
|
||||
* `seconds` field and a positive or negative `nanos` field. For durations
|
||||
* of one second or more, a non-zero value for the `nanos` field must be
|
||||
* of the same sign as the `seconds` field. Must be from -999,999,999
|
||||
* to +999,999,999 inclusive.
|
||||
*/
|
||||
nanos: number;
|
||||
}
|
||||
|
||||
const baseDuration: object = { seconds: 0, nanos: 0 };
|
||||
|
||||
export const Duration = {
|
||||
encode(
|
||||
message: Duration,
|
||||
writer: _m0.Writer = _m0.Writer.create()
|
||||
): _m0.Writer {
|
||||
if (message.seconds !== 0) {
|
||||
writer.uint32(8).int64(message.seconds);
|
||||
}
|
||||
if (message.nanos !== 0) {
|
||||
writer.uint32(16).int32(message.nanos);
|
||||
}
|
||||
return writer;
|
||||
},
|
||||
|
||||
decode(input: _m0.Reader | Uint8Array, length?: number): Duration {
|
||||
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
||||
let end = length === undefined ? reader.len : reader.pos + length;
|
||||
const message = { ...baseDuration } as Duration;
|
||||
while (reader.pos < end) {
|
||||
const tag = reader.uint32();
|
||||
switch (tag >>> 3) {
|
||||
case 1:
|
||||
message.seconds = longToNumber(reader.int64() as Long);
|
||||
break;
|
||||
case 2:
|
||||
message.nanos = reader.int32();
|
||||
break;
|
||||
default:
|
||||
reader.skipType(tag & 7);
|
||||
break;
|
||||
}
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
fromJSON(object: any): Duration {
|
||||
const message = { ...baseDuration } as Duration;
|
||||
message.seconds =
|
||||
object.seconds !== undefined && object.seconds !== null
|
||||
? Number(object.seconds)
|
||||
: 0;
|
||||
message.nanos =
|
||||
object.nanos !== undefined && object.nanos !== null
|
||||
? Number(object.nanos)
|
||||
: 0;
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: Duration): unknown {
|
||||
const obj: any = {};
|
||||
message.seconds !== undefined && (obj.seconds = message.seconds);
|
||||
message.nanos !== undefined && (obj.nanos = message.nanos);
|
||||
return obj;
|
||||
},
|
||||
|
||||
fromPartial(object: DeepPartial<Duration>): Duration {
|
||||
const message = { ...baseDuration } as Duration;
|
||||
message.seconds = object.seconds ?? 0;
|
||||
message.nanos = object.nanos ?? 0;
|
||||
return message;
|
||||
},
|
||||
};
|
||||
|
||||
declare var self: any | undefined;
|
||||
declare var window: any | undefined;
|
||||
declare var global: any | undefined;
|
||||
var globalThis: any = (() => {
|
||||
if (typeof globalThis !== "undefined") return globalThis;
|
||||
if (typeof self !== "undefined") return self;
|
||||
if (typeof window !== "undefined") return window;
|
||||
if (typeof global !== "undefined") return global;
|
||||
throw "Unable to locate global object";
|
||||
})();
|
||||
|
||||
type Builtin =
|
||||
| Date
|
||||
| Function
|
||||
| Uint8Array
|
||||
| string
|
||||
| number
|
||||
| boolean
|
||||
| undefined;
|
||||
export type DeepPartial<T> = T extends Builtin
|
||||
? T
|
||||
: T extends Array<infer U>
|
||||
? Array<DeepPartial<U>>
|
||||
: T extends ReadonlyArray<infer U>
|
||||
? ReadonlyArray<DeepPartial<U>>
|
||||
: T extends {}
|
||||
? { [K in keyof T]?: DeepPartial<T[K]> }
|
||||
: Partial<T>;
|
||||
|
||||
function longToNumber(long: Long): number {
|
||||
if (long.gt(Number.MAX_SAFE_INTEGER)) {
|
||||
throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER");
|
||||
}
|
||||
return long.toNumber();
|
||||
}
|
||||
|
||||
if (_m0.util.Long !== Long) {
|
||||
_m0.util.Long = Long as any;
|
||||
_m0.configure();
|
||||
}
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue