resource.pb.go 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309
  1. // Code generated by protoc-gen-go. DO NOT EDIT.
  2. // versions:
  3. // protoc-gen-go v1.36.4
  4. // protoc (unknown)
  5. // source: store/resource.proto
  6. package store
  7. import (
  8. protoreflect "google.golang.org/protobuf/reflect/protoreflect"
  9. protoimpl "google.golang.org/protobuf/runtime/protoimpl"
  10. timestamppb "google.golang.org/protobuf/types/known/timestamppb"
  11. reflect "reflect"
  12. sync "sync"
  13. unsafe "unsafe"
  14. )
  15. const (
  16. // Verify that this generated code is sufficiently up-to-date.
  17. _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
  18. // Verify that runtime/protoimpl is sufficiently up-to-date.
  19. _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
  20. )
  21. type ResourceStorageType int32
  22. const (
  23. ResourceStorageType_RESOURCE_STORAGE_TYPE_UNSPECIFIED ResourceStorageType = 0
  24. ResourceStorageType_LOCAL ResourceStorageType = 1
  25. ResourceStorageType_S3 ResourceStorageType = 2
  26. ResourceStorageType_EXTERNAL ResourceStorageType = 3
  27. )
  28. // Enum value maps for ResourceStorageType.
  29. var (
  30. ResourceStorageType_name = map[int32]string{
  31. 0: "RESOURCE_STORAGE_TYPE_UNSPECIFIED",
  32. 1: "LOCAL",
  33. 2: "S3",
  34. 3: "EXTERNAL",
  35. }
  36. ResourceStorageType_value = map[string]int32{
  37. "RESOURCE_STORAGE_TYPE_UNSPECIFIED": 0,
  38. "LOCAL": 1,
  39. "S3": 2,
  40. "EXTERNAL": 3,
  41. }
  42. )
  43. func (x ResourceStorageType) Enum() *ResourceStorageType {
  44. p := new(ResourceStorageType)
  45. *p = x
  46. return p
  47. }
  48. func (x ResourceStorageType) String() string {
  49. return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
  50. }
  51. func (ResourceStorageType) Descriptor() protoreflect.EnumDescriptor {
  52. return file_store_resource_proto_enumTypes[0].Descriptor()
  53. }
  54. func (ResourceStorageType) Type() protoreflect.EnumType {
  55. return &file_store_resource_proto_enumTypes[0]
  56. }
  57. func (x ResourceStorageType) Number() protoreflect.EnumNumber {
  58. return protoreflect.EnumNumber(x)
  59. }
  60. // Deprecated: Use ResourceStorageType.Descriptor instead.
  61. func (ResourceStorageType) EnumDescriptor() ([]byte, []int) {
  62. return file_store_resource_proto_rawDescGZIP(), []int{0}
  63. }
  64. type ResourcePayload struct {
  65. state protoimpl.MessageState `protogen:"open.v1"`
  66. // Types that are valid to be assigned to Payload:
  67. //
  68. // *ResourcePayload_S3Object_
  69. Payload isResourcePayload_Payload `protobuf_oneof:"payload"`
  70. unknownFields protoimpl.UnknownFields
  71. sizeCache protoimpl.SizeCache
  72. }
  73. func (x *ResourcePayload) Reset() {
  74. *x = ResourcePayload{}
  75. mi := &file_store_resource_proto_msgTypes[0]
  76. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  77. ms.StoreMessageInfo(mi)
  78. }
  79. func (x *ResourcePayload) String() string {
  80. return protoimpl.X.MessageStringOf(x)
  81. }
  82. func (*ResourcePayload) ProtoMessage() {}
  83. func (x *ResourcePayload) ProtoReflect() protoreflect.Message {
  84. mi := &file_store_resource_proto_msgTypes[0]
  85. if x != nil {
  86. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  87. if ms.LoadMessageInfo() == nil {
  88. ms.StoreMessageInfo(mi)
  89. }
  90. return ms
  91. }
  92. return mi.MessageOf(x)
  93. }
  94. // Deprecated: Use ResourcePayload.ProtoReflect.Descriptor instead.
  95. func (*ResourcePayload) Descriptor() ([]byte, []int) {
  96. return file_store_resource_proto_rawDescGZIP(), []int{0}
  97. }
  98. func (x *ResourcePayload) GetPayload() isResourcePayload_Payload {
  99. if x != nil {
  100. return x.Payload
  101. }
  102. return nil
  103. }
  104. func (x *ResourcePayload) GetS3Object() *ResourcePayload_S3Object {
  105. if x != nil {
  106. if x, ok := x.Payload.(*ResourcePayload_S3Object_); ok {
  107. return x.S3Object
  108. }
  109. }
  110. return nil
  111. }
  112. type isResourcePayload_Payload interface {
  113. isResourcePayload_Payload()
  114. }
  115. type ResourcePayload_S3Object_ struct {
  116. S3Object *ResourcePayload_S3Object `protobuf:"bytes,1,opt,name=s3_object,json=s3Object,proto3,oneof"`
  117. }
  118. func (*ResourcePayload_S3Object_) isResourcePayload_Payload() {}
  119. type ResourcePayload_S3Object struct {
  120. state protoimpl.MessageState `protogen:"open.v1"`
  121. S3Config *StorageS3Config `protobuf:"bytes,1,opt,name=s3_config,json=s3Config,proto3" json:"s3_config,omitempty"`
  122. // key is the S3 object key.
  123. Key string `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"`
  124. // last_presigned_time is the last time the object was presigned.
  125. // This is used to determine if the presigned URL is still valid.
  126. LastPresignedTime *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=last_presigned_time,json=lastPresignedTime,proto3" json:"last_presigned_time,omitempty"`
  127. unknownFields protoimpl.UnknownFields
  128. sizeCache protoimpl.SizeCache
  129. }
  130. func (x *ResourcePayload_S3Object) Reset() {
  131. *x = ResourcePayload_S3Object{}
  132. mi := &file_store_resource_proto_msgTypes[1]
  133. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  134. ms.StoreMessageInfo(mi)
  135. }
  136. func (x *ResourcePayload_S3Object) String() string {
  137. return protoimpl.X.MessageStringOf(x)
  138. }
  139. func (*ResourcePayload_S3Object) ProtoMessage() {}
  140. func (x *ResourcePayload_S3Object) ProtoReflect() protoreflect.Message {
  141. mi := &file_store_resource_proto_msgTypes[1]
  142. if x != nil {
  143. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  144. if ms.LoadMessageInfo() == nil {
  145. ms.StoreMessageInfo(mi)
  146. }
  147. return ms
  148. }
  149. return mi.MessageOf(x)
  150. }
  151. // Deprecated: Use ResourcePayload_S3Object.ProtoReflect.Descriptor instead.
  152. func (*ResourcePayload_S3Object) Descriptor() ([]byte, []int) {
  153. return file_store_resource_proto_rawDescGZIP(), []int{0, 0}
  154. }
  155. func (x *ResourcePayload_S3Object) GetS3Config() *StorageS3Config {
  156. if x != nil {
  157. return x.S3Config
  158. }
  159. return nil
  160. }
  161. func (x *ResourcePayload_S3Object) GetKey() string {
  162. if x != nil {
  163. return x.Key
  164. }
  165. return ""
  166. }
  167. func (x *ResourcePayload_S3Object) GetLastPresignedTime() *timestamppb.Timestamp {
  168. if x != nil {
  169. return x.LastPresignedTime
  170. }
  171. return nil
  172. }
  173. var File_store_resource_proto protoreflect.FileDescriptor
  174. var file_store_resource_proto_rawDesc = string([]byte{
  175. 0x0a, 0x14, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65,
  176. 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0b, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x73, 0x74,
  177. 0x6f, 0x72, 0x65, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74,
  178. 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70,
  179. 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2f, 0x77, 0x6f, 0x72, 0x6b,
  180. 0x73, 0x70, 0x61, 0x63, 0x65, 0x5f, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72,
  181. 0x6f, 0x74, 0x6f, 0x22, 0x88, 0x02, 0x0a, 0x0f, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65,
  182. 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x12, 0x44, 0x0a, 0x09, 0x73, 0x33, 0x5f, 0x6f, 0x62,
  183. 0x6a, 0x65, 0x63, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x6d, 0x65, 0x6d,
  184. 0x6f, 0x73, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63,
  185. 0x65, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x2e, 0x53, 0x33, 0x4f, 0x62, 0x6a, 0x65, 0x63,
  186. 0x74, 0x48, 0x00, 0x52, 0x08, 0x73, 0x33, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x1a, 0xa3, 0x01,
  187. 0x0a, 0x08, 0x53, 0x33, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x39, 0x0a, 0x09, 0x73, 0x33,
  188. 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e,
  189. 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x53, 0x74, 0x6f, 0x72,
  190. 0x61, 0x67, 0x65, 0x53, 0x33, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x08, 0x73, 0x33, 0x43,
  191. 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01,
  192. 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x4a, 0x0a, 0x13, 0x6c, 0x61, 0x73, 0x74, 0x5f,
  193. 0x70, 0x72, 0x65, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x03,
  194. 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72,
  195. 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70,
  196. 0x52, 0x11, 0x6c, 0x61, 0x73, 0x74, 0x50, 0x72, 0x65, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x54,
  197. 0x69, 0x6d, 0x65, 0x42, 0x09, 0x0a, 0x07, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x2a, 0x5d,
  198. 0x0a, 0x13, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67,
  199. 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x25, 0x0a, 0x21, 0x52, 0x45, 0x53, 0x4f, 0x55, 0x52, 0x43,
  200. 0x45, 0x5f, 0x53, 0x54, 0x4f, 0x52, 0x41, 0x47, 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55,
  201. 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05,
  202. 0x4c, 0x4f, 0x43, 0x41, 0x4c, 0x10, 0x01, 0x12, 0x06, 0x0a, 0x02, 0x53, 0x33, 0x10, 0x02, 0x12,
  203. 0x0c, 0x0a, 0x08, 0x45, 0x58, 0x54, 0x45, 0x52, 0x4e, 0x41, 0x4c, 0x10, 0x03, 0x42, 0x98, 0x01,
  204. 0x0a, 0x0f, 0x63, 0x6f, 0x6d, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x73, 0x74, 0x6f, 0x72,
  205. 0x65, 0x42, 0x0d, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f,
  206. 0x50, 0x01, 0x5a, 0x29, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x75,
  207. 0x73, 0x65, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2f, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2f, 0x70, 0x72,
  208. 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x73, 0x74, 0x6f, 0x72, 0x65, 0xa2, 0x02, 0x03,
  209. 0x4d, 0x53, 0x58, 0xaa, 0x02, 0x0b, 0x4d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x53, 0x74, 0x6f, 0x72,
  210. 0x65, 0xca, 0x02, 0x0b, 0x4d, 0x65, 0x6d, 0x6f, 0x73, 0x5c, 0x53, 0x74, 0x6f, 0x72, 0x65, 0xe2,
  211. 0x02, 0x17, 0x4d, 0x65, 0x6d, 0x6f, 0x73, 0x5c, 0x53, 0x74, 0x6f, 0x72, 0x65, 0x5c, 0x47, 0x50,
  212. 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0c, 0x4d, 0x65, 0x6d, 0x6f,
  213. 0x73, 0x3a, 0x3a, 0x53, 0x74, 0x6f, 0x72, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
  214. })
  215. var (
  216. file_store_resource_proto_rawDescOnce sync.Once
  217. file_store_resource_proto_rawDescData []byte
  218. )
  219. func file_store_resource_proto_rawDescGZIP() []byte {
  220. file_store_resource_proto_rawDescOnce.Do(func() {
  221. file_store_resource_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_store_resource_proto_rawDesc), len(file_store_resource_proto_rawDesc)))
  222. })
  223. return file_store_resource_proto_rawDescData
  224. }
  225. var file_store_resource_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
  226. var file_store_resource_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
  227. var file_store_resource_proto_goTypes = []any{
  228. (ResourceStorageType)(0), // 0: memos.store.ResourceStorageType
  229. (*ResourcePayload)(nil), // 1: memos.store.ResourcePayload
  230. (*ResourcePayload_S3Object)(nil), // 2: memos.store.ResourcePayload.S3Object
  231. (*StorageS3Config)(nil), // 3: memos.store.StorageS3Config
  232. (*timestamppb.Timestamp)(nil), // 4: google.protobuf.Timestamp
  233. }
  234. var file_store_resource_proto_depIdxs = []int32{
  235. 2, // 0: memos.store.ResourcePayload.s3_object:type_name -> memos.store.ResourcePayload.S3Object
  236. 3, // 1: memos.store.ResourcePayload.S3Object.s3_config:type_name -> memos.store.StorageS3Config
  237. 4, // 2: memos.store.ResourcePayload.S3Object.last_presigned_time:type_name -> google.protobuf.Timestamp
  238. 3, // [3:3] is the sub-list for method output_type
  239. 3, // [3:3] is the sub-list for method input_type
  240. 3, // [3:3] is the sub-list for extension type_name
  241. 3, // [3:3] is the sub-list for extension extendee
  242. 0, // [0:3] is the sub-list for field type_name
  243. }
  244. func init() { file_store_resource_proto_init() }
  245. func file_store_resource_proto_init() {
  246. if File_store_resource_proto != nil {
  247. return
  248. }
  249. file_store_workspace_setting_proto_init()
  250. file_store_resource_proto_msgTypes[0].OneofWrappers = []any{
  251. (*ResourcePayload_S3Object_)(nil),
  252. }
  253. type x struct{}
  254. out := protoimpl.TypeBuilder{
  255. File: protoimpl.DescBuilder{
  256. GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
  257. RawDescriptor: unsafe.Slice(unsafe.StringData(file_store_resource_proto_rawDesc), len(file_store_resource_proto_rawDesc)),
  258. NumEnums: 1,
  259. NumMessages: 2,
  260. NumExtensions: 0,
  261. NumServices: 0,
  262. },
  263. GoTypes: file_store_resource_proto_goTypes,
  264. DependencyIndexes: file_store_resource_proto_depIdxs,
  265. EnumInfos: file_store_resource_proto_enumTypes,
  266. MessageInfos: file_store_resource_proto_msgTypes,
  267. }.Build()
  268. File_store_resource_proto = out.File
  269. file_store_resource_proto_goTypes = nil
  270. file_store_resource_proto_depIdxs = nil
  271. }