diff options
author | Patrick Steinhardt <psteinhardt@gitlab.com> | 2021-05-19 18:27:28 +0300 |
---|---|---|
committer | Patrick Steinhardt <psteinhardt@gitlab.com> | 2021-05-19 18:40:29 +0300 |
commit | f597557e404f60f70b86498f6c4f4ad9416b6522 (patch) | |
tree | 07ca62c00ebeae3b9386cb3246f4c6393fb85f31 /proto/repository-service.proto | |
parent | 1094a54dd669f6b3039428027b6e760fbc9428db (diff) |
repository: Implement new `GetConfig()` RPC
We're about to introduce replication of the gitconfig, and for this
we need an RPC to read a remote repo's gitconfig. This commit thus
introduces a new `GetConfig()` RPC which streams back the complete
contents of the remote config.
Diffstat (limited to 'proto/repository-service.proto')
-rw-r--r-- | proto/repository-service.proto | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/proto/repository-service.proto b/proto/repository-service.proto index 6ca36ca03..6d6d580df 100644 --- a/proto/repository-service.proto +++ b/proto/repository-service.proto @@ -125,16 +125,27 @@ service RepositoryService { op: MUTATOR }; } + + // GetConfig reads the target repository's gitconfig and streams its contents + // back. Returns a NotFound error in case no gitconfig was found. + rpc GetConfig(GetConfigRequest) returns (stream GetConfigResponse) { + option (op_type) = { + op: ACCESSOR + }; + } + rpc SetConfig(SetConfigRequest) returns (SetConfigResponse) { option (op_type) = { op: MUTATOR }; } + rpc DeleteConfig(DeleteConfigRequest) returns (DeleteConfigResponse) { option (op_type) = { op: MUTATOR }; } + rpc FindLicense(FindLicenseRequest) returns (FindLicenseResponse) { option (op_type) = { op: ACCESSOR @@ -480,6 +491,19 @@ message CreateBundleResponse { bytes data = 1; } +// GetConfigRequest is a request for the GetConfig RPC. +message GetConfigRequest { + // Repository is the repository from which the configuration should be read + // from. + Repository repository = 1 [(target_repository)=true]; +} + +// GetConfigResponse is a response for the GetConfig RPC. +message GetConfigResponse { + // Data contains contents of the gitconfig. + bytes data = 1; +} + message SetConfigRequest { Repository repository = 1 [(target_repository)=true]; message Entry { |