memos/proto/store/resource.proto

31 lines
656 B
Protocol Buffer
Raw Permalink Normal View History

2024-05-02 16:28:06 +03:00
syntax = "proto3";
package memos.store;
import "google/protobuf/timestamp.proto";
2024-05-17 03:50:02 +03:00
import "store/workspace_setting.proto";
2024-05-02 16:28:06 +03:00
option go_package = "gen/store";
enum ResourceStorageType {
RESOURCE_STORAGE_TYPE_UNSPECIFIED = 0;
LOCAL = 1;
S3 = 2;
EXTERNAL = 3;
}
message ResourcePayload {
oneof payload {
S3Object s3_object = 1;
}
message S3Object {
2024-05-17 03:50:02 +03:00
StorageS3Config s3_config = 1;
2024-05-02 17:21:49 +03:00
// key is the S3 object key.
2024-05-17 03:50:02 +03:00
string key = 2;
2024-05-02 17:21:49 +03:00
// last_presigned_time is the last time the object was presigned.
// This is used to determine if the presigned URL is still valid.
2024-05-17 03:50:02 +03:00
google.protobuf.Timestamp last_presigned_time = 3;
2024-05-02 16:28:06 +03:00
}
}