51 lines
980 B
Protocol Buffer
51 lines
980 B
Protocol Buffer
syntax = "proto3";
|
|
|
|
package main;
|
|
|
|
import "google/protobuf/timestamp.proto";
|
|
import "google/api/annotations.proto";
|
|
|
|
option go_package = "git.vdhsn.com/barretthousen/barretthousen/src/runner/api/grpc";
|
|
|
|
service Runner {
|
|
rpc StartSync(SyncParameters) returns (SyncStatus) {
|
|
option (google.api.http) = {
|
|
put: "/v1/sync"
|
|
body: "*"
|
|
};
|
|
}
|
|
|
|
rpc Status(StatusFilter) returns (SyncStatusList) {
|
|
option (google.api.http) = {
|
|
get: "/v1/sync"
|
|
};
|
|
}
|
|
}
|
|
|
|
message SyncParameters {
|
|
string targetSite = 1;
|
|
}
|
|
|
|
message SyncStatus {
|
|
int32 id = 1;
|
|
google.protobuf.Timestamp createdTs = 2;
|
|
google.protobuf.Timestamp completedTs = 3;
|
|
int32 auctionsFound = 4;
|
|
string targetSiteName = 5;
|
|
string errors = 6;
|
|
}
|
|
|
|
message StatusFilter {
|
|
int32 page = 1;
|
|
int32 limit = 2;
|
|
}
|
|
|
|
message SyncStatusList {
|
|
repeated SyncStatus active = 1;
|
|
repeated SyncStatus complete = 2;
|
|
int32 page = 3;
|
|
int32 total = 4;
|
|
int32 activeTotal = 5;
|
|
int32 completeTotal = 6;
|
|
}
|