syntax = "proto3"; package memos.store; import "store/instance_setting.proto"; option go_package = "gen/store"; enum AttachmentStorageType { ATTACHMENT_STORAGE_TYPE_UNSPECIFIED = 0; // Attachment is stored locally. AKA, local file system. LOCAL = 1; // Attachment is stored in S3. S3 = 2; // Attachment is stored in an external storage. The reference is a URL. EXTERNAL = 3; } enum MotionMediaFamily { MOTION_MEDIA_FAMILY_UNSPECIFIED = 0; APPLE_LIVE_PHOTO = 1; ANDROID_MOTION_PHOTO = 2; } enum MotionMediaRole { MOTION_MEDIA_ROLE_UNSPECIFIED = 0; STILL = 1; VIDEO = 2; CONTAINER = 3; } message MotionMedia { MotionMediaFamily family = 1; MotionMediaRole role = 2; string group_id = 3; int64 presentation_timestamp_us = 4; bool has_embedded_video = 5; } message MediaMetadata { optional int32 width = 1; optional int32 height = 2; oneof details { PhotoMetadata photo = 3; VideoMetadata video = 4; } } message PhotoMetadata { MediaCaptureTime capture_time = 1; MediaLocation location = 2; optional int32 source_exif_orientation = 3; string camera_make = 4; string camera_model = 5; string lens_model = 6; optional double f_number = 7; optional double exposure_time_seconds = 8; optional int32 iso = 9; optional double focal_length_mm = 10; } message MediaCaptureTime { string local_date_time = 1; optional string utc_offset = 2; } message MediaLocation { optional double latitude = 1; optional double longitude = 2; optional double altitude_meters = 3; } message VideoMetadata { optional double duration_seconds = 1; } message AttachmentPayload { oneof payload { S3Object s3_object = 1; } MotionMedia motion_media = 10; MediaMetadata media_metadata = 11; message S3Object { // Legacy attachments embedded their complete S3 configuration. // New attachments resolve storage through storage_id. StorageS3Config s3_config = 1; // key is the S3 object key. string key = 2; // Field 3 held last_presigned_time before presigned attachment URLs were removed. reserved 3; reserved "last_presigned_time"; // storage_id identifies the configured storage containing this object. string storage_id = 4; } }