Files
2026-02-28 05:33:16 +08:00

327 lines
9.6 KiB
Go

// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.36.11
// protoc v3.19.4
// source: objectstory.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 UploadFileMetadataReq struct {
state protoimpl.MessageState `protogen:"open.v1"`
FileName string `protobuf:"bytes,1,opt,name=fileName,proto3" json:"fileName,omitempty"`
FileSize int64 `protobuf:"varint,2,opt,name=fileSize,proto3" json:"fileSize,omitempty"`
FileType string `protobuf:"bytes,3,opt,name=fileType,proto3" json:"fileType,omitempty"` // avatar, chat, etc.
UserId string `protobuf:"bytes,4,opt,name=userId,proto3" json:"userId,omitempty"`
FileData []byte `protobuf:"bytes,5,opt,name=fileData,proto3" json:"fileData,omitempty"` // 如果文件很小可以直接传,大文件建议API层直接传S3,RPC只传元数据
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *UploadFileMetadataReq) Reset() {
*x = UploadFileMetadataReq{}
mi := &file_objectstory_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *UploadFileMetadataReq) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*UploadFileMetadataReq) ProtoMessage() {}
func (x *UploadFileMetadataReq) ProtoReflect() protoreflect.Message {
mi := &file_objectstory_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 UploadFileMetadataReq.ProtoReflect.Descriptor instead.
func (*UploadFileMetadataReq) Descriptor() ([]byte, []int) {
return file_objectstory_proto_rawDescGZIP(), []int{0}
}
func (x *UploadFileMetadataReq) GetFileName() string {
if x != nil {
return x.FileName
}
return ""
}
func (x *UploadFileMetadataReq) GetFileSize() int64 {
if x != nil {
return x.FileSize
}
return 0
}
func (x *UploadFileMetadataReq) GetFileType() string {
if x != nil {
return x.FileType
}
return ""
}
func (x *UploadFileMetadataReq) GetUserId() string {
if x != nil {
return x.UserId
}
return ""
}
func (x *UploadFileMetadataReq) GetFileData() []byte {
if x != nil {
return x.FileData
}
return nil
}
type UploadFileResp struct {
state protoimpl.MessageState `protogen:"open.v1"`
Url string `protobuf:"bytes,1,opt,name=url,proto3" json:"url,omitempty"`
FileId string `protobuf:"bytes,2,opt,name=fileId,proto3" json:"fileId,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *UploadFileResp) Reset() {
*x = UploadFileResp{}
mi := &file_objectstory_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *UploadFileResp) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*UploadFileResp) ProtoMessage() {}
func (x *UploadFileResp) ProtoReflect() protoreflect.Message {
mi := &file_objectstory_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 UploadFileResp.ProtoReflect.Descriptor instead.
func (*UploadFileResp) Descriptor() ([]byte, []int) {
return file_objectstory_proto_rawDescGZIP(), []int{1}
}
func (x *UploadFileResp) GetUrl() string {
if x != nil {
return x.Url
}
return ""
}
func (x *UploadFileResp) GetFileId() string {
if x != nil {
return x.FileId
}
return ""
}
type GetFileUrlReq struct {
state protoimpl.MessageState `protogen:"open.v1"`
FileId string `protobuf:"bytes,1,opt,name=fileId,proto3" json:"fileId,omitempty"`
UserId string `protobuf:"bytes,2,opt,name=userId,proto3" json:"userId,omitempty"` // 用于鉴权
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *GetFileUrlReq) Reset() {
*x = GetFileUrlReq{}
mi := &file_objectstory_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *GetFileUrlReq) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GetFileUrlReq) ProtoMessage() {}
func (x *GetFileUrlReq) ProtoReflect() protoreflect.Message {
mi := &file_objectstory_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 GetFileUrlReq.ProtoReflect.Descriptor instead.
func (*GetFileUrlReq) Descriptor() ([]byte, []int) {
return file_objectstory_proto_rawDescGZIP(), []int{2}
}
func (x *GetFileUrlReq) GetFileId() string {
if x != nil {
return x.FileId
}
return ""
}
func (x *GetFileUrlReq) GetUserId() string {
if x != nil {
return x.UserId
}
return ""
}
type GetFileUrlResp struct {
state protoimpl.MessageState `protogen:"open.v1"`
Url string `protobuf:"bytes,1,opt,name=url,proto3" json:"url,omitempty"` // 可能是带签名的临时 URL
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *GetFileUrlResp) Reset() {
*x = GetFileUrlResp{}
mi := &file_objectstory_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *GetFileUrlResp) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GetFileUrlResp) ProtoMessage() {}
func (x *GetFileUrlResp) ProtoReflect() protoreflect.Message {
mi := &file_objectstory_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 GetFileUrlResp.ProtoReflect.Descriptor instead.
func (*GetFileUrlResp) Descriptor() ([]byte, []int) {
return file_objectstory_proto_rawDescGZIP(), []int{3}
}
func (x *GetFileUrlResp) GetUrl() string {
if x != nil {
return x.Url
}
return ""
}
var File_objectstory_proto protoreflect.FileDescriptor
const file_objectstory_proto_rawDesc = "" +
"\n" +
"\x11objectstory.proto\x12\x04file\"\x9f\x01\n" +
"\x15UploadFileMetadataReq\x12\x1a\n" +
"\bfileName\x18\x01 \x01(\tR\bfileName\x12\x1a\n" +
"\bfileSize\x18\x02 \x01(\x03R\bfileSize\x12\x1a\n" +
"\bfileType\x18\x03 \x01(\tR\bfileType\x12\x16\n" +
"\x06userId\x18\x04 \x01(\tR\x06userId\x12\x1a\n" +
"\bfileData\x18\x05 \x01(\fR\bfileData\":\n" +
"\x0eUploadFileResp\x12\x10\n" +
"\x03url\x18\x01 \x01(\tR\x03url\x12\x16\n" +
"\x06fileId\x18\x02 \x01(\tR\x06fileId\"?\n" +
"\rGetFileUrlReq\x12\x16\n" +
"\x06fileId\x18\x01 \x01(\tR\x06fileId\x12\x16\n" +
"\x06userId\x18\x02 \x01(\tR\x06userId\"\"\n" +
"\x0eGetFileUrlResp\x12\x10\n" +
"\x03url\x18\x01 \x01(\tR\x03url2\x83\x01\n" +
"\vFileService\x12;\n" +
"\x06Upload\x12\x1b.file.UploadFileMetadataReq\x1a\x14.file.UploadFileResp\x127\n" +
"\n" +
"GetFileUrl\x12\x13.file.GetFileUrlReq\x1a\x14.file.GetFileUrlRespB\x06Z\x04./pbb\x06proto3"
var (
file_objectstory_proto_rawDescOnce sync.Once
file_objectstory_proto_rawDescData []byte
)
func file_objectstory_proto_rawDescGZIP() []byte {
file_objectstory_proto_rawDescOnce.Do(func() {
file_objectstory_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_objectstory_proto_rawDesc), len(file_objectstory_proto_rawDesc)))
})
return file_objectstory_proto_rawDescData
}
var file_objectstory_proto_msgTypes = make([]protoimpl.MessageInfo, 4)
var file_objectstory_proto_goTypes = []any{
(*UploadFileMetadataReq)(nil), // 0: file.UploadFileMetadataReq
(*UploadFileResp)(nil), // 1: file.UploadFileResp
(*GetFileUrlReq)(nil), // 2: file.GetFileUrlReq
(*GetFileUrlResp)(nil), // 3: file.GetFileUrlResp
}
var file_objectstory_proto_depIdxs = []int32{
0, // 0: file.FileService.Upload:input_type -> file.UploadFileMetadataReq
2, // 1: file.FileService.GetFileUrl:input_type -> file.GetFileUrlReq
1, // 2: file.FileService.Upload:output_type -> file.UploadFileResp
3, // 3: file.FileService.GetFileUrl:output_type -> file.GetFileUrlResp
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_objectstory_proto_init() }
func file_objectstory_proto_init() {
if File_objectstory_proto != nil {
return
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: unsafe.Slice(unsafe.StringData(file_objectstory_proto_rawDesc), len(file_objectstory_proto_rawDesc)),
NumEnums: 0,
NumMessages: 4,
NumExtensions: 0,
NumServices: 1,
},
GoTypes: file_objectstory_proto_goTypes,
DependencyIndexes: file_objectstory_proto_depIdxs,
MessageInfos: file_objectstory_proto_msgTypes,
}.Build()
File_objectstory_proto = out.File
file_objectstory_proto_goTypes = nil
file_objectstory_proto_depIdxs = nil
}