From 02806ec17f3254d163b2df224ed1819666d8e1a6 Mon Sep 17 00:00:00 2001 From: Doria Keung Date: Mon, 10 Jul 2023 11:07:57 -0400 Subject: [PATCH] Add `ListRepositoryTagsByReference` rpc --- .../repository_tag.connect.go | 38 ++- .../registry/v1alpha1/repository_tag.pb.go | 311 ++++++++++++++---- .../registry/v1alpha1/repository_tag.proto | 22 ++ 3 files changed, 314 insertions(+), 57 deletions(-) diff --git a/private/gen/proto/connect/buf/alpha/registry/v1alpha1/registryv1alpha1connect/repository_tag.connect.go b/private/gen/proto/connect/buf/alpha/registry/v1alpha1/registryv1alpha1connect/repository_tag.connect.go index 715b406efc..f90b4bb7f2 100644 --- a/private/gen/proto/connect/buf/alpha/registry/v1alpha1/registryv1alpha1connect/repository_tag.connect.go +++ b/private/gen/proto/connect/buf/alpha/registry/v1alpha1/registryv1alpha1connect/repository_tag.connect.go @@ -53,6 +53,9 @@ const ( // RepositoryTagServiceListRepositoryTagsProcedure is the fully-qualified name of the // RepositoryTagService's ListRepositoryTags RPC. RepositoryTagServiceListRepositoryTagsProcedure = "/buf.alpha.registry.v1alpha1.RepositoryTagService/ListRepositoryTags" + // RepositoryTagServiceListRepositoryTagsForReferenceProcedure is the fully-qualified name of the + // RepositoryTagService's ListRepositoryTagsForReference RPC. + RepositoryTagServiceListRepositoryTagsForReferenceProcedure = "/buf.alpha.registry.v1alpha1.RepositoryTagService/ListRepositoryTagsForReference" ) // RepositoryTagServiceClient is a client for the buf.alpha.registry.v1alpha1.RepositoryTagService @@ -62,6 +65,9 @@ type RepositoryTagServiceClient interface { CreateRepositoryTag(context.Context, *connect_go.Request[v1alpha1.CreateRepositoryTagRequest]) (*connect_go.Response[v1alpha1.CreateRepositoryTagResponse], error) // ListRepositoryTags lists the repository tags associated with a Repository. ListRepositoryTags(context.Context, *connect_go.Request[v1alpha1.ListRepositoryTagsRequest]) (*connect_go.Response[v1alpha1.ListRepositoryTagsResponse], error) + // ListRepositoryTagsForReference lists the repository tags associated with a repository + // reference name. + ListRepositoryTagsForReference(context.Context, *connect_go.Request[v1alpha1.ListRepositoryTagsForReferenceRequest]) (*connect_go.Response[v1alpha1.ListRepositoryTagsForReferenceResponse], error) } // NewRepositoryTagServiceClient constructs a client for the @@ -87,13 +93,20 @@ func NewRepositoryTagServiceClient(httpClient connect_go.HTTPClient, baseURL str connect_go.WithIdempotency(connect_go.IdempotencyNoSideEffects), connect_go.WithClientOptions(opts...), ), + listRepositoryTagsForReference: connect_go.NewClient[v1alpha1.ListRepositoryTagsForReferenceRequest, v1alpha1.ListRepositoryTagsForReferenceResponse]( + httpClient, + baseURL+RepositoryTagServiceListRepositoryTagsForReferenceProcedure, + connect_go.WithIdempotency(connect_go.IdempotencyNoSideEffects), + connect_go.WithClientOptions(opts...), + ), } } // repositoryTagServiceClient implements RepositoryTagServiceClient. type repositoryTagServiceClient struct { - createRepositoryTag *connect_go.Client[v1alpha1.CreateRepositoryTagRequest, v1alpha1.CreateRepositoryTagResponse] - listRepositoryTags *connect_go.Client[v1alpha1.ListRepositoryTagsRequest, v1alpha1.ListRepositoryTagsResponse] + createRepositoryTag *connect_go.Client[v1alpha1.CreateRepositoryTagRequest, v1alpha1.CreateRepositoryTagResponse] + listRepositoryTags *connect_go.Client[v1alpha1.ListRepositoryTagsRequest, v1alpha1.ListRepositoryTagsResponse] + listRepositoryTagsForReference *connect_go.Client[v1alpha1.ListRepositoryTagsForReferenceRequest, v1alpha1.ListRepositoryTagsForReferenceResponse] } // CreateRepositoryTag calls buf.alpha.registry.v1alpha1.RepositoryTagService.CreateRepositoryTag. @@ -106,6 +119,12 @@ func (c *repositoryTagServiceClient) ListRepositoryTags(ctx context.Context, req return c.listRepositoryTags.CallUnary(ctx, req) } +// ListRepositoryTagsForReference calls +// buf.alpha.registry.v1alpha1.RepositoryTagService.ListRepositoryTagsForReference. +func (c *repositoryTagServiceClient) ListRepositoryTagsForReference(ctx context.Context, req *connect_go.Request[v1alpha1.ListRepositoryTagsForReferenceRequest]) (*connect_go.Response[v1alpha1.ListRepositoryTagsForReferenceResponse], error) { + return c.listRepositoryTagsForReference.CallUnary(ctx, req) +} + // RepositoryTagServiceHandler is an implementation of the // buf.alpha.registry.v1alpha1.RepositoryTagService service. type RepositoryTagServiceHandler interface { @@ -113,6 +132,9 @@ type RepositoryTagServiceHandler interface { CreateRepositoryTag(context.Context, *connect_go.Request[v1alpha1.CreateRepositoryTagRequest]) (*connect_go.Response[v1alpha1.CreateRepositoryTagResponse], error) // ListRepositoryTags lists the repository tags associated with a Repository. ListRepositoryTags(context.Context, *connect_go.Request[v1alpha1.ListRepositoryTagsRequest]) (*connect_go.Response[v1alpha1.ListRepositoryTagsResponse], error) + // ListRepositoryTagsForReference lists the repository tags associated with a repository + // reference name. + ListRepositoryTagsForReference(context.Context, *connect_go.Request[v1alpha1.ListRepositoryTagsForReferenceRequest]) (*connect_go.Response[v1alpha1.ListRepositoryTagsForReferenceResponse], error) } // NewRepositoryTagServiceHandler builds an HTTP handler from the service implementation. It returns @@ -133,12 +155,20 @@ func NewRepositoryTagServiceHandler(svc RepositoryTagServiceHandler, opts ...con connect_go.WithIdempotency(connect_go.IdempotencyNoSideEffects), connect_go.WithHandlerOptions(opts...), ) + repositoryTagServiceListRepositoryTagsForReferenceHandler := connect_go.NewUnaryHandler( + RepositoryTagServiceListRepositoryTagsForReferenceProcedure, + svc.ListRepositoryTagsForReference, + connect_go.WithIdempotency(connect_go.IdempotencyNoSideEffects), + connect_go.WithHandlerOptions(opts...), + ) return "/buf.alpha.registry.v1alpha1.RepositoryTagService/", http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { switch r.URL.Path { case RepositoryTagServiceCreateRepositoryTagProcedure: repositoryTagServiceCreateRepositoryTagHandler.ServeHTTP(w, r) case RepositoryTagServiceListRepositoryTagsProcedure: repositoryTagServiceListRepositoryTagsHandler.ServeHTTP(w, r) + case RepositoryTagServiceListRepositoryTagsForReferenceProcedure: + repositoryTagServiceListRepositoryTagsForReferenceHandler.ServeHTTP(w, r) default: http.NotFound(w, r) } @@ -155,3 +185,7 @@ func (UnimplementedRepositoryTagServiceHandler) CreateRepositoryTag(context.Cont func (UnimplementedRepositoryTagServiceHandler) ListRepositoryTags(context.Context, *connect_go.Request[v1alpha1.ListRepositoryTagsRequest]) (*connect_go.Response[v1alpha1.ListRepositoryTagsResponse], error) { return nil, connect_go.NewError(connect_go.CodeUnimplemented, errors.New("buf.alpha.registry.v1alpha1.RepositoryTagService.ListRepositoryTags is not implemented")) } + +func (UnimplementedRepositoryTagServiceHandler) ListRepositoryTagsForReference(context.Context, *connect_go.Request[v1alpha1.ListRepositoryTagsForReferenceRequest]) (*connect_go.Response[v1alpha1.ListRepositoryTagsForReferenceResponse], error) { + return nil, connect_go.NewError(connect_go.CodeUnimplemented, errors.New("buf.alpha.registry.v1alpha1.RepositoryTagService.ListRepositoryTagsForReference is not implemented")) +} diff --git a/private/gen/proto/go/buf/alpha/registry/v1alpha1/repository_tag.pb.go b/private/gen/proto/go/buf/alpha/registry/v1alpha1/repository_tag.pb.go index 10b26eb999..70fac021a9 100644 --- a/private/gen/proto/go/buf/alpha/registry/v1alpha1/repository_tag.pb.go +++ b/private/gen/proto/go/buf/alpha/registry/v1alpha1/repository_tag.pb.go @@ -363,6 +363,144 @@ func (x *ListRepositoryTagsResponse) GetNextPageToken() string { return "" } +type ListRepositoryTagsForReferenceRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The ID of the repository whose tags should be listed. + RepositoryId string `protobuf:"bytes,1,opt,name=repository_id,json=repositoryId,proto3" json:"repository_id,omitempty"` + // The name of the reference. + Reference string `protobuf:"bytes,2,opt,name=reference,proto3" json:"reference,omitempty"` + PageSize uint32 `protobuf:"varint,3,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` + // The first page is returned if this is empty. + PageToken string `protobuf:"bytes,4,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"` + Reverse bool `protobuf:"varint,5,opt,name=reverse,proto3" json:"reverse,omitempty"` +} + +func (x *ListRepositoryTagsForReferenceRequest) Reset() { + *x = ListRepositoryTagsForReferenceRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_buf_alpha_registry_v1alpha1_repository_tag_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListRepositoryTagsForReferenceRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListRepositoryTagsForReferenceRequest) ProtoMessage() {} + +func (x *ListRepositoryTagsForReferenceRequest) ProtoReflect() protoreflect.Message { + mi := &file_buf_alpha_registry_v1alpha1_repository_tag_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListRepositoryTagsForReferenceRequest.ProtoReflect.Descriptor instead. +func (*ListRepositoryTagsForReferenceRequest) Descriptor() ([]byte, []int) { + return file_buf_alpha_registry_v1alpha1_repository_tag_proto_rawDescGZIP(), []int{5} +} + +func (x *ListRepositoryTagsForReferenceRequest) GetRepositoryId() string { + if x != nil { + return x.RepositoryId + } + return "" +} + +func (x *ListRepositoryTagsForReferenceRequest) GetReference() string { + if x != nil { + return x.Reference + } + return "" +} + +func (x *ListRepositoryTagsForReferenceRequest) GetPageSize() uint32 { + if x != nil { + return x.PageSize + } + return 0 +} + +func (x *ListRepositoryTagsForReferenceRequest) GetPageToken() string { + if x != nil { + return x.PageToken + } + return "" +} + +func (x *ListRepositoryTagsForReferenceRequest) GetReverse() bool { + if x != nil { + return x.Reverse + } + return false +} + +type ListRepositoryTagsForReferenceResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + RepositoryTags []*RepositoryTag `protobuf:"bytes,1,rep,name=repository_tags,json=repositoryTags,proto3" json:"repository_tags,omitempty"` + // There are no more pages if this is empty. + NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"` +} + +func (x *ListRepositoryTagsForReferenceResponse) Reset() { + *x = ListRepositoryTagsForReferenceResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_buf_alpha_registry_v1alpha1_repository_tag_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListRepositoryTagsForReferenceResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListRepositoryTagsForReferenceResponse) ProtoMessage() {} + +func (x *ListRepositoryTagsForReferenceResponse) ProtoReflect() protoreflect.Message { + mi := &file_buf_alpha_registry_v1alpha1_repository_tag_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListRepositoryTagsForReferenceResponse.ProtoReflect.Descriptor instead. +func (*ListRepositoryTagsForReferenceResponse) Descriptor() ([]byte, []int) { + return file_buf_alpha_registry_v1alpha1_repository_tag_proto_rawDescGZIP(), []int{6} +} + +func (x *ListRepositoryTagsForReferenceResponse) GetRepositoryTags() []*RepositoryTag { + if x != nil { + return x.RepositoryTags + } + return nil +} + +func (x *ListRepositoryTagsForReferenceResponse) GetNextPageToken() string { + if x != nil { + return x.NextPageToken + } + return "" +} + var File_buf_alpha_registry_v1alpha1_repository_tag_proto protoreflect.FileDescriptor var file_buf_alpha_registry_v1alpha1_repository_tag_proto_rawDesc = []byte{ @@ -417,45 +555,79 @@ var file_buf_alpha_registry_v1alpha1_repository_tag_proto_rawDesc = []byte{ 0x54, 0x61, 0x67, 0x52, 0x0e, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x54, 0x61, 0x67, 0x73, 0x12, 0x26, 0x0a, 0x0f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6e, 0x65, - 0x78, 0x74, 0x50, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x32, 0xb3, 0x02, 0x0a, 0x14, - 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x54, 0x61, 0x67, 0x53, 0x65, 0x72, - 0x76, 0x69, 0x63, 0x65, 0x12, 0x8d, 0x01, 0x0a, 0x13, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, - 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x54, 0x61, 0x67, 0x12, 0x37, 0x2e, 0x62, - 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, - 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, - 0x65, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x54, 0x61, 0x67, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x38, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, - 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, - 0x68, 0x61, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, - 0x74, 0x6f, 0x72, 0x79, 0x54, 0x61, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, - 0x03, 0x90, 0x02, 0x02, 0x12, 0x8a, 0x01, 0x0a, 0x12, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x70, - 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x54, 0x61, 0x67, 0x73, 0x12, 0x36, 0x2e, 0x62, 0x75, - 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, - 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, - 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x54, 0x61, 0x67, 0x73, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x37, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, + 0x78, 0x74, 0x50, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0xc0, 0x01, 0x0a, 0x25, + 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x54, 0x61, + 0x67, 0x73, 0x46, 0x6f, 0x72, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x23, 0x0a, 0x0d, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, + 0x6f, 0x72, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x72, 0x65, + 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x49, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x72, 0x65, + 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x72, + 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, + 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x08, 0x70, 0x61, 0x67, + 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, + 0x6b, 0x65, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x61, 0x67, 0x65, 0x54, + 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x18, 0x0a, 0x07, 0x72, 0x65, 0x76, 0x65, 0x72, 0x73, 0x65, 0x18, + 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x72, 0x65, 0x76, 0x65, 0x72, 0x73, 0x65, 0x22, 0xa5, + 0x01, 0x0a, 0x26, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, + 0x79, 0x54, 0x61, 0x67, 0x73, 0x46, 0x6f, 0x72, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, + 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x53, 0x0a, 0x0f, 0x72, 0x65, 0x70, + 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x5f, 0x74, 0x61, 0x67, 0x73, 0x18, 0x01, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, + 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, + 0x2e, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x54, 0x61, 0x67, 0x52, 0x0e, + 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x54, 0x61, 0x67, 0x73, 0x12, 0x26, + 0x0a, 0x0f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, + 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6e, 0x65, 0x78, 0x74, 0x50, 0x61, 0x67, + 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x32, 0xe4, 0x03, 0x0a, 0x14, 0x52, 0x65, 0x70, 0x6f, 0x73, + 0x69, 0x74, 0x6f, 0x72, 0x79, 0x54, 0x61, 0x67, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, + 0x8d, 0x01, 0x0a, 0x13, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, + 0x74, 0x6f, 0x72, 0x79, 0x54, 0x61, 0x67, 0x12, 0x37, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, + 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, + 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x70, 0x6f, + 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x54, 0x61, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x38, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, + 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x43, + 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x54, + 0x61, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x03, 0x90, 0x02, 0x02, 0x12, + 0x8a, 0x01, 0x0a, 0x12, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, + 0x72, 0x79, 0x54, 0x61, 0x67, 0x73, 0x12, 0x36, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, + 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, + 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, + 0x6f, 0x72, 0x79, 0x54, 0x61, 0x67, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x37, + 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, + 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4c, 0x69, 0x73, + 0x74, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x54, 0x61, 0x67, 0x73, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x03, 0x90, 0x02, 0x01, 0x12, 0xae, 0x01, 0x0a, + 0x1e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x54, + 0x61, 0x67, 0x73, 0x46, 0x6f, 0x72, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x12, + 0x42, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, + 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4c, 0x69, + 0x73, 0x74, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x54, 0x61, 0x67, 0x73, + 0x46, 0x6f, 0x72, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x43, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, - 0x54, 0x61, 0x67, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x03, 0x90, 0x02, - 0x01, 0x42, 0x9f, 0x02, 0x0a, 0x1f, 0x63, 0x6f, 0x6d, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, - 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, - 0x6c, 0x70, 0x68, 0x61, 0x31, 0x42, 0x12, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, - 0x79, 0x54, 0x61, 0x67, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x59, 0x67, 0x69, 0x74, - 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x62, 0x75, 0x66, 0x62, 0x75, 0x69, 0x6c, 0x64, - 0x2f, 0x62, 0x75, 0x66, 0x2f, 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x2f, 0x67, 0x65, 0x6e, - 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x2f, 0x62, 0x75, 0x66, 0x2f, 0x61, 0x6c, - 0x70, 0x68, 0x61, 0x2f, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2f, 0x76, 0x31, 0x61, - 0x6c, 0x70, 0x68, 0x61, 0x31, 0x3b, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x76, 0x31, - 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0xa2, 0x02, 0x03, 0x42, 0x41, 0x52, 0xaa, 0x02, 0x1b, 0x42, - 0x75, 0x66, 0x2e, 0x41, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, - 0x79, 0x2e, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0xca, 0x02, 0x1b, 0x42, 0x75, 0x66, - 0x5c, 0x41, 0x6c, 0x70, 0x68, 0x61, 0x5c, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x5c, - 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0xe2, 0x02, 0x27, 0x42, 0x75, 0x66, 0x5c, 0x41, - 0x6c, 0x70, 0x68, 0x61, 0x5c, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x5c, 0x56, 0x31, - 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, - 0x74, 0x61, 0xea, 0x02, 0x1e, 0x42, 0x75, 0x66, 0x3a, 0x3a, 0x41, 0x6c, 0x70, 0x68, 0x61, 0x3a, - 0x3a, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x3a, 0x3a, 0x56, 0x31, 0x61, 0x6c, 0x70, - 0x68, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x54, 0x61, 0x67, 0x73, 0x46, 0x6f, 0x72, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x03, 0x90, 0x02, 0x01, 0x42, 0x9f, 0x02, + 0x0a, 0x1f, 0x63, 0x6f, 0x6d, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, + 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, + 0x31, 0x42, 0x12, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x54, 0x61, 0x67, + 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x59, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, + 0x63, 0x6f, 0x6d, 0x2f, 0x62, 0x75, 0x66, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x2f, 0x62, 0x75, 0x66, + 0x2f, 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x2f, 0x62, 0x75, 0x66, 0x2f, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, + 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, + 0x31, 0x3b, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, + 0x61, 0x31, 0xa2, 0x02, 0x03, 0x42, 0x41, 0x52, 0xaa, 0x02, 0x1b, 0x42, 0x75, 0x66, 0x2e, 0x41, + 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x56, 0x31, + 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0xca, 0x02, 0x1b, 0x42, 0x75, 0x66, 0x5c, 0x41, 0x6c, 0x70, + 0x68, 0x61, 0x5c, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x5c, 0x56, 0x31, 0x61, 0x6c, + 0x70, 0x68, 0x61, 0x31, 0xe2, 0x02, 0x27, 0x42, 0x75, 0x66, 0x5c, 0x41, 0x6c, 0x70, 0x68, 0x61, + 0x5c, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x5c, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, + 0x61, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, + 0x1e, 0x42, 0x75, 0x66, 0x3a, 0x3a, 0x41, 0x6c, 0x70, 0x68, 0x61, 0x3a, 0x3a, 0x52, 0x65, 0x67, + 0x69, 0x73, 0x74, 0x72, 0x79, 0x3a, 0x3a, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x62, + 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -470,28 +642,33 @@ func file_buf_alpha_registry_v1alpha1_repository_tag_proto_rawDescGZIP() []byte return file_buf_alpha_registry_v1alpha1_repository_tag_proto_rawDescData } -var file_buf_alpha_registry_v1alpha1_repository_tag_proto_msgTypes = make([]protoimpl.MessageInfo, 5) +var file_buf_alpha_registry_v1alpha1_repository_tag_proto_msgTypes = make([]protoimpl.MessageInfo, 7) var file_buf_alpha_registry_v1alpha1_repository_tag_proto_goTypes = []interface{}{ - (*RepositoryTag)(nil), // 0: buf.alpha.registry.v1alpha1.RepositoryTag - (*CreateRepositoryTagRequest)(nil), // 1: buf.alpha.registry.v1alpha1.CreateRepositoryTagRequest - (*CreateRepositoryTagResponse)(nil), // 2: buf.alpha.registry.v1alpha1.CreateRepositoryTagResponse - (*ListRepositoryTagsRequest)(nil), // 3: buf.alpha.registry.v1alpha1.ListRepositoryTagsRequest - (*ListRepositoryTagsResponse)(nil), // 4: buf.alpha.registry.v1alpha1.ListRepositoryTagsResponse - (*timestamppb.Timestamp)(nil), // 5: google.protobuf.Timestamp + (*RepositoryTag)(nil), // 0: buf.alpha.registry.v1alpha1.RepositoryTag + (*CreateRepositoryTagRequest)(nil), // 1: buf.alpha.registry.v1alpha1.CreateRepositoryTagRequest + (*CreateRepositoryTagResponse)(nil), // 2: buf.alpha.registry.v1alpha1.CreateRepositoryTagResponse + (*ListRepositoryTagsRequest)(nil), // 3: buf.alpha.registry.v1alpha1.ListRepositoryTagsRequest + (*ListRepositoryTagsResponse)(nil), // 4: buf.alpha.registry.v1alpha1.ListRepositoryTagsResponse + (*ListRepositoryTagsForReferenceRequest)(nil), // 5: buf.alpha.registry.v1alpha1.ListRepositoryTagsForReferenceRequest + (*ListRepositoryTagsForReferenceResponse)(nil), // 6: buf.alpha.registry.v1alpha1.ListRepositoryTagsForReferenceResponse + (*timestamppb.Timestamp)(nil), // 7: google.protobuf.Timestamp } var file_buf_alpha_registry_v1alpha1_repository_tag_proto_depIdxs = []int32{ - 5, // 0: buf.alpha.registry.v1alpha1.RepositoryTag.create_time:type_name -> google.protobuf.Timestamp + 7, // 0: buf.alpha.registry.v1alpha1.RepositoryTag.create_time:type_name -> google.protobuf.Timestamp 0, // 1: buf.alpha.registry.v1alpha1.CreateRepositoryTagResponse.repository_tag:type_name -> buf.alpha.registry.v1alpha1.RepositoryTag 0, // 2: buf.alpha.registry.v1alpha1.ListRepositoryTagsResponse.repository_tags:type_name -> buf.alpha.registry.v1alpha1.RepositoryTag - 1, // 3: buf.alpha.registry.v1alpha1.RepositoryTagService.CreateRepositoryTag:input_type -> buf.alpha.registry.v1alpha1.CreateRepositoryTagRequest - 3, // 4: buf.alpha.registry.v1alpha1.RepositoryTagService.ListRepositoryTags:input_type -> buf.alpha.registry.v1alpha1.ListRepositoryTagsRequest - 2, // 5: buf.alpha.registry.v1alpha1.RepositoryTagService.CreateRepositoryTag:output_type -> buf.alpha.registry.v1alpha1.CreateRepositoryTagResponse - 4, // 6: buf.alpha.registry.v1alpha1.RepositoryTagService.ListRepositoryTags:output_type -> buf.alpha.registry.v1alpha1.ListRepositoryTagsResponse - 5, // [5:7] is the sub-list for method output_type - 3, // [3:5] is the sub-list for method input_type - 3, // [3:3] is the sub-list for extension type_name - 3, // [3:3] is the sub-list for extension extendee - 0, // [0:3] is the sub-list for field type_name + 0, // 3: buf.alpha.registry.v1alpha1.ListRepositoryTagsForReferenceResponse.repository_tags:type_name -> buf.alpha.registry.v1alpha1.RepositoryTag + 1, // 4: buf.alpha.registry.v1alpha1.RepositoryTagService.CreateRepositoryTag:input_type -> buf.alpha.registry.v1alpha1.CreateRepositoryTagRequest + 3, // 5: buf.alpha.registry.v1alpha1.RepositoryTagService.ListRepositoryTags:input_type -> buf.alpha.registry.v1alpha1.ListRepositoryTagsRequest + 5, // 6: buf.alpha.registry.v1alpha1.RepositoryTagService.ListRepositoryTagsForReference:input_type -> buf.alpha.registry.v1alpha1.ListRepositoryTagsForReferenceRequest + 2, // 7: buf.alpha.registry.v1alpha1.RepositoryTagService.CreateRepositoryTag:output_type -> buf.alpha.registry.v1alpha1.CreateRepositoryTagResponse + 4, // 8: buf.alpha.registry.v1alpha1.RepositoryTagService.ListRepositoryTags:output_type -> buf.alpha.registry.v1alpha1.ListRepositoryTagsResponse + 6, // 9: buf.alpha.registry.v1alpha1.RepositoryTagService.ListRepositoryTagsForReference:output_type -> buf.alpha.registry.v1alpha1.ListRepositoryTagsForReferenceResponse + 7, // [7:10] is the sub-list for method output_type + 4, // [4:7] is the sub-list for method input_type + 4, // [4:4] is the sub-list for extension type_name + 4, // [4:4] is the sub-list for extension extendee + 0, // [0:4] is the sub-list for field type_name } func init() { file_buf_alpha_registry_v1alpha1_repository_tag_proto_init() } @@ -560,6 +737,30 @@ func file_buf_alpha_registry_v1alpha1_repository_tag_proto_init() { return nil } } + file_buf_alpha_registry_v1alpha1_repository_tag_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListRepositoryTagsForReferenceRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_buf_alpha_registry_v1alpha1_repository_tag_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListRepositoryTagsForReferenceResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } } type x struct{} out := protoimpl.TypeBuilder{ @@ -567,7 +768,7 @@ func file_buf_alpha_registry_v1alpha1_repository_tag_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_buf_alpha_registry_v1alpha1_repository_tag_proto_rawDesc, NumEnums: 0, - NumMessages: 5, + NumMessages: 7, NumExtensions: 0, NumServices: 1, }, diff --git a/proto/buf/alpha/registry/v1alpha1/repository_tag.proto b/proto/buf/alpha/registry/v1alpha1/repository_tag.proto index 5d86e2a134..39f1ceaf32 100644 --- a/proto/buf/alpha/registry/v1alpha1/repository_tag.proto +++ b/proto/buf/alpha/registry/v1alpha1/repository_tag.proto @@ -43,6 +43,11 @@ service RepositoryTagService { rpc ListRepositoryTags(ListRepositoryTagsRequest) returns (ListRepositoryTagsResponse) { option idempotency_level = NO_SIDE_EFFECTS; } + // ListRepositoryTagsForReference lists the repository tags associated with a repository + // reference name. + rpc ListRepositoryTagsForReference(ListRepositoryTagsForReferenceRequest) returns (ListRepositoryTagsForReferenceResponse) { + option idempotency_level = NO_SIDE_EFFECTS; + } } message CreateRepositoryTagRequest { @@ -72,3 +77,20 @@ message ListRepositoryTagsResponse { // There are no more pages if this is empty. string next_page_token = 2; } + +message ListRepositoryTagsForReferenceRequest { + // The ID of the repository whose tags should be listed. + string repository_id = 1; + // The name of the reference. + string reference = 2; + uint32 page_size = 3; + // The first page is returned if this is empty. + string page_token = 4; + bool reverse = 5; +} + +message ListRepositoryTagsForReferenceResponse { + repeated RepositoryTag repository_tags = 1; + // There are no more pages if this is empty. + string next_page_token = 2; +}