1000f8a80d
- Add gRPC service modules: auth, channel, channel settings, member, permission - Update protobuf definitions and generated code - Remove immediate/ real-time module (superseded by IM service) - Update etcd discovery and registration - Update cache, error, config, and build infrastructure - Add ADR documentation - Update OpenAPI spec
61 lines
1.4 KiB
Protocol Buffer
61 lines
1.4 KiB
Protocol Buffer
syntax = "proto3";
|
|
|
|
package gitks;
|
|
|
|
import "repository.proto";
|
|
|
|
// HookService provides gRPC callback hooks for git operations.
|
|
// External services can implement this interface to receive hook callbacks.
|
|
service HookService {
|
|
// Pre-receive hook callback: validate push before it happens.
|
|
rpc PreReceiveHook(PreReceiveHookRequest) returns (PreReceiveHookResponse);
|
|
|
|
// Update hook callback: validate each ref update individually.
|
|
rpc UpdateHook(UpdateHookRequest) returns (UpdateHookResponse);
|
|
|
|
// Post-receive hook callback: notify after push has completed.
|
|
rpc PostReceiveHook(PostReceiveHookRequest) returns (PostReceiveHookResponse);
|
|
}
|
|
|
|
message PreReceiveHookRequest {
|
|
RepositoryHeader repository = 1;
|
|
repeated RefUpdate ref_updates = 2;
|
|
string push_options = 3;
|
|
}
|
|
|
|
message PreReceiveHookResponse {
|
|
bool accept = 1;
|
|
string rejection_message = 2;
|
|
}
|
|
|
|
message UpdateHookRequest {
|
|
RepositoryHeader repository = 1;
|
|
string ref_name = 2;
|
|
string old_oid = 3;
|
|
string new_oid = 4;
|
|
}
|
|
|
|
message UpdateHookResponse {
|
|
bool accept = 1;
|
|
string rejection_message = 2;
|
|
}
|
|
|
|
message PostReceiveHookRequest {
|
|
RepositoryHeader repository = 1;
|
|
repeated RefUpdate ref_updates = 2;
|
|
}
|
|
|
|
message PostReceiveHookResponse {
|
|
repeated HookAction actions = 1;
|
|
}
|
|
|
|
message RefUpdate {
|
|
string old_oid = 1;
|
|
string new_oid = 2;
|
|
string ref_name = 3;
|
|
}
|
|
|
|
message HookAction {
|
|
string action_type = 1; // "trigger_ci", "update_index", etc.
|
|
string payload = 2;
|
|
} |