[Tags] Improvements towards creation / listing /deletion (#220)

This commit is contained in:
Johannes Batzill 2023-07-25 00:04:47 +00:00 committed by Harness
parent 33cf26683d
commit c7e3620de9
19 changed files with 530 additions and 371 deletions

View File

@ -17,7 +17,7 @@ type Interface interface {
GetSubmodule(ctx context.Context, params *GetSubmoduleParams) (*GetSubmoduleOutput, error)
GetBlob(ctx context.Context, params *GetBlobParams) (*GetBlobOutput, error)
CreateBranch(ctx context.Context, params *CreateBranchParams) (*CreateBranchOutput, error)
CreateTag(ctx context.Context, params *CreateTagParams) (*CreateTagOutput, error)
CreateCommitTag(ctx context.Context, params *CreateCommitTagParams) (*CreateCommitTagOutput, error)
DeleteTag(ctx context.Context, params *DeleteTagParams) error
GetBranch(ctx context.Context, params *GetBranchParams) (*GetBranchOutput, error)
DeleteBranch(ctx context.Context, params *DeleteBranchParams) error

View File

@ -39,16 +39,38 @@ func (g Adapter) GetAnnotatedTags(ctx context.Context, repoPath string, shas []s
return giteaGetAnnotatedTags(ctx, repoPath, shas)
}
func (g Adapter) CreateAnnotatedTag(
// CreateTag creates the tag pointing at the provided SHA (could be any type, e.g. commit, tag, blob, ...)
func (g Adapter) CreateTag(
ctx context.Context,
repoPath string,
request *types.CreateTagRequest,
name string,
targetSHA string,
opts *types.CreateTagOptions,
) error {
cmd := gitea.NewCommand(ctx, "tag", "-a", "-m", request.Message, "--", request.Name, request.TargetSha)
env := []string{
"GIT_COMMITTER_NAME=" + request.TaggerName,
"GIT_COMMITTER_EMAIL=" + request.TaggerEmail,
args := []string{
"tag",
}
env := []string{}
if opts != nil && opts.Message != "" {
args = append(args,
"-m",
opts.Message,
)
env = append(env,
"GIT_COMMITTER_NAME="+opts.Tagger.Identity.Name,
"GIT_COMMITTER_EMAIL="+opts.Tagger.Identity.Email,
"GIT_COMMITTER_DATE="+opts.Tagger.When.Format(time.RFC3339),
)
}
args = append(args,
"--",
name,
targetSHA,
)
cmd := gitea.NewCommand(ctx, args...)
_, _, err := cmd.RunStdString(&gitea.RunOpts{Dir: repoPath, Env: env})
if err != nil {
return processGiteaErrorf(err, "Service failed to create a tag")

View File

@ -62,7 +62,7 @@ func (s ReferenceService) CreateBranch(ctx context.Context,
}
// get target commit (as target could be branch/tag/commit, and tag can't be pushed using source:destination syntax)
targetCommit, err := sharedRepo.GetCommit(strings.TrimSpace(request.GetTarget()))
targetCommit, err := s.adapter.GetCommit(ctx, sharedRepo.tmpPath, strings.TrimSpace(request.GetTarget()))
if git.IsErrNotExist(err) {
return nil, ErrNotFoundf("target '%s' doesn't exist", request.GetTarget())
}
@ -71,7 +71,7 @@ func (s ReferenceService) CreateBranch(ctx context.Context,
}
// push to new branch (all changes should go through push flow for hooks and other safety meassures)
err = sharedRepo.PushCommitToBranch(ctx, base, targetCommit.ID.String(), request.GetBranchName())
err = sharedRepo.PushCommitToBranch(ctx, base, targetCommit.SHA, request.GetBranchName())
if err != nil {
return nil, processGitErrorf(err, "failed to push new branch '%s'", request.GetBranchName())
}

View File

@ -41,7 +41,7 @@ type GitAdapter interface {
GetFullCommitID(ctx context.Context, repoPath, shortID string) (string, error)
GetAnnotatedTag(ctx context.Context, repoPath string, sha string) (*types.Tag, error)
GetAnnotatedTags(ctx context.Context, repoPath string, shas []string) ([]types.Tag, error)
CreateAnnotatedTag(ctx context.Context, repoPath string, request *types.CreateTagRequest) error
CreateTag(ctx context.Context, repoPath string, name string, targetSHA string, opts *types.CreateTagOptions) error
GetBranch(ctx context.Context, repoPath string, branchName string) (*types.Branch, error)
GetCommitDivergences(ctx context.Context, repoPath string,
requests []types.CommitDivergenceRequest, max int32) ([]types.CommitDivergence, error)

View File

@ -156,10 +156,11 @@ func mapRenameDetails(renameDetails []types.PathRenameDetails) []*rpc.RenameDeta
return renameDetailsList
}
func mapCommitTag(tag *types.Tag) *rpc.CommitTag {
func mapAnnotatedTag(tag *types.Tag) *rpc.CommitTag {
return &rpc.CommitTag{
Name: tag.Name,
Sha: tag.Sha,
Title: tag.Title,
Message: tag.Message,
Tagger: mapGitSignature(tag.Tagger),
IsAnnotated: true,

View File

@ -6,7 +6,10 @@ package service
import (
"context"
"errors"
"fmt"
"strings"
"time"
"github.com/harness/gitness/gitrpc/internal/types"
"github.com/harness/gitness/gitrpc/rpc"
@ -46,31 +49,53 @@ func (s ReferenceService) ListCommitTags(request *rpc.ListCommitTagsRequest,
}
}
// populate annotation data for all annotated tags
if len(annotatedTagSHAs) > 0 {
var gitTags []types.Tag
gitTags, err = s.adapter.GetAnnotatedTags(ctx, repoPath, annotatedTagSHAs)
var aTags []types.Tag
aTags, err = s.adapter.GetAnnotatedTags(ctx, repoPath, annotatedTagSHAs)
if err != nil {
return processGitErrorf(err, "failed to get annotated tag")
}
ai := 0 // since only some tags are annotated, we need second index
for i := range tags {
if !tags[i].IsAnnotated {
ai := 0 // index for annotated tags
ri := 0 // read index for all tags
wi := 0 // write index for all tags (as we might remove some non-commit tags)
for ; ri < len(tags); ri++ {
// always copy the current read element to the latest write position (doesn't mean it's kept)
tags[wi] = tags[ri]
commitSHAs[wi] = commitSHAs[ri]
// keep the tag as is if it's not annotated
if !tags[ri].IsAnnotated {
wi++
continue
}
// filter out annotated tags that don't point to commit objects (blobs, trees, nested tags, ...)
// we don't actually wanna write it, so keep write index
// TODO: Support proper pagination: https://harness.atlassian.net/browse/CODE-669
if aTags[ai].TargetType != types.GitObjectTypeCommit {
ai++
continue
}
// correct the commitSHA for the annotated tag (currently it is the tag sha, not the commit sha)
// NOTE: This is required as otherwise gitea will wrongly set the committer to the tagger signature.
commitSHAs[i] = gitTags[ai].TargetSha
commitSHAs[wi] = aTags[ai].TargetSha
// update tag information with annotation details
// NOTE: we keep the name from the reference and ignore the annotated name (similar to github)
tags[i].Message = gitTags[ai].Message
tags[i].Title = gitTags[ai].Title
tags[i].Tagger = mapGitSignature(gitTags[ai].Tagger)
tags[wi].Message = aTags[ai].Message
tags[wi].Title = aTags[ai].Title
tags[wi].Tagger = mapGitSignature(aTags[ai].Tagger)
ai++
wi++
}
// truncate slices based on what was removed
tags = tags[:wi]
commitSHAs = commitSHAs[:wi]
}
// get commits if needed (single call for perf savings: 1s-4s vs 5s-20s)
@ -185,10 +210,10 @@ func listCommitTagsWalkReferencesHandler(tags *[]*rpc.CommitTag) types.WalkRefer
return nil
}
}
func (s ReferenceService) CreateTag(
func (s ReferenceService) CreateCommitTag(
ctx context.Context,
request *rpc.CreateTagRequest,
) (*rpc.CreateTagResponse, error) {
request *rpc.CreateCommitTagRequest,
) (*rpc.CreateCommitTagResponse, error) {
base := request.GetBase()
if base == nil {
return nil, types.ErrBaseCannotBeEmpty
@ -208,35 +233,87 @@ func (s ReferenceService) CreateTag(
defer sharedRepo.Close(ctx)
// clone repo (with HEAD branch - target might be anything)
err = sharedRepo.Clone(ctx, "")
if err != nil {
return nil, processGitErrorf(err, "failed to clone shared repo with branch '%s'", request.GetSha())
return nil, processGitErrorf(err, "failed to clone shared repo")
}
actor := request.GetBase().GetActor()
createTagRequest := types.CreateTagRequest{
Name: request.GetTagName(),
TargetSha: request.GetSha(),
Message: request.GetMessage(),
TaggerEmail: actor.GetEmail(),
TaggerName: actor.GetName(),
}
err = s.adapter.CreateAnnotatedTag(ctx, sharedRepo.tmpPath, &createTagRequest)
// get target commit (as target could be branch/tag/commit, and tag can't be pushed using source:destination syntax)
// NOTE: in case the target is an annotated tag, the targetCommit title and message are that of the tag, not the commit
targetCommit, err := s.adapter.GetCommit(ctx, sharedRepo.tmpPath, strings.TrimSpace(request.GetTarget()))
if git.IsErrNotExist(err) {
return nil, ErrNotFoundf("target '%s' doesn't exist", request.GetTarget())
}
if err != nil {
return nil, processGitErrorf(err, "Failed to create tag %s - %s", request.GetTagName(), err.Error())
return nil, fmt.Errorf("failed to get commit id for target '%s': %w", request.GetTarget(), err)
}
tagger := base.GetActor()
if request.GetTagger() != nil {
tagger = request.GetTagger()
}
taggerDate := time.Now().UTC()
if request.GetTaggerDate() != 0 {
taggerDate = time.Unix(request.GetTaggerDate(), 0)
}
createTagRequest := &types.CreateTagOptions{
Message: request.GetMessage(),
Tagger: types.Signature{
Identity: types.Identity{
Name: tagger.Name,
Email: tagger.Email,
},
When: taggerDate,
},
}
err = s.adapter.CreateTag(
ctx,
sharedRepo.tmpPath,
request.GetTagName(),
targetCommit.SHA,
createTagRequest)
if errors.Is(err, types.ErrAlreadyExists) {
return nil, ErrAlreadyExistsf("tag '%s' already exists", request.GetTagName())
}
if err != nil {
return nil, processGitErrorf(err, "Failed to create tag '%s'", request.GetTagName())
}
if err = sharedRepo.PushTag(ctx, base, request.GetTagName()); err != nil {
return nil, processGitErrorf(err, "Failed to push the tag %s to remote", request.GetTagName())
return nil, processGitErrorf(err, "Failed to push the tag to remote")
}
tag, err := s.adapter.GetAnnotatedTag(ctx, repoPath, request.GetTagName())
var commitTag *rpc.CommitTag
if request.GetMessage() != "" {
tag, err := s.adapter.GetAnnotatedTag(ctx, repoPath, request.GetTagName())
if err != nil {
return nil, fmt.Errorf("failed to read annotated tag after creation: %w", err)
}
commitTag = mapAnnotatedTag(tag)
} else {
commitTag = &rpc.CommitTag{
Name: request.GetTagName(),
IsAnnotated: false,
Sha: targetCommit.SHA,
}
}
// gitea overwrites some commit details in case getCommit(ref) was called with ref being a tag
// To avoid this issue, let's get the commit again using the actual id of the commit
// TODO: can we do this nicer?
rawCommit, err := s.adapter.GetCommit(ctx, repoPath, targetCommit.SHA)
if err != nil {
return nil, err
return nil, fmt.Errorf("failed to get the raw commit '%s' after tag creation: %w", targetCommit.SHA, err)
}
commitTag := mapCommitTag(tag)
return &rpc.CreateTagResponse{Tag: commitTag}, nil
commitTag.Commit, err = mapGitCommit(rawCommit)
if err != nil {
return nil, fmt.Errorf("failed to map target commit after tag creation: %w", err)
}
return &rpc.CreateCommitTagResponse{Tag: commitTag}, nil
}
func (s ReferenceService) DeleteTag(
@ -262,7 +339,8 @@ func (s ReferenceService) DeleteTag(
defer sharedRepo.Close(ctx)
err = sharedRepo.Clone(ctx, request.GetTagName())
// clone repo (with HEAD branch - tag target might be anything)
err = sharedRepo.Clone(ctx, "")
if err != nil {
return nil, processGitErrorf(err, "failed to clone shared repo with tag '%s'", request.GetTagName())
}

View File

@ -150,12 +150,13 @@ type Tag struct {
Tagger Signature
}
type CreateTagRequest struct {
Name string
TargetSha string
Message string
TaggerName string
TaggerEmail string
type CreateTagOptions struct {
// Message is the optional message the tag will be created with - if the message is empty
// the tag will be lightweight, otherwise it'll be annotated.
Message string
// Tagger is the information used in case the tag is annotated (Message is provided).
Tagger Signature
}
// Signature represents the Author or Committer information.

View File

@ -23,13 +23,17 @@ type MergeParams struct {
Title string
Message string
// Committer overwrites the git committer used for committing the files (optional, default: actor)
// Committer overwrites the git committer used for committing the files
// (optional, default: actor)
Committer *Identity
// CommitterDate overwrites the git committer date used for committing the files (optional, default: current time)
// CommitterDate overwrites the git committer date used for committing the files
// (optional, default: current time on server)
CommitterDate *time.Time
// Author overwrites the git author used for committing the files (optional, default: committer)
// Author overwrites the git author used for committing the files
// (optional, default: committer)
Author *Identity
// AuthorDate overwrites the git author date used for committing the files (optional, default: committer date)
// AuthorDate overwrites the git author date used for committing the files
// (optional, default: committer date)
AuthorDate *time.Time
RefType enum.RefType

View File

@ -45,13 +45,17 @@ type CommitFilesParams struct {
NewBranch string
Actions []CommitFileAction
// Committer overwrites the git committer used for committing the files (optional, default: actor)
// Committer overwrites the git committer used for committing the files
// (optional, default: actor)
Committer *Identity
// CommitterDate overwrites the git committer date used for committing the files (optional, default: current time)
// CommitterDate overwrites the git committer date used for committing the files
// (optional, default: current time on server)
CommitterDate *time.Time
// Author overwrites the git author used for committing the files (optional, default: committer)
// Author overwrites the git author used for committing the files
// (optional, default: committer)
Author *Identity
// AuthorDate overwrites the git author date used for committing the files (optional, default: committer date)
// AuthorDate overwrites the git author date used for committing the files
// (optional, default: committer date)
AuthorDate *time.Time
}

View File

@ -11,21 +11,22 @@ service ReferenceService {
rpc DeleteBranch(DeleteBranchRequest) returns (DeleteBranchResponse);
rpc ListBranches(ListBranchesRequest) returns (stream ListBranchesResponse);
rpc ListCommitTags(ListCommitTagsRequest) returns (stream ListCommitTagsResponse);
rpc CreateTag(CreateTagRequest) returns (CreateTagResponse);
rpc CreateCommitTag(CreateCommitTagRequest) returns (CreateCommitTagResponse);
rpc DeleteTag(DeleteTagRequest) returns (UpdateRefResponse);
rpc GetRef(GetRefRequest) returns (GetRefResponse);
rpc UpdateRef(UpdateRefRequest) returns (UpdateRefResponse);
}
message CreateTagRequest {
message CreateCommitTagRequest {
WriteRequest base = 1;
string sha = 2;
string tag_name = 3;
string tag_name = 2;
string target = 3;
string message = 4;
Identity tagger = 5;
int64 taggerDate = 6;
}
message CreateTagResponse {
message CreateCommitTagResponse {
CommitTag tag = 1;
}

View File

@ -34,13 +34,17 @@ type CreateRepositoryParams struct {
DefaultBranch string
Files []File
// Committer overwrites the git committer used for committing the files (optional, default: actor)
// Committer overwrites the git committer used for committing the files
// (optional, default: actor)
Committer *Identity
// CommitterDate overwrites the git committer date used for committing the files (optional, default: current time)
// CommitterDate overwrites the git committer date used for committing the files
// (optional, default: current time on server)
CommitterDate *time.Time
// Author overwrites the git author used for committing the files (optional, default: committer)
// Author overwrites the git author used for committing the files
// (optional, default: committer)
Author *Identity
// AuthorDate overwrites the git author date used for committing the files (optional, default: committer date)
// AuthorDate overwrites the git author date used for committing the files
// (optional, default: committer date)
AuthorDate *time.Time
}

View File

@ -118,19 +118,21 @@ func (ListCommitTagsRequest_SortOption) EnumDescriptor() ([]byte, []int) {
return file_ref_proto_rawDescGZIP(), []int{12, 0}
}
type CreateTagRequest struct {
type CreateCommitTagRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Base *WriteRequest `protobuf:"bytes,1,opt,name=base,proto3" json:"base,omitempty"`
Sha string `protobuf:"bytes,2,opt,name=sha,proto3" json:"sha,omitempty"`
TagName string `protobuf:"bytes,3,opt,name=tag_name,json=tagName,proto3" json:"tag_name,omitempty"`
Message string `protobuf:"bytes,4,opt,name=message,proto3" json:"message,omitempty"`
Base *WriteRequest `protobuf:"bytes,1,opt,name=base,proto3" json:"base,omitempty"`
TagName string `protobuf:"bytes,2,opt,name=tag_name,json=tagName,proto3" json:"tag_name,omitempty"`
Target string `protobuf:"bytes,3,opt,name=target,proto3" json:"target,omitempty"`
Message string `protobuf:"bytes,4,opt,name=message,proto3" json:"message,omitempty"`
Tagger *Identity `protobuf:"bytes,5,opt,name=tagger,proto3" json:"tagger,omitempty"`
TaggerDate int64 `protobuf:"varint,6,opt,name=taggerDate,proto3" json:"taggerDate,omitempty"`
}
func (x *CreateTagRequest) Reset() {
*x = CreateTagRequest{}
func (x *CreateCommitTagRequest) Reset() {
*x = CreateCommitTagRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_ref_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
@ -138,13 +140,13 @@ func (x *CreateTagRequest) Reset() {
}
}
func (x *CreateTagRequest) String() string {
func (x *CreateCommitTagRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*CreateTagRequest) ProtoMessage() {}
func (*CreateCommitTagRequest) ProtoMessage() {}
func (x *CreateTagRequest) ProtoReflect() protoreflect.Message {
func (x *CreateCommitTagRequest) ProtoReflect() protoreflect.Message {
mi := &file_ref_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
@ -156,40 +158,54 @@ func (x *CreateTagRequest) ProtoReflect() protoreflect.Message {
return mi.MessageOf(x)
}
// Deprecated: Use CreateTagRequest.ProtoReflect.Descriptor instead.
func (*CreateTagRequest) Descriptor() ([]byte, []int) {
// Deprecated: Use CreateCommitTagRequest.ProtoReflect.Descriptor instead.
func (*CreateCommitTagRequest) Descriptor() ([]byte, []int) {
return file_ref_proto_rawDescGZIP(), []int{0}
}
func (x *CreateTagRequest) GetBase() *WriteRequest {
func (x *CreateCommitTagRequest) GetBase() *WriteRequest {
if x != nil {
return x.Base
}
return nil
}
func (x *CreateTagRequest) GetSha() string {
if x != nil {
return x.Sha
}
return ""
}
func (x *CreateTagRequest) GetTagName() string {
func (x *CreateCommitTagRequest) GetTagName() string {
if x != nil {
return x.TagName
}
return ""
}
func (x *CreateTagRequest) GetMessage() string {
func (x *CreateCommitTagRequest) GetTarget() string {
if x != nil {
return x.Target
}
return ""
}
func (x *CreateCommitTagRequest) GetMessage() string {
if x != nil {
return x.Message
}
return ""
}
type CreateTagResponse struct {
func (x *CreateCommitTagRequest) GetTagger() *Identity {
if x != nil {
return x.Tagger
}
return nil
}
func (x *CreateCommitTagRequest) GetTaggerDate() int64 {
if x != nil {
return x.TaggerDate
}
return 0
}
type CreateCommitTagResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
@ -197,8 +213,8 @@ type CreateTagResponse struct {
Tag *CommitTag `protobuf:"bytes,1,opt,name=tag,proto3" json:"tag,omitempty"`
}
func (x *CreateTagResponse) Reset() {
*x = CreateTagResponse{}
func (x *CreateCommitTagResponse) Reset() {
*x = CreateCommitTagResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_ref_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
@ -206,13 +222,13 @@ func (x *CreateTagResponse) Reset() {
}
}
func (x *CreateTagResponse) String() string {
func (x *CreateCommitTagResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*CreateTagResponse) ProtoMessage() {}
func (*CreateCommitTagResponse) ProtoMessage() {}
func (x *CreateTagResponse) ProtoReflect() protoreflect.Message {
func (x *CreateCommitTagResponse) ProtoReflect() protoreflect.Message {
mi := &file_ref_proto_msgTypes[1]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
@ -224,12 +240,12 @@ func (x *CreateTagResponse) ProtoReflect() protoreflect.Message {
return mi.MessageOf(x)
}
// Deprecated: Use CreateTagResponse.ProtoReflect.Descriptor instead.
func (*CreateTagResponse) Descriptor() ([]byte, []int) {
// Deprecated: Use CreateCommitTagResponse.ProtoReflect.Descriptor instead.
func (*CreateCommitTagResponse) Descriptor() ([]byte, []int) {
return file_ref_proto_rawDescGZIP(), []int{1}
}
func (x *CreateTagResponse) GetTag() *CommitTag {
func (x *CreateCommitTagResponse) GetTag() *CommitTag {
if x != nil {
return x.Tag
}
@ -1286,184 +1302,190 @@ var File_ref_proto protoreflect.FileDescriptor
var file_ref_proto_rawDesc = []byte{
0x0a, 0x09, 0x72, 0x65, 0x66, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x03, 0x72, 0x70, 0x63,
0x1a, 0x0c, 0x73, 0x68, 0x61, 0x72, 0x65, 0x64, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x80,
0x01, 0x0a, 0x10, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x61, 0x67, 0x52, 0x65, 0x71, 0x75,
0x65, 0x73, 0x74, 0x12, 0x25, 0x0a, 0x04, 0x62, 0x61, 0x73, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28,
0x0b, 0x32, 0x11, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x57, 0x72, 0x69, 0x74, 0x65, 0x52, 0x65, 0x71,
0x75, 0x65, 0x73, 0x74, 0x52, 0x04, 0x62, 0x61, 0x73, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x73, 0x68,
0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x73, 0x68, 0x61, 0x12, 0x19, 0x0a, 0x08,
0x74, 0x61, 0x67, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07,
0x74, 0x61, 0x67, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61,
0x67, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67,
0x65, 0x22, 0x35, 0x0a, 0x11, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x61, 0x67, 0x52, 0x65,
0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x20, 0x0a, 0x03, 0x74, 0x61, 0x67, 0x18, 0x01, 0x20,
0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74,
0x54, 0x61, 0x67, 0x52, 0x03, 0x74, 0x61, 0x67, 0x22, 0x54, 0x0a, 0x10, 0x44, 0x65, 0x6c, 0x65,
0x74, 0x65, 0x54, 0x61, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x25, 0x0a, 0x04,
0x62, 0x61, 0x73, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x72, 0x70, 0x63,
0x2e, 0x57, 0x72, 0x69, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x04, 0x62,
0x61, 0x73, 0x65, 0x12, 0x19, 0x0a, 0x08, 0x74, 0x61, 0x67, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18,
0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x74, 0x61, 0x67, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0x75,
0x0a, 0x13, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x42, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x52, 0x65,
0x1a, 0x0c, 0x73, 0x68, 0x61, 0x72, 0x65, 0x64, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xd3,
0x01, 0x0a, 0x16, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x54,
0x61, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x25, 0x0a, 0x04, 0x62, 0x61, 0x73,
0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x57, 0x72,
0x69, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x04, 0x62, 0x61, 0x73, 0x65,
0x12, 0x19, 0x0a, 0x08, 0x74, 0x61, 0x67, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01,
0x28, 0x09, 0x52, 0x07, 0x74, 0x61, 0x67, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x74,
0x61, 0x72, 0x67, 0x65, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x74, 0x61, 0x72,
0x67, 0x65, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x04,
0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x25, 0x0a,
0x06, 0x74, 0x61, 0x67, 0x67, 0x65, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e,
0x72, 0x70, 0x63, 0x2e, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x52, 0x06, 0x74, 0x61,
0x67, 0x67, 0x65, 0x72, 0x12, 0x1e, 0x0a, 0x0a, 0x74, 0x61, 0x67, 0x67, 0x65, 0x72, 0x44, 0x61,
0x74, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x74, 0x61, 0x67, 0x67, 0x65, 0x72,
0x44, 0x61, 0x74, 0x65, 0x22, 0x3b, 0x0a, 0x17, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x43, 0x6f,
0x6d, 0x6d, 0x69, 0x74, 0x54, 0x61, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12,
0x20, 0x0a, 0x03, 0x74, 0x61, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x72,
0x70, 0x63, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x54, 0x61, 0x67, 0x52, 0x03, 0x74, 0x61,
0x67, 0x22, 0x54, 0x0a, 0x10, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x54, 0x61, 0x67, 0x52, 0x65,
0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x25, 0x0a, 0x04, 0x62, 0x61, 0x73, 0x65, 0x18, 0x01, 0x20,
0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x57, 0x72, 0x69, 0x74, 0x65, 0x52,
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x04, 0x62, 0x61, 0x73, 0x65, 0x12, 0x1f, 0x0a, 0x0b,
0x62, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28,
0x09, 0x52, 0x0a, 0x62, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x16, 0x0a,
0x06, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x74,
0x61, 0x72, 0x67, 0x65, 0x74, 0x22, 0x3b, 0x0a, 0x14, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x42,
0x72, 0x61, 0x6e, 0x63, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x23, 0x0a,
0x06, 0x62, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0b, 0x2e,
0x72, 0x70, 0x63, 0x2e, 0x42, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x52, 0x06, 0x62, 0x72, 0x61, 0x6e,
0x63, 0x68, 0x22, 0x59, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x42, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x52,
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x24, 0x0a, 0x04, 0x62, 0x61, 0x73, 0x65, 0x18, 0x01,
0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x52, 0x65, 0x61, 0x64, 0x52,
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x04, 0x62, 0x61, 0x73, 0x65, 0x12, 0x1f, 0x0a, 0x0b,
0x62, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28,
0x09, 0x52, 0x0a, 0x62, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0x38, 0x0a,
0x11, 0x47, 0x65, 0x74, 0x42, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
0x73, 0x65, 0x12, 0x23, 0x0a, 0x06, 0x62, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x18, 0x01, 0x20, 0x01,
0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x42, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x52,
0x06, 0x62, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x22, 0x73, 0x0a, 0x13, 0x44, 0x65, 0x6c, 0x65, 0x74,
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x04, 0x62, 0x61, 0x73, 0x65, 0x12, 0x19, 0x0a, 0x08,
0x74, 0x61, 0x67, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07,
0x74, 0x61, 0x67, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0x75, 0x0a, 0x13, 0x43, 0x72, 0x65, 0x61, 0x74,
0x65, 0x42, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x25,
0x0a, 0x04, 0x62, 0x61, 0x73, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x72,
0x70, 0x63, 0x2e, 0x57, 0x72, 0x69, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52,
0x04, 0x62, 0x61, 0x73, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x62, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x5f,
0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x62, 0x72, 0x61, 0x6e,
0x63, 0x68, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x18,
0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x22, 0x28, 0x0a, 0x14,
0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x42, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x52, 0x65, 0x73, 0x70,
0x6f, 0x6e, 0x73, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x73, 0x68, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28,
0x09, 0x52, 0x03, 0x73, 0x68, 0x61, 0x22, 0xb6, 0x02, 0x0a, 0x13, 0x4c, 0x69, 0x73, 0x74, 0x42,
0x72, 0x61, 0x6e, 0x63, 0x68, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x24,
0x0a, 0x04, 0x62, 0x61, 0x73, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x72,
0x70, 0x63, 0x2e, 0x52, 0x65, 0x61, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x04,
0x62, 0x61, 0x73, 0x65, 0x12, 0x25, 0x0a, 0x0e, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x5f,
0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0d, 0x69, 0x6e,
0x63, 0x6c, 0x75, 0x64, 0x65, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x71,
0x75, 0x65, 0x72, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x71, 0x75, 0x65, 0x72,
0x79, 0x12, 0x37, 0x0a, 0x04, 0x73, 0x6f, 0x72, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32,
0x23, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x72, 0x61, 0x6e, 0x63, 0x68,
0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x53, 0x6f, 0x72, 0x74, 0x4f, 0x70,
0x74, 0x69, 0x6f, 0x6e, 0x52, 0x04, 0x73, 0x6f, 0x72, 0x74, 0x12, 0x24, 0x0a, 0x05, 0x6f, 0x72,
0x64, 0x65, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0e, 0x2e, 0x72, 0x70, 0x63, 0x2e,
0x53, 0x6f, 0x72, 0x74, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x52, 0x05, 0x6f, 0x72, 0x64, 0x65, 0x72,
0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x67, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04,
0x70, 0x61, 0x67, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65,
0x18, 0x07, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65,
0x22, 0x2d, 0x0a, 0x0a, 0x53, 0x6f, 0x72, 0x74, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x0b,
0x0a, 0x07, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, 0x4e,
0x61, 0x6d, 0x65, 0x10, 0x01, 0x12, 0x08, 0x0a, 0x04, 0x44, 0x61, 0x74, 0x65, 0x10, 0x02, 0x22,
0x3b, 0x0a, 0x14, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x65, 0x73, 0x52,
0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x23, 0x0a, 0x06, 0x62, 0x72, 0x61, 0x6e, 0x63,
0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x42, 0x72,
0x61, 0x6e, 0x63, 0x68, 0x52, 0x06, 0x62, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x22, 0x53, 0x0a, 0x06,
0x42, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01,
0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x73, 0x68,
0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x73, 0x68, 0x61, 0x12, 0x23, 0x0a, 0x06,
0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x72,
0x70, 0x63, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x52, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x69,
0x74, 0x22, 0xba, 0x02, 0x0a, 0x15, 0x4c, 0x69, 0x73, 0x74, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74,
0x54, 0x61, 0x67, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x24, 0x0a, 0x04, 0x62,
0x61, 0x73, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x72, 0x70, 0x63, 0x2e,
0x52, 0x65, 0x61, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x04, 0x62, 0x61, 0x73,
0x65, 0x12, 0x25, 0x0a, 0x0e, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x5f, 0x63, 0x6f, 0x6d,
0x6d, 0x69, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0d, 0x69, 0x6e, 0x63, 0x6c, 0x75,
0x64, 0x65, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x71, 0x75, 0x65, 0x72,
0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, 0x12, 0x39,
0x0a, 0x04, 0x73, 0x6f, 0x72, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x25, 0x2e, 0x72,
0x70, 0x63, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x54, 0x61, 0x67,
0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x53, 0x6f, 0x72, 0x74, 0x4f, 0x70, 0x74,
0x69, 0x6f, 0x6e, 0x52, 0x04, 0x73, 0x6f, 0x72, 0x74, 0x12, 0x24, 0x0a, 0x05, 0x6f, 0x72, 0x64,
0x65, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0e, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x53,
0x6f, 0x72, 0x74, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x52, 0x05, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x12,
0x12, 0x0a, 0x04, 0x70, 0x61, 0x67, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x70,
0x61, 0x67, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x18,
0x07, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x22,
0x2d, 0x0a, 0x0a, 0x53, 0x6f, 0x72, 0x74, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x0b, 0x0a,
0x07, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, 0x4e, 0x61,
0x6d, 0x65, 0x10, 0x01, 0x12, 0x08, 0x0a, 0x04, 0x44, 0x61, 0x74, 0x65, 0x10, 0x02, 0x22, 0x3a,
0x0a, 0x16, 0x4c, 0x69, 0x73, 0x74, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x54, 0x61, 0x67, 0x73,
0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x20, 0x0a, 0x03, 0x74, 0x61, 0x67, 0x18,
0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x43, 0x6f, 0x6d, 0x6d,
0x69, 0x74, 0x54, 0x61, 0x67, 0x52, 0x03, 0x74, 0x61, 0x67, 0x22, 0xd1, 0x01, 0x0a, 0x09, 0x43,
0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x54, 0x61, 0x67, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65,
0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x10, 0x0a, 0x03,
0x73, 0x68, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x73, 0x68, 0x61, 0x12, 0x21,
0x0a, 0x0c, 0x69, 0x73, 0x5f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x65, 0x64, 0x18, 0x03,
0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x69, 0x73, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x65,
0x64, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09,
0x52, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61,
0x67, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67,
0x65, 0x12, 0x26, 0x0a, 0x06, 0x74, 0x61, 0x67, 0x67, 0x65, 0x72, 0x18, 0x06, 0x20, 0x01, 0x28,
0x0b, 0x32, 0x0e, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72,
0x65, 0x52, 0x06, 0x74, 0x61, 0x67, 0x67, 0x65, 0x72, 0x12, 0x23, 0x0a, 0x06, 0x63, 0x6f, 0x6d,
0x6d, 0x69, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x72, 0x70, 0x63, 0x2e,
0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x52, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x22, 0x79,
0x0a, 0x0d, 0x47, 0x65, 0x74, 0x52, 0x65, 0x66, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12,
0x63, 0x68, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74,
0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x22, 0x3b,
0x0a, 0x14, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x42, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x52, 0x65,
0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x23, 0x0a, 0x06, 0x62, 0x72, 0x61, 0x6e, 0x63, 0x68,
0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x42, 0x72, 0x61,
0x6e, 0x63, 0x68, 0x52, 0x06, 0x62, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x22, 0x59, 0x0a, 0x10, 0x47,
0x65, 0x74, 0x42, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12,
0x24, 0x0a, 0x04, 0x62, 0x61, 0x73, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e,
0x72, 0x70, 0x63, 0x2e, 0x52, 0x65, 0x61, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52,
0x04, 0x62, 0x61, 0x73, 0x65, 0x12, 0x19, 0x0a, 0x08, 0x72, 0x65, 0x66, 0x5f, 0x6e, 0x61, 0x6d,
0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x72, 0x65, 0x66, 0x4e, 0x61, 0x6d, 0x65,
0x12, 0x27, 0x0a, 0x08, 0x72, 0x65, 0x66, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01,
0x28, 0x0e, 0x32, 0x0c, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x52, 0x65, 0x66, 0x54, 0x79, 0x70, 0x65,
0x52, 0x07, 0x72, 0x65, 0x66, 0x54, 0x79, 0x70, 0x65, 0x22, 0x22, 0x0a, 0x0e, 0x47, 0x65, 0x74,
0x52, 0x65, 0x66, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x73,
0x68, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x73, 0x68, 0x61, 0x22, 0xb7, 0x01,
0x0a, 0x10, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x66, 0x52, 0x65, 0x71, 0x75, 0x65,
0x73, 0x74, 0x12, 0x25, 0x0a, 0x04, 0x62, 0x61, 0x73, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b,
0x32, 0x11, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x57, 0x72, 0x69, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75,
0x65, 0x73, 0x74, 0x52, 0x04, 0x62, 0x61, 0x73, 0x65, 0x12, 0x19, 0x0a, 0x08, 0x72, 0x65, 0x66,
0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x72, 0x65, 0x66,
0x4e, 0x61, 0x6d, 0x65, 0x12, 0x27, 0x0a, 0x08, 0x72, 0x65, 0x66, 0x5f, 0x74, 0x79, 0x70, 0x65,
0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0c, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x52, 0x65, 0x66,
0x54, 0x79, 0x70, 0x65, 0x52, 0x07, 0x72, 0x65, 0x66, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1b, 0x0a,
0x09, 0x6e, 0x65, 0x77, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09,
0x52, 0x08, 0x6e, 0x65, 0x77, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x6f, 0x6c,
0x64, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6f,
0x6c, 0x64, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x13, 0x0a, 0x11, 0x55, 0x70, 0x64, 0x61, 0x74,
0x65, 0x52, 0x65, 0x66, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0xd3, 0x04, 0x0a,
0x10, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63,
0x65, 0x12, 0x43, 0x0a, 0x0c, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x42, 0x72, 0x61, 0x6e, 0x63,
0x68, 0x12, 0x18, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x42, 0x72,
0x61, 0x6e, 0x63, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x72, 0x70,
0x63, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x42, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x52, 0x65,
0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3a, 0x0a, 0x09, 0x47, 0x65, 0x74, 0x42, 0x72, 0x61,
0x6e, 0x63, 0x68, 0x12, 0x15, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, 0x74, 0x42, 0x72, 0x61,
0x6e, 0x63, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x72, 0x70, 0x63,
0x2e, 0x47, 0x65, 0x74, 0x42, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
0x73, 0x65, 0x12, 0x43, 0x0a, 0x0c, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x42, 0x72, 0x61, 0x6e,
0x63, 0x68, 0x12, 0x18, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x42,
0x72, 0x61, 0x6e, 0x63, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x72,
0x70, 0x63, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x42, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x52,
0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x45, 0x0a, 0x0c, 0x4c, 0x69, 0x73, 0x74, 0x42,
0x72, 0x61, 0x6e, 0x63, 0x68, 0x65, 0x73, 0x12, 0x18, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x4c, 0x69,
0x73, 0x74, 0x42, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
0x74, 0x1a, 0x19, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x72, 0x61, 0x6e,
0x63, 0x68, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x30, 0x01, 0x12, 0x4b,
0x0a, 0x0e, 0x4c, 0x69, 0x73, 0x74, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x54, 0x61, 0x67, 0x73,
0x12, 0x1a, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x43, 0x6f, 0x6d, 0x6d, 0x69,
0x74, 0x54, 0x61, 0x67, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x72,
0x70, 0x63, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x54, 0x61, 0x67,
0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x30, 0x01, 0x12, 0x3a, 0x0a, 0x09, 0x43,
0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x61, 0x67, 0x12, 0x15, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x43,
0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x61, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a,
0x16, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x61, 0x67, 0x52,
0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3a, 0x0a, 0x09, 0x44, 0x65, 0x6c, 0x65, 0x74,
0x65, 0x54, 0x61, 0x67, 0x12, 0x15, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74,
0x65, 0x54, 0x61, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x72, 0x70,
0x63, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x66, 0x52, 0x65, 0x73, 0x70, 0x6f,
0x6e, 0x73, 0x65, 0x12, 0x31, 0x0a, 0x06, 0x47, 0x65, 0x74, 0x52, 0x65, 0x66, 0x12, 0x12, 0x2e,
0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x65, 0x66, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
0x74, 0x1a, 0x13, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x65, 0x66, 0x52, 0x65,
0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3a, 0x0a, 0x09, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65,
0x52, 0x65, 0x66, 0x12, 0x15, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65,
0x52, 0x65, 0x66, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x72, 0x70, 0x63,
0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x66, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
0x73, 0x65, 0x42, 0x27, 0x5a, 0x25, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d,
0x2f, 0x68, 0x61, 0x72, 0x6e, 0x65, 0x73, 0x73, 0x2f, 0x67, 0x69, 0x74, 0x6e, 0x65, 0x73, 0x73,
0x2f, 0x67, 0x69, 0x74, 0x72, 0x70, 0x63, 0x2f, 0x72, 0x70, 0x63, 0x62, 0x06, 0x70, 0x72, 0x6f,
0x74, 0x6f, 0x33,
0x04, 0x62, 0x61, 0x73, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x62, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x5f,
0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x62, 0x72, 0x61, 0x6e,
0x63, 0x68, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0x38, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x42, 0x72, 0x61,
0x6e, 0x63, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x23, 0x0a, 0x06, 0x62,
0x72, 0x61, 0x6e, 0x63, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x72, 0x70,
0x63, 0x2e, 0x42, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x52, 0x06, 0x62, 0x72, 0x61, 0x6e, 0x63, 0x68,
0x22, 0x73, 0x0a, 0x13, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x42, 0x72, 0x61, 0x6e, 0x63, 0x68,
0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x25, 0x0a, 0x04, 0x62, 0x61, 0x73, 0x65, 0x18,
0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x57, 0x72, 0x69, 0x74,
0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x04, 0x62, 0x61, 0x73, 0x65, 0x12, 0x1f,
0x0a, 0x0b, 0x62, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20,
0x01, 0x28, 0x09, 0x52, 0x0a, 0x62, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x4e, 0x61, 0x6d, 0x65, 0x12,
0x14, 0x0a, 0x05, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05,
0x66, 0x6f, 0x72, 0x63, 0x65, 0x22, 0x28, 0x0a, 0x14, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x42,
0x72, 0x61, 0x6e, 0x63, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x10, 0x0a,
0x03, 0x73, 0x68, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x73, 0x68, 0x61, 0x22,
0xb6, 0x02, 0x0a, 0x13, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x65, 0x73,
0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x24, 0x0a, 0x04, 0x62, 0x61, 0x73, 0x65, 0x18,
0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x52, 0x65, 0x61, 0x64,
0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x04, 0x62, 0x61, 0x73, 0x65, 0x12, 0x25, 0x0a,
0x0e, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x18,
0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0d, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x43, 0x6f,
0x6d, 0x6d, 0x69, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, 0x18, 0x03, 0x20,
0x01, 0x28, 0x09, 0x52, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, 0x12, 0x37, 0x0a, 0x04, 0x73, 0x6f,
0x72, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x23, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x4c,
0x69, 0x73, 0x74, 0x42, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65,
0x73, 0x74, 0x2e, 0x53, 0x6f, 0x72, 0x74, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x04, 0x73,
0x6f, 0x72, 0x74, 0x12, 0x24, 0x0a, 0x05, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x18, 0x05, 0x20, 0x01,
0x28, 0x0e, 0x32, 0x0e, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x6f, 0x72, 0x74, 0x4f, 0x72, 0x64,
0x65, 0x72, 0x52, 0x05, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x67,
0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x70, 0x61, 0x67, 0x65, 0x12, 0x1a, 0x0a,
0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x05, 0x52,
0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x22, 0x2d, 0x0a, 0x0a, 0x53, 0x6f, 0x72,
0x74, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x0b, 0x0a, 0x07, 0x44, 0x65, 0x66, 0x61, 0x75,
0x6c, 0x74, 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, 0x4e, 0x61, 0x6d, 0x65, 0x10, 0x01, 0x12, 0x08,
0x0a, 0x04, 0x44, 0x61, 0x74, 0x65, 0x10, 0x02, 0x22, 0x3b, 0x0a, 0x14, 0x4c, 0x69, 0x73, 0x74,
0x42, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
0x12, 0x23, 0x0a, 0x06, 0x62, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b,
0x32, 0x0b, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x42, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x52, 0x06, 0x62,
0x72, 0x61, 0x6e, 0x63, 0x68, 0x22, 0x53, 0x0a, 0x06, 0x42, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x12,
0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e,
0x61, 0x6d, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x73, 0x68, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09,
0x52, 0x03, 0x73, 0x68, 0x61, 0x12, 0x23, 0x0a, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x18,
0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x43, 0x6f, 0x6d, 0x6d,
0x69, 0x74, 0x52, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x22, 0xba, 0x02, 0x0a, 0x15, 0x4c,
0x69, 0x73, 0x74, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x54, 0x61, 0x67, 0x73, 0x52, 0x65, 0x71,
0x75, 0x65, 0x73, 0x74, 0x12, 0x24, 0x0a, 0x04, 0x62, 0x61, 0x73, 0x65, 0x18, 0x01, 0x20, 0x01,
0x28, 0x0b, 0x32, 0x10, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x52, 0x65, 0x61, 0x64, 0x52, 0x65, 0x71,
0x75, 0x65, 0x73, 0x74, 0x52, 0x04, 0x62, 0x61, 0x73, 0x65, 0x12, 0x25, 0x0a, 0x0e, 0x69, 0x6e,
0x63, 0x6c, 0x75, 0x64, 0x65, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x18, 0x02, 0x20, 0x01,
0x28, 0x08, 0x52, 0x0d, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x43, 0x6f, 0x6d, 0x6d, 0x69,
0x74, 0x12, 0x14, 0x0a, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09,
0x52, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, 0x12, 0x39, 0x0a, 0x04, 0x73, 0x6f, 0x72, 0x74, 0x18,
0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x25, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x4c, 0x69, 0x73, 0x74,
0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x54, 0x61, 0x67, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
0x74, 0x2e, 0x53, 0x6f, 0x72, 0x74, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x04, 0x73, 0x6f,
0x72, 0x74, 0x12, 0x24, 0x0a, 0x05, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28,
0x0e, 0x32, 0x0e, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x6f, 0x72, 0x74, 0x4f, 0x72, 0x64, 0x65,
0x72, 0x52, 0x05, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x67, 0x65,
0x18, 0x06, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x70, 0x61, 0x67, 0x65, 0x12, 0x1a, 0x0a, 0x08,
0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08,
0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x22, 0x2d, 0x0a, 0x0a, 0x53, 0x6f, 0x72, 0x74,
0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x0b, 0x0a, 0x07, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c,
0x74, 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, 0x4e, 0x61, 0x6d, 0x65, 0x10, 0x01, 0x12, 0x08, 0x0a,
0x04, 0x44, 0x61, 0x74, 0x65, 0x10, 0x02, 0x22, 0x3a, 0x0a, 0x16, 0x4c, 0x69, 0x73, 0x74, 0x43,
0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x54, 0x61, 0x67, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
0x65, 0x12, 0x20, 0x0a, 0x03, 0x74, 0x61, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e,
0x2e, 0x72, 0x70, 0x63, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x54, 0x61, 0x67, 0x52, 0x03,
0x74, 0x61, 0x67, 0x22, 0xd1, 0x01, 0x0a, 0x09, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x54, 0x61,
0x67, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52,
0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x73, 0x68, 0x61, 0x18, 0x02, 0x20, 0x01,
0x28, 0x09, 0x52, 0x03, 0x73, 0x68, 0x61, 0x12, 0x21, 0x0a, 0x0c, 0x69, 0x73, 0x5f, 0x61, 0x6e,
0x6e, 0x6f, 0x74, 0x61, 0x74, 0x65, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x69,
0x73, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x65, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x69,
0x74, 0x6c, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65,
0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28,
0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x26, 0x0a, 0x06, 0x74, 0x61,
0x67, 0x67, 0x65, 0x72, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x72, 0x70, 0x63,
0x2e, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x52, 0x06, 0x74, 0x61, 0x67, 0x67,
0x65, 0x72, 0x12, 0x23, 0x0a, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x18, 0x07, 0x20, 0x01,
0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x52,
0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x22, 0x79, 0x0a, 0x0d, 0x47, 0x65, 0x74, 0x52, 0x65,
0x66, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x24, 0x0a, 0x04, 0x62, 0x61, 0x73, 0x65,
0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x52, 0x65, 0x61,
0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x04, 0x62, 0x61, 0x73, 0x65, 0x12, 0x19,
0x0a, 0x08, 0x72, 0x65, 0x66, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09,
0x52, 0x07, 0x72, 0x65, 0x66, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x27, 0x0a, 0x08, 0x72, 0x65, 0x66,
0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0c, 0x2e, 0x72, 0x70,
0x63, 0x2e, 0x52, 0x65, 0x66, 0x54, 0x79, 0x70, 0x65, 0x52, 0x07, 0x72, 0x65, 0x66, 0x54, 0x79,
0x70, 0x65, 0x22, 0x22, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x52, 0x65, 0x66, 0x52, 0x65, 0x73, 0x70,
0x6f, 0x6e, 0x73, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x73, 0x68, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28,
0x09, 0x52, 0x03, 0x73, 0x68, 0x61, 0x22, 0xb7, 0x01, 0x0a, 0x10, 0x55, 0x70, 0x64, 0x61, 0x74,
0x65, 0x52, 0x65, 0x66, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x25, 0x0a, 0x04, 0x62,
0x61, 0x73, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x72, 0x70, 0x63, 0x2e,
0x57, 0x72, 0x69, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x04, 0x62, 0x61,
0x73, 0x65, 0x12, 0x19, 0x0a, 0x08, 0x72, 0x65, 0x66, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02,
0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x72, 0x65, 0x66, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x27, 0x0a,
0x08, 0x72, 0x65, 0x66, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32,
0x0c, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x52, 0x65, 0x66, 0x54, 0x79, 0x70, 0x65, 0x52, 0x07, 0x72,
0x65, 0x66, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x6e, 0x65, 0x77, 0x5f, 0x76, 0x61,
0x6c, 0x75, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6e, 0x65, 0x77, 0x56, 0x61,
0x6c, 0x75, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x6f, 0x6c, 0x64, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65,
0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6f, 0x6c, 0x64, 0x56, 0x61, 0x6c, 0x75, 0x65,
0x22, 0x13, 0x0a, 0x11, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x66, 0x52, 0x65, 0x73,
0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0xe5, 0x04, 0x0a, 0x10, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65,
0x6e, 0x63, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x43, 0x0a, 0x0c, 0x43, 0x72,
0x65, 0x61, 0x74, 0x65, 0x42, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x12, 0x18, 0x2e, 0x72, 0x70, 0x63,
0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x42, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x52, 0x65, 0x71,
0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74,
0x65, 0x42, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12,
0x3a, 0x0a, 0x09, 0x47, 0x65, 0x74, 0x42, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x12, 0x15, 0x2e, 0x72,
0x70, 0x63, 0x2e, 0x47, 0x65, 0x74, 0x42, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x52, 0x65, 0x71, 0x75,
0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, 0x74, 0x42, 0x72, 0x61,
0x6e, 0x63, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x43, 0x0a, 0x0c, 0x44,
0x65, 0x6c, 0x65, 0x74, 0x65, 0x42, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x12, 0x18, 0x2e, 0x72, 0x70,
0x63, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x42, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x52, 0x65,
0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x44, 0x65, 0x6c, 0x65,
0x74, 0x65, 0x42, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
0x12, 0x45, 0x0a, 0x0c, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x65, 0x73,
0x12, 0x18, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x72, 0x61, 0x6e, 0x63,
0x68, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x72, 0x70, 0x63,
0x2e, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x65, 0x73, 0x52, 0x65, 0x73,
0x70, 0x6f, 0x6e, 0x73, 0x65, 0x30, 0x01, 0x12, 0x4b, 0x0a, 0x0e, 0x4c, 0x69, 0x73, 0x74, 0x43,
0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x54, 0x61, 0x67, 0x73, 0x12, 0x1a, 0x2e, 0x72, 0x70, 0x63, 0x2e,
0x4c, 0x69, 0x73, 0x74, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x54, 0x61, 0x67, 0x73, 0x52, 0x65,
0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x4c, 0x69, 0x73, 0x74,
0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x54, 0x61, 0x67, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
0x73, 0x65, 0x30, 0x01, 0x12, 0x4c, 0x0a, 0x0f, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x43, 0x6f,
0x6d, 0x6d, 0x69, 0x74, 0x54, 0x61, 0x67, 0x12, 0x1b, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x43, 0x72,
0x65, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x54, 0x61, 0x67, 0x52, 0x65, 0x71,
0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74,
0x65, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x54, 0x61, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
0x73, 0x65, 0x12, 0x3a, 0x0a, 0x09, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x54, 0x61, 0x67, 0x12,
0x15, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x54, 0x61, 0x67, 0x52,
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x55, 0x70, 0x64,
0x61, 0x74, 0x65, 0x52, 0x65, 0x66, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x31,
0x0a, 0x06, 0x47, 0x65, 0x74, 0x52, 0x65, 0x66, 0x12, 0x12, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x47,
0x65, 0x74, 0x52, 0x65, 0x66, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x13, 0x2e, 0x72,
0x70, 0x63, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x65, 0x66, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
0x65, 0x12, 0x3a, 0x0a, 0x09, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x66, 0x12, 0x15,
0x2e, 0x72, 0x70, 0x63, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x66, 0x52, 0x65,
0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x55, 0x70, 0x64, 0x61,
0x74, 0x65, 0x52, 0x65, 0x66, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x27, 0x5a,
0x25, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x68, 0x61, 0x72, 0x6e,
0x65, 0x73, 0x73, 0x2f, 0x67, 0x69, 0x74, 0x6e, 0x65, 0x73, 0x73, 0x2f, 0x67, 0x69, 0x74, 0x72,
0x70, 0x63, 0x2f, 0x72, 0x70, 0x63, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
@ -1483,8 +1505,8 @@ var file_ref_proto_msgTypes = make([]protoimpl.MessageInfo, 19)
var file_ref_proto_goTypes = []interface{}{
(ListBranchesRequest_SortOption)(0), // 0: rpc.ListBranchesRequest.SortOption
(ListCommitTagsRequest_SortOption)(0), // 1: rpc.ListCommitTagsRequest.SortOption
(*CreateTagRequest)(nil), // 2: rpc.CreateTagRequest
(*CreateTagResponse)(nil), // 3: rpc.CreateTagResponse
(*CreateCommitTagRequest)(nil), // 2: rpc.CreateCommitTagRequest
(*CreateCommitTagResponse)(nil), // 3: rpc.CreateCommitTagResponse
(*DeleteTagRequest)(nil), // 4: rpc.DeleteTagRequest
(*CreateBranchRequest)(nil), // 5: rpc.CreateBranchRequest
(*CreateBranchResponse)(nil), // 6: rpc.CreateBranchResponse
@ -1503,59 +1525,61 @@ var file_ref_proto_goTypes = []interface{}{
(*UpdateRefRequest)(nil), // 19: rpc.UpdateRefRequest
(*UpdateRefResponse)(nil), // 20: rpc.UpdateRefResponse
(*WriteRequest)(nil), // 21: rpc.WriteRequest
(*ReadRequest)(nil), // 22: rpc.ReadRequest
(SortOrder)(0), // 23: rpc.SortOrder
(*Commit)(nil), // 24: rpc.Commit
(*Signature)(nil), // 25: rpc.Signature
(RefType)(0), // 26: rpc.RefType
(*Identity)(nil), // 22: rpc.Identity
(*ReadRequest)(nil), // 23: rpc.ReadRequest
(SortOrder)(0), // 24: rpc.SortOrder
(*Commit)(nil), // 25: rpc.Commit
(*Signature)(nil), // 26: rpc.Signature
(RefType)(0), // 27: rpc.RefType
}
var file_ref_proto_depIdxs = []int32{
21, // 0: rpc.CreateTagRequest.base:type_name -> rpc.WriteRequest
16, // 1: rpc.CreateTagResponse.tag:type_name -> rpc.CommitTag
21, // 2: rpc.DeleteTagRequest.base:type_name -> rpc.WriteRequest
21, // 3: rpc.CreateBranchRequest.base:type_name -> rpc.WriteRequest
13, // 4: rpc.CreateBranchResponse.branch:type_name -> rpc.Branch
22, // 5: rpc.GetBranchRequest.base:type_name -> rpc.ReadRequest
13, // 6: rpc.GetBranchResponse.branch:type_name -> rpc.Branch
21, // 7: rpc.DeleteBranchRequest.base:type_name -> rpc.WriteRequest
22, // 8: rpc.ListBranchesRequest.base:type_name -> rpc.ReadRequest
0, // 9: rpc.ListBranchesRequest.sort:type_name -> rpc.ListBranchesRequest.SortOption
23, // 10: rpc.ListBranchesRequest.order:type_name -> rpc.SortOrder
13, // 11: rpc.ListBranchesResponse.branch:type_name -> rpc.Branch
24, // 12: rpc.Branch.commit:type_name -> rpc.Commit
22, // 13: rpc.ListCommitTagsRequest.base:type_name -> rpc.ReadRequest
1, // 14: rpc.ListCommitTagsRequest.sort:type_name -> rpc.ListCommitTagsRequest.SortOption
23, // 15: rpc.ListCommitTagsRequest.order:type_name -> rpc.SortOrder
16, // 16: rpc.ListCommitTagsResponse.tag:type_name -> rpc.CommitTag
25, // 17: rpc.CommitTag.tagger:type_name -> rpc.Signature
24, // 18: rpc.CommitTag.commit:type_name -> rpc.Commit
22, // 19: rpc.GetRefRequest.base:type_name -> rpc.ReadRequest
26, // 20: rpc.GetRefRequest.ref_type:type_name -> rpc.RefType
21, // 21: rpc.UpdateRefRequest.base:type_name -> rpc.WriteRequest
26, // 22: rpc.UpdateRefRequest.ref_type:type_name -> rpc.RefType
5, // 23: rpc.ReferenceService.CreateBranch:input_type -> rpc.CreateBranchRequest
7, // 24: rpc.ReferenceService.GetBranch:input_type -> rpc.GetBranchRequest
9, // 25: rpc.ReferenceService.DeleteBranch:input_type -> rpc.DeleteBranchRequest
11, // 26: rpc.ReferenceService.ListBranches:input_type -> rpc.ListBranchesRequest
14, // 27: rpc.ReferenceService.ListCommitTags:input_type -> rpc.ListCommitTagsRequest
2, // 28: rpc.ReferenceService.CreateTag:input_type -> rpc.CreateTagRequest
4, // 29: rpc.ReferenceService.DeleteTag:input_type -> rpc.DeleteTagRequest
17, // 30: rpc.ReferenceService.GetRef:input_type -> rpc.GetRefRequest
19, // 31: rpc.ReferenceService.UpdateRef:input_type -> rpc.UpdateRefRequest
6, // 32: rpc.ReferenceService.CreateBranch:output_type -> rpc.CreateBranchResponse
8, // 33: rpc.ReferenceService.GetBranch:output_type -> rpc.GetBranchResponse
10, // 34: rpc.ReferenceService.DeleteBranch:output_type -> rpc.DeleteBranchResponse
12, // 35: rpc.ReferenceService.ListBranches:output_type -> rpc.ListBranchesResponse
15, // 36: rpc.ReferenceService.ListCommitTags:output_type -> rpc.ListCommitTagsResponse
3, // 37: rpc.ReferenceService.CreateTag:output_type -> rpc.CreateTagResponse
20, // 38: rpc.ReferenceService.DeleteTag:output_type -> rpc.UpdateRefResponse
18, // 39: rpc.ReferenceService.GetRef:output_type -> rpc.GetRefResponse
20, // 40: rpc.ReferenceService.UpdateRef:output_type -> rpc.UpdateRefResponse
32, // [32:41] is the sub-list for method output_type
23, // [23:32] is the sub-list for method input_type
23, // [23:23] is the sub-list for extension type_name
23, // [23:23] is the sub-list for extension extendee
0, // [0:23] is the sub-list for field type_name
21, // 0: rpc.CreateCommitTagRequest.base:type_name -> rpc.WriteRequest
22, // 1: rpc.CreateCommitTagRequest.tagger:type_name -> rpc.Identity
16, // 2: rpc.CreateCommitTagResponse.tag:type_name -> rpc.CommitTag
21, // 3: rpc.DeleteTagRequest.base:type_name -> rpc.WriteRequest
21, // 4: rpc.CreateBranchRequest.base:type_name -> rpc.WriteRequest
13, // 5: rpc.CreateBranchResponse.branch:type_name -> rpc.Branch
23, // 6: rpc.GetBranchRequest.base:type_name -> rpc.ReadRequest
13, // 7: rpc.GetBranchResponse.branch:type_name -> rpc.Branch
21, // 8: rpc.DeleteBranchRequest.base:type_name -> rpc.WriteRequest
23, // 9: rpc.ListBranchesRequest.base:type_name -> rpc.ReadRequest
0, // 10: rpc.ListBranchesRequest.sort:type_name -> rpc.ListBranchesRequest.SortOption
24, // 11: rpc.ListBranchesRequest.order:type_name -> rpc.SortOrder
13, // 12: rpc.ListBranchesResponse.branch:type_name -> rpc.Branch
25, // 13: rpc.Branch.commit:type_name -> rpc.Commit
23, // 14: rpc.ListCommitTagsRequest.base:type_name -> rpc.ReadRequest
1, // 15: rpc.ListCommitTagsRequest.sort:type_name -> rpc.ListCommitTagsRequest.SortOption
24, // 16: rpc.ListCommitTagsRequest.order:type_name -> rpc.SortOrder
16, // 17: rpc.ListCommitTagsResponse.tag:type_name -> rpc.CommitTag
26, // 18: rpc.CommitTag.tagger:type_name -> rpc.Signature
25, // 19: rpc.CommitTag.commit:type_name -> rpc.Commit
23, // 20: rpc.GetRefRequest.base:type_name -> rpc.ReadRequest
27, // 21: rpc.GetRefRequest.ref_type:type_name -> rpc.RefType
21, // 22: rpc.UpdateRefRequest.base:type_name -> rpc.WriteRequest
27, // 23: rpc.UpdateRefRequest.ref_type:type_name -> rpc.RefType
5, // 24: rpc.ReferenceService.CreateBranch:input_type -> rpc.CreateBranchRequest
7, // 25: rpc.ReferenceService.GetBranch:input_type -> rpc.GetBranchRequest
9, // 26: rpc.ReferenceService.DeleteBranch:input_type -> rpc.DeleteBranchRequest
11, // 27: rpc.ReferenceService.ListBranches:input_type -> rpc.ListBranchesRequest
14, // 28: rpc.ReferenceService.ListCommitTags:input_type -> rpc.ListCommitTagsRequest
2, // 29: rpc.ReferenceService.CreateCommitTag:input_type -> rpc.CreateCommitTagRequest
4, // 30: rpc.ReferenceService.DeleteTag:input_type -> rpc.DeleteTagRequest
17, // 31: rpc.ReferenceService.GetRef:input_type -> rpc.GetRefRequest
19, // 32: rpc.ReferenceService.UpdateRef:input_type -> rpc.UpdateRefRequest
6, // 33: rpc.ReferenceService.CreateBranch:output_type -> rpc.CreateBranchResponse
8, // 34: rpc.ReferenceService.GetBranch:output_type -> rpc.GetBranchResponse
10, // 35: rpc.ReferenceService.DeleteBranch:output_type -> rpc.DeleteBranchResponse
12, // 36: rpc.ReferenceService.ListBranches:output_type -> rpc.ListBranchesResponse
15, // 37: rpc.ReferenceService.ListCommitTags:output_type -> rpc.ListCommitTagsResponse
3, // 38: rpc.ReferenceService.CreateCommitTag:output_type -> rpc.CreateCommitTagResponse
20, // 39: rpc.ReferenceService.DeleteTag:output_type -> rpc.UpdateRefResponse
18, // 40: rpc.ReferenceService.GetRef:output_type -> rpc.GetRefResponse
20, // 41: rpc.ReferenceService.UpdateRef:output_type -> rpc.UpdateRefResponse
33, // [33:42] is the sub-list for method output_type
24, // [24:33] is the sub-list for method input_type
24, // [24:24] is the sub-list for extension type_name
24, // [24:24] is the sub-list for extension extendee
0, // [0:24] is the sub-list for field type_name
}
func init() { file_ref_proto_init() }
@ -1566,7 +1590,7 @@ func file_ref_proto_init() {
file_shared_proto_init()
if !protoimpl.UnsafeEnabled {
file_ref_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*CreateTagRequest); i {
switch v := v.(*CreateCommitTagRequest); i {
case 0:
return &v.state
case 1:
@ -1578,7 +1602,7 @@ func file_ref_proto_init() {
}
}
file_ref_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*CreateTagResponse); i {
switch v := v.(*CreateCommitTagResponse); i {
case 0:
return &v.state
case 1:

View File

@ -27,7 +27,7 @@ type ReferenceServiceClient interface {
DeleteBranch(ctx context.Context, in *DeleteBranchRequest, opts ...grpc.CallOption) (*DeleteBranchResponse, error)
ListBranches(ctx context.Context, in *ListBranchesRequest, opts ...grpc.CallOption) (ReferenceService_ListBranchesClient, error)
ListCommitTags(ctx context.Context, in *ListCommitTagsRequest, opts ...grpc.CallOption) (ReferenceService_ListCommitTagsClient, error)
CreateTag(ctx context.Context, in *CreateTagRequest, opts ...grpc.CallOption) (*CreateTagResponse, error)
CreateCommitTag(ctx context.Context, in *CreateCommitTagRequest, opts ...grpc.CallOption) (*CreateCommitTagResponse, error)
DeleteTag(ctx context.Context, in *DeleteTagRequest, opts ...grpc.CallOption) (*UpdateRefResponse, error)
GetRef(ctx context.Context, in *GetRefRequest, opts ...grpc.CallOption) (*GetRefResponse, error)
UpdateRef(ctx context.Context, in *UpdateRefRequest, opts ...grpc.CallOption) (*UpdateRefResponse, error)
@ -132,9 +132,9 @@ func (x *referenceServiceListCommitTagsClient) Recv() (*ListCommitTagsResponse,
return m, nil
}
func (c *referenceServiceClient) CreateTag(ctx context.Context, in *CreateTagRequest, opts ...grpc.CallOption) (*CreateTagResponse, error) {
out := new(CreateTagResponse)
err := c.cc.Invoke(ctx, "/rpc.ReferenceService/CreateTag", in, out, opts...)
func (c *referenceServiceClient) CreateCommitTag(ctx context.Context, in *CreateCommitTagRequest, opts ...grpc.CallOption) (*CreateCommitTagResponse, error) {
out := new(CreateCommitTagResponse)
err := c.cc.Invoke(ctx, "/rpc.ReferenceService/CreateCommitTag", in, out, opts...)
if err != nil {
return nil, err
}
@ -177,7 +177,7 @@ type ReferenceServiceServer interface {
DeleteBranch(context.Context, *DeleteBranchRequest) (*DeleteBranchResponse, error)
ListBranches(*ListBranchesRequest, ReferenceService_ListBranchesServer) error
ListCommitTags(*ListCommitTagsRequest, ReferenceService_ListCommitTagsServer) error
CreateTag(context.Context, *CreateTagRequest) (*CreateTagResponse, error)
CreateCommitTag(context.Context, *CreateCommitTagRequest) (*CreateCommitTagResponse, error)
DeleteTag(context.Context, *DeleteTagRequest) (*UpdateRefResponse, error)
GetRef(context.Context, *GetRefRequest) (*GetRefResponse, error)
UpdateRef(context.Context, *UpdateRefRequest) (*UpdateRefResponse, error)
@ -203,8 +203,8 @@ func (UnimplementedReferenceServiceServer) ListBranches(*ListBranchesRequest, Re
func (UnimplementedReferenceServiceServer) ListCommitTags(*ListCommitTagsRequest, ReferenceService_ListCommitTagsServer) error {
return status.Errorf(codes.Unimplemented, "method ListCommitTags not implemented")
}
func (UnimplementedReferenceServiceServer) CreateTag(context.Context, *CreateTagRequest) (*CreateTagResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method CreateTag not implemented")
func (UnimplementedReferenceServiceServer) CreateCommitTag(context.Context, *CreateCommitTagRequest) (*CreateCommitTagResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method CreateCommitTag not implemented")
}
func (UnimplementedReferenceServiceServer) DeleteTag(context.Context, *DeleteTagRequest) (*UpdateRefResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method DeleteTag not implemented")
@ -324,20 +324,20 @@ func (x *referenceServiceListCommitTagsServer) Send(m *ListCommitTagsResponse) e
return x.ServerStream.SendMsg(m)
}
func _ReferenceService_CreateTag_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(CreateTagRequest)
func _ReferenceService_CreateCommitTag_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(CreateCommitTagRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(ReferenceServiceServer).CreateTag(ctx, in)
return srv.(ReferenceServiceServer).CreateCommitTag(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/rpc.ReferenceService/CreateTag",
FullMethod: "/rpc.ReferenceService/CreateCommitTag",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ReferenceServiceServer).CreateTag(ctx, req.(*CreateTagRequest))
return srv.(ReferenceServiceServer).CreateCommitTag(ctx, req.(*CreateCommitTagRequest))
}
return interceptor(ctx, in, info, handler)
}
@ -416,8 +416,8 @@ var ReferenceService_ServiceDesc = grpc.ServiceDesc{
Handler: _ReferenceService_DeleteBranch_Handler,
},
{
MethodName: "CreateTag",
Handler: _ReferenceService_CreateTag_Handler,
MethodName: "CreateCommitTag",
Handler: _ReferenceService_CreateCommitTag_Handler,
},
{
MethodName: "DeleteTag",

View File

@ -9,6 +9,7 @@ import (
"errors"
"fmt"
"io"
"time"
"github.com/harness/gitness/gitrpc/rpc"
@ -47,14 +48,26 @@ type CommitTag struct {
Commit *Commit
}
type CreateTagParams struct {
type CreateCommitTagParams struct {
WriteParams
Name string
SHA string
Name string
// Target is the commit (or points to the commit) the new tag will be pointing to.
Target string
// Message is the optional message the tag will be created with - if the message is empty
// the tag will be lightweight, otherwise it'll be annotated
Message string
// Tagger overwrites the git author used in case the tag is annotated
// (optional, default: actor)
Tagger *Identity
// TaggerDate overwrites the git author date used in case the tag is annotated
// (optional, default: current time on server)
TaggerDate *time.Time
}
func (p *CreateTagParams) Validate() error {
func (p *CreateCommitTagParams) Validate() error {
if p == nil {
return ErrNoParamsProvided
}
@ -62,16 +75,14 @@ func (p *CreateTagParams) Validate() error {
if p.Name == "" {
return errors.New("tag name cannot be empty")
}
if p.SHA == "" {
if p.Target == "" {
return errors.New("target cannot be empty")
}
if p.Message == "" {
return errors.New("message cannot be empty")
}
return nil
}
type CreateTagOutput struct {
type CreateCommitTagOutput struct {
CommitTag
}
@ -139,18 +150,20 @@ func (c *Client) ListCommitTags(ctx context.Context, params *ListCommitTagsParam
return output, nil
}
func (c *Client) CreateTag(ctx context.Context, params *CreateTagParams) (*CreateTagOutput, error) {
func (c *Client) CreateCommitTag(ctx context.Context, params *CreateCommitTagParams) (*CreateCommitTagOutput, error) {
err := params.Validate()
if err != nil {
return nil, err
}
resp, err := c.refService.CreateTag(ctx, &rpc.CreateTagRequest{
Base: mapToRPCWriteRequest(params.WriteParams),
Sha: params.SHA,
TagName: params.Name,
Message: params.Message,
resp, err := c.refService.CreateCommitTag(ctx, &rpc.CreateCommitTagRequest{
Base: mapToRPCWriteRequest(params.WriteParams),
Target: params.Target,
TagName: params.Name,
Message: params.Message,
Tagger: mapToRPCIdentityOptional(params.Tagger),
TaggerDate: mapToRPCTimeOptional(params.TaggerDate),
})
if err != nil {
@ -163,7 +176,7 @@ func (c *Client) CreateTag(ctx context.Context, params *CreateTagParams) (*Creat
return nil, fmt.Errorf("failed to map rpc tag: %w", err)
}
return &CreateTagOutput{
return &CreateCommitTagOutput{
CommitTag: *commitTag,
}, nil
}

View File

@ -22,7 +22,7 @@ type CreateBranchInput struct {
// Target is the commit (or points to the commit) the new branch will be pointing to.
// If no target is provided, the branch points to the same commit as the default branch of the repo.
Target *string `json:"target"`
Target string `json:"target"`
}
// CreateBranch creates a new branch for a repo.
@ -38,8 +38,8 @@ func (c *Controller) CreateBranch(ctx context.Context, session *auth.Session,
}
// set target to default branch in case no target was provided
if in.Target == nil || *in.Target == "" {
in.Target = &repo.DefaultBranch
if in.Target == "" {
in.Target = repo.DefaultBranch
}
err = checkBranchName(in.Name)
@ -55,7 +55,7 @@ func (c *Controller) CreateBranch(ctx context.Context, session *auth.Session,
rpcOut, err := c.gitRPCClient.CreateBranch(ctx, &gitrpc.CreateBranchParams{
WriteParams: writeParams,
BranchName: in.Name,
Target: *in.Target,
Target: in.Target,
})
if err != nil {
return nil, err

View File

@ -7,6 +7,7 @@ package repo
import (
"context"
"fmt"
"time"
"github.com/harness/gitness/gitrpc"
apiauth "github.com/harness/gitness/internal/api/auth"
@ -14,18 +15,21 @@ import (
"github.com/harness/gitness/types/enum"
)
// CreateBranchInput used for branch creation apis.
type CreateTagInput struct {
// CreateCommitTagInput used for tag creation apis.
type CreateCommitTagInput struct {
Name string `json:"name"`
// Target is the commit (or points to the commit) the new branch will be pointing to.
// If no target is provided, the branch points to the same commit as the default branch of the repo.
Target *string `json:"target"`
Message *string `json:"message"`
// Target is the commit (or points to the commit) the new tag will be pointing to.
// If no target is provided, the tag points to the same commit as the default branch of the repo.
Target string `json:"target"`
// Message is the optional message the tag will be created with - if the message is empty
// the tag will be lightweight, otherwise it'll be annotated.
Message string `json:"message"`
}
// CreateTag creates a new tag for a repo.
func (c *Controller) CreateTag(ctx context.Context, session *auth.Session,
repoRef string, in *CreateTagInput) (*CommitTag, error) {
// CreateCommitTag creates a new tag for a repo.
func (c *Controller) CreateCommitTag(ctx context.Context, session *auth.Session,
repoRef string, in *CreateCommitTagInput) (*CommitTag, error) {
repo, err := c.repoStore.FindByRef(ctx, repoRef)
if err != nil {
return nil, err
@ -36,8 +40,8 @@ func (c *Controller) CreateTag(ctx context.Context, session *auth.Session,
}
// set target to default branch in case no branch or commit was provided
if in.Target == nil || *in.Target == "" {
in.Target = &repo.DefaultBranch
if in.Target == "" {
in.Target = repo.DefaultBranch
}
writeParams, err := CreateRPCWriteParams(ctx, c.urlProvider, session, repo)
@ -45,11 +49,14 @@ func (c *Controller) CreateTag(ctx context.Context, session *auth.Session,
return nil, fmt.Errorf("failed to create RPC write params: %w", err)
}
rpcOut, err := c.gitRPCClient.CreateTag(ctx, &gitrpc.CreateTagParams{
now := time.Now()
rpcOut, err := c.gitRPCClient.CreateCommitTag(ctx, &gitrpc.CreateCommitTagParams{
WriteParams: writeParams,
Name: in.Name,
SHA: *in.Target,
Message: *in.Message,
Target: in.Target,
Message: in.Message,
Tagger: rpcIdentityFromPrincipal(session.Principal),
TaggerDate: &now,
})
if err != nil {

View File

@ -23,14 +23,14 @@ func HandleCreateCommitTag(repoCtrl *repo.Controller) http.HandlerFunc {
return
}
in := new(repo.CreateTagInput)
in := new(repo.CreateCommitTagInput)
err = json.NewDecoder(r.Body).Decode(in)
if err != nil {
render.BadRequestf(w, "Invalid request body: %s.", err)
return
}
tag, err := repoCtrl.CreateTag(ctx, session, repoRef, in)
tag, err := repoCtrl.CreateCommitTag(ctx, session, repoRef, in)
if err != nil {
render.TranslatedUserError(w, err)
return

View File

@ -134,7 +134,7 @@ type deleteBranchRequest struct {
type createTagRequest struct {
repoRequest
repo.CreateTagInput
repo.CreateCommitTagInput
}
type listTagsRequest struct {

View File

@ -14,10 +14,10 @@ import (
"github.com/harness/gitness/store/database/dbtx"
"github.com/harness/gitness/types"
"github.com/harness/gitness/types/enum"
"github.com/rs/zerolog/log"
"github.com/jmoiron/sqlx"
"github.com/pkg/errors"
"github.com/rs/zerolog/log"
)
var _ store.MembershipStore = (*MembershipStore)(nil)