// contracts/proto/media/v1/media.proto // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.36.11 // protoc v4.25.9 // source: media/media.proto package pb 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 UploadRequest struct { state protoimpl.MessageState `protogen:"open.v1"` FileName string `protobuf:"bytes,1,opt,name=file_name,json=fileName,proto3" json:"file_name,omitempty"` Data []byte `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"` // Сами байты файла Mode string `protobuf:"bytes,3,opt,name=mode,proto3" json:"mode,omitempty"` // "avatar", "chat", "raw" unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } func (x *UploadRequest) Reset() { *x = UploadRequest{} mi := &file_media_media_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } func (x *UploadRequest) String() string { return protoimpl.X.MessageStringOf(x) } func (*UploadRequest) ProtoMessage() {} func (x *UploadRequest) ProtoReflect() protoreflect.Message { mi := &file_media_media_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 UploadRequest.ProtoReflect.Descriptor instead. func (*UploadRequest) Descriptor() ([]byte, []int) { return file_media_media_proto_rawDescGZIP(), []int{0} } func (x *UploadRequest) GetFileName() string { if x != nil { return x.FileName } return "" } func (x *UploadRequest) GetData() []byte { if x != nil { return x.Data } return nil } func (x *UploadRequest) GetMode() string { if x != nil { return x.Mode } return "" } type UploadResponse struct { state protoimpl.MessageState `protogen:"open.v1"` FileName string `protobuf:"bytes,1,opt,name=file_name,json=fileName,proto3" json:"file_name,omitempty"` Size int64 `protobuf:"varint,2,opt,name=size,proto3" json:"size,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } func (x *UploadResponse) Reset() { *x = UploadResponse{} mi := &file_media_media_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } func (x *UploadResponse) String() string { return protoimpl.X.MessageStringOf(x) } func (*UploadResponse) ProtoMessage() {} func (x *UploadResponse) ProtoReflect() protoreflect.Message { mi := &file_media_media_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 UploadResponse.ProtoReflect.Descriptor instead. func (*UploadResponse) Descriptor() ([]byte, []int) { return file_media_media_proto_rawDescGZIP(), []int{1} } func (x *UploadResponse) GetFileName() string { if x != nil { return x.FileName } return "" } func (x *UploadResponse) GetSize() int64 { if x != nil { return x.Size } return 0 } type GetPresignedUrlRequest struct { state protoimpl.MessageState `protogen:"open.v1"` FileName string `protobuf:"bytes,1,opt,name=file_name,json=fileName,proto3" json:"file_name,omitempty"` IsPublic bool `protobuf:"varint,2,opt,name=is_public,json=isPublic,proto3" json:"is_public,omitempty"` // Если true, ссылка живет 24 часа, иначе 2 минуты unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } func (x *GetPresignedUrlRequest) Reset() { *x = GetPresignedUrlRequest{} mi := &file_media_media_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } func (x *GetPresignedUrlRequest) String() string { return protoimpl.X.MessageStringOf(x) } func (*GetPresignedUrlRequest) ProtoMessage() {} func (x *GetPresignedUrlRequest) ProtoReflect() protoreflect.Message { mi := &file_media_media_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 GetPresignedUrlRequest.ProtoReflect.Descriptor instead. func (*GetPresignedUrlRequest) Descriptor() ([]byte, []int) { return file_media_media_proto_rawDescGZIP(), []int{2} } func (x *GetPresignedUrlRequest) GetFileName() string { if x != nil { return x.FileName } return "" } func (x *GetPresignedUrlRequest) GetIsPublic() bool { if x != nil { return x.IsPublic } return false } type GetPresignedUrlResponse struct { state protoimpl.MessageState `protogen:"open.v1"` Url string `protobuf:"bytes,1,opt,name=url,proto3" json:"url,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } func (x *GetPresignedUrlResponse) Reset() { *x = GetPresignedUrlResponse{} mi := &file_media_media_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } func (x *GetPresignedUrlResponse) String() string { return protoimpl.X.MessageStringOf(x) } func (*GetPresignedUrlResponse) ProtoMessage() {} func (x *GetPresignedUrlResponse) ProtoReflect() protoreflect.Message { mi := &file_media_media_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 GetPresignedUrlResponse.ProtoReflect.Descriptor instead. func (*GetPresignedUrlResponse) Descriptor() ([]byte, []int) { return file_media_media_proto_rawDescGZIP(), []int{3} } func (x *GetPresignedUrlResponse) GetUrl() string { if x != nil { return x.Url } return "" } var File_media_media_proto protoreflect.FileDescriptor const file_media_media_proto_rawDesc = "" + "\n" + "\x11media/media.proto\x12\bmedia.v1\"T\n" + "\rUploadRequest\x12\x1b\n" + "\tfile_name\x18\x01 \x01(\tR\bfileName\x12\x12\n" + "\x04data\x18\x02 \x01(\fR\x04data\x12\x12\n" + "\x04mode\x18\x03 \x01(\tR\x04mode\"A\n" + "\x0eUploadResponse\x12\x1b\n" + "\tfile_name\x18\x01 \x01(\tR\bfileName\x12\x12\n" + "\x04size\x18\x02 \x01(\x03R\x04size\"R\n" + "\x16GetPresignedUrlRequest\x12\x1b\n" + "\tfile_name\x18\x01 \x01(\tR\bfileName\x12\x1b\n" + "\tis_public\x18\x02 \x01(\bR\bisPublic\"+\n" + "\x17GetPresignedUrlResponse\x12\x10\n" + "\x03url\x18\x01 \x01(\tR\x03url2\xa3\x01\n" + "\fMediaService\x12;\n" + "\x06Upload\x12\x17.media.v1.UploadRequest\x1a\x18.media.v1.UploadResponse\x12V\n" + "\x0fGetPresignedUrl\x12 .media.v1.GetPresignedUrlRequest\x1a!.media.v1.GetPresignedUrlResponseB*Z(git.lendry.ru/lendry-erp/proto.git/go;pbb\x06proto3" var ( file_media_media_proto_rawDescOnce sync.Once file_media_media_proto_rawDescData []byte ) func file_media_media_proto_rawDescGZIP() []byte { file_media_media_proto_rawDescOnce.Do(func() { file_media_media_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_media_media_proto_rawDesc), len(file_media_media_proto_rawDesc))) }) return file_media_media_proto_rawDescData } var file_media_media_proto_msgTypes = make([]protoimpl.MessageInfo, 4) var file_media_media_proto_goTypes = []any{ (*UploadRequest)(nil), // 0: media.v1.UploadRequest (*UploadResponse)(nil), // 1: media.v1.UploadResponse (*GetPresignedUrlRequest)(nil), // 2: media.v1.GetPresignedUrlRequest (*GetPresignedUrlResponse)(nil), // 3: media.v1.GetPresignedUrlResponse } var file_media_media_proto_depIdxs = []int32{ 0, // 0: media.v1.MediaService.Upload:input_type -> media.v1.UploadRequest 2, // 1: media.v1.MediaService.GetPresignedUrl:input_type -> media.v1.GetPresignedUrlRequest 1, // 2: media.v1.MediaService.Upload:output_type -> media.v1.UploadResponse 3, // 3: media.v1.MediaService.GetPresignedUrl:output_type -> media.v1.GetPresignedUrlResponse 2, // [2:4] is the sub-list for method output_type 0, // [0:2] is the sub-list for method input_type 0, // [0:0] is the sub-list for extension type_name 0, // [0:0] is the sub-list for extension extendee 0, // [0:0] is the sub-list for field type_name } func init() { file_media_media_proto_init() } func file_media_media_proto_init() { if File_media_media_proto != nil { return } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: unsafe.Slice(unsafe.StringData(file_media_media_proto_rawDesc), len(file_media_media_proto_rawDesc)), NumEnums: 0, NumMessages: 4, NumExtensions: 0, NumServices: 1, }, GoTypes: file_media_media_proto_goTypes, DependencyIndexes: file_media_media_proto_depIdxs, MessageInfos: file_media_media_proto_msgTypes, }.Build() File_media_media_proto = out.File file_media_media_proto_goTypes = nil file_media_media_proto_depIdxs = nil }