resource.proto 816 B

123456789101112131415161718192021222324252627282930313233
  1. syntax = "proto3";
  2. package memos.store;
  3. import "google/protobuf/timestamp.proto";
  4. import "store/workspace_setting.proto";
  5. option go_package = "gen/store";
  6. enum ResourceStorageType {
  7. RESOURCE_STORAGE_TYPE_UNSPECIFIED = 0;
  8. // Resource is stored locally. AKA, local file system.
  9. LOCAL = 1;
  10. // Resource is stored in S3.
  11. S3 = 2;
  12. // Resource is stored in an external storage. The reference is a URL.
  13. EXTERNAL = 3;
  14. }
  15. message ResourcePayload {
  16. oneof payload {
  17. S3Object s3_object = 1;
  18. }
  19. message S3Object {
  20. StorageS3Config s3_config = 1;
  21. // key is the S3 object key.
  22. string key = 2;
  23. // last_presigned_time is the last time the object was presigned.
  24. // This is used to determine if the presigned URL is still valid.
  25. google.protobuf.Timestamp last_presigned_time = 3;
  26. }
  27. }