diff options
author | Jonas Wälter <jonas.waelter@noser.com> | 2021-07-19 12:39:25 +0300 |
---|---|---|
committer | Zeger-Jan van de Weg <git@zjvandeweg.nl> | 2021-07-19 12:39:25 +0300 |
commit | de87a43f03d13fabb9db6e4123562cf8dbfc6f36 (patch) | |
tree | cb9fa035fcfa53b9a25c5baabef9c5cb92dc1fd1 /proto/ref.proto | |
parent | acd3f8e4903958d92ebece465453f2d14c22d177 (diff) |
Add GetTagSignatures RPC
Diffstat (limited to 'proto/ref.proto')
-rw-r--r-- | proto/ref.proto | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/proto/ref.proto b/proto/ref.proto index 7e4200969..122088302 100644 --- a/proto/ref.proto +++ b/proto/ref.proto @@ -88,6 +88,16 @@ service RefService { }; } + // GetTagSignatures returns signatures for annotated tags resolved from a set of revisions. Revisions + // which don't resolve to an annotated tag are silently discarded. Revisions which cannot be resolved + // result in an error. Tags which are annotated but not signed will return a TagSignature response + // which has no signature, but its unsigned contents will still be returned. + rpc GetTagSignatures(GetTagSignaturesRequest) returns (stream GetTagSignaturesResponse) { + option (op_type) = { + op: ACCESSOR + }; + } + rpc GetTagMessages(GetTagMessagesRequest) returns (stream GetTagMessagesResponse) { option (op_type) = { op: ACCESSOR @@ -317,6 +327,37 @@ message ListTagNamesContainingCommitResponse { repeated bytes tag_names = 2; } +// GetTagSignaturesRequest is a request for the GetTagSignatures RPC. +message GetTagSignaturesRequest { + // Repository is the repository in which tag signatures should be looked up. + Repository repository = 1 [(target_repository)=true]; + // TagRevisions is the set of revisions which that should be looked up. Revisions + // supports the syntax as specified by gitrevisions(7). All revisions are expected + // to resolve to annotated tag objects. At least one revision must be provided. + repeated string tag_revisions = 2; +} + +// GetTagSignaturesResponse is a response for a GetTagSignatures request. Each response +// may contain multiple TagSignatures. In case TagSignatures don't fit into a single +// response, signatures will be batched in multiple responses. +message GetTagSignaturesResponse { + // TagSignature represents the signature of a signed tag. + message TagSignature { + // TagId is the resolved object ID of the tag. + string tag_id = 1; + // Signature contains the cryptographic signature of the tag. If the tag is not + // cryptographically signed, then the signature is unset. + bytes signature = 2; + // Content contains the contents which are signed by the signature. Contents + // include both the commit message, but also the commit metadata like author and + // subject. + bytes content = 3; + } + + // Signatures is the set of signatures found. + repeated TagSignature signatures = 1; +} + message GetTagMessagesRequest { reserved 2; reserved "tag_names"; |