Files
sam 0dae907dad refactor(state)!: split StateStoreService into per-domain services
One gRPC service per domain in state.v1 (tasks, executions, accounts, identities, packages, captures, bindings, access, orgs, alerts and so on), each with its own server type in staterpc. RPC and message names and numbers are unchanged.
2026-10-25 19:54:27 +11:00

66 lines
2.1 KiB
Protocol Buffer

syntax = "proto3";
package state.v1;
import "google/protobuf/timestamp.proto";
// Sources: the capture endpoint and its signing setting. Secrets travel in
// plaintext; the store encrypts at rest.
service SourceService {
rpc InsertSource(InsertSourceRequest) returns (InsertSourceResponse);
rpc GetSource(GetSourceRequest) returns (GetSourceResponse);
rpc ListSources(ListSourcesRequest) returns (ListSourcesResponse);
rpc SetSourceSigning(SetSourceSigningRequest) returns (SetSourceSigningResponse);
rpc SetSourceSecret(SetSourceSecretRequest) returns (SetSourceSecretResponse);
rpc SetSourceName(SetSourceNameRequest) returns (SetSourceNameResponse);
rpc SetSourceDeliveryHeader(SetSourceDeliveryHeaderRequest) returns (SetSourceDeliveryHeaderResponse);
rpc DeleteSource(DeleteSourceRequest) returns (DeleteSourceResponse);
}
// Source mirrors internal/domain/source.Source.
message Source {
string path = 1;
string signing = 2;
string secret = 3;
google.protobuf.Timestamp created_at = 4;
google.protobuf.Timestamp updated_at = 5;
string name = 6;
string delivery_header = 7;
// org_id is the source's owning org, read-only here. workspace_id is the
// org's workspace it is created in, the default one when empty.
string org_id = 8;
string workspace_id = 9;
}
message SetSourceNameRequest {
string path = 1;
string name = 2;
}
message SetSourceNameResponse {}
message SetSourceDeliveryHeaderRequest {
string path = 1;
string header = 2;
}
message SetSourceDeliveryHeaderResponse {}
message DeleteSourceRequest { string path = 1; }
message DeleteSourceResponse {}
message InsertSourceRequest { Source source = 1; }
message InsertSourceResponse {}
message GetSourceRequest { string path = 1; }
message GetSourceResponse {
Source source = 1;
bool found = 2;
}
message ListSourcesRequest {}
message ListSourcesResponse { repeated Source sources = 1; }
message SetSourceSigningRequest {
string path = 1;
string from = 2;
string to = 3;
}
message SetSourceSigningResponse {}
message SetSourceSecretRequest {
string path = 1;
string secret = 2;
}
message SetSourceSecretResponse {}