syntax = "proto3"; import "google/protobuf/timestamp.proto"; package rove; service Rove { rpc ValidateSeries (ValidateSeriesRequest) returns (stream ValidateSeriesResponse) {} rpc ValidateSpatial (ValidateSpatialRequest) returns (stream ValidateSpatialResponse) {} } message GeoPoint { float lat = 1; float lon = 2; } enum Flag { // WIP PASS = 0; FAIL = 1; WARN = 2; INCONCLUSIVE = 3; INVALID = 4; DATA_MISSING = 5; ISOLATED = 6; } // tests a time series between start_time and end_time message ValidateSeriesRequest { // resource locator of the form : // e.g. oda:123456 where oda is a data source known to the system, and 123456 // is a timeseries ID in oda string series_id = 1; // if not provided, the start of the time series will be used optional google.protobuf.Timestamp start_time = 2; // if not provided, the end of the time series will be used optional google.protobuf.Timestamp end_time = 3; // list of the names of tests to be run on the data repeated string tests = 4; } // tests a time slice with optional list of data sources to use, and a list of // coordinates that define a polygon representing the area to be tested message ValidateSpatialRequest { // resource locator of the form : // e.g. frost:air_temperature where frost is a data source known to the system, // and air_temperature is the element for the call to get data string spatial_id = 1; // extra data sources providing data to help qc the first source, but he data // from these sources will not be qced themselves repeated string backing_sources = 2; google.protobuf.Timestamp time = 3; repeated string tests = 4; // if not provided, the whole globe will be used repeated GeoPoint polygon = 5; } message SeriesTestResult { google.protobuf.Timestamp time = 1; Flag flag = 2; } message ValidateSeriesResponse { // name of the test this flag is from string test = 1; // results for each data point in the series, paired with timestamps to // identify the point repeated SeriesTestResult results = 2; } message SpatialTestResult { // TODO: maybe this should contain the series ID? GeoPoint location = 1; Flag flag = 2; } message ValidateSpatialResponse { // name of the test this flag is from string test = 1; // results for each data point in the series, paired with geopoints to // identify the point repeated SpatialTestResult results = 2; }