blob: abf3db6754d5d10a59b6d1e26ae082ff6842eebc [file] [log] [blame]
syntax = "proto3";
package cobalt.observation_store;
import "src/pb/encrypted_message.proto";
import "src/pb/observation.proto";
import "src/pb/observation_batch.proto";
// A StoredObservationBatch is similar to an ObservationBatch except that the observations it
// contains may or may not be encrypted. It is used internally by ObservationStore.
message StoredObservationBatch {
ObservationMetadata meta_data = 1;
repeated StoredObservation observation = 2;
}
// A StoredObservation contains data about one observation that is stored in an ObservationStore.
message StoredObservation {
oneof observation {
EncryptedMessage encrypted = 1;
Observation unencrypted = 2;
}
bytes contribution_id = 3;
}
// FileObservationStoreRecord is used internally by FileObservationStore for serializing protos into
// files. It allows writing either a meta_data or an encrypted_observation so they can later be
// reconstructed into an Envelope.
message FileObservationStoreRecord {
oneof contents {
ObservationMetadata meta_data = 1;
EncryptedMessage encrypted_observation = 2;
Observation unencrypted_observation = 3;
}
bytes contribution_id = 4;
}