-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
49 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
syntax = "proto3"; | ||
|
||
package o5.builder.v1; | ||
|
||
import "buf/validate/validate.proto"; | ||
import "google/protobuf/empty.proto"; | ||
import "google/protobuf/timestamp.proto"; | ||
import "j5/source/v1/config.proto"; | ||
import "o5/messaging/v1/annotations.proto"; | ||
|
||
option go_package = "github.com/pentops/o5-go/builder/v1/builder_pb"; | ||
|
||
service BuilderTopic { | ||
option (o5.messaging.v1.config).unicast.name = "j5-builder-input"; | ||
rpc BuildProto(BuildProtoMessage) returns (google.protobuf.Empty) {} | ||
rpc BuildAPI(BuildAPIMessage) returns (google.protobuf.Empty) {} | ||
} | ||
|
||
message CommitInfo { | ||
string owner = 1 [(buf.validate.field).required = true]; | ||
string repo = 2 [(buf.validate.field).required = true]; | ||
string hash = 3 [(buf.validate.field).required = true]; | ||
|
||
google.protobuf.Timestamp time = 4 [(buf.validate.field).required = true]; | ||
repeated string aliases = 5; | ||
} | ||
|
||
message CheckRun { | ||
string name = 1; | ||
int64 id = 2; | ||
} | ||
|
||
message BuildProtoMessage { | ||
CommitInfo commit = 1 [(buf.validate.field).required = true]; | ||
CheckRun check_run = 2 [(buf.validate.field).required = true]; | ||
|
||
// contains one single proto build definition, otherwise is the config | ||
// as pulled from the source. | ||
j5.source.v1.Config config = 3 [(buf.validate.field).required = true]; | ||
} | ||
|
||
message BuildAPIMessage { | ||
CommitInfo commit = 1 [(buf.validate.field).required = true]; | ||
CheckRun check_run = 2 [(buf.validate.field).required = true]; | ||
|
||
// contains fields relating to JSON API build, i.e. excludes other build | ||
// configs. | ||
j5.source.v1.Config config = 3 [(buf.validate.field).required = true]; | ||
} |