- Introduced a new test file for setting up an in-memory SQLite database for testing purposes. - Added helper functions for seeding test data, including users, plans, subscriptions, and wallet transactions. - Implemented usage helpers to load user video counts and storage usage. - Created user payload struct and functions to build user payloads with preferences and wallet balance. - Refactored gRPC server setup to include new services and handlers. - Updated proto files to simplify service definitions by removing redundant service prefixes.
811 lines
25 KiB
Go
811 lines
25 KiB
Go
// Code generated by protoc-gen-go. DO NOT EDIT.
|
|
// versions:
|
|
// protoc-gen-go v1.36.11
|
|
// protoc (unknown)
|
|
// source: app/v1/videos.proto
|
|
|
|
package appv1
|
|
|
|
import (
|
|
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
|
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
|
reflect "reflect"
|
|
sync "sync"
|
|
unsafe "unsafe"
|
|
)
|
|
|
|
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 GetUploadUrlRequest struct {
|
|
state protoimpl.MessageState `protogen:"open.v1"`
|
|
Filename string `protobuf:"bytes,1,opt,name=filename,proto3" json:"filename,omitempty"`
|
|
unknownFields protoimpl.UnknownFields
|
|
sizeCache protoimpl.SizeCache
|
|
}
|
|
|
|
func (x *GetUploadUrlRequest) Reset() {
|
|
*x = GetUploadUrlRequest{}
|
|
mi := &file_app_v1_videos_proto_msgTypes[0]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
|
|
func (x *GetUploadUrlRequest) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
|
|
func (*GetUploadUrlRequest) ProtoMessage() {}
|
|
|
|
func (x *GetUploadUrlRequest) ProtoReflect() protoreflect.Message {
|
|
mi := &file_app_v1_videos_proto_msgTypes[0]
|
|
if x != nil {
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
if ms.LoadMessageInfo() == nil {
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
return ms
|
|
}
|
|
return mi.MessageOf(x)
|
|
}
|
|
|
|
// Deprecated: Use GetUploadUrlRequest.ProtoReflect.Descriptor instead.
|
|
func (*GetUploadUrlRequest) Descriptor() ([]byte, []int) {
|
|
return file_app_v1_videos_proto_rawDescGZIP(), []int{0}
|
|
}
|
|
|
|
func (x *GetUploadUrlRequest) GetFilename() string {
|
|
if x != nil {
|
|
return x.Filename
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type GetUploadUrlResponse struct {
|
|
state protoimpl.MessageState `protogen:"open.v1"`
|
|
UploadUrl string `protobuf:"bytes,1,opt,name=upload_url,json=uploadUrl,proto3" json:"upload_url,omitempty"`
|
|
Key string `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"`
|
|
FileId string `protobuf:"bytes,3,opt,name=file_id,json=fileId,proto3" json:"file_id,omitempty"`
|
|
unknownFields protoimpl.UnknownFields
|
|
sizeCache protoimpl.SizeCache
|
|
}
|
|
|
|
func (x *GetUploadUrlResponse) Reset() {
|
|
*x = GetUploadUrlResponse{}
|
|
mi := &file_app_v1_videos_proto_msgTypes[1]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
|
|
func (x *GetUploadUrlResponse) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
|
|
func (*GetUploadUrlResponse) ProtoMessage() {}
|
|
|
|
func (x *GetUploadUrlResponse) ProtoReflect() protoreflect.Message {
|
|
mi := &file_app_v1_videos_proto_msgTypes[1]
|
|
if x != nil {
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
if ms.LoadMessageInfo() == nil {
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
return ms
|
|
}
|
|
return mi.MessageOf(x)
|
|
}
|
|
|
|
// Deprecated: Use GetUploadUrlResponse.ProtoReflect.Descriptor instead.
|
|
func (*GetUploadUrlResponse) Descriptor() ([]byte, []int) {
|
|
return file_app_v1_videos_proto_rawDescGZIP(), []int{1}
|
|
}
|
|
|
|
func (x *GetUploadUrlResponse) GetUploadUrl() string {
|
|
if x != nil {
|
|
return x.UploadUrl
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *GetUploadUrlResponse) GetKey() string {
|
|
if x != nil {
|
|
return x.Key
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *GetUploadUrlResponse) GetFileId() string {
|
|
if x != nil {
|
|
return x.FileId
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type CreateVideoRequest struct {
|
|
state protoimpl.MessageState `protogen:"open.v1"`
|
|
Title string `protobuf:"bytes,1,opt,name=title,proto3" json:"title,omitempty"`
|
|
Description *string `protobuf:"bytes,2,opt,name=description,proto3,oneof" json:"description,omitempty"`
|
|
Url string `protobuf:"bytes,3,opt,name=url,proto3" json:"url,omitempty"`
|
|
Size int64 `protobuf:"varint,4,opt,name=size,proto3" json:"size,omitempty"`
|
|
Duration int32 `protobuf:"varint,5,opt,name=duration,proto3" json:"duration,omitempty"`
|
|
Format *string `protobuf:"bytes,6,opt,name=format,proto3,oneof" json:"format,omitempty"`
|
|
unknownFields protoimpl.UnknownFields
|
|
sizeCache protoimpl.SizeCache
|
|
}
|
|
|
|
func (x *CreateVideoRequest) Reset() {
|
|
*x = CreateVideoRequest{}
|
|
mi := &file_app_v1_videos_proto_msgTypes[2]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
|
|
func (x *CreateVideoRequest) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
|
|
func (*CreateVideoRequest) ProtoMessage() {}
|
|
|
|
func (x *CreateVideoRequest) ProtoReflect() protoreflect.Message {
|
|
mi := &file_app_v1_videos_proto_msgTypes[2]
|
|
if x != nil {
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
if ms.LoadMessageInfo() == nil {
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
return ms
|
|
}
|
|
return mi.MessageOf(x)
|
|
}
|
|
|
|
// Deprecated: Use CreateVideoRequest.ProtoReflect.Descriptor instead.
|
|
func (*CreateVideoRequest) Descriptor() ([]byte, []int) {
|
|
return file_app_v1_videos_proto_rawDescGZIP(), []int{2}
|
|
}
|
|
|
|
func (x *CreateVideoRequest) GetTitle() string {
|
|
if x != nil {
|
|
return x.Title
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *CreateVideoRequest) GetDescription() string {
|
|
if x != nil && x.Description != nil {
|
|
return *x.Description
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *CreateVideoRequest) GetUrl() string {
|
|
if x != nil {
|
|
return x.Url
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *CreateVideoRequest) GetSize() int64 {
|
|
if x != nil {
|
|
return x.Size
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (x *CreateVideoRequest) GetDuration() int32 {
|
|
if x != nil {
|
|
return x.Duration
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (x *CreateVideoRequest) GetFormat() string {
|
|
if x != nil && x.Format != nil {
|
|
return *x.Format
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type CreateVideoResponse struct {
|
|
state protoimpl.MessageState `protogen:"open.v1"`
|
|
Video *Video `protobuf:"bytes,1,opt,name=video,proto3" json:"video,omitempty"`
|
|
unknownFields protoimpl.UnknownFields
|
|
sizeCache protoimpl.SizeCache
|
|
}
|
|
|
|
func (x *CreateVideoResponse) Reset() {
|
|
*x = CreateVideoResponse{}
|
|
mi := &file_app_v1_videos_proto_msgTypes[3]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
|
|
func (x *CreateVideoResponse) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
|
|
func (*CreateVideoResponse) ProtoMessage() {}
|
|
|
|
func (x *CreateVideoResponse) ProtoReflect() protoreflect.Message {
|
|
mi := &file_app_v1_videos_proto_msgTypes[3]
|
|
if x != nil {
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
if ms.LoadMessageInfo() == nil {
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
return ms
|
|
}
|
|
return mi.MessageOf(x)
|
|
}
|
|
|
|
// Deprecated: Use CreateVideoResponse.ProtoReflect.Descriptor instead.
|
|
func (*CreateVideoResponse) Descriptor() ([]byte, []int) {
|
|
return file_app_v1_videos_proto_rawDescGZIP(), []int{3}
|
|
}
|
|
|
|
func (x *CreateVideoResponse) GetVideo() *Video {
|
|
if x != nil {
|
|
return x.Video
|
|
}
|
|
return nil
|
|
}
|
|
|
|
type ListVideosRequest struct {
|
|
state protoimpl.MessageState `protogen:"open.v1"`
|
|
Page int32 `protobuf:"varint,1,opt,name=page,proto3" json:"page,omitempty"`
|
|
Limit int32 `protobuf:"varint,2,opt,name=limit,proto3" json:"limit,omitempty"`
|
|
Search *string `protobuf:"bytes,3,opt,name=search,proto3,oneof" json:"search,omitempty"`
|
|
Status *string `protobuf:"bytes,4,opt,name=status,proto3,oneof" json:"status,omitempty"`
|
|
unknownFields protoimpl.UnknownFields
|
|
sizeCache protoimpl.SizeCache
|
|
}
|
|
|
|
func (x *ListVideosRequest) Reset() {
|
|
*x = ListVideosRequest{}
|
|
mi := &file_app_v1_videos_proto_msgTypes[4]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
|
|
func (x *ListVideosRequest) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
|
|
func (*ListVideosRequest) ProtoMessage() {}
|
|
|
|
func (x *ListVideosRequest) ProtoReflect() protoreflect.Message {
|
|
mi := &file_app_v1_videos_proto_msgTypes[4]
|
|
if x != nil {
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
if ms.LoadMessageInfo() == nil {
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
return ms
|
|
}
|
|
return mi.MessageOf(x)
|
|
}
|
|
|
|
// Deprecated: Use ListVideosRequest.ProtoReflect.Descriptor instead.
|
|
func (*ListVideosRequest) Descriptor() ([]byte, []int) {
|
|
return file_app_v1_videos_proto_rawDescGZIP(), []int{4}
|
|
}
|
|
|
|
func (x *ListVideosRequest) GetPage() int32 {
|
|
if x != nil {
|
|
return x.Page
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (x *ListVideosRequest) GetLimit() int32 {
|
|
if x != nil {
|
|
return x.Limit
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (x *ListVideosRequest) GetSearch() string {
|
|
if x != nil && x.Search != nil {
|
|
return *x.Search
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *ListVideosRequest) GetStatus() string {
|
|
if x != nil && x.Status != nil {
|
|
return *x.Status
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type ListVideosResponse struct {
|
|
state protoimpl.MessageState `protogen:"open.v1"`
|
|
Videos []*Video `protobuf:"bytes,1,rep,name=videos,proto3" json:"videos,omitempty"`
|
|
Total int64 `protobuf:"varint,2,opt,name=total,proto3" json:"total,omitempty"`
|
|
Page int32 `protobuf:"varint,3,opt,name=page,proto3" json:"page,omitempty"`
|
|
Limit int32 `protobuf:"varint,4,opt,name=limit,proto3" json:"limit,omitempty"`
|
|
unknownFields protoimpl.UnknownFields
|
|
sizeCache protoimpl.SizeCache
|
|
}
|
|
|
|
func (x *ListVideosResponse) Reset() {
|
|
*x = ListVideosResponse{}
|
|
mi := &file_app_v1_videos_proto_msgTypes[5]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
|
|
func (x *ListVideosResponse) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
|
|
func (*ListVideosResponse) ProtoMessage() {}
|
|
|
|
func (x *ListVideosResponse) ProtoReflect() protoreflect.Message {
|
|
mi := &file_app_v1_videos_proto_msgTypes[5]
|
|
if x != nil {
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
if ms.LoadMessageInfo() == nil {
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
return ms
|
|
}
|
|
return mi.MessageOf(x)
|
|
}
|
|
|
|
// Deprecated: Use ListVideosResponse.ProtoReflect.Descriptor instead.
|
|
func (*ListVideosResponse) Descriptor() ([]byte, []int) {
|
|
return file_app_v1_videos_proto_rawDescGZIP(), []int{5}
|
|
}
|
|
|
|
func (x *ListVideosResponse) GetVideos() []*Video {
|
|
if x != nil {
|
|
return x.Videos
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (x *ListVideosResponse) GetTotal() int64 {
|
|
if x != nil {
|
|
return x.Total
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (x *ListVideosResponse) GetPage() int32 {
|
|
if x != nil {
|
|
return x.Page
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (x *ListVideosResponse) GetLimit() int32 {
|
|
if x != nil {
|
|
return x.Limit
|
|
}
|
|
return 0
|
|
}
|
|
|
|
type GetVideoRequest struct {
|
|
state protoimpl.MessageState `protogen:"open.v1"`
|
|
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
|
|
unknownFields protoimpl.UnknownFields
|
|
sizeCache protoimpl.SizeCache
|
|
}
|
|
|
|
func (x *GetVideoRequest) Reset() {
|
|
*x = GetVideoRequest{}
|
|
mi := &file_app_v1_videos_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_app_v1_videos_proto_msgTypes[6]
|
|
if 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_app_v1_videos_proto_rawDescGZIP(), []int{6}
|
|
}
|
|
|
|
func (x *GetVideoRequest) GetId() string {
|
|
if x != nil {
|
|
return x.Id
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type GetVideoResponse struct {
|
|
state protoimpl.MessageState `protogen:"open.v1"`
|
|
Video *Video `protobuf:"bytes,1,opt,name=video,proto3" json:"video,omitempty"`
|
|
unknownFields protoimpl.UnknownFields
|
|
sizeCache protoimpl.SizeCache
|
|
}
|
|
|
|
func (x *GetVideoResponse) Reset() {
|
|
*x = GetVideoResponse{}
|
|
mi := &file_app_v1_videos_proto_msgTypes[7]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
|
|
func (x *GetVideoResponse) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
|
|
func (*GetVideoResponse) ProtoMessage() {}
|
|
|
|
func (x *GetVideoResponse) ProtoReflect() protoreflect.Message {
|
|
mi := &file_app_v1_videos_proto_msgTypes[7]
|
|
if x != nil {
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
if ms.LoadMessageInfo() == nil {
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
return ms
|
|
}
|
|
return mi.MessageOf(x)
|
|
}
|
|
|
|
// Deprecated: Use GetVideoResponse.ProtoReflect.Descriptor instead.
|
|
func (*GetVideoResponse) Descriptor() ([]byte, []int) {
|
|
return file_app_v1_videos_proto_rawDescGZIP(), []int{7}
|
|
}
|
|
|
|
func (x *GetVideoResponse) GetVideo() *Video {
|
|
if x != nil {
|
|
return x.Video
|
|
}
|
|
return nil
|
|
}
|
|
|
|
type UpdateVideoRequest struct {
|
|
state protoimpl.MessageState `protogen:"open.v1"`
|
|
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
|
|
Title string `protobuf:"bytes,2,opt,name=title,proto3" json:"title,omitempty"`
|
|
Description *string `protobuf:"bytes,3,opt,name=description,proto3,oneof" json:"description,omitempty"`
|
|
Url string `protobuf:"bytes,4,opt,name=url,proto3" json:"url,omitempty"`
|
|
Size int64 `protobuf:"varint,5,opt,name=size,proto3" json:"size,omitempty"`
|
|
Duration int32 `protobuf:"varint,6,opt,name=duration,proto3" json:"duration,omitempty"`
|
|
Format *string `protobuf:"bytes,7,opt,name=format,proto3,oneof" json:"format,omitempty"`
|
|
Status *string `protobuf:"bytes,8,opt,name=status,proto3,oneof" json:"status,omitempty"`
|
|
unknownFields protoimpl.UnknownFields
|
|
sizeCache protoimpl.SizeCache
|
|
}
|
|
|
|
func (x *UpdateVideoRequest) Reset() {
|
|
*x = UpdateVideoRequest{}
|
|
mi := &file_app_v1_videos_proto_msgTypes[8]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
|
|
func (x *UpdateVideoRequest) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
|
|
func (*UpdateVideoRequest) ProtoMessage() {}
|
|
|
|
func (x *UpdateVideoRequest) ProtoReflect() protoreflect.Message {
|
|
mi := &file_app_v1_videos_proto_msgTypes[8]
|
|
if x != nil {
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
if ms.LoadMessageInfo() == nil {
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
return ms
|
|
}
|
|
return mi.MessageOf(x)
|
|
}
|
|
|
|
// Deprecated: Use UpdateVideoRequest.ProtoReflect.Descriptor instead.
|
|
func (*UpdateVideoRequest) Descriptor() ([]byte, []int) {
|
|
return file_app_v1_videos_proto_rawDescGZIP(), []int{8}
|
|
}
|
|
|
|
func (x *UpdateVideoRequest) GetId() string {
|
|
if x != nil {
|
|
return x.Id
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *UpdateVideoRequest) GetTitle() string {
|
|
if x != nil {
|
|
return x.Title
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *UpdateVideoRequest) GetDescription() string {
|
|
if x != nil && x.Description != nil {
|
|
return *x.Description
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *UpdateVideoRequest) GetUrl() string {
|
|
if x != nil {
|
|
return x.Url
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *UpdateVideoRequest) GetSize() int64 {
|
|
if x != nil {
|
|
return x.Size
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (x *UpdateVideoRequest) GetDuration() int32 {
|
|
if x != nil {
|
|
return x.Duration
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (x *UpdateVideoRequest) GetFormat() string {
|
|
if x != nil && x.Format != nil {
|
|
return *x.Format
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *UpdateVideoRequest) GetStatus() string {
|
|
if x != nil && x.Status != nil {
|
|
return *x.Status
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type UpdateVideoResponse struct {
|
|
state protoimpl.MessageState `protogen:"open.v1"`
|
|
Video *Video `protobuf:"bytes,1,opt,name=video,proto3" json:"video,omitempty"`
|
|
unknownFields protoimpl.UnknownFields
|
|
sizeCache protoimpl.SizeCache
|
|
}
|
|
|
|
func (x *UpdateVideoResponse) Reset() {
|
|
*x = UpdateVideoResponse{}
|
|
mi := &file_app_v1_videos_proto_msgTypes[9]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
|
|
func (x *UpdateVideoResponse) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
|
|
func (*UpdateVideoResponse) ProtoMessage() {}
|
|
|
|
func (x *UpdateVideoResponse) ProtoReflect() protoreflect.Message {
|
|
mi := &file_app_v1_videos_proto_msgTypes[9]
|
|
if x != nil {
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
if ms.LoadMessageInfo() == nil {
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
return ms
|
|
}
|
|
return mi.MessageOf(x)
|
|
}
|
|
|
|
// Deprecated: Use UpdateVideoResponse.ProtoReflect.Descriptor instead.
|
|
func (*UpdateVideoResponse) Descriptor() ([]byte, []int) {
|
|
return file_app_v1_videos_proto_rawDescGZIP(), []int{9}
|
|
}
|
|
|
|
func (x *UpdateVideoResponse) GetVideo() *Video {
|
|
if x != nil {
|
|
return x.Video
|
|
}
|
|
return nil
|
|
}
|
|
|
|
type DeleteVideoRequest struct {
|
|
state protoimpl.MessageState `protogen:"open.v1"`
|
|
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
|
|
unknownFields protoimpl.UnknownFields
|
|
sizeCache protoimpl.SizeCache
|
|
}
|
|
|
|
func (x *DeleteVideoRequest) Reset() {
|
|
*x = DeleteVideoRequest{}
|
|
mi := &file_app_v1_videos_proto_msgTypes[10]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
|
|
func (x *DeleteVideoRequest) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
|
|
func (*DeleteVideoRequest) ProtoMessage() {}
|
|
|
|
func (x *DeleteVideoRequest) ProtoReflect() protoreflect.Message {
|
|
mi := &file_app_v1_videos_proto_msgTypes[10]
|
|
if x != nil {
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
if ms.LoadMessageInfo() == nil {
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
return ms
|
|
}
|
|
return mi.MessageOf(x)
|
|
}
|
|
|
|
// Deprecated: Use DeleteVideoRequest.ProtoReflect.Descriptor instead.
|
|
func (*DeleteVideoRequest) Descriptor() ([]byte, []int) {
|
|
return file_app_v1_videos_proto_rawDescGZIP(), []int{10}
|
|
}
|
|
|
|
func (x *DeleteVideoRequest) GetId() string {
|
|
if x != nil {
|
|
return x.Id
|
|
}
|
|
return ""
|
|
}
|
|
|
|
var File_app_v1_videos_proto protoreflect.FileDescriptor
|
|
|
|
const file_app_v1_videos_proto_rawDesc = "" +
|
|
"\n" +
|
|
"\x13app/v1/videos.proto\x12\rstream.app.v1\x1a\x13app/v1/common.proto\"1\n" +
|
|
"\x13GetUploadUrlRequest\x12\x1a\n" +
|
|
"\bfilename\x18\x01 \x01(\tR\bfilename\"`\n" +
|
|
"\x14GetUploadUrlResponse\x12\x1d\n" +
|
|
"\n" +
|
|
"upload_url\x18\x01 \x01(\tR\tuploadUrl\x12\x10\n" +
|
|
"\x03key\x18\x02 \x01(\tR\x03key\x12\x17\n" +
|
|
"\afile_id\x18\x03 \x01(\tR\x06fileId\"\xcb\x01\n" +
|
|
"\x12CreateVideoRequest\x12\x14\n" +
|
|
"\x05title\x18\x01 \x01(\tR\x05title\x12%\n" +
|
|
"\vdescription\x18\x02 \x01(\tH\x00R\vdescription\x88\x01\x01\x12\x10\n" +
|
|
"\x03url\x18\x03 \x01(\tR\x03url\x12\x12\n" +
|
|
"\x04size\x18\x04 \x01(\x03R\x04size\x12\x1a\n" +
|
|
"\bduration\x18\x05 \x01(\x05R\bduration\x12\x1b\n" +
|
|
"\x06format\x18\x06 \x01(\tH\x01R\x06format\x88\x01\x01B\x0e\n" +
|
|
"\f_descriptionB\t\n" +
|
|
"\a_format\"A\n" +
|
|
"\x13CreateVideoResponse\x12*\n" +
|
|
"\x05video\x18\x01 \x01(\v2\x14.stream.app.v1.VideoR\x05video\"\x8d\x01\n" +
|
|
"\x11ListVideosRequest\x12\x12\n" +
|
|
"\x04page\x18\x01 \x01(\x05R\x04page\x12\x14\n" +
|
|
"\x05limit\x18\x02 \x01(\x05R\x05limit\x12\x1b\n" +
|
|
"\x06search\x18\x03 \x01(\tH\x00R\x06search\x88\x01\x01\x12\x1b\n" +
|
|
"\x06status\x18\x04 \x01(\tH\x01R\x06status\x88\x01\x01B\t\n" +
|
|
"\a_searchB\t\n" +
|
|
"\a_status\"\x82\x01\n" +
|
|
"\x12ListVideosResponse\x12,\n" +
|
|
"\x06videos\x18\x01 \x03(\v2\x14.stream.app.v1.VideoR\x06videos\x12\x14\n" +
|
|
"\x05total\x18\x02 \x01(\x03R\x05total\x12\x12\n" +
|
|
"\x04page\x18\x03 \x01(\x05R\x04page\x12\x14\n" +
|
|
"\x05limit\x18\x04 \x01(\x05R\x05limit\"!\n" +
|
|
"\x0fGetVideoRequest\x12\x0e\n" +
|
|
"\x02id\x18\x01 \x01(\tR\x02id\">\n" +
|
|
"\x10GetVideoResponse\x12*\n" +
|
|
"\x05video\x18\x01 \x01(\v2\x14.stream.app.v1.VideoR\x05video\"\x83\x02\n" +
|
|
"\x12UpdateVideoRequest\x12\x0e\n" +
|
|
"\x02id\x18\x01 \x01(\tR\x02id\x12\x14\n" +
|
|
"\x05title\x18\x02 \x01(\tR\x05title\x12%\n" +
|
|
"\vdescription\x18\x03 \x01(\tH\x00R\vdescription\x88\x01\x01\x12\x10\n" +
|
|
"\x03url\x18\x04 \x01(\tR\x03url\x12\x12\n" +
|
|
"\x04size\x18\x05 \x01(\x03R\x04size\x12\x1a\n" +
|
|
"\bduration\x18\x06 \x01(\x05R\bduration\x12\x1b\n" +
|
|
"\x06format\x18\a \x01(\tH\x01R\x06format\x88\x01\x01\x12\x1b\n" +
|
|
"\x06status\x18\b \x01(\tH\x02R\x06status\x88\x01\x01B\x0e\n" +
|
|
"\f_descriptionB\t\n" +
|
|
"\a_formatB\t\n" +
|
|
"\a_status\"A\n" +
|
|
"\x13UpdateVideoResponse\x12*\n" +
|
|
"\x05video\x18\x01 \x01(\v2\x14.stream.app.v1.VideoR\x05video\"$\n" +
|
|
"\x12DeleteVideoRequest\x12\x0e\n" +
|
|
"\x02id\x18\x01 \x01(\tR\x02id2\xff\x03\n" +
|
|
"\x06Videos\x12W\n" +
|
|
"\fGetUploadUrl\x12\".stream.app.v1.GetUploadUrlRequest\x1a#.stream.app.v1.GetUploadUrlResponse\x12T\n" +
|
|
"\vCreateVideo\x12!.stream.app.v1.CreateVideoRequest\x1a\".stream.app.v1.CreateVideoResponse\x12Q\n" +
|
|
"\n" +
|
|
"ListVideos\x12 .stream.app.v1.ListVideosRequest\x1a!.stream.app.v1.ListVideosResponse\x12K\n" +
|
|
"\bGetVideo\x12\x1e.stream.app.v1.GetVideoRequest\x1a\x1f.stream.app.v1.GetVideoResponse\x12T\n" +
|
|
"\vUpdateVideo\x12!.stream.app.v1.UpdateVideoRequest\x1a\".stream.app.v1.UpdateVideoResponse\x12P\n" +
|
|
"\vDeleteVideo\x12!.stream.app.v1.DeleteVideoRequest\x1a\x1e.stream.app.v1.MessageResponseB,Z*stream.api/internal/gen/proto/app/v1;appv1b\x06proto3"
|
|
|
|
var (
|
|
file_app_v1_videos_proto_rawDescOnce sync.Once
|
|
file_app_v1_videos_proto_rawDescData []byte
|
|
)
|
|
|
|
func file_app_v1_videos_proto_rawDescGZIP() []byte {
|
|
file_app_v1_videos_proto_rawDescOnce.Do(func() {
|
|
file_app_v1_videos_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_app_v1_videos_proto_rawDesc), len(file_app_v1_videos_proto_rawDesc)))
|
|
})
|
|
return file_app_v1_videos_proto_rawDescData
|
|
}
|
|
|
|
var file_app_v1_videos_proto_msgTypes = make([]protoimpl.MessageInfo, 11)
|
|
var file_app_v1_videos_proto_goTypes = []any{
|
|
(*GetUploadUrlRequest)(nil), // 0: stream.app.v1.GetUploadUrlRequest
|
|
(*GetUploadUrlResponse)(nil), // 1: stream.app.v1.GetUploadUrlResponse
|
|
(*CreateVideoRequest)(nil), // 2: stream.app.v1.CreateVideoRequest
|
|
(*CreateVideoResponse)(nil), // 3: stream.app.v1.CreateVideoResponse
|
|
(*ListVideosRequest)(nil), // 4: stream.app.v1.ListVideosRequest
|
|
(*ListVideosResponse)(nil), // 5: stream.app.v1.ListVideosResponse
|
|
(*GetVideoRequest)(nil), // 6: stream.app.v1.GetVideoRequest
|
|
(*GetVideoResponse)(nil), // 7: stream.app.v1.GetVideoResponse
|
|
(*UpdateVideoRequest)(nil), // 8: stream.app.v1.UpdateVideoRequest
|
|
(*UpdateVideoResponse)(nil), // 9: stream.app.v1.UpdateVideoResponse
|
|
(*DeleteVideoRequest)(nil), // 10: stream.app.v1.DeleteVideoRequest
|
|
(*Video)(nil), // 11: stream.app.v1.Video
|
|
(*MessageResponse)(nil), // 12: stream.app.v1.MessageResponse
|
|
}
|
|
var file_app_v1_videos_proto_depIdxs = []int32{
|
|
11, // 0: stream.app.v1.CreateVideoResponse.video:type_name -> stream.app.v1.Video
|
|
11, // 1: stream.app.v1.ListVideosResponse.videos:type_name -> stream.app.v1.Video
|
|
11, // 2: stream.app.v1.GetVideoResponse.video:type_name -> stream.app.v1.Video
|
|
11, // 3: stream.app.v1.UpdateVideoResponse.video:type_name -> stream.app.v1.Video
|
|
0, // 4: stream.app.v1.Videos.GetUploadUrl:input_type -> stream.app.v1.GetUploadUrlRequest
|
|
2, // 5: stream.app.v1.Videos.CreateVideo:input_type -> stream.app.v1.CreateVideoRequest
|
|
4, // 6: stream.app.v1.Videos.ListVideos:input_type -> stream.app.v1.ListVideosRequest
|
|
6, // 7: stream.app.v1.Videos.GetVideo:input_type -> stream.app.v1.GetVideoRequest
|
|
8, // 8: stream.app.v1.Videos.UpdateVideo:input_type -> stream.app.v1.UpdateVideoRequest
|
|
10, // 9: stream.app.v1.Videos.DeleteVideo:input_type -> stream.app.v1.DeleteVideoRequest
|
|
1, // 10: stream.app.v1.Videos.GetUploadUrl:output_type -> stream.app.v1.GetUploadUrlResponse
|
|
3, // 11: stream.app.v1.Videos.CreateVideo:output_type -> stream.app.v1.CreateVideoResponse
|
|
5, // 12: stream.app.v1.Videos.ListVideos:output_type -> stream.app.v1.ListVideosResponse
|
|
7, // 13: stream.app.v1.Videos.GetVideo:output_type -> stream.app.v1.GetVideoResponse
|
|
9, // 14: stream.app.v1.Videos.UpdateVideo:output_type -> stream.app.v1.UpdateVideoResponse
|
|
12, // 15: stream.app.v1.Videos.DeleteVideo:output_type -> stream.app.v1.MessageResponse
|
|
10, // [10:16] is the sub-list for method output_type
|
|
4, // [4:10] is the sub-list for method input_type
|
|
4, // [4:4] is the sub-list for extension type_name
|
|
4, // [4:4] is the sub-list for extension extendee
|
|
0, // [0:4] is the sub-list for field type_name
|
|
}
|
|
|
|
func init() { file_app_v1_videos_proto_init() }
|
|
func file_app_v1_videos_proto_init() {
|
|
if File_app_v1_videos_proto != nil {
|
|
return
|
|
}
|
|
file_app_v1_common_proto_init()
|
|
file_app_v1_videos_proto_msgTypes[2].OneofWrappers = []any{}
|
|
file_app_v1_videos_proto_msgTypes[4].OneofWrappers = []any{}
|
|
file_app_v1_videos_proto_msgTypes[8].OneofWrappers = []any{}
|
|
type x struct{}
|
|
out := protoimpl.TypeBuilder{
|
|
File: protoimpl.DescBuilder{
|
|
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
|
RawDescriptor: unsafe.Slice(unsafe.StringData(file_app_v1_videos_proto_rawDesc), len(file_app_v1_videos_proto_rawDesc)),
|
|
NumEnums: 0,
|
|
NumMessages: 11,
|
|
NumExtensions: 0,
|
|
NumServices: 1,
|
|
},
|
|
GoTypes: file_app_v1_videos_proto_goTypes,
|
|
DependencyIndexes: file_app_v1_videos_proto_depIdxs,
|
|
MessageInfos: file_app_v1_videos_proto_msgTypes,
|
|
}.Build()
|
|
File_app_v1_videos_proto = out.File
|
|
file_app_v1_videos_proto_goTypes = nil
|
|
file_app_v1_videos_proto_depIdxs = nil
|
|
}
|