Skip to content

Database governance built for humans and agents — controlling changes and access across every major database.

chore: changelist api (#8449)

Danny Xu0005e9c379b6
diff --git a/backend/api/v1/changelist_service.go b/backend/api/v1/changelist_service.go
new file mode 100644
index 0000000000..7e77b312ff
--- /dev/null
+++ b/backend/api/v1/changelist_service.go
@@ -0,0 +1,270 @@
+package v1
+
+import (
+ "context"
+ "fmt"
+
+ "google.golang.org/grpc/codes"
+ "google.golang.org/grpc/status"
+ "google.golang.org/protobuf/types/known/emptypb"
+ "google.golang.org/protobuf/types/known/timestamppb"
+
+ "github.com/bytebase/bytebase/backend/common"
+ "github.com/bytebase/bytebase/backend/store"
+ storepb "github.com/bytebase/bytebase/proto/generated-go/store"
+ v1pb "github.com/bytebase/bytebase/proto/generated-go/v1"
+)
+
+// ChangelistService implements the changelist service.
+type ChangelistService struct {
+ v1pb.UnimplementedChangelistServiceServer
+ store *store.Store
+}
+
+// NewChangelistService creates a new ChangelistService.
+func NewChangelistService(store *store.Store) *ChangelistService {
+ return &ChangelistService{
+ store: store,
+ }
+}
+
+// CreateChangelist creates a changelist.
+func (s *ChangelistService) CreateChangelist(ctx context.Context, request *v1pb.CreateChangelistRequest) (*v1pb.Changelist, error) {
+ if request.Changelist == nil {
+ return nil, status.Errorf(codes.InvalidArgument, "changelist must be set")
+ }
+ currentPrincipalID := ctx.Value(common.PrincipalIDContextKey).(int)
+
+ projectResourceID, err := common.GetProjectID(request.Parent)
+ if err != nil {
+ return nil, status.Errorf(codes.InvalidArgument, err.Error())
+ }
+ project, err := s.store.GetProjectV2(ctx, &store.FindProjectMessage{
+ ResourceID: &projectResourceID,
+ })
+ if err != nil {
+ return nil, status.Errorf(codes.Internal, fmt.Sprintf("failed to get project with resource id %q, err: %s", projectResourceID, err.Error()))
+ }
+ if project == nil {
+ return nil, status.Errorf(codes.NotFound, fmt.Sprintf("project with resource id %q not found", projectResourceID))
+ }
+ if project.Deleted {
+ return nil, status.Errorf(codes.NotFound, fmt.Sprintf("project with resource id %q had deleted", projectResourceID))
+ }
+
+ changelist, err := s.store.CreateChangelist(ctx, &store.ChangelistMessage{
+ ProjectID: project.ResourceID,
+ ResourceID: request.ChangelistId,
+ Payload: convertV1ChangelistPayload(request.Changelist),
+ CreatorID: currentPrincipalID,
+ })
+ if err != nil {
+ return nil, err
+ }
+ v1Changelist, err := s.convertStoreChangelist(ctx, changelist)
+ if err != nil {
+ return nil, err
+ }
+ return v1Changelist, nil
+}
+
+// GetChangelist gets a changelist.
+func (s *ChangelistService) GetChangelist(ctx context.Context, request *v1pb.GetChangelistRequest) (*v1pb.Changelist, error) {
+ projectID, changelistID, err := common.GetProjectIDChangelistID(request.Name)
+ if err != nil {
+ return nil, status.Errorf(codes.InvalidArgument, err.Error())
+ }
+ project, err := s.store.GetProjectV2(ctx, &store.FindProjectMessage{
+ ResourceID: &projectID,
+ })
+ if err != nil {
+ return nil, status.Errorf(codes.Internal, err.Error())
+ }
+ if project == nil {
+ return nil, status.Errorf(codes.NotFound, "project %q not found", request.Name)
+ }
+
+ changelist, err := s.store.GetChangelist(ctx, &store.FindChangelistMessage{ProjectID: &project.ResourceID, ResourceID: &changelistID})
+ if err != nil {
+ return nil, err
+ }
+ v1Changelist, err := s.convertStoreChangelist(ctx, changelist)
+ if err != nil {
+ return nil, err
+ }
+ return v1Changelist, nil
+}
+
+// GetChangelist gets a changelist.
+func (s *ChangelistService) ListChangelists(ctx context.Context, request *v1pb.ListChangelistsRequest) (*v1pb.ListChangelistsResponse, error) {
+ projectResourceID, err := common.GetProjectID(request.Parent)
+ if err != nil {
+ return nil, status.Errorf(codes.InvalidArgument, err.Error())
+ }
+ project, err := s.store.GetProjectV2(ctx, &store.FindProjectMessage{
+ ResourceID: &projectResourceID,
+ })
+ if err != nil {
+ return nil, status.Errorf(codes.Internal, fmt.Sprintf("failed to get project with resource id %q, err: %s", projectResourceID, err.Error()))
+ }
+ if project == nil {
+ return nil, status.Errorf(codes.NotFound, fmt.Sprintf("project with resource id %q not found", projectResourceID))
+ }
+ if project.Deleted {
+ return nil, status.Errorf(codes.NotFound, fmt.Sprintf("project with resource id %q had deleted", projectResourceID))
+ }
+
+ changelists, err := s.store.ListChangelists(ctx, &store.FindChangelistMessage{ProjectID: &project.ResourceID})
+ if err != nil {
+ return nil, err
+ }
+
+ resp := &v1pb.ListChangelistsResponse{}
+ for _, changelist := range changelists {
+ v1Changelist, err := s.convertStoreChangelist(ctx, changelist)
+ if err != nil {
+ return nil, err
+ }
+ resp.Changelists = append(resp.Changelists, v1Changelist)
+ }
+ return nil, nil
+}
+
+// UpdateChangelist updates a changelist.
+func (s *ChangelistService) UpdateChangelist(ctx context.Context, request *v1pb.UpdateChangelistRequest) (*v1pb.Changelist, error) {
+ if request.Changelist == nil {
+ return nil, status.Errorf(codes.InvalidArgument, "changelist must be set")
+ }
+ if request.UpdateMask == nil {
+ return nil, status.Errorf(codes.InvalidArgument, "update_mask must be set")
+ }
+
+ projectID, changelistID, err := common.GetProjectIDChangelistID(request.Changelist.Name)
+ if err != nil {
+ return nil, status.Errorf(codes.InvalidArgument, err.Error())
+ }
+ project, err := s.store.GetProjectV2(ctx, &store.FindProjectMessage{
+ ResourceID: &projectID,
+ })
+ if err != nil {
+ return nil, status.Errorf(codes.Internal, err.Error())
+ }
+ if project == nil {
+ return nil, status.Errorf(codes.NotFound, "project %q not found", projectID)
+ }
+ changelist, err := s.store.GetChangelist(ctx, &store.FindChangelistMessage{ProjectID: &project.ResourceID, ResourceID: &changelistID})
+ if err != nil {
+ return nil, err
+ }
+ if changelist == nil {
+ return nil, status.Errorf(codes.NotFound, "changelist %q not found", changelistID)
+ }
+
+ update := &store.UpdateChangelistMessage{
+ UpdaterID: ctx.Value(common.PrincipalIDContextKey).(int),
+ ProjectID: project.ResourceID,
+ ResourceID: changelistID,
+ }
+ newChangelist := convertV1ChangelistPayload(request.Changelist)
+
+ for _, path := range request.UpdateMask.Paths {
+ switch path {
+ case "description":
+ changelist.Payload.Description = newChangelist.Description
+ case "changes":
+ changelist.Payload.Changes = newChangelist.Changes
+ default:
+ return nil, status.Errorf(codes.InvalidArgument, `unsupport update_mask "%s"`, path)
+ }
+ }
+ update.Payload = newChangelist
+ if err := s.store.UpdateChangelist(ctx, update); err != nil {
+ return nil, err
+ }
+ changelist, err = s.store.GetChangelist(ctx, &store.FindChangelistMessage{ProjectID: &project.ResourceID, ResourceID: &changelistID})
+ if err != nil {
+ return nil, err
+ }
+
+ v1Changelist, err := s.convertStoreChangelist(ctx, changelist)
+ if err != nil {
+ return nil, err
+ }
+ return v1Changelist, nil
+}
+
+// DeleteChangelist deletes a changelist.
+func (s *ChangelistService) DeleteChangelist(ctx context.Context, request *v1pb.DeleteChangelistRequest) (*emptypb.Empty, error) {
+ projectID, changelistID, err := common.GetProjectIDChangelistID(request.Name)
+ if err != nil {
+ return nil, status.Errorf(codes.InvalidArgument, err.Error())
+ }
+ project, err := s.store.GetProjectV2(ctx, &store.FindProjectMessage{
+ ResourceID: &projectID,
+ })
+ if err != nil {
+ return nil, status.Errorf(codes.Internal, err.Error())
+ }
+ if project == nil {
+ return nil, status.Errorf(codes.NotFound, "project %q not found", projectID)
+ }
+ changelist, err := s.store.GetChangelist(ctx, &store.FindChangelistMessage{ProjectID: &project.ResourceID, ResourceID: &changelistID})
+ if err != nil {
+ return nil, err
+ }
+ if changelist == nil {
+ return nil, status.Errorf(codes.NotFound, "changelist %q not found", changelistID)
+ }
+
+ if err := s.store.DeleteChangelist(ctx, project.ResourceID, changelistID); err != nil {
+ return nil, err
+ }
+
+ return &emptypb.Empty{}, nil
+}
+
+func convertV1ChangelistPayload(changelist *v1pb.Changelist) *storepb.Changelist {
+ storeChangelist := &storepb.Changelist{
+ Description: changelist.Description,
+ }
+ for _, change := range changelist.Changes {
+ storeChangelist.Changes = append(storeChangelist.Changes, &storepb.Changelist_Change{
+ Sheet: change.Sheet,
+ Source: change.Source,
+ })
+ }
+ return storeChangelist
+}
+
+func (s *ChangelistService) convertStoreChangelist(ctx context.Context, changelist *store.ChangelistMessage) (*v1pb.Changelist, error) {
+ creator, err := s.store.GetUserByID(ctx, changelist.CreatorID)
+ if err != nil {
+ return nil, status.Errorf(codes.Internal, fmt.Sprintf("failed to get creator: %v", err))
+ }
+ if creator == nil {
+ return nil, status.Errorf(codes.NotFound, fmt.Sprintf("cannot find the creator: %d", changelist.CreatorID))
+ }
+ updater, err := s.store.GetUserByID(ctx, changelist.UpdaterID)
+ if err != nil {
+ return nil, status.Errorf(codes.Internal, fmt.Sprintf("failed to get updater: %v", err))
+ }
+ if updater == nil {
+ return nil, status.Errorf(codes.NotFound, fmt.Sprintf("cannot find the updater: %d", changelist.UpdaterID))
+ }
+
+ v1Changelist := &v1pb.Changelist{
+ Name: fmt.Sprintf("projects/%s/changelists/%s", changelist.ProjectID, changelist.ResourceID),
+ Description: changelist.Payload.Description,
+ CreateTime: timestamppb.New(changelist.CreatedTime),
+ UpdateTime: timestamppb.New(changelist.UpdatedTime),
+ Creator: fmt.Sprintf("users/%s", creator.Email),
+ Updater: fmt.Sprintf("users/%s", updater.Email),
+ }
+ for _, change := range changelist.Payload.Changes {
+ v1Changelist.Changes = append(v1Changelist.Changes, &v1pb.Changelist_Change{
+ Sheet: change.Sheet,
+ Source: change.Source,
+ })
+ }
+ return v1Changelist, nil
+}
diff --git a/backend/common/resource_name.go b/backend/common/resource_name.go
index 1e8b7fab0a..0fcf2738e5 100644
--- a/backend/common/resource_name.go
+++ b/backend/common/resource_name.go
@@ -43,6 +43,7 @@ const (
InboxNamePrefix = "inbox/"
SchemaDesignPrefix = "schemaDesigns/"
DeploymentConfigPrefix = "deploymentConfigs/"
+ ChangelistsPrefix = "changelists/"
BackupSettingSuffix = "/backupSetting"
SchemaSuffix = "/schema"
@@ -95,6 +96,14 @@ func GetProjectIDDeploymentConfigID(name string) (string, string, error) {
return tokens[0], tokens[1], nil
}
+func GetProjectIDChangelistID(name string) (string, string, error) {
+ tokens, err := GetNameParentTokens(name, ProjectNamePrefix, ChangelistsPrefix)
+ if err != nil {
+ return "", "", err
+ }
+ return tokens[0], tokens[1], nil
+}
+
// GetUIDFromName returns the UID from a resource name.
func GetUIDFromName(name, prefix string) (int, error) {
tokens, err := GetNameParentTokens(name, prefix)
diff --git a/backend/server/grpc_routes.go b/backend/server/grpc_routes.go
index 74edbeb2c7..6955e7babf 100644
--- a/backend/server/grpc_routes.go
+++ b/backend/server/grpc_routes.go
@@ -87,6 +87,7 @@ func configureGrpcRouters(
v1pb.RegisterLoggingServiceServer(grpcServer, v1.NewLoggingService(stores))
v1pb.RegisterBookmarkServiceServer(grpcServer, v1.NewBookmarkService(stores))
v1pb.RegisterInboxServiceServer(grpcServer, v1.NewInboxService(stores))
+ v1pb.RegisterChangelistServiceServer(grpcServer, v1.NewChangelistService(stores))
// REST gateway proxy.
grpcEndpoint := fmt.Sprintf(":%d", profile.GrpcPort)
@@ -158,5 +159,8 @@ func configureGrpcRouters(
if err := v1pb.RegisterInboxServiceHandler(ctx, mux, grpcConn); err != nil {
return nil, nil, err
}
+ if err := v1pb.RegisterChangelistServiceHandler(ctx, mux, grpcConn); err != nil {
+ return nil, nil, err
+ }
return rolloutService, issueService, nil
}
diff --git a/backend/store/changelist.go b/backend/store/changelist.go
index 5ae316fbd4..6a44e1cdc0 100644
--- a/backend/store/changelist.go
+++ b/backend/store/changelist.go
@@ -135,6 +135,60 @@ func (s *Store) ListChangelists(ctx context.Context, find *FindChangelistMessage
return changelists, nil
}
+// CreateChangelist creates a changelist.
+func (s *Store) CreateChangelist(ctx context.Context, create *ChangelistMessage) (*ChangelistMessage, error) {
+ project, err := s.GetProjectV2(ctx, &FindProjectMessage{ResourceID: &create.ProjectID})
+ if err != nil {
+ return nil, err
+ }
+ if create.Payload == nil {
+ create.Payload = &storepb.Changelist{}
+ }
+ create.UpdaterID = create.CreatorID
+ payload, err := protojson.Marshal(create.Payload)
+ if err != nil {
+ return nil, err
+ }
+
+ query := `
+ INSERT INTO changelist (
+ creator_id,
+ updater_id,
+ project_id,
+ name,
+ payload
+ )
+ VALUES ($1, $2, $3, $4, $5);
+ `
+
+ tx, err := s.db.BeginTx(ctx, nil)
+ if err != nil {
+ return nil, err
+ }
+ defer tx.Rollback()
+ var createdTs, updatedTs int64
+ if err := tx.QueryRowContext(ctx, query,
+ create.CreatorID,
+ create.CreatorID,
+ project.UID,
+ create.ResourceID,
+ payload,
+ ).Scan(
+ &create.UID,
+ &createdTs,
+ &updatedTs,
+ ); err != nil {
+ return nil, err
+ }
+ create.CreatedTime = time.Unix(createdTs, 0)
+ create.UpdatedTime = time.Unix(updatedTs, 0)
+ if err := tx.Commit(); err != nil {
+ return nil, err
+ }
+
+ return create, nil
+}
+
// UpdateChangelist updates a changelist.
func (s *Store) UpdateChangelist(ctx context.Context, update *UpdateChangelistMessage) error {
project, err := s.GetProjectV2(ctx, &FindProjectMessage{ResourceID: &update.ProjectID})
diff --git a/frontend/src/types/proto/v1/changelist_service.ts b/frontend/src/types/proto/v1/changelist_service.ts
index 81197471c1..b8ab2a1e2e 100644
--- a/frontend/src/types/proto/v1/changelist_service.ts
+++ b/frontend/src/types/proto/v1/changelist_service.ts
@@ -34,6 +34,40 @@ export interface GetChangelistRequest {
name: string;
}
+export interface ListChangelistsRequest {
+ /**
+ * The parent, which owns this collection of changelists.
+ * Format: projects/{project}
+ * Use "projects/-" to list all changelists.
+ */
+ parent: string;
+ /**
+ * The maximum number of databases to return. The service may return fewer than
+ * this value.
+ * If unspecified, at most 50 databases will be returned.
+ * The maximum value is 1000; values above 1000 will be coerced to 1000.
+ */
+ pageSize: number;
+ /**
+ * A page token, received from a previous `ListDatabases` call.
+ * Provide this to retrieve the subsequent page.
+ *
+ * When paginating, all other parameters provided to `ListDatabases` must match
+ * the call that provided the page token.
+ */
+ pageToken: string;
+}
+
+export interface ListChangelistsResponse {
+ /** The changelists from the specified request. */
+ changelists: Changelist[];
+ /**
+ * A token, which can be sent as `page_token` to retrieve the next page.
+ * If this field is omitted, there are no subsequent pages.
+ */
+ nextPageToken: string;
+}
+
export interface UpdateChangelistRequest {
/**
* The changelist to update.
@@ -238,6 +272,165 @@ export const GetChangelistRequest = {
},
};
+function createBaseListChangelistsRequest(): ListChangelistsRequest {
+ return { parent: "", pageSize: 0, pageToken: "" };
+}
+
+export const ListChangelistsRequest = {
+ encode(message: ListChangelistsRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
+ if (message.parent !== "") {
+ writer.uint32(10).string(message.parent);
+ }
+ if (message.pageSize !== 0) {
+ writer.uint32(16).int32(message.pageSize);
+ }
+ if (message.pageToken !== "") {
+ writer.uint32(26).string(message.pageToken);
+ }
+ return writer;
+ },
+
+ decode(input: _m0.Reader | Uint8Array, length?: number): ListChangelistsRequest {
+ const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
+ let end = length === undefined ? reader.len : reader.pos + length;
+ const message = createBaseListChangelistsRequest();
+ while (reader.pos < end) {
+ const tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1:
+ if (tag !== 10) {
+ break;
+ }
+
+ message.parent = reader.string();
+ continue;
+ case 2:
+ if (tag !== 16) {
+ break;
+ }
+
+ message.pageSize = reader.int32();
+ continue;
+ case 3:
+ if (tag !== 26) {
+ break;
+ }
+
+ message.pageToken = reader.string();
+ continue;
+ }
+ if ((tag & 7) === 4 || tag === 0) {
+ break;
+ }
+ reader.skipType(tag & 7);
+ }
+ return message;
+ },
+
+ fromJSON(object: any): ListChangelistsRequest {
+ return {
+ parent: isSet(object.parent) ? String(object.parent) : "",
+ pageSize: isSet(object.pageSize) ? Number(object.pageSize) : 0,
+ pageToken: isSet(object.pageToken) ? String(object.pageToken) : "",
+ };
+ },
+
+ toJSON(message: ListChangelistsRequest): unknown {
+ const obj: any = {};
+ message.parent !== undefined && (obj.parent = message.parent);
+ message.pageSize !== undefined && (obj.pageSize = Math.round(message.pageSize));
+ message.pageToken !== undefined && (obj.pageToken = message.pageToken);
+ return obj;
+ },
+
+ create(base?: DeepPartial<ListChangelistsRequest>): ListChangelistsRequest {
+ return ListChangelistsRequest.fromPartial(base ?? {});
+ },
+
+ fromPartial(object: DeepPartial<ListChangelistsRequest>): ListChangelistsRequest {
+ const message = createBaseListChangelistsRequest();
+ message.parent = object.parent ?? "";
+ message.pageSize = object.pageSize ?? 0;
+ message.pageToken = object.pageToken ?? "";
+ return message;
+ },
+};
+
+function createBaseListChangelistsResponse(): ListChangelistsResponse {
+ return { changelists: [], nextPageToken: "" };
+}
+
+export const ListChangelistsResponse = {
+ encode(message: ListChangelistsResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
+ for (const v of message.changelists) {
+ Changelist.encode(v!, writer.uint32(10).fork()).ldelim();
+ }
+ if (message.nextPageToken !== "") {
+ writer.uint32(18).string(message.nextPageToken);
+ }
+ return writer;
+ },
+
+ decode(input: _m0.Reader | Uint8Array, length?: number): ListChangelistsResponse {
+ const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
+ let end = length === undefined ? reader.len : reader.pos + length;
+ const message = createBaseListChangelistsResponse();
+ while (reader.pos < end) {
+ const tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1:
+ if (tag !== 10) {
+ break;
+ }
+
+ message.changelists.push(Changelist.decode(reader, reader.uint32()));
+ continue;
+ case 2:
+ if (tag !== 18) {
+ break;
+ }
+
+ message.nextPageToken = reader.string();
+ continue;
+ }
+ if ((tag & 7) === 4 || tag === 0) {
+ break;
+ }
+ reader.skipType(tag & 7);
+ }
+ return message;
+ },
+
+ fromJSON(object: any): ListChangelistsResponse {
+ return {
+ changelists: Array.isArray(object?.changelists) ? object.changelists.map((e: any) => Changelist.fromJSON(e)) : [],
+ nextPageToken: isSet(object.nextPageToken) ? String(object.nextPageToken) : "",
+ };
+ },
+
+ toJSON(message: ListChangelistsResponse): unknown {
+ const obj: any = {};
+ if (message.changelists) {
+ obj.changelists = message.changelists.map((e) => e ? Changelist.toJSON(e) : undefined);
+ } else {
+ obj.changelists = [];
+ }
+ message.nextPageToken !== undefined && (obj.nextPageToken = message.nextPageToken);
+ return obj;
+ },
+
+ create(base?: DeepPartial<ListChangelistsResponse>): ListChangelistsResponse {
+ return ListChangelistsResponse.fromPartial(base ?? {});
+ },
+
+ fromPartial(object: DeepPartial<ListChangelistsResponse>): ListChangelistsResponse {
+ const message = createBaseListChangelistsResponse();
+ message.changelists = object.changelists?.map((e) => Changelist.fromPartial(e)) || [];
+ message.nextPageToken = object.nextPageToken ?? "";
+ return message;
+ },
+};
+
function createBaseUpdateChangelistRequest(): UpdateChangelistRequest {
return { changelist: undefined, updateMask: undefined };
}
@@ -712,6 +905,60 @@ export const ChangelistServiceDefinition = {
},
},
},
+ listChangelists: {
+ name: "ListChangelists",
+ requestType: ListChangelistsRequest,
+ requestStream: false,
+ responseType: ListChangelistsResponse,
+ responseStream: false,
+ options: {
+ _unknownFields: {
+ 8410: [new Uint8Array([6, 112, 97, 114, 101, 110, 116])],
+ 578365826: [
+ new Uint8Array([
+ 37,
+ 18,
+ 35,
+ 47,
+ 118,
+ 49,
+ 47,
+ 123,
+ 112,
+ 97,
+ 114,
+ 101,
+ 110,
+ 116,
+ 61,
+ 112,
+ 114,
+ 111,
+ 106,
+ 101,
+ 99,
+ 116,
+ 115,
+ 47,
+ 42,
+ 125,
+ 47,
+ 99,
+ 104,
+ 97,
+ 110,
+ 103,
+ 101,
+ 108,
+ 105,
+ 115,
+ 116,
+ 115,
+ ]),
+ ],
+ },
+ },
+ },
updateChangelist: {
name: "UpdateChangelist",
requestType: UpdateChangelistRequest,
diff --git a/proto/gen/grpc-doc/v1/README.md b/proto/gen/grpc-doc/v1/README.md
index b826083f26..3ab2fd3c70 100644
--- a/proto/gen/grpc-doc/v1/README.md
+++ b/proto/gen/grpc-doc/v1/README.md
@@ -118,6 +118,8 @@
- [CreateChangelistRequest](#bytebase-v1-CreateChangelistRequest)
- [DeleteChangelistRequest](#bytebase-v1-DeleteChangelistRequest)
- [GetChangelistRequest](#bytebase-v1-GetChangelistRequest)
+ - [ListChangelistsRequest](#bytebase-v1-ListChangelistsRequest)
+ - [ListChangelistsResponse](#bytebase-v1-ListChangelistsResponse)
- [UpdateChangelistRequest](#bytebase-v1-UpdateChangelistRequest)
- [ChangelistService](#bytebase-v1-ChangelistService)
@@ -2205,6 +2207,41 @@ This value should be 4-63 characters, and valid characters are /[a-z][0-9]-/. |
+<a name="bytebase-v1-ListChangelistsRequest"></a>
+
+### ListChangelistsRequest
+
+
+
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| parent | [string](#string) | | The parent, which owns this collection of changelists. Format: projects/{project} Use &#34;projects/-&#34; to list all changelists. |
+| page_size | [int32](#int32) | | The maximum number of databases to return. The service may return fewer than this value. If unspecified, at most 50 databases will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000. |
+| page_token | [string](#string) | | A page token, received from a previous `ListDatabases` call. Provide this to retrieve the subsequent page.
+
+When paginating, all other parameters provided to `ListDatabases` must match the call that provided the page token. |
+
+
+
+
+
+
+<a name="bytebase-v1-ListChangelistsResponse"></a>
+
+### ListChangelistsResponse
+
+
+
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| changelists | [Changelist](#bytebase-v1-Changelist) | repeated | The changelists from the specified request. |
+| next_page_token | [string](#string) | | A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages. |
+
+
+
+
+
+
<a name="bytebase-v1-UpdateChangelistRequest"></a>
### UpdateChangelistRequest
@@ -2238,6 +2275,7 @@ The changelist&#39;s `name` field is used to identify the changelist to update.
| ----------- | ------------ | ------------- | ------------|
| CreateChangelist | [CreateChangelistRequest](#bytebase-v1-CreateChangelistRequest) | [Changelist](#bytebase-v1-Changelist) | |
| GetChangelist | [GetChangelistRequest](#bytebase-v1-GetChangelistRequest) | [Changelist](#bytebase-v1-Changelist) | |
+| ListChangelists | [ListChangelistsRequest](#bytebase-v1-ListChangelistsRequest) | [ListChangelistsResponse](#bytebase-v1-ListChangelistsResponse) | |
| UpdateChangelist | [UpdateChangelistRequest](#bytebase-v1-UpdateChangelistRequest) | [Changelist](#bytebase-v1-Changelist) | |
| DeleteChangelist | [DeleteChangelistRequest](#bytebase-v1-DeleteChangelistRequest) | [.google.protobuf.Empty](#google-protobuf-Empty) | |
diff --git a/proto/generated-go/v1/changelist_service.pb.go b/proto/generated-go/v1/changelist_service.pb.go
index d4e656f61b..b01739738c 100644
--- a/proto/generated-go/v1/changelist_service.pb.go
+++ b/proto/generated-go/v1/changelist_service.pb.go
@@ -144,6 +144,139 @@ func (x *GetChangelistRequest) GetName() string {
return ""
}
+type ListChangelistsRequest struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // The parent, which owns this collection of changelists.
+ // Format: projects/{project}
+ // Use "projects/-" to list all changelists.
+ Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"`
+ // The maximum number of databases to return. The service may return fewer than
+ // this value.
+ // If unspecified, at most 50 databases will be returned.
+ // The maximum value is 1000; values above 1000 will be coerced to 1000.
+ PageSize int32 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"`
+ // A page token, received from a previous `ListDatabases` call.
+ // Provide this to retrieve the subsequent page.
+ //
+ // When paginating, all other parameters provided to `ListDatabases` must match
+ // the call that provided the page token.
+ PageToken string `protobuf:"bytes,3,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"`
+}
+
+func (x *ListChangelistsRequest) Reset() {
+ *x = ListChangelistsRequest{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_v1_changelist_service_proto_msgTypes[2]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *ListChangelistsRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ListChangelistsRequest) ProtoMessage() {}
+
+func (x *ListChangelistsRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_v1_changelist_service_proto_msgTypes[2]
+ 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 ListChangelistsRequest.ProtoReflect.Descriptor instead.
+func (*ListChangelistsRequest) Descriptor() ([]byte, []int) {
+ return file_v1_changelist_service_proto_rawDescGZIP(), []int{2}
+}
+
+func (x *ListChangelistsRequest) GetParent() string {
+ if x != nil {
+ return x.Parent
+ }
+ return ""
+}
+
+func (x *ListChangelistsRequest) GetPageSize() int32 {
+ if x != nil {
+ return x.PageSize
+ }
+ return 0
+}
+
+func (x *ListChangelistsRequest) GetPageToken() string {
+ if x != nil {
+ return x.PageToken
+ }
+ return ""
+}
+
+type ListChangelistsResponse struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // The changelists from the specified request.
+ Changelists []*Changelist `protobuf:"bytes,1,rep,name=changelists,proto3" json:"changelists,omitempty"`
+ // A token, which can be sent as `page_token` to retrieve the next page.
+ // If this field is omitted, there are no subsequent pages.
+ NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"`
+}
+
+func (x *ListChangelistsResponse) Reset() {
+ *x = ListChangelistsResponse{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_v1_changelist_service_proto_msgTypes[3]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *ListChangelistsResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ListChangelistsResponse) ProtoMessage() {}
+
+func (x *ListChangelistsResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_v1_changelist_service_proto_msgTypes[3]
+ 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 ListChangelistsResponse.ProtoReflect.Descriptor instead.
+func (*ListChangelistsResponse) Descriptor() ([]byte, []int) {
+ return file_v1_changelist_service_proto_rawDescGZIP(), []int{3}
+}
+
+func (x *ListChangelistsResponse) GetChangelists() []*Changelist {
+ if x != nil {
+ return x.Changelists
+ }
+ return nil
+}
+
+func (x *ListChangelistsResponse) GetNextPageToken() string {
+ if x != nil {
+ return x.NextPageToken
+ }
+ return ""
+}
+
type UpdateChangelistRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
@@ -161,7 +294,7 @@ type UpdateChangelistRequest struct {
func (x *UpdateChangelistRequest) Reset() {
*x = UpdateChangelistRequest{}
if protoimpl.UnsafeEnabled {
- mi := &file_v1_changelist_service_proto_msgTypes[2]
+ mi := &file_v1_changelist_service_proto_msgTypes[4]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -174,7 +307,7 @@ func (x *UpdateChangelistRequest) String() string {
func (*UpdateChangelistRequest) ProtoMessage() {}
func (x *UpdateChangelistRequest) ProtoReflect() protoreflect.Message {
- mi := &file_v1_changelist_service_proto_msgTypes[2]
+ mi := &file_v1_changelist_service_proto_msgTypes[4]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -187,7 +320,7 @@ func (x *UpdateChangelistRequest) ProtoReflect() protoreflect.Message {
// Deprecated: Use UpdateChangelistRequest.ProtoReflect.Descriptor instead.
func (*UpdateChangelistRequest) Descriptor() ([]byte, []int) {
- return file_v1_changelist_service_proto_rawDescGZIP(), []int{2}
+ return file_v1_changelist_service_proto_rawDescGZIP(), []int{4}
}
func (x *UpdateChangelistRequest) GetChangelist() *Changelist {
@@ -217,7 +350,7 @@ type DeleteChangelistRequest struct {
func (x *DeleteChangelistRequest) Reset() {
*x = DeleteChangelistRequest{}
if protoimpl.UnsafeEnabled {
- mi := &file_v1_changelist_service_proto_msgTypes[3]
+ mi := &file_v1_changelist_service_proto_msgTypes[5]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -230,7 +363,7 @@ func (x *DeleteChangelistRequest) String() string {
func (*DeleteChangelistRequest) ProtoMessage() {}
func (x *DeleteChangelistRequest) ProtoReflect() protoreflect.Message {
- mi := &file_v1_changelist_service_proto_msgTypes[3]
+ mi := &file_v1_changelist_service_proto_msgTypes[5]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -243,7 +376,7 @@ func (x *DeleteChangelistRequest) ProtoReflect() protoreflect.Message {
// Deprecated: Use DeleteChangelistRequest.ProtoReflect.Descriptor instead.
func (*DeleteChangelistRequest) Descriptor() ([]byte, []int) {
- return file_v1_changelist_service_proto_rawDescGZIP(), []int{3}
+ return file_v1_changelist_service_proto_rawDescGZIP(), []int{5}
}
func (x *DeleteChangelistRequest) GetName() string {
@@ -279,7 +412,7 @@ type Changelist struct {
func (x *Changelist) Reset() {
*x = Changelist{}
if protoimpl.UnsafeEnabled {
- mi := &file_v1_changelist_service_proto_msgTypes[4]
+ mi := &file_v1_changelist_service_proto_msgTypes[6]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -292,7 +425,7 @@ func (x *Changelist) String() string {
func (*Changelist) ProtoMessage() {}
func (x *Changelist) ProtoReflect() protoreflect.Message {
- mi := &file_v1_changelist_service_proto_msgTypes[4]
+ mi := &file_v1_changelist_service_proto_msgTypes[6]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -305,7 +438,7 @@ func (x *Changelist) ProtoReflect() protoreflect.Message {
// Deprecated: Use Changelist.ProtoReflect.Descriptor instead.
func (*Changelist) Descriptor() ([]byte, []int) {
- return file_v1_changelist_service_proto_rawDescGZIP(), []int{4}
+ return file_v1_changelist_service_proto_rawDescGZIP(), []int{6}
}
func (x *Changelist) GetName() string {
@@ -374,7 +507,7 @@ type Changelist_Change struct {
func (x *Changelist_Change) Reset() {
*x = Changelist_Change{}
if protoimpl.UnsafeEnabled {
- mi := &file_v1_changelist_service_proto_msgTypes[5]
+ mi := &file_v1_changelist_service_proto_msgTypes[7]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -387,7 +520,7 @@ func (x *Changelist_Change) String() string {
func (*Changelist_Change) ProtoMessage() {}
func (x *Changelist_Change) ProtoReflect() protoreflect.Message {
- mi := &file_v1_changelist_service_proto_msgTypes[5]
+ mi := &file_v1_changelist_service_proto_msgTypes[7]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -400,7 +533,7 @@ func (x *Changelist_Change) ProtoReflect() protoreflect.Message {
// Deprecated: Use Changelist_Change.ProtoReflect.Descriptor instead.
func (*Changelist_Change) Descriptor() ([]byte, []int) {
- return file_v1_changelist_service_proto_rawDescGZIP(), []int{4, 0}
+ return file_v1_changelist_service_proto_rawDescGZIP(), []int{6, 0}
}
func (x *Changelist_Change) GetSheet() string {
@@ -447,84 +580,109 @@ var file_v1_changelist_service_proto_rawDesc = []byte{
0x74, 0x49, 0x64, 0x22, 0x2f, 0x0a, 0x14, 0x47, 0x65, 0x74, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65,
0x6c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x17, 0x0a, 0x04, 0x6e,
0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x04,
- 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x94, 0x01, 0x0a, 0x17, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x43,
- 0x68, 0x61, 0x6e, 0x67, 0x65, 0x6c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
- 0x12, 0x3c, 0x0a, 0x0a, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x6c, 0x69, 0x73, 0x74, 0x18, 0x01,
- 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e,
- 0x76, 0x31, 0x2e, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x6c, 0x69, 0x73, 0x74, 0x42, 0x03, 0xe0,
- 0x41, 0x02, 0x52, 0x0a, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x6c, 0x69, 0x73, 0x74, 0x12, 0x3b,
- 0x0a, 0x0b, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x18, 0x02, 0x20,
- 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f,
- 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4d, 0x61, 0x73, 0x6b, 0x52,
- 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4d, 0x61, 0x73, 0x6b, 0x22, 0x32, 0x0a, 0x17, 0x44,
- 0x65, 0x6c, 0x65, 0x74, 0x65, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x6c, 0x69, 0x73, 0x74, 0x52,
- 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01,
- 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22,
- 0xfe, 0x02, 0x0a, 0x0a, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x6c, 0x69, 0x73, 0x74, 0x12, 0x1a,
- 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x06, 0xe0, 0x41,
- 0x02, 0xe0, 0x41, 0x05, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65,
- 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52,
- 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1d, 0x0a, 0x07,
- 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0,
- 0x41, 0x03, 0x52, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x1d, 0x0a, 0x07, 0x75,
- 0x70, 0x64, 0x61, 0x74, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41,
- 0x03, 0x52, 0x07, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x72, 0x12, 0x40, 0x0a, 0x0b, 0x63, 0x72,
- 0x65, 0x61, 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32,
- 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75,
- 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x03, 0xe0, 0x41, 0x03,
- 0x52, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x40, 0x0a, 0x0b,
- 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28,
- 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
- 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x03, 0xe0,
- 0x41, 0x03, 0x52, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x38,
- 0x0a, 0x07, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32,
- 0x1e, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68,
- 0x61, 0x6e, 0x67, 0x65, 0x6c, 0x69, 0x73, 0x74, 0x2e, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x52,
- 0x07, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x1a, 0x36, 0x0a, 0x06, 0x43, 0x68, 0x61, 0x6e,
- 0x67, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x68, 0x65, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28,
- 0x09, 0x52, 0x05, 0x73, 0x68, 0x65, 0x65, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x6f, 0x75, 0x72,
- 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65,
- 0x32, 0xed, 0x04, 0x0a, 0x11, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x6c, 0x69, 0x73, 0x74, 0x53,
- 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x9e, 0x01, 0x0a, 0x10, 0x43, 0x72, 0x65, 0x61, 0x74,
- 0x65, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x6c, 0x69, 0x73, 0x74, 0x12, 0x24, 0x2e, 0x62, 0x79,
- 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65,
+ 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x71, 0x0a, 0x16, 0x4c, 0x69, 0x73, 0x74, 0x43, 0x68, 0x61, 0x6e,
+ 0x67, 0x65, 0x6c, 0x69, 0x73, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1b,
+ 0x0a, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03,
+ 0xe0, 0x41, 0x02, 0x52, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x70,
+ 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 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, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x61,
+ 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x7c, 0x0a, 0x17, 0x4c, 0x69, 0x73, 0x74, 0x43,
+ 0x68, 0x61, 0x6e, 0x67, 0x65, 0x6c, 0x69, 0x73, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
+ 0x73, 0x65, 0x12, 0x39, 0x0a, 0x0b, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x6c, 0x69, 0x73, 0x74,
+ 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61,
+ 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x6c, 0x69, 0x73, 0x74,
+ 0x52, 0x0b, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x6c, 0x69, 0x73, 0x74, 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, 0x22, 0x94, 0x01, 0x0a, 0x17, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65,
0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x6c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
- 0x74, 0x1a, 0x17, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e,
- 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x6c, 0x69, 0x73, 0x74, 0x22, 0x4b, 0xda, 0x41, 0x11, 0x70,
- 0x61, 0x72, 0x65, 0x6e, 0x74, 0x2c, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x6c, 0x69, 0x73, 0x74,
- 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x31, 0x3a, 0x0a, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x6c, 0x69,
- 0x73, 0x74, 0x22, 0x23, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x3d,
- 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x63, 0x68, 0x61, 0x6e,
- 0x67, 0x65, 0x6c, 0x69, 0x73, 0x74, 0x73, 0x12, 0x7f, 0x0a, 0x0d, 0x47, 0x65, 0x74, 0x43, 0x68,
- 0x61, 0x6e, 0x67, 0x65, 0x6c, 0x69, 0x73, 0x74, 0x12, 0x21, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62,
- 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65,
- 0x6c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x62, 0x79,
- 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65,
- 0x6c, 0x69, 0x73, 0x74, 0x22, 0x32, 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x82, 0xd3, 0xe4,
- 0x93, 0x02, 0x25, 0x12, 0x23, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x70,
- 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65,
- 0x6c, 0x69, 0x73, 0x74, 0x73, 0x2f, 0x2a, 0x7d, 0x12, 0xae, 0x01, 0x0a, 0x10, 0x55, 0x70, 0x64,
- 0x61, 0x74, 0x65, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x6c, 0x69, 0x73, 0x74, 0x12, 0x24, 0x2e,
- 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61,
- 0x74, 0x65, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x6c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75,
- 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76,
- 0x31, 0x2e, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x6c, 0x69, 0x73, 0x74, 0x22, 0x5b, 0xda, 0x41,
- 0x16, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x6c, 0x69, 0x73, 0x74, 0x2c, 0x75, 0x70, 0x64, 0x61,
- 0x74, 0x65, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x3c, 0x3a, 0x0a, 0x63,
- 0x68, 0x61, 0x6e, 0x67, 0x65, 0x6c, 0x69, 0x73, 0x74, 0x32, 0x2e, 0x2f, 0x76, 0x31, 0x2f, 0x7b,
- 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x6c, 0x69, 0x73, 0x74, 0x2e, 0x6e, 0x61, 0x6d, 0x65, 0x3d,
+ 0x74, 0x12, 0x3c, 0x0a, 0x0a, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x6c, 0x69, 0x73, 0x74, 0x18,
+ 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65,
+ 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x6c, 0x69, 0x73, 0x74, 0x42, 0x03,
+ 0xe0, 0x41, 0x02, 0x52, 0x0a, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x6c, 0x69, 0x73, 0x74, 0x12,
+ 0x3b, 0x0a, 0x0b, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x18, 0x02,
+ 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72,
+ 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4d, 0x61, 0x73, 0x6b,
+ 0x52, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4d, 0x61, 0x73, 0x6b, 0x22, 0x32, 0x0a, 0x17,
+ 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x6c, 0x69, 0x73, 0x74,
+ 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18,
+ 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65,
+ 0x22, 0xfe, 0x02, 0x0a, 0x0a, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x6c, 0x69, 0x73, 0x74, 0x12,
+ 0x1a, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x06, 0xe0,
+ 0x41, 0x02, 0xe0, 0x41, 0x05, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64,
+ 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09,
+ 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1d, 0x0a,
+ 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03,
+ 0xe0, 0x41, 0x03, 0x52, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x1d, 0x0a, 0x07,
+ 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0,
+ 0x41, 0x03, 0x52, 0x07, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x72, 0x12, 0x40, 0x0a, 0x0b, 0x63,
+ 0x72, 0x65, 0x61, 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b,
+ 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62,
+ 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x03, 0xe0, 0x41,
+ 0x03, 0x52, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x40, 0x0a,
+ 0x0b, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x06, 0x20, 0x01,
+ 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74,
+ 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x03,
+ 0xe0, 0x41, 0x03, 0x52, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12,
+ 0x38, 0x0a, 0x07, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b,
+ 0x32, 0x1e, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x43,
+ 0x68, 0x61, 0x6e, 0x67, 0x65, 0x6c, 0x69, 0x73, 0x74, 0x2e, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65,
+ 0x52, 0x07, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x1a, 0x36, 0x0a, 0x06, 0x43, 0x68, 0x61,
+ 0x6e, 0x67, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x68, 0x65, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01,
+ 0x28, 0x09, 0x52, 0x05, 0x73, 0x68, 0x65, 0x65, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x6f, 0x75,
+ 0x72, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63,
+ 0x65, 0x32, 0x82, 0x06, 0x0a, 0x11, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x6c, 0x69, 0x73, 0x74,
+ 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x9e, 0x01, 0x0a, 0x10, 0x43, 0x72, 0x65, 0x61,
+ 0x74, 0x65, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x6c, 0x69, 0x73, 0x74, 0x12, 0x24, 0x2e, 0x62,
+ 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74,
+ 0x65, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x6c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65,
+ 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31,
+ 0x2e, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x6c, 0x69, 0x73, 0x74, 0x22, 0x4b, 0xda, 0x41, 0x11,
+ 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x2c, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x6c, 0x69, 0x73,
+ 0x74, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x31, 0x3a, 0x0a, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x6c,
+ 0x69, 0x73, 0x74, 0x22, 0x23, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74,
+ 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x63, 0x68, 0x61,
+ 0x6e, 0x67, 0x65, 0x6c, 0x69, 0x73, 0x74, 0x73, 0x12, 0x7f, 0x0a, 0x0d, 0x47, 0x65, 0x74, 0x43,
+ 0x68, 0x61, 0x6e, 0x67, 0x65, 0x6c, 0x69, 0x73, 0x74, 0x12, 0x21, 0x2e, 0x62, 0x79, 0x74, 0x65,
+ 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x68, 0x61, 0x6e, 0x67,
+ 0x65, 0x6c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x62,
+ 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, 0x61, 0x6e, 0x67,
+ 0x65, 0x6c, 0x69, 0x73, 0x74, 0x22, 0x32, 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x82, 0xd3,
+ 0xe4, 0x93, 0x02, 0x25, 0x12, 0x23, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d,
0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x63, 0x68, 0x61, 0x6e, 0x67,
- 0x65, 0x6c, 0x69, 0x73, 0x74, 0x73, 0x2f, 0x2a, 0x7d, 0x12, 0x84, 0x01, 0x0a, 0x10, 0x44, 0x65,
- 0x6c, 0x65, 0x74, 0x65, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x6c, 0x69, 0x73, 0x74, 0x12, 0x24,
- 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x6c,
- 0x65, 0x74, 0x65, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x6c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71,
- 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72,
- 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x32, 0xda, 0x41,
- 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x25, 0x2a, 0x23, 0x2f, 0x76, 0x31,
- 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f,
- 0x2a, 0x2f, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x6c, 0x69, 0x73, 0x74, 0x73, 0x2f, 0x2a, 0x7d,
- 0x42, 0x11, 0x5a, 0x0f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2d, 0x67, 0x6f,
- 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
+ 0x65, 0x6c, 0x69, 0x73, 0x74, 0x73, 0x2f, 0x2a, 0x7d, 0x12, 0x92, 0x01, 0x0a, 0x0f, 0x4c, 0x69,
+ 0x73, 0x74, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x6c, 0x69, 0x73, 0x74, 0x73, 0x12, 0x23, 0x2e,
+ 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74,
+ 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x6c, 0x69, 0x73, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65,
+ 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31,
+ 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x6c, 0x69, 0x73, 0x74, 0x73,
+ 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x34, 0xda, 0x41, 0x06, 0x70, 0x61, 0x72,
+ 0x65, 0x6e, 0x74, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x25, 0x12, 0x23, 0x2f, 0x76, 0x31, 0x2f, 0x7b,
+ 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f,
+ 0x2a, 0x7d, 0x2f, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x6c, 0x69, 0x73, 0x74, 0x73, 0x12, 0xae,
+ 0x01, 0x0a, 0x10, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x6c,
+ 0x69, 0x73, 0x74, 0x12, 0x24, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76,
+ 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x6c, 0x69,
+ 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x62, 0x79, 0x74, 0x65,
+ 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x6c, 0x69,
+ 0x73, 0x74, 0x22, 0x5b, 0xda, 0x41, 0x16, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x6c, 0x69, 0x73,
+ 0x74, 0x2c, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x82, 0xd3, 0xe4,
+ 0x93, 0x02, 0x3c, 0x3a, 0x0a, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x6c, 0x69, 0x73, 0x74, 0x32,
+ 0x2e, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x6c, 0x69, 0x73, 0x74,
+ 0x2e, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a,
+ 0x2f, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x6c, 0x69, 0x73, 0x74, 0x73, 0x2f, 0x2a, 0x7d, 0x12,
+ 0x84, 0x01, 0x0a, 0x10, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65,
+ 0x6c, 0x69, 0x73, 0x74, 0x12, 0x24, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e,
+ 0x76, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x6c,
+ 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f,
+ 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70,
+ 0x74, 0x79, 0x22, 0x32, 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x82, 0xd3, 0xe4, 0x93, 0x02,
+ 0x25, 0x2a, 0x23, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x70, 0x72, 0x6f,
+ 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x6c, 0x69,
+ 0x73, 0x74, 0x73, 0x2f, 0x2a, 0x7d, 0x42, 0x11, 0x5a, 0x0f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61,
+ 0x74, 0x65, 0x64, 0x2d, 0x67, 0x6f, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f,
+ 0x33,
}
var (
@@ -539,38 +697,43 @@ func file_v1_changelist_service_proto_rawDescGZIP() []byte {
return file_v1_changelist_service_proto_rawDescData
}
-var file_v1_changelist_service_proto_msgTypes = make([]protoimpl.MessageInfo, 6)
+var file_v1_changelist_service_proto_msgTypes = make([]protoimpl.MessageInfo, 8)
var file_v1_changelist_service_proto_goTypes = []interface{}{
(*CreateChangelistRequest)(nil), // 0: bytebase.v1.CreateChangelistRequest
(*GetChangelistRequest)(nil), // 1: bytebase.v1.GetChangelistRequest
- (*UpdateChangelistRequest)(nil), // 2: bytebase.v1.UpdateChangelistRequest
- (*DeleteChangelistRequest)(nil), // 3: bytebase.v1.DeleteChangelistRequest
- (*Changelist)(nil), // 4: bytebase.v1.Changelist
- (*Changelist_Change)(nil), // 5: bytebase.v1.Changelist.Change
- (*fieldmaskpb.FieldMask)(nil), // 6: google.protobuf.FieldMask
- (*timestamppb.Timestamp)(nil), // 7: google.protobuf.Timestamp
- (*emptypb.Empty)(nil), // 8: google.protobuf.Empty
+ (*ListChangelistsRequest)(nil), // 2: bytebase.v1.ListChangelistsRequest
+ (*ListChangelistsResponse)(nil), // 3: bytebase.v1.ListChangelistsResponse
+ (*UpdateChangelistRequest)(nil), // 4: bytebase.v1.UpdateChangelistRequest
+ (*DeleteChangelistRequest)(nil), // 5: bytebase.v1.DeleteChangelistRequest
+ (*Changelist)(nil), // 6: bytebase.v1.Changelist
+ (*Changelist_Change)(nil), // 7: bytebase.v1.Changelist.Change
+ (*fieldmaskpb.FieldMask)(nil), // 8: google.protobuf.FieldMask
+ (*timestamppb.Timestamp)(nil), // 9: google.protobuf.Timestamp
+ (*emptypb.Empty)(nil), // 10: google.protobuf.Empty
}
var file_v1_changelist_service_proto_depIdxs = []int32{
- 4, // 0: bytebase.v1.CreateChangelistRequest.changelist:type_name -> bytebase.v1.Changelist
- 4, // 1: bytebase.v1.UpdateChangelistRequest.changelist:type_name -> bytebase.v1.Changelist
- 6, // 2: bytebase.v1.UpdateChangelistRequest.update_mask:type_name -> google.protobuf.FieldMask
- 7, // 3: bytebase.v1.Changelist.create_time:type_name -> google.protobuf.Timestamp
- 7, // 4: bytebase.v1.Changelist.update_time:type_name -> google.protobuf.Timestamp
- 5, // 5: bytebase.v1.Changelist.changes:type_name -> bytebase.v1.Changelist.Change
- 0, // 6: bytebase.v1.ChangelistService.CreateChangelist:input_type -> bytebase.v1.CreateChangelistRequest
- 1, // 7: bytebase.v1.ChangelistService.GetChangelist:input_type -> bytebase.v1.GetChangelistRequest
- 2, // 8: bytebase.v1.ChangelistService.UpdateChangelist:input_type -> bytebase.v1.UpdateChangelistRequest
- 3, // 9: bytebase.v1.ChangelistService.DeleteChangelist:input_type -> bytebase.v1.DeleteChangelistRequest
- 4, // 10: bytebase.v1.ChangelistService.CreateChangelist:output_type -> bytebase.v1.Changelist
- 4, // 11: bytebase.v1.ChangelistService.GetChangelist:output_type -> bytebase.v1.Changelist
- 4, // 12: bytebase.v1.ChangelistService.UpdateChangelist:output_type -> bytebase.v1.Changelist
- 8, // 13: bytebase.v1.ChangelistService.DeleteChangelist:output_type -> google.protobuf.Empty
- 10, // [10:14] is the sub-list for method output_type
- 6, // [6:10] is the sub-list for method input_type
- 6, // [6:6] is the sub-list for extension type_name
- 6, // [6:6] is the sub-list for extension extendee
- 0, // [0:6] is the sub-list for field type_name
+ 6, // 0: bytebase.v1.CreateChangelistRequest.changelist:type_name -> bytebase.v1.Changelist
+ 6, // 1: bytebase.v1.ListChangelistsResponse.changelists:type_name -> bytebase.v1.Changelist
+ 6, // 2: bytebase.v1.UpdateChangelistRequest.changelist:type_name -> bytebase.v1.Changelist
+ 8, // 3: bytebase.v1.UpdateChangelistRequest.update_mask:type_name -> google.protobuf.FieldMask
+ 9, // 4: bytebase.v1.Changelist.create_time:type_name -> google.protobuf.Timestamp
+ 9, // 5: bytebase.v1.Changelist.update_time:type_name -> google.protobuf.Timestamp
+ 7, // 6: bytebase.v1.Changelist.changes:type_name -> bytebase.v1.Changelist.Change
+ 0, // 7: bytebase.v1.ChangelistService.CreateChangelist:input_type -> bytebase.v1.CreateChangelistRequest
+ 1, // 8: bytebase.v1.ChangelistService.GetChangelist:input_type -> bytebase.v1.GetChangelistRequest
+ 2, // 9: bytebase.v1.ChangelistService.ListChangelists:input_type -> bytebase.v1.ListChangelistsRequest
+ 4, // 10: bytebase.v1.ChangelistService.UpdateChangelist:input_type -> bytebase.v1.UpdateChangelistRequest
+ 5, // 11: bytebase.v1.ChangelistService.DeleteChangelist:input_type -> bytebase.v1.DeleteChangelistRequest
+ 6, // 12: bytebase.v1.ChangelistService.CreateChangelist:output_type -> bytebase.v1.Changelist
+ 6, // 13: bytebase.v1.ChangelistService.GetChangelist:output_type -> bytebase.v1.Changelist
+ 3, // 14: bytebase.v1.ChangelistService.ListChangelists:output_type -> bytebase.v1.ListChangelistsResponse
+ 6, // 15: bytebase.v1.ChangelistService.UpdateChangelist:output_type -> bytebase.v1.Changelist
+ 10, // 16: bytebase.v1.ChangelistService.DeleteChangelist:output_type -> google.protobuf.Empty
+ 12, // [12:17] is the sub-list for method output_type
+ 7, // [7:12] is the sub-list for method input_type
+ 7, // [7:7] is the sub-list for extension type_name
+ 7, // [7:7] is the sub-list for extension extendee
+ 0, // [0:7] is the sub-list for field type_name
}
func init() { file_v1_changelist_service_proto_init() }
@@ -604,7 +767,7 @@ func file_v1_changelist_service_proto_init() {
}
}
file_v1_changelist_service_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*UpdateChangelistRequest); i {
+ switch v := v.(*ListChangelistsRequest); i {
case 0:
return &v.state
case 1:
@@ -616,7 +779,7 @@ func file_v1_changelist_service_proto_init() {
}
}
file_v1_changelist_service_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*DeleteChangelistRequest); i {
+ switch v := v.(*ListChangelistsResponse); i {
case 0:
return &v.state
case 1:
@@ -628,7 +791,7 @@ func file_v1_changelist_service_proto_init() {
}
}
file_v1_changelist_service_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*Changelist); i {
+ switch v := v.(*UpdateChangelistRequest); i {
case 0:
return &v.state
case 1:
@@ -640,6 +803,30 @@ func file_v1_changelist_service_proto_init() {
}
}
file_v1_changelist_service_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*DeleteChangelistRequest); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_v1_changelist_service_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*Changelist); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_v1_changelist_service_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Changelist_Change); i {
case 0:
return &v.state
@@ -658,7 +845,7 @@ func file_v1_changelist_service_proto_init() {
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_v1_changelist_service_proto_rawDesc,
NumEnums: 0,
- NumMessages: 6,
+ NumMessages: 8,
NumExtensions: 0,
NumServices: 1,
},
diff --git a/proto/generated-go/v1/changelist_service.pb.gw.go b/proto/generated-go/v1/changelist_service.pb.gw.go
index 0fab49c756..394384d679 100644
--- a/proto/generated-go/v1/changelist_service.pb.gw.go
+++ b/proto/generated-go/v1/changelist_service.pb.gw.go
@@ -169,6 +169,76 @@ func local_request_ChangelistService_GetChangelist_0(ctx context.Context, marsha
}
+var (
+ filter_ChangelistService_ListChangelists_0 = &utilities.DoubleArray{Encoding: map[string]int{"parent": 0}, Base: []int{1, 2, 0, 0}, Check: []int{0, 1, 2, 2}}
+)
+
+func request_ChangelistService_ListChangelists_0(ctx context.Context, marshaler runtime.Marshaler, client ChangelistServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
+ var protoReq ListChangelistsRequest
+ var metadata runtime.ServerMetadata
+
+ var (
+ val string
+ ok bool
+ err error
+ _ = err
+ )
+
+ val, ok = pathParams["parent"]
+ if !ok {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "parent")
+ }
+
+ protoReq.Parent, err = runtime.String(val)
+ if err != nil {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "parent", err)
+ }
+
+ if err := req.ParseForm(); err != nil {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
+ }
+ if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_ChangelistService_ListChangelists_0); err != nil {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
+ }
+
+ msg, err := client.ListChangelists(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
+ return msg, metadata, err
+
+}
+
+func local_request_ChangelistService_ListChangelists_0(ctx context.Context, marshaler runtime.Marshaler, server ChangelistServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
+ var protoReq ListChangelistsRequest
+ var metadata runtime.ServerMetadata
+
+ var (
+ val string
+ ok bool
+ err error
+ _ = err
+ )
+
+ val, ok = pathParams["parent"]
+ if !ok {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "parent")
+ }
+
+ protoReq.Parent, err = runtime.String(val)
+ if err != nil {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "parent", err)
+ }
+
+ if err := req.ParseForm(); err != nil {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
+ }
+ if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_ChangelistService_ListChangelists_0); err != nil {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
+ }
+
+ msg, err := server.ListChangelists(ctx, &protoReq)
+ return msg, metadata, err
+
+}
+
var (
filter_ChangelistService_UpdateChangelist_0 = &utilities.DoubleArray{Encoding: map[string]int{"changelist": 0, "name": 1}, Base: []int{1, 4, 5, 2, 0, 0, 0, 0}, Check: []int{0, 1, 1, 2, 4, 2, 2, 3}}
)
@@ -377,6 +447,31 @@ func RegisterChangelistServiceHandlerServer(ctx context.Context, mux *runtime.Se
})
+ mux.Handle("GET", pattern_ChangelistService_ListChangelists_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
+ ctx, cancel := context.WithCancel(req.Context())
+ defer cancel()
+ var stream runtime.ServerTransportStream
+ ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
+ inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
+ var err error
+ var annotatedContext context.Context
+ annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/bytebase.v1.ChangelistService/ListChangelists", runtime.WithHTTPPathPattern("/v1/{parent=projects/*}/changelists"))
+ if err != nil {
+ runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ return
+ }
+ resp, md, err := local_request_ChangelistService_ListChangelists_0(annotatedContext, inboundMarshaler, server, req, pathParams)
+ md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
+ if err != nil {
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
+ return
+ }
+
+ forward_ChangelistService_ListChangelists_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+
+ })
+
mux.Handle("PATCH", pattern_ChangelistService_UpdateChangelist_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
@@ -512,6 +607,28 @@ func RegisterChangelistServiceHandlerClient(ctx context.Context, mux *runtime.Se
})
+ mux.Handle("GET", pattern_ChangelistService_ListChangelists_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
+ ctx, cancel := context.WithCancel(req.Context())
+ defer cancel()
+ inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
+ var err error
+ var annotatedContext context.Context
+ annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/bytebase.v1.ChangelistService/ListChangelists", runtime.WithHTTPPathPattern("/v1/{parent=projects/*}/changelists"))
+ if err != nil {
+ runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ return
+ }
+ resp, md, err := request_ChangelistService_ListChangelists_0(annotatedContext, inboundMarshaler, client, req, pathParams)
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
+ if err != nil {
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
+ return
+ }
+
+ forward_ChangelistService_ListChangelists_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+
+ })
+
mux.Handle("PATCH", pattern_ChangelistService_UpdateChangelist_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
@@ -564,6 +681,8 @@ var (
pattern_ChangelistService_GetChangelist_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 2, 2, 1, 0, 4, 4, 5, 3}, []string{"v1", "projects", "changelists", "name"}, ""))
+ pattern_ChangelistService_ListChangelists_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 2, 5, 2, 2, 3}, []string{"v1", "projects", "parent", "changelists"}, ""))
+
pattern_ChangelistService_UpdateChangelist_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 2, 2, 1, 0, 4, 4, 5, 3}, []string{"v1", "projects", "changelists", "changelist.name"}, ""))
pattern_ChangelistService_DeleteChangelist_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 2, 2, 1, 0, 4, 4, 5, 3}, []string{"v1", "projects", "changelists", "name"}, ""))
@@ -574,6 +693,8 @@ var (
forward_ChangelistService_GetChangelist_0 = runtime.ForwardResponseMessage
+ forward_ChangelistService_ListChangelists_0 = runtime.ForwardResponseMessage
+
forward_ChangelistService_UpdateChangelist_0 = runtime.ForwardResponseMessage
forward_ChangelistService_DeleteChangelist_0 = runtime.ForwardResponseMessage
diff --git a/proto/generated-go/v1/changelist_service_grpc.pb.go b/proto/generated-go/v1/changelist_service_grpc.pb.go
index 10c39e2069..6b561b9b4f 100644
--- a/proto/generated-go/v1/changelist_service_grpc.pb.go
+++ b/proto/generated-go/v1/changelist_service_grpc.pb.go
@@ -22,6 +22,7 @@ const _ = grpc.SupportPackageIsVersion7
const (
ChangelistService_CreateChangelist_FullMethodName = "/bytebase.v1.ChangelistService/CreateChangelist"
ChangelistService_GetChangelist_FullMethodName = "/bytebase.v1.ChangelistService/GetChangelist"
+ ChangelistService_ListChangelists_FullMethodName = "/bytebase.v1.ChangelistService/ListChangelists"
ChangelistService_UpdateChangelist_FullMethodName = "/bytebase.v1.ChangelistService/UpdateChangelist"
ChangelistService_DeleteChangelist_FullMethodName = "/bytebase.v1.ChangelistService/DeleteChangelist"
)
@@ -32,6 +33,7 @@ const (
type ChangelistServiceClient interface {
CreateChangelist(ctx context.Context, in *CreateChangelistRequest, opts ...grpc.CallOption) (*Changelist, error)
GetChangelist(ctx context.Context, in *GetChangelistRequest, opts ...grpc.CallOption) (*Changelist, error)
+ ListChangelists(ctx context.Context, in *ListChangelistsRequest, opts ...grpc.CallOption) (*ListChangelistsResponse, error)
UpdateChangelist(ctx context.Context, in *UpdateChangelistRequest, opts ...grpc.CallOption) (*Changelist, error)
DeleteChangelist(ctx context.Context, in *DeleteChangelistRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
}
@@ -62,6 +64,15 @@ func (c *changelistServiceClient) GetChangelist(ctx context.Context, in *GetChan
return out, nil
}
+func (c *changelistServiceClient) ListChangelists(ctx context.Context, in *ListChangelistsRequest, opts ...grpc.CallOption) (*ListChangelistsResponse, error) {
+ out := new(ListChangelistsResponse)
+ err := c.cc.Invoke(ctx, ChangelistService_ListChangelists_FullMethodName, in, out, opts...)
+ if err != nil {
+ return nil, err
+ }
+ return out, nil
+}
+
func (c *changelistServiceClient) UpdateChangelist(ctx context.Context, in *UpdateChangelistRequest, opts ...grpc.CallOption) (*Changelist, error) {
out := new(Changelist)
err := c.cc.Invoke(ctx, ChangelistService_UpdateChangelist_FullMethodName, in, out, opts...)
@@ -86,6 +97,7 @@ func (c *changelistServiceClient) DeleteChangelist(ctx context.Context, in *Dele
type ChangelistServiceServer interface {
CreateChangelist(context.Context, *CreateChangelistRequest) (*Changelist, error)
GetChangelist(context.Context, *GetChangelistRequest) (*Changelist, error)
+ ListChangelists(context.Context, *ListChangelistsRequest) (*ListChangelistsResponse, error)
UpdateChangelist(context.Context, *UpdateChangelistRequest) (*Changelist, error)
DeleteChangelist(context.Context, *DeleteChangelistRequest) (*emptypb.Empty, error)
mustEmbedUnimplementedChangelistServiceServer()
@@ -101,6 +113,9 @@ func (UnimplementedChangelistServiceServer) CreateChangelist(context.Context, *C
func (UnimplementedChangelistServiceServer) GetChangelist(context.Context, *GetChangelistRequest) (*Changelist, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetChangelist not implemented")
}
+func (UnimplementedChangelistServiceServer) ListChangelists(context.Context, *ListChangelistsRequest) (*ListChangelistsResponse, error) {
+ return nil, status.Errorf(codes.Unimplemented, "method ListChangelists not implemented")
+}
func (UnimplementedChangelistServiceServer) UpdateChangelist(context.Context, *UpdateChangelistRequest) (*Changelist, error) {
return nil, status.Errorf(codes.Unimplemented, "method UpdateChangelist not implemented")
}
@@ -156,6 +171,24 @@ func _ChangelistService_GetChangelist_Handler(srv interface{}, ctx context.Conte
return interceptor(ctx, in, info, handler)
}
+func _ChangelistService_ListChangelists_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+ in := new(ListChangelistsRequest)
+ if err := dec(in); err != nil {
+ return nil, err
+ }
+ if interceptor == nil {
+ return srv.(ChangelistServiceServer).ListChangelists(ctx, in)
+ }
+ info := &grpc.UnaryServerInfo{
+ Server: srv,
+ FullMethod: ChangelistService_ListChangelists_FullMethodName,
+ }
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+ return srv.(ChangelistServiceServer).ListChangelists(ctx, req.(*ListChangelistsRequest))
+ }
+ return interceptor(ctx, in, info, handler)
+}
+
func _ChangelistService_UpdateChangelist_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(UpdateChangelistRequest)
if err := dec(in); err != nil {
@@ -207,6 +240,10 @@ var ChangelistService_ServiceDesc = grpc.ServiceDesc{
MethodName: "GetChangelist",
Handler: _ChangelistService_GetChangelist_Handler,
},
+ {
+ MethodName: "ListChangelists",
+ Handler: _ChangelistService_ListChangelists_Handler,
+ },
{
MethodName: "UpdateChangelist",
Handler: _ChangelistService_UpdateChangelist_Handler,
diff --git a/proto/v1/changelist_service.proto b/proto/v1/changelist_service.proto
index 238b243aa0..ab34d46285 100644
--- a/proto/v1/changelist_service.proto
+++ b/proto/v1/changelist_service.proto
@@ -25,6 +25,11 @@ service ChangelistService {
option (google.api.method_signature) = "name";
}
+ rpc ListChangelists(ListChangelistsRequest) returns (ListChangelistsResponse) {
+ option (google.api.http) = {get: "/v1/{parent=projects/*}/changelists"};
+ option (google.api.method_signature) = "parent";
+ }
+
rpc UpdateChangelist(UpdateChangelistRequest) returns (Changelist) {
option (google.api.http) = {
patch: "/v1/{changelist.name=projects/*/changelists/*}"
@@ -61,6 +66,35 @@ message GetChangelistRequest {
string name = 1 [(google.api.field_behavior) = REQUIRED];
}
+message ListChangelistsRequest {
+ // The parent, which owns this collection of changelists.
+ // Format: projects/{project}
+ // Use "projects/-" to list all changelists.
+ string parent = 1 [(google.api.field_behavior) = REQUIRED];
+
+ // The maximum number of databases to return. The service may return fewer than
+ // this value.
+ // If unspecified, at most 50 databases will be returned.
+ // The maximum value is 1000; values above 1000 will be coerced to 1000.
+ int32 page_size = 2;
+
+ // A page token, received from a previous `ListDatabases` call.
+ // Provide this to retrieve the subsequent page.
+ //
+ // When paginating, all other parameters provided to `ListDatabases` must match
+ // the call that provided the page token.
+ string page_token = 3;
+}
+
+message ListChangelistsResponse {
+ // The changelists from the specified request.
+ repeated Changelist changelists = 1;
+
+ // A token, which can be sent as `page_token` to retrieve the next page.
+ // If this field is omitted, there are no subsequent pages.
+ string next_page_token = 2;
+}
+
message UpdateChangelistRequest {
// The changelist to update.
//