67 lines
2.3 KiB
Protocol Buffer
67 lines
2.3 KiB
Protocol Buffer
syntax = "proto3";
|
|
|
|
package state.v1;
|
|
|
|
import "google/protobuf/timestamp.proto";
|
|
|
|
service BindingService {
|
|
rpc InsertBinding(InsertBindingRequest) returns (InsertBindingResponse);
|
|
rpc GetBinding(GetBindingRequest) returns (GetBindingResponse);
|
|
rpc ListBindings(ListBindingsRequest) returns (ListBindingsResponse);
|
|
rpc UpdateBinding(UpdateBindingRequest) returns (UpdateBindingResponse);
|
|
rpc DeleteBinding(DeleteBindingRequest) returns (DeleteBindingResponse);
|
|
rpc ApproveBinding(ApproveBindingRequest) returns (ApproveBindingResponse);
|
|
rpc PauseBinding(PauseBindingRequest) returns (PauseBindingResponse);
|
|
rpc ResumeBinding(ResumeBindingRequest) returns (ResumeBindingResponse);
|
|
}
|
|
|
|
// BindingMatcher mirrors internal/domain/binding.Matcher.
|
|
message BindingMatcher {
|
|
string source = 1;
|
|
}
|
|
// Binding mirrors internal/domain/binding.Binding.
|
|
message Binding {
|
|
string id = 1;
|
|
string name = 2;
|
|
BindingMatcher matcher = 3;
|
|
string mapping_id = 4;
|
|
string workflow = 5;
|
|
string owner = 6;
|
|
string repo = 7;
|
|
int64 version = 8;
|
|
string status = 9;
|
|
reserved 10;
|
|
reserved "secret";
|
|
google.protobuf.Timestamp created_at = 11;
|
|
google.protobuf.Timestamp updated_at = 12;
|
|
string filter = 13;
|
|
// inputs_json assigns workflow inputs, a JSON object of
|
|
// {"param": name} or {"value": constant} per input.
|
|
string inputs_json = 14;
|
|
// repo_param names the mapped parameter holding "owner/name".
|
|
string repo_param = 15;
|
|
// org_id is the org that owns the binding; it is read-only here.
|
|
string org_id = 16;
|
|
// workspace_id is its source's workspace; read-only here.
|
|
string workspace_id = 17;
|
|
}
|
|
message InsertBindingRequest { Binding binding = 1; }
|
|
message InsertBindingResponse { string id = 1; }
|
|
message GetBindingRequest { string id = 1; }
|
|
message GetBindingResponse {
|
|
Binding binding = 1;
|
|
bool found = 2;
|
|
}
|
|
message ListBindingsRequest {}
|
|
message ListBindingsResponse { repeated Binding bindings = 1; }
|
|
message UpdateBindingRequest { Binding binding = 1; }
|
|
message UpdateBindingResponse {}
|
|
message DeleteBindingRequest { string id = 1; }
|
|
message DeleteBindingResponse {}
|
|
message ApproveBindingRequest { string id = 1; }
|
|
message ApproveBindingResponse {}
|
|
message PauseBindingRequest { string id = 1; }
|
|
message PauseBindingResponse {}
|
|
message ResumeBindingRequest { string id = 1; }
|
|
message ResumeBindingResponse {}
|