Skip to content

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

chore: revision service (#16192)

Danny Xua1e83190587b
diff --git a/CLAUDE.md b/CLAUDE.md
index 6506d43d5f..ccadf26905 100644
--- a/CLAUDE.md
+++ b/CLAUDE.md
@@ -11,6 +11,7 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co
- Frontend lint: `pnpm --dir frontend lint`
- Frontend type check: `pnpm --dir frontend type-check`
- Frontend test: `pnpm --dir frontend test`
+- Proto lint: `cd proto && buf lint`
- Go lint command: `g ./path/to/package/...` - This custom alias runs linting tools for Go code
## Code Style
diff --git a/backend/api/v1/database_service_revision.go b/backend/api/v1/revision_service.go
similarity index 95%
rename from backend/api/v1/database_service_revision.go
rename to backend/api/v1/revision_service.go
index 791199b0ea..148bb0e8d6 100644
--- a/backend/api/v1/database_service_revision.go
+++ b/backend/api/v1/revision_service.go
@@ -18,7 +18,20 @@ import (
v1pb "github.com/bytebase/bytebase/proto/generated-go/v1"
)
-func (s *DatabaseService) ListRevisions(ctx context.Context, request *v1pb.ListRevisionsRequest) (*v1pb.ListRevisionsResponse, error) {
+// RevisionService implements the revision service.
+type RevisionService struct {
+ v1pb.UnimplementedRevisionServiceServer
+ store *store.Store
+}
+
+// NewRevisionService creates a new RevisionService.
+func NewRevisionService(store *store.Store) *RevisionService {
+ return &RevisionService{
+ store: store,
+ }
+}
+
+func (s *RevisionService) ListRevisions(ctx context.Context, request *v1pb.ListRevisionsRequest) (*v1pb.ListRevisionsResponse, error) {
instanceID, databaseName, err := common.GetInstanceDatabaseID(request.Parent)
if err != nil {
return nil, status.Errorf(codes.InvalidArgument, "failed to get instance and database from %v, err: %v", request.Parent, err)
@@ -85,7 +98,7 @@ func (s *DatabaseService) ListRevisions(ctx context.Context, request *v1pb.ListR
}, nil
}
-func (s *DatabaseService) GetRevision(ctx context.Context, request *v1pb.GetRevisionRequest) (*v1pb.Revision, error) {
+func (s *RevisionService) GetRevision(ctx context.Context, request *v1pb.GetRevisionRequest) (*v1pb.Revision, error) {
instanceName, databaseName, revisionUID, err := common.GetInstanceDatabaseRevisionID(request.Name)
if err != nil {
return nil, status.Errorf(codes.InvalidArgument, "failed to get revision UID from %v, err: %v", request.Name, err)
@@ -102,7 +115,7 @@ func (s *DatabaseService) GetRevision(ctx context.Context, request *v1pb.GetRevi
return converted, nil
}
-func (s *DatabaseService) CreateRevision(ctx context.Context, request *v1pb.CreateRevisionRequest) (*v1pb.Revision, error) {
+func (s *RevisionService) CreateRevision(ctx context.Context, request *v1pb.CreateRevisionRequest) (*v1pb.Revision, error) {
instanceID, databaseID, err := common.GetInstanceDatabaseID(request.Parent)
if err != nil {
return nil, status.Errorf(codes.InvalidArgument, "failed to get instance and database from %v, err: %v", request.Parent, err)
@@ -205,7 +218,7 @@ func (s *DatabaseService) CreateRevision(ctx context.Context, request *v1pb.Crea
return converted, nil
}
-func (s *DatabaseService) DeleteRevision(ctx context.Context, request *v1pb.DeleteRevisionRequest) (*emptypb.Empty, error) {
+func (s *RevisionService) DeleteRevision(ctx context.Context, request *v1pb.DeleteRevisionRequest) (*emptypb.Empty, error) {
_, _, revisionUID, err := common.GetInstanceDatabaseRevisionID(request.Name)
if err != nil {
return nil, status.Errorf(codes.InvalidArgument, "failed to get revision UID from %v, err: %v", request.Name, err)
diff --git a/backend/server/grpc_routes.go b/backend/server/grpc_routes.go
index e4b01e8e43..ae3bae6d59 100644
--- a/backend/server/grpc_routes.go
+++ b/backend/server/grpc_routes.go
@@ -61,6 +61,7 @@ func configureGrpcRouters(
iamManager))
v1pb.RegisterProjectServiceServer(grpcServer, apiv1.NewProjectService(stores, profile, iamManager, licenseService))
v1pb.RegisterDatabaseServiceServer(grpcServer, apiv1.NewDatabaseService(stores, schemaSyncer, licenseService, profile, iamManager))
+ v1pb.RegisterRevisionServiceServer(grpcServer, apiv1.NewRevisionService(stores))
v1pb.RegisterDatabaseCatalogServiceServer(grpcServer, apiv1.NewDatabaseCatalogService(stores, licenseService))
v1pb.RegisterInstanceRoleServiceServer(grpcServer, apiv1.NewInstanceRoleService(stores, dbFactory))
v1pb.RegisterOrgPolicyServiceServer(grpcServer, apiv1.NewOrgPolicyService(stores, licenseService))
@@ -125,6 +126,9 @@ func configureGrpcRouters(
if err := v1pb.RegisterDatabaseServiceHandler(ctx, mux, grpcConn); err != nil {
return err
}
+ if err := v1pb.RegisterRevisionServiceHandler(ctx, mux, grpcConn); err != nil {
+ return err
+ }
if err := v1pb.RegisterDatabaseCatalogServiceHandler(ctx, mux, grpcConn); err != nil {
return err
}
diff --git a/frontend/src/components/Database/DatabaseRevisionPanel.vue b/frontend/src/components/Database/DatabaseRevisionPanel.vue
index a7d5c5db26..54f87781ea 100644
--- a/frontend/src/components/Database/DatabaseRevisionPanel.vue
+++ b/frontend/src/components/Database/DatabaseRevisionPanel.vue
@@ -20,7 +20,7 @@
<script lang="ts" setup>
import { RevisionDataTable } from "@/components/Revision";
import PagedTable from "@/components/v2/Model/PagedTable.vue";
-import { databaseServiceClient } from "@/grpcweb";
+import { revisionServiceClient } from "@/grpcweb";
import type { ComposedDatabase } from "@/types";
import { useDatabaseDetailContext } from "./context";
@@ -38,7 +38,7 @@ const fetchRevisionList = async ({
pageSize: number;
}) => {
const { nextPageToken, revisions } =
- await databaseServiceClient.listRevisions({
+ await revisionServiceClient.listRevisions({
parent: props.database.name,
pageSize,
pageToken,
diff --git a/frontend/src/components/Revision/RevisionDataTable.vue b/frontend/src/components/Revision/RevisionDataTable.vue
index eb2d43d601..1bd47b17e1 100644
--- a/frontend/src/components/Revision/RevisionDataTable.vue
+++ b/frontend/src/components/Revision/RevisionDataTable.vue
@@ -34,7 +34,7 @@ import { useI18n } from "vue-i18n";
import { RouterLink, useRouter } from "vue-router";
import { useRevisionStore } from "@/store";
import { getDateForPbTimestamp } from "@/types";
-import type { Revision } from "@/types/proto/v1/database_service";
+import type { Revision } from "@/types/proto/v1/revision_service";
import { extractIssueUID } from "@/utils";
import { useDatabaseDetailContext } from "../Database/context";
import HumanizeDate from "../misc/HumanizeDate.vue";
diff --git a/frontend/src/grpcweb/index.ts b/frontend/src/grpcweb/index.ts
index faad4ec38d..8c5be8a695 100644
--- a/frontend/src/grpcweb/index.ts
+++ b/frontend/src/grpcweb/index.ts
@@ -15,6 +15,7 @@ import { OrgPolicyServiceDefinition } from "@/types/proto/v1/org_policy_service"
import { PlanServiceDefinition } from "@/types/proto/v1/plan_service";
import { ProjectServiceDefinition } from "@/types/proto/v1/project_service";
import { ReleaseServiceDefinition } from "@/types/proto/v1/release_service";
+import { RevisionServiceDefinition } from "@/types/proto/v1/revision_service";
import { ReviewConfigServiceDefinition } from "@/types/proto/v1/review_config_service";
import { RiskServiceDefinition } from "@/types/proto/v1/risk_service";
import { RoleServiceDefinition } from "@/types/proto/v1/role_service";
@@ -210,6 +211,11 @@ export const releaseServiceClient = clientFactory.create(
channel
);
+export const revisionServiceClient = clientFactory.create(
+ RevisionServiceDefinition,
+ channel
+);
+
export const instanceRoleServiceClient = clientFactory.create(
InstanceRoleServiceDefinition,
channel
diff --git a/frontend/src/store/modules/revision.ts b/frontend/src/store/modules/revision.ts
index 02f16dc6af..95669d5015 100644
--- a/frontend/src/store/modules/revision.ts
+++ b/frontend/src/store/modules/revision.ts
@@ -1,8 +1,8 @@
import { defineStore } from "pinia";
import { computed, reactive } from "vue";
-import { databaseServiceClient } from "@/grpcweb";
+import { revisionServiceClient } from "@/grpcweb";
import type { Pagination } from "@/types";
-import { Revision } from "@/types/proto/v1/database_service";
+import { Revision } from "@/types/proto/v1/revision_service";
import { DEFAULT_PAGE_SIZE } from "./common";
import { revisionNamePrefix } from "./v1/common";
@@ -17,7 +17,7 @@ export const useRevisionStore = defineStore("revision", () => {
database: string,
pagination?: Pagination
) => {
- const resp = await databaseServiceClient.listRevisions({
+ const resp = await revisionServiceClient.listRevisions({
parent: database,
pageSize: pagination?.pageSize || DEFAULT_PAGE_SIZE,
pageToken: pagination?.pageToken,
@@ -39,7 +39,7 @@ export const useRevisionStore = defineStore("revision", () => {
return revisionMapByName.get(name);
}
- const revision = await databaseServiceClient.getRevision({ name });
+ const revision = await revisionServiceClient.getRevision({ name });
revisionMapByName.set(revision.name, revision);
return revision;
};
@@ -49,7 +49,7 @@ export const useRevisionStore = defineStore("revision", () => {
};
const deleteRevision = async (name: string) => {
- await databaseServiceClient.deleteRevision({ name });
+ await revisionServiceClient.deleteRevision({ name });
revisionMapByName.delete(name);
};
diff --git a/frontend/src/types/proto/v1/database_service.ts b/frontend/src/types/proto/v1/database_service.ts
index 19c6d9800f..72ce14ae38 100644
--- a/frontend/src/types/proto/v1/database_service.ts
+++ b/frontend/src/types/proto/v1/database_service.ts
@@ -1367,112 +1367,6 @@ export interface ChangedResourceProcedure {
ranges: Range[];
}
-export interface ListRevisionsRequest {
- /**
- * The parent of the revisions.
- * Format: instances/{instance}/databases/{database}
- */
- parent: string;
- /**
- * The maximum number of revisions to return. The service may return fewer
- * than this value. If unspecified, at most 10 revisions 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 `ListRevisions` call.
- * Provide this to retrieve the subsequent page.
- *
- * When paginating, all other parameters provided to `ListRevisions` must
- * match the call that provided the page token.
- */
- pageToken: string;
- showDeleted: boolean;
-}
-
-export interface ListRevisionsResponse {
- revisions: Revision[];
- /**
- * 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 CreateRevisionRequest {
- /** Format: instances/{instance}/databases/{database} */
- parent: string;
- /** The revision to create. */
- revision: Revision | undefined;
-}
-
-export interface GetRevisionRequest {
- /**
- * The name of the revision.
- * Format: instances/{instance}/databases/{database}/revisions/{revision}
- */
- name: string;
-}
-
-export interface DeleteRevisionRequest {
- /**
- * The name of the revision to delete.
- * Format: instances/{instance}/databases/{database}/revisions/{revision}
- */
- name: string;
-}
-
-export interface Revision {
- /** Format: instances/{instance}/databases/{database}/revisions/{revision} */
- name: string;
- /**
- * Format: projects/{project}/releases/{release}
- * Can be empty.
- */
- release: string;
- createTime:
- | Timestamp
- | undefined;
- /**
- * Format: users/[email protected]
- * Can be empty.
- */
- deleter: string;
- /** Can be empty. */
- deleteTime:
- | Timestamp
- | undefined;
- /**
- * Format: projects/{project}/releases/{release}/files/{id}
- * Can be empty.
- */
- file: string;
- version: string;
- /**
- * The sheet that holds the content.
- * Format: projects/{project}/sheets/{sheet}
- */
- sheet: string;
- /** The SHA256 hash value of the sheet. */
- sheetSha256: string;
- /** The statement is used for preview purpose. */
- statement: string;
- statementSize: Long;
- /**
- * The issue associated with the revision.
- * Can be empty.
- * Format: projects/{project}/issues/{issue}
- */
- issue: string;
- /**
- * The task run associated with the revision.
- * Can be empty.
- * Format:
- * projects/{project}/rollouts/{rollout}/stages/{stage}/tasks/{task}/taskRuns/{taskRun}
- */
- taskRun: string;
-}
-
export interface ListChangelogsRequest {
/**
* The parent of the changelogs.
@@ -8821,12 +8715,12 @@ export const ChangedResourceProcedure: MessageFns<ChangedResourceProcedure> = {
},
};
-function createBaseListRevisionsRequest(): ListRevisionsRequest {
- return { parent: "", pageSize: 0, pageToken: "", showDeleted: false };
+function createBaseListChangelogsRequest(): ListChangelogsRequest {
+ return { parent: "", pageSize: 0, pageToken: "", view: ChangelogView.CHANGELOG_VIEW_UNSPECIFIED, filter: "" };
}
-export const ListRevisionsRequest: MessageFns<ListRevisionsRequest> = {
- encode(message: ListRevisionsRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
+export const ListChangelogsRequest: MessageFns<ListChangelogsRequest> = {
+ encode(message: ListChangelogsRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
if (message.parent !== "") {
writer.uint32(10).string(message.parent);
}
@@ -8836,16 +8730,19 @@ export const ListRevisionsRequest: MessageFns<ListRevisionsRequest> = {
if (message.pageToken !== "") {
writer.uint32(26).string(message.pageToken);
}
- if (message.showDeleted !== false) {
- writer.uint32(32).bool(message.showDeleted);
+ if (message.view !== ChangelogView.CHANGELOG_VIEW_UNSPECIFIED) {
+ writer.uint32(32).int32(changelogViewToNumber(message.view));
+ }
+ if (message.filter !== "") {
+ writer.uint32(42).string(message.filter);
}
return writer;
},
- decode(input: BinaryReader | Uint8Array, length?: number): ListRevisionsRequest {
+ decode(input: BinaryReader | Uint8Array, length?: number): ListChangelogsRequest {
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
let end = length === undefined ? reader.len : reader.pos + length;
- const message = createBaseListRevisionsRequest();
+ const message = createBaseListChangelogsRequest();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
@@ -8878,7 +8775,15 @@ export const ListRevisionsRequest: MessageFns<ListRevisionsRequest> = {
break;
}
- message.showDeleted = reader.bool();
+ message.view = changelogViewFromJSON(reader.int32());
+ continue;
+ }
+ case 5: {
+ if (tag !== 42) {
+ break;
+ }
+
+ message.filter = reader.string();
continue;
}
}
@@ -8890,16 +8795,17 @@ export const ListRevisionsRequest: MessageFns<ListRevisionsRequest> = {
return message;
},
- fromJSON(object: any): ListRevisionsRequest {
+ fromJSON(object: any): ListChangelogsRequest {
return {
parent: isSet(object.parent) ? globalThis.String(object.parent) : "",
pageSize: isSet(object.pageSize) ? globalThis.Number(object.pageSize) : 0,
pageToken: isSet(object.pageToken) ? globalThis.String(object.pageToken) : "",
- showDeleted: isSet(object.showDeleted) ? globalThis.Boolean(object.showDeleted) : false,
+ view: isSet(object.view) ? changelogViewFromJSON(object.view) : ChangelogView.CHANGELOG_VIEW_UNSPECIFIED,
+ filter: isSet(object.filter) ? globalThis.String(object.filter) : "",
};
},
- toJSON(message: ListRevisionsRequest): unknown {
+ toJSON(message: ListChangelogsRequest): unknown {
const obj: any = {};
if (message.parent !== "") {
obj.parent = message.parent;
@@ -8910,33 +8816,37 @@ export const ListRevisionsRequest: MessageFns<ListRevisionsRequest> = {
if (message.pageToken !== "") {
obj.pageToken = message.pageToken;
}
- if (message.showDeleted !== false) {
- obj.showDeleted = message.showDeleted;
+ if (message.view !== ChangelogView.CHANGELOG_VIEW_UNSPECIFIED) {
+ obj.view = changelogViewToJSON(message.view);
+ }
+ if (message.filter !== "") {
+ obj.filter = message.filter;
}
return obj;
},
- create(base?: DeepPartial<ListRevisionsRequest>): ListRevisionsRequest {
- return ListRevisionsRequest.fromPartial(base ?? {});
+ create(base?: DeepPartial<ListChangelogsRequest>): ListChangelogsRequest {
+ return ListChangelogsRequest.fromPartial(base ?? {});
},
- fromPartial(object: DeepPartial<ListRevisionsRequest>): ListRevisionsRequest {
- const message = createBaseListRevisionsRequest();
+ fromPartial(object: DeepPartial<ListChangelogsRequest>): ListChangelogsRequest {
+ const message = createBaseListChangelogsRequest();
message.parent = object.parent ?? "";
message.pageSize = object.pageSize ?? 0;
message.pageToken = object.pageToken ?? "";
- message.showDeleted = object.showDeleted ?? false;
+ message.view = object.view ?? ChangelogView.CHANGELOG_VIEW_UNSPECIFIED;
+ message.filter = object.filter ?? "";
return message;
},
};
-function createBaseListRevisionsResponse(): ListRevisionsResponse {
- return { revisions: [], nextPageToken: "" };
+function createBaseListChangelogsResponse(): ListChangelogsResponse {
+ return { changelogs: [], nextPageToken: "" };
}
-export const ListRevisionsResponse: MessageFns<ListRevisionsResponse> = {
- encode(message: ListRevisionsResponse, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
- for (const v of message.revisions) {
- Revision.encode(v!, writer.uint32(10).fork()).join();
+export const ListChangelogsResponse: MessageFns<ListChangelogsResponse> = {
+ encode(message: ListChangelogsResponse, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
+ for (const v of message.changelogs) {
+ Changelog.encode(v!, writer.uint32(10).fork()).join();
}
if (message.nextPageToken !== "") {
writer.uint32(18).string(message.nextPageToken);
@@ -8944,10 +8854,10 @@ export const ListRevisionsResponse: MessageFns<ListRevisionsResponse> = {
return writer;
},
- decode(input: BinaryReader | Uint8Array, length?: number): ListRevisionsResponse {
+ decode(input: BinaryReader | Uint8Array, length?: number): ListChangelogsResponse {
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
let end = length === undefined ? reader.len : reader.pos + length;
- const message = createBaseListRevisionsResponse();
+ const message = createBaseListChangelogsResponse();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
@@ -8956,7 +8866,7 @@ export const ListRevisionsResponse: MessageFns<ListRevisionsResponse> = {
break;
}
- message.revisions.push(Revision.decode(reader, reader.uint32()));
+ message.changelogs.push(Changelog.decode(reader, reader.uint32()));
continue;
}
case 2: {
@@ -8976,19 +8886,19 @@ export const ListRevisionsResponse: MessageFns<ListRevisionsResponse> = {
return message;
},
- fromJSON(object: any): ListRevisionsResponse {
+ fromJSON(object: any): ListChangelogsResponse {
return {
- revisions: globalThis.Array.isArray(object?.revisions)
- ? object.revisions.map((e: any) => Revision.fromJSON(e))
+ changelogs: globalThis.Array.isArray(object?.changelogs)
+ ? object.changelogs.map((e: any) => Changelog.fromJSON(e))
: [],
nextPageToken: isSet(object.nextPageToken) ? globalThis.String(object.nextPageToken) : "",
};
},
- toJSON(message: ListRevisionsResponse): unknown {
+ toJSON(message: ListChangelogsResponse): unknown {
const obj: any = {};
- if (message.revisions?.length) {
- obj.revisions = message.revisions.map((e) => Revision.toJSON(e));
+ if (message.changelogs?.length) {
+ obj.changelogs = message.changelogs.map((e) => Changelog.toJSON(e));
}
if (message.nextPageToken !== "") {
obj.nextPageToken = message.nextPageToken;
@@ -8996,36 +8906,39 @@ export const ListRevisionsResponse: MessageFns<ListRevisionsResponse> = {
return obj;
},
- create(base?: DeepPartial<ListRevisionsResponse>): ListRevisionsResponse {
- return ListRevisionsResponse.fromPartial(base ?? {});
+ create(base?: DeepPartial<ListChangelogsResponse>): ListChangelogsResponse {
+ return ListChangelogsResponse.fromPartial(base ?? {});
},
- fromPartial(object: DeepPartial<ListRevisionsResponse>): ListRevisionsResponse {
- const message = createBaseListRevisionsResponse();
- message.revisions = object.revisions?.map((e) => Revision.fromPartial(e)) || [];
+ fromPartial(object: DeepPartial<ListChangelogsResponse>): ListChangelogsResponse {
+ const message = createBaseListChangelogsResponse();
+ message.changelogs = object.changelogs?.map((e) => Changelog.fromPartial(e)) || [];
message.nextPageToken = object.nextPageToken ?? "";
return message;
},
};
-function createBaseCreateRevisionRequest(): CreateRevisionRequest {
- return { parent: "", revision: undefined };
+function createBaseGetChangelogRequest(): GetChangelogRequest {
+ return { name: "", view: ChangelogView.CHANGELOG_VIEW_UNSPECIFIED, sdlFormat: false };
}
-export const CreateRevisionRequest: MessageFns<CreateRevisionRequest> = {
- encode(message: CreateRevisionRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
- if (message.parent !== "") {
- writer.uint32(10).string(message.parent);
+export const GetChangelogRequest: MessageFns<GetChangelogRequest> = {
+ encode(message: GetChangelogRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
+ if (message.name !== "") {
+ writer.uint32(10).string(message.name);
}
- if (message.revision !== undefined) {
- Revision.encode(message.revision, writer.uint32(18).fork()).join();
+ if (message.view !== ChangelogView.CHANGELOG_VIEW_UNSPECIFIED) {
+ writer.uint32(16).int32(changelogViewToNumber(message.view));
+ }
+ if (message.sdlFormat !== false) {
+ writer.uint32(24).bool(message.sdlFormat);
}
return writer;
},
- decode(input: BinaryReader | Uint8Array, length?: number): CreateRevisionRequest {
+ decode(input: BinaryReader | Uint8Array, length?: number): GetChangelogRequest {
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
let end = length === undefined ? reader.len : reader.pos + length;
- const message = createBaseCreateRevisionRequest();
+ const message = createBaseGetChangelogRequest();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
@@ -9034,15 +8947,23 @@ export const CreateRevisionRequest: MessageFns<CreateRevisionRequest> = {
break;
}
- message.parent = reader.string();
+ message.name = reader.string();
continue;
}
case 2: {
- if (tag !== 18) {
+ if (tag !== 16) {
+ break;
+ }
+
+ message.view = changelogViewFromJSON(reader.int32());
+ continue;
+ }
+ case 3: {
+ if (tag !== 24) {
break;
}
- message.revision = Revision.decode(reader, reader.uint32());
+ message.sdlFormat = reader.bool();
continue;
}
}
@@ -9054,53 +8975,118 @@ export const CreateRevisionRequest: MessageFns<CreateRevisionRequest> = {
return message;
},
- fromJSON(object: any): CreateRevisionRequest {
+ fromJSON(object: any): GetChangelogRequest {
return {
- parent: isSet(object.parent) ? globalThis.String(object.parent) : "",
- revision: isSet(object.revision) ? Revision.fromJSON(object.revision) : undefined,
+ name: isSet(object.name) ? globalThis.String(object.name) : "",
+ view: isSet(object.view) ? changelogViewFromJSON(object.view) : ChangelogView.CHANGELOG_VIEW_UNSPECIFIED,
+ sdlFormat: isSet(object.sdlFormat) ? globalThis.Boolean(object.sdlFormat) : false,
};
},
- toJSON(message: CreateRevisionRequest): unknown {
+ toJSON(message: GetChangelogRequest): unknown {
const obj: any = {};
- if (message.parent !== "") {
- obj.parent = message.parent;
+ if (message.name !== "") {
+ obj.name = message.name;
+ }
+ if (message.view !== ChangelogView.CHANGELOG_VIEW_UNSPECIFIED) {
+ obj.view = changelogViewToJSON(message.view);
}
- if (message.revision !== undefined) {
- obj.revision = Revision.toJSON(message.revision);
+ if (message.sdlFormat !== false) {
+ obj.sdlFormat = message.sdlFormat;
}
return obj;
},
- create(base?: DeepPartial<CreateRevisionRequest>): CreateRevisionRequest {
- return CreateRevisionRequest.fromPartial(base ?? {});
+ create(base?: DeepPartial<GetChangelogRequest>): GetChangelogRequest {
+ return GetChangelogRequest.fromPartial(base ?? {});
},
- fromPartial(object: DeepPartial<CreateRevisionRequest>): CreateRevisionRequest {
- const message = createBaseCreateRevisionRequest();
- message.parent = object.parent ?? "";
- message.revision = (object.revision !== undefined && object.revision !== null)
- ? Revision.fromPartial(object.revision)
- : undefined;
+ fromPartial(object: DeepPartial<GetChangelogRequest>): GetChangelogRequest {
+ const message = createBaseGetChangelogRequest();
+ message.name = object.name ?? "";
+ message.view = object.view ?? ChangelogView.CHANGELOG_VIEW_UNSPECIFIED;
+ message.sdlFormat = object.sdlFormat ?? false;
return message;
},
};
-function createBaseGetRevisionRequest(): GetRevisionRequest {
- return { name: "" };
+function createBaseChangelog(): Changelog {
+ return {
+ name: "",
+ createTime: undefined,
+ status: Changelog_Status.STATUS_UNSPECIFIED,
+ statement: "",
+ statementSize: Long.ZERO,
+ statementSheet: "",
+ schema: "",
+ schemaSize: Long.ZERO,
+ prevSchema: "",
+ prevSchemaSize: Long.ZERO,
+ issue: "",
+ taskRun: "",
+ version: "",
+ revision: "",
+ changedResources: undefined,
+ type: Changelog_Type.TYPE_UNSPECIFIED,
+ };
}
-export const GetRevisionRequest: MessageFns<GetRevisionRequest> = {
- encode(message: GetRevisionRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
+export const Changelog: MessageFns<Changelog> = {
+ encode(message: Changelog, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
if (message.name !== "") {
writer.uint32(10).string(message.name);
}
+ if (message.createTime !== undefined) {
+ Timestamp.encode(message.createTime, writer.uint32(26).fork()).join();
+ }
+ if (message.status !== Changelog_Status.STATUS_UNSPECIFIED) {
+ writer.uint32(32).int32(changelog_StatusToNumber(message.status));
+ }
+ if (message.statement !== "") {
+ writer.uint32(42).string(message.statement);
+ }
+ if (!message.statementSize.equals(Long.ZERO)) {
+ writer.uint32(48).int64(message.statementSize.toString());
+ }
+ if (message.statementSheet !== "") {
+ writer.uint32(58).string(message.statementSheet);
+ }
+ if (message.schema !== "") {
+ writer.uint32(66).string(message.schema);
+ }
+ if (!message.schemaSize.equals(Long.ZERO)) {
+ writer.uint32(72).int64(message.schemaSize.toString());
+ }
+ if (message.prevSchema !== "") {
+ writer.uint32(82).string(message.prevSchema);
+ }
+ if (!message.prevSchemaSize.equals(Long.ZERO)) {
+ writer.uint32(88).int64(message.prevSchemaSize.toString());
+ }
+ if (message.issue !== "") {
+ writer.uint32(98).string(message.issue);
+ }
+ if (message.taskRun !== "") {
+ writer.uint32(106).string(message.taskRun);
+ }
+ if (message.version !== "") {
+ writer.uint32(114).string(message.version);
+ }
+ if (message.revision !== "") {
+ writer.uint32(122).string(message.revision);
+ }
+ if (message.changedResources !== undefined) {
+ ChangedResources.encode(message.changedResources, writer.uint32(130).fork()).join();
+ }
+ if (message.type !== Changelog_Type.TYPE_UNSPECIFIED) {
+ writer.uint32(136).int32(changelog_TypeToNumber(message.type));
+ }
return writer;
},
- decode(input: BinaryReader | Uint8Array, length?: number): GetRevisionRequest {
+ decode(input: BinaryReader | Uint8Array, length?: number): Changelog {
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
let end = length === undefined ? reader.len : reader.pos + length;
- const message = createBaseGetRevisionRequest();
+ const message = createBaseChangelog();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
@@ -9112,186 +9098,20 @@ export const GetRevisionRequest: MessageFns<GetRevisionRequest> = {
message.name = reader.string();
continue;
}
- }
- if ((tag & 7) === 4 || tag === 0) {
- break;
- }
- reader.skip(tag & 7);
- }
- return message;
- },
-
- fromJSON(object: any): GetRevisionRequest {
- return { name: isSet(object.name) ? globalThis.String(object.name) : "" };
- },
-
- toJSON(message: GetRevisionRequest): unknown {
- const obj: any = {};
- if (message.name !== "") {
- obj.name = message.name;
- }
- return obj;
- },
-
- create(base?: DeepPartial<GetRevisionRequest>): GetRevisionRequest {
- return GetRevisionRequest.fromPartial(base ?? {});
- },
- fromPartial(object: DeepPartial<GetRevisionRequest>): GetRevisionRequest {
- const message = createBaseGetRevisionRequest();
- message.name = object.name ?? "";
- return message;
- },
-};
-
-function createBaseDeleteRevisionRequest(): DeleteRevisionRequest {
- return { name: "" };
-}
-
-export const DeleteRevisionRequest: MessageFns<DeleteRevisionRequest> = {
- encode(message: DeleteRevisionRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
- if (message.name !== "") {
- writer.uint32(10).string(message.name);
- }
- return writer;
- },
-
- decode(input: BinaryReader | Uint8Array, length?: number): DeleteRevisionRequest {
- const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
- let end = length === undefined ? reader.len : reader.pos + length;
- const message = createBaseDeleteRevisionRequest();
- while (reader.pos < end) {
- const tag = reader.uint32();
- switch (tag >>> 3) {
- case 1: {
- if (tag !== 10) {
- break;
- }
-
- message.name = reader.string();
- continue;
- }
- }
- if ((tag & 7) === 4 || tag === 0) {
- break;
- }
- reader.skip(tag & 7);
- }
- return message;
- },
-
- fromJSON(object: any): DeleteRevisionRequest {
- return { name: isSet(object.name) ? globalThis.String(object.name) : "" };
- },
-
- toJSON(message: DeleteRevisionRequest): unknown {
- const obj: any = {};
- if (message.name !== "") {
- obj.name = message.name;
- }
- return obj;
- },
-
- create(base?: DeepPartial<DeleteRevisionRequest>): DeleteRevisionRequest {
- return DeleteRevisionRequest.fromPartial(base ?? {});
- },
- fromPartial(object: DeepPartial<DeleteRevisionRequest>): DeleteRevisionRequest {
- const message = createBaseDeleteRevisionRequest();
- message.name = object.name ?? "";
- return message;
- },
-};
-
-function createBaseRevision(): Revision {
- return {
- name: "",
- release: "",
- createTime: undefined,
- deleter: "",
- deleteTime: undefined,
- file: "",
- version: "",
- sheet: "",
- sheetSha256: "",
- statement: "",
- statementSize: Long.ZERO,
- issue: "",
- taskRun: "",
- };
-}
-
-export const Revision: MessageFns<Revision> = {
- encode(message: Revision, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
- if (message.name !== "") {
- writer.uint32(10).string(message.name);
- }
- if (message.release !== "") {
- writer.uint32(18).string(message.release);
- }
- if (message.createTime !== undefined) {
- Timestamp.encode(message.createTime, writer.uint32(34).fork()).join();
- }
- if (message.deleter !== "") {
- writer.uint32(42).string(message.deleter);
- }
- if (message.deleteTime !== undefined) {
- Timestamp.encode(message.deleteTime, writer.uint32(50).fork()).join();
- }
- if (message.file !== "") {
- writer.uint32(58).string(message.file);
- }
- if (message.version !== "") {
- writer.uint32(66).string(message.version);
- }
- if (message.sheet !== "") {
- writer.uint32(74).string(message.sheet);
- }
- if (message.sheetSha256 !== "") {
- writer.uint32(82).string(message.sheetSha256);
- }
- if (message.statement !== "") {
- writer.uint32(90).string(message.statement);
- }
- if (!message.statementSize.equals(Long.ZERO)) {
- writer.uint32(96).int64(message.statementSize.toString());
- }
- if (message.issue !== "") {
- writer.uint32(106).string(message.issue);
- }
- if (message.taskRun !== "") {
- writer.uint32(114).string(message.taskRun);
- }
- return writer;
- },
-
- decode(input: BinaryReader | Uint8Array, length?: number): Revision {
- const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
- let end = length === undefined ? reader.len : reader.pos + length;
- const message = createBaseRevision();
- while (reader.pos < end) {
- const tag = reader.uint32();
- switch (tag >>> 3) {
- case 1: {
- if (tag !== 10) {
- break;
- }
-
- message.name = reader.string();
- continue;
- }
- case 2: {
- if (tag !== 18) {
+ case 3: {
+ if (tag !== 26) {
break;
}
- message.release = reader.string();
+ message.createTime = Timestamp.decode(reader, reader.uint32());
continue;
}
case 4: {
- if (tag !== 34) {
+ if (tag !== 32) {
break;
}
- message.createTime = Timestamp.decode(reader, reader.uint32());
+ message.status = changelog_StatusFromJSON(reader.int32());
continue;
}
case 5: {
@@ -9299,15 +9119,15 @@ export const Revision: MessageFns<Revision> = {
break;
}
- message.deleter = reader.string();
+ message.statement = reader.string();
continue;
}
case 6: {
- if (tag !== 50) {
+ if (tag !== 48) {
break;
}
- message.deleteTime = Timestamp.decode(reader, reader.uint32());
+ message.statementSize = Long.fromString(reader.int64().toString());
continue;
}
case 7: {
@@ -9315,7 +9135,7 @@ export const Revision: MessageFns<Revision> = {
break;
}
- message.file = reader.string();
+ message.statementSheet = reader.string();
continue;
}
case 8: {
@@ -9323,15 +9143,15 @@ export const Revision: MessageFns<Revision> = {
break;
}
- message.version = reader.string();
+ message.schema = reader.string();
continue;
}
case 9: {
- if (tag !== 74) {
+ if (tag !== 72) {
break;
}
- message.sheet = reader.string();
+ message.schemaSize = Long.fromString(reader.int64().toString());
continue;
}
case 10: {
@@ -9339,23 +9159,23 @@ export const Revision: MessageFns<Revision> = {
break;
}
- message.sheetSha256 = reader.string();
+ message.prevSchema = reader.string();
continue;
}
case 11: {
- if (tag !== 90) {
+ if (tag !== 88) {
break;
}
- message.statement = reader.string();
+ message.prevSchemaSize = Long.fromString(reader.int64().toString());
continue;
}
case 12: {
- if (tag !== 96) {
+ if (tag !== 98) {
break;
}
- message.statementSize = Long.fromString(reader.int64().toString());
+ message.issue = reader.string();
continue;
}
case 13: {
@@ -9363,7 +9183,7 @@ export const Revision: MessageFns<Revision> = {
break;
}
- message.issue = reader.string();
+ message.taskRun = reader.string();
continue;
}
case 14: {
@@ -9371,7 +9191,31 @@ export const Revision: MessageFns<Revision> = {
break;
}
- message.taskRun = reader.string();
+ message.version = reader.string();
+ continue;
+ }
+ case 15: {
+ if (tag !== 122) {
+ break;
+ }
+
+ message.revision = reader.string();
+ continue;
+ }
+ case 16: {
+ if (tag !== 130) {
+ break;
+ }
+
+ message.changedResources = ChangedResources.decode(reader, reader.uint32());
+ continue;
+ }
+ case 17: {
+ if (tag !== 136) {
+ break;
+ }
+
+ message.type = changelog_TypeFromJSON(reader.int32());
continue;
}
}
@@ -9383,58 +9227,58 @@ export const Revision: MessageFns<Revision> = {
return message;
},
- fromJSON(object: any): Revision {
+ fromJSON(object: any): Changelog {
return {
name: isSet(object.name) ? globalThis.String(object.name) : "",
- release: isSet(object.release) ? globalThis.String(object.release) : "",
createTime: isSet(object.createTime) ? fromJsonTimestamp(object.createTime) : undefined,
- deleter: isSet(object.deleter) ? globalThis.String(object.deleter) : "",
- deleteTime: isSet(object.deleteTime) ? fromJsonTimestamp(object.deleteTime) : undefined,
- file: isSet(object.file) ? globalThis.String(object.file) : "",
- version: isSet(object.version) ? globalThis.String(object.version) : "",
- sheet: isSet(object.sheet) ? globalThis.String(object.sheet) : "",
- sheetSha256: isSet(object.sheetSha256) ? globalThis.String(object.sheetSha256) : "",
+ status: isSet(object.status) ? changelog_StatusFromJSON(object.status) : Changelog_Status.STATUS_UNSPECIFIED,
statement: isSet(object.statement) ? globalThis.String(object.statement) : "",
statementSize: isSet(object.statementSize) ? Long.fromValue(object.statementSize) : Long.ZERO,
+ statementSheet: isSet(object.statementSheet) ? globalThis.String(object.statementSheet) : "",
+ schema: isSet(object.schema) ? globalThis.String(object.schema) : "",
+ schemaSize: isSet(object.schemaSize) ? Long.fromValue(object.schemaSize) : Long.ZERO,
+ prevSchema: isSet(object.prevSchema) ? globalThis.String(object.prevSchema) : "",
+ prevSchemaSize: isSet(object.prevSchemaSize) ? Long.fromValue(object.prevSchemaSize) : Long.ZERO,
issue: isSet(object.issue) ? globalThis.String(object.issue) : "",
taskRun: isSet(object.taskRun) ? globalThis.String(object.taskRun) : "",
+ version: isSet(object.version) ? globalThis.String(object.version) : "",
+ revision: isSet(object.revision) ? globalThis.String(object.revision) : "",
+ changedResources: isSet(object.changedResources) ? ChangedResources.fromJSON(object.changedResources) : undefined,
+ type: isSet(object.type) ? changelog_TypeFromJSON(object.type) : Changelog_Type.TYPE_UNSPECIFIED,
};
},
- toJSON(message: Revision): unknown {
+ toJSON(message: Changelog): unknown {
const obj: any = {};
if (message.name !== "") {
obj.name = message.name;
}
- if (message.release !== "") {
- obj.release = message.release;
- }
if (message.createTime !== undefined) {
obj.createTime = fromTimestamp(message.createTime).toISOString();
}
- if (message.deleter !== "") {
- obj.deleter = message.deleter;
+ if (message.status !== Changelog_Status.STATUS_UNSPECIFIED) {
+ obj.status = changelog_StatusToJSON(message.status);
}
- if (message.deleteTime !== undefined) {
- obj.deleteTime = fromTimestamp(message.deleteTime).toISOString();
+ if (message.statement !== "") {
+ obj.statement = message.statement;
}
- if (message.file !== "") {
- obj.file = message.file;
+ if (!message.statementSize.equals(Long.ZERO)) {
+ obj.statementSize = (message.statementSize || Long.ZERO).toString();
}
- if (message.version !== "") {
- obj.version = message.version;
+ if (message.statementSheet !== "") {
+ obj.statementSheet = message.statementSheet;
}
- if (message.sheet !== "") {
- obj.sheet = message.sheet;
+ if (message.schema !== "") {
+ obj.schema = message.schema;
}
- if (message.sheetSha256 !== "") {
- obj.sheetSha256 = message.sheetSha256;
+ if (!message.schemaSize.equals(Long.ZERO)) {
+ obj.schemaSize = (message.schemaSize || Long.ZERO).toString();
}
- if (message.statement !== "") {
- obj.statement = message.statement;
+ if (message.prevSchema !== "") {
+ obj.prevSchema = message.prevSchema;
}
- if (!message.statementSize.equals(Long.ZERO)) {
- obj.statementSize = (message.statementSize || Long.ZERO).toString();
+ if (!message.prevSchemaSize.equals(Long.ZERO)) {
+ obj.prevSchemaSize = (message.prevSchemaSize || Long.ZERO).toString();
}
if (message.issue !== "") {
obj.issue = message.issue;
@@ -9442,65 +9286,90 @@ export const Revision: MessageFns<Revision> = {
if (message.taskRun !== "") {
obj.taskRun = message.taskRun;
}
+ if (message.version !== "") {
+ obj.version = message.version;
+ }
+ if (message.revision !== "") {
+ obj.revision = message.revision;
+ }
+ if (message.changedResources !== undefined) {
+ obj.changedResources = ChangedResources.toJSON(message.changedResources);
+ }
+ if (message.type !== Changelog_Type.TYPE_UNSPECIFIED) {
+ obj.type = changelog_TypeToJSON(message.type);
+ }
return obj;
},
- create(base?: DeepPartial<Revision>): Revision {
- return Revision.fromPartial(base ?? {});
+ create(base?: DeepPartial<Changelog>): Changelog {
+ return Changelog.fromPartial(base ?? {});
},
- fromPartial(object: DeepPartial<Revision>): Revision {
- const message = createBaseRevision();
+ fromPartial(object: DeepPartial<Changelog>): Changelog {
+ const message = createBaseChangelog();
message.name = object.name ?? "";
- message.release = object.release ?? "";
message.createTime = (object.createTime !== undefined && object.createTime !== null)
? Timestamp.fromPartial(object.createTime)
: undefined;
- message.deleter = object.deleter ?? "";
- message.deleteTime = (object.deleteTime !== undefined && object.deleteTime !== null)
- ? Timestamp.fromPartial(object.deleteTime)
- : undefined;
- message.file = object.file ?? "";
- message.version = object.version ?? "";
- message.sheet = object.sheet ?? "";
- message.sheetSha256 = object.sheetSha256 ?? "";
+ message.status = object.status ?? Changelog_Status.STATUS_UNSPECIFIED;
message.statement = object.statement ?? "";
message.statementSize = (object.statementSize !== undefined && object.statementSize !== null)
? Long.fromValue(object.statementSize)
: Long.ZERO;
+ message.statementSheet = object.statementSheet ?? "";
+ message.schema = object.schema ?? "";
+ message.schemaSize = (object.schemaSize !== undefined && object.schemaSize !== null)
+ ? Long.fromValue(object.schemaSize)
+ : Long.ZERO;
+ message.prevSchema = object.prevSchema ?? "";
+ message.prevSchemaSize = (object.prevSchemaSize !== undefined && object.prevSchemaSize !== null)
+ ? Long.fromValue(object.prevSchemaSize)
+ : Long.ZERO;
message.issue = object.issue ?? "";
message.taskRun = object.taskRun ?? "";
+ message.version = object.version ?? "";
+ message.revision = object.revision ?? "";
+ message.changedResources = (object.changedResources !== undefined && object.changedResources !== null)
+ ? ChangedResources.fromPartial(object.changedResources)
+ : undefined;
+ message.type = object.type ?? Changelog_Type.TYPE_UNSPECIFIED;
return message;
},
};
-function createBaseListChangelogsRequest(): ListChangelogsRequest {
- return { parent: "", pageSize: 0, pageToken: "", view: ChangelogView.CHANGELOG_VIEW_UNSPECIFIED, filter: "" };
+function createBaseGetSchemaStringRequest(): GetSchemaStringRequest {
+ return {
+ name: "",
+ type: GetSchemaStringRequest_ObjectType.OBJECT_TYPE_UNSPECIFIED,
+ schema: "",
+ object: "",
+ metadata: undefined,
+ };
}
-export const ListChangelogsRequest: MessageFns<ListChangelogsRequest> = {
- encode(message: ListChangelogsRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
- if (message.parent !== "") {
- writer.uint32(10).string(message.parent);
- }
- if (message.pageSize !== 0) {
- writer.uint32(16).int32(message.pageSize);
+export const GetSchemaStringRequest: MessageFns<GetSchemaStringRequest> = {
+ encode(message: GetSchemaStringRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
+ if (message.name !== "") {
+ writer.uint32(10).string(message.name);
}
- if (message.pageToken !== "") {
- writer.uint32(26).string(message.pageToken);
+ if (message.type !== GetSchemaStringRequest_ObjectType.OBJECT_TYPE_UNSPECIFIED) {
+ writer.uint32(16).int32(getSchemaStringRequest_ObjectTypeToNumber(message.type));
}
- if (message.view !== ChangelogView.CHANGELOG_VIEW_UNSPECIFIED) {
- writer.uint32(32).int32(changelogViewToNumber(message.view));
+ if (message.schema !== "") {
+ writer.uint32(26).string(message.schema);
}
- if (message.filter !== "") {
- writer.uint32(42).string(message.filter);
+ if (message.object !== "") {
+ writer.uint32(34).string(message.object);
+ }
+ if (message.metadata !== undefined) {
+ DatabaseMetadata.encode(message.metadata, writer.uint32(42).fork()).join();
}
return writer;
},
- decode(input: BinaryReader | Uint8Array, length?: number): ListChangelogsRequest {
+ decode(input: BinaryReader | Uint8Array, length?: number): GetSchemaStringRequest {
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
let end = length === undefined ? reader.len : reader.pos + length;
- const message = createBaseListChangelogsRequest();
+ const message = createBaseGetSchemaStringRequest();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
@@ -9509,7 +9378,7 @@ export const ListChangelogsRequest: MessageFns<ListChangelogsRequest> = {
break;
}
- message.parent = reader.string();
+ message.name = reader.string();
continue;
}
case 2: {
@@ -9517,7 +9386,7 @@ export const ListChangelogsRequest: MessageFns<ListChangelogsRequest> = {
break;
}
- message.pageSize = reader.int32();
+ message.type = getSchemaStringRequest_ObjectTypeFromJSON(reader.int32());
continue;
}
case 3: {
@@ -9525,15 +9394,15 @@ export const ListChangelogsRequest: MessageFns<ListChangelogsRequest> = {
break;
}
- message.pageToken = reader.string();
+ message.schema = reader.string();
continue;
}
case 4: {
- if (tag !== 32) {
+ if (tag !== 34) {
break;
}
- message.view = changelogViewFromJSON(reader.int32());
+ message.object = reader.string();
continue;
}
case 5: {
@@ -9541,7 +9410,7 @@ export const ListChangelogsRequest: MessageFns<ListChangelogsRequest> = {
break;
}
- message.filter = reader.string();
+ message.metadata = DatabaseMetadata.decode(reader, reader.uint32());
continue;
}
}
@@ -9553,150 +9422,70 @@ export const ListChangelogsRequest: MessageFns<ListChangelogsRequest> = {
return message;
},
- fromJSON(object: any): ListChangelogsRequest {
+ fromJSON(object: any): GetSchemaStringRequest {
return {
- parent: isSet(object.parent) ? globalThis.String(object.parent) : "",
- pageSize: isSet(object.pageSize) ? globalThis.Number(object.pageSize) : 0,
- pageToken: isSet(object.pageToken) ? globalThis.String(object.pageToken) : "",
- view: isSet(object.view) ? changelogViewFromJSON(object.view) : ChangelogView.CHANGELOG_VIEW_UNSPECIFIED,
- filter: isSet(object.filter) ? globalThis.String(object.filter) : "",
+ name: isSet(object.name) ? globalThis.String(object.name) : "",
+ type: isSet(object.type)
+ ? getSchemaStringRequest_ObjectTypeFromJSON(object.type)
+ : GetSchemaStringRequest_ObjectType.OBJECT_TYPE_UNSPECIFIED,
+ schema: isSet(object.schema) ? globalThis.String(object.schema) : "",
+ object: isSet(object.object) ? globalThis.String(object.object) : "",
+ metadata: isSet(object.metadata) ? DatabaseMetadata.fromJSON(object.metadata) : undefined,
};
},
- toJSON(message: ListChangelogsRequest): unknown {
+ toJSON(message: GetSchemaStringRequest): unknown {
const obj: any = {};
- if (message.parent !== "") {
- obj.parent = message.parent;
- }
- if (message.pageSize !== 0) {
- obj.pageSize = Math.round(message.pageSize);
- }
- if (message.pageToken !== "") {
- obj.pageToken = message.pageToken;
- }
- if (message.view !== ChangelogView.CHANGELOG_VIEW_UNSPECIFIED) {
- obj.view = changelogViewToJSON(message.view);
- }
- if (message.filter !== "") {
- obj.filter = message.filter;
- }
- return obj;
- },
-
- create(base?: DeepPartial<ListChangelogsRequest>): ListChangelogsRequest {
- return ListChangelogsRequest.fromPartial(base ?? {});
- },
- fromPartial(object: DeepPartial<ListChangelogsRequest>): ListChangelogsRequest {
- const message = createBaseListChangelogsRequest();
- message.parent = object.parent ?? "";
- message.pageSize = object.pageSize ?? 0;
- message.pageToken = object.pageToken ?? "";
- message.view = object.view ?? ChangelogView.CHANGELOG_VIEW_UNSPECIFIED;
- message.filter = object.filter ?? "";
- return message;
- },
-};
-
-function createBaseListChangelogsResponse(): ListChangelogsResponse {
- return { changelogs: [], nextPageToken: "" };
-}
-
-export const ListChangelogsResponse: MessageFns<ListChangelogsResponse> = {
- encode(message: ListChangelogsResponse, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
- for (const v of message.changelogs) {
- Changelog.encode(v!, writer.uint32(10).fork()).join();
+ if (message.name !== "") {
+ obj.name = message.name;
}
- if (message.nextPageToken !== "") {
- writer.uint32(18).string(message.nextPageToken);
+ if (message.type !== GetSchemaStringRequest_ObjectType.OBJECT_TYPE_UNSPECIFIED) {
+ obj.type = getSchemaStringRequest_ObjectTypeToJSON(message.type);
}
- return writer;
- },
-
- decode(input: BinaryReader | Uint8Array, length?: number): ListChangelogsResponse {
- const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
- let end = length === undefined ? reader.len : reader.pos + length;
- const message = createBaseListChangelogsResponse();
- while (reader.pos < end) {
- const tag = reader.uint32();
- switch (tag >>> 3) {
- case 1: {
- if (tag !== 10) {
- break;
- }
-
- message.changelogs.push(Changelog.decode(reader, reader.uint32()));
- continue;
- }
- case 2: {
- if (tag !== 18) {
- break;
- }
-
- message.nextPageToken = reader.string();
- continue;
- }
- }
- if ((tag & 7) === 4 || tag === 0) {
- break;
- }
- reader.skip(tag & 7);
+ if (message.schema !== "") {
+ obj.schema = message.schema;
}
- return message;
- },
-
- fromJSON(object: any): ListChangelogsResponse {
- return {
- changelogs: globalThis.Array.isArray(object?.changelogs)
- ? object.changelogs.map((e: any) => Changelog.fromJSON(e))
- : [],
- nextPageToken: isSet(object.nextPageToken) ? globalThis.String(object.nextPageToken) : "",
- };
- },
-
- toJSON(message: ListChangelogsResponse): unknown {
- const obj: any = {};
- if (message.changelogs?.length) {
- obj.changelogs = message.changelogs.map((e) => Changelog.toJSON(e));
+ if (message.object !== "") {
+ obj.object = message.object;
}
- if (message.nextPageToken !== "") {
- obj.nextPageToken = message.nextPageToken;
+ if (message.metadata !== undefined) {
+ obj.metadata = DatabaseMetadata.toJSON(message.metadata);
}
return obj;
},
- create(base?: DeepPartial<ListChangelogsResponse>): ListChangelogsResponse {
- return ListChangelogsResponse.fromPartial(base ?? {});
+ create(base?: DeepPartial<GetSchemaStringRequest>): GetSchemaStringRequest {
+ return GetSchemaStringRequest.fromPartial(base ?? {});
},
- fromPartial(object: DeepPartial<ListChangelogsResponse>): ListChangelogsResponse {
- const message = createBaseListChangelogsResponse();
- message.changelogs = object.changelogs?.map((e) => Changelog.fromPartial(e)) || [];
- message.nextPageToken = object.nextPageToken ?? "";
+ fromPartial(object: DeepPartial<GetSchemaStringRequest>): GetSchemaStringRequest {
+ const message = createBaseGetSchemaStringRequest();
+ message.name = object.name ?? "";
+ message.type = object.type ?? GetSchemaStringRequest_ObjectType.OBJECT_TYPE_UNSPECIFIED;
+ message.schema = object.schema ?? "";
+ message.object = object.object ?? "";
+ message.metadata = (object.metadata !== undefined && object.metadata !== null)
+ ? DatabaseMetadata.fromPartial(object.metadata)
+ : undefined;
return message;
},
};
-function createBaseGetChangelogRequest(): GetChangelogRequest {
- return { name: "", view: ChangelogView.CHANGELOG_VIEW_UNSPECIFIED, sdlFormat: false };
+function createBaseGetSchemaStringResponse(): GetSchemaStringResponse {
+ return { schemaString: "" };
}
-export const GetChangelogRequest: MessageFns<GetChangelogRequest> = {
- encode(message: GetChangelogRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
- if (message.name !== "") {
- writer.uint32(10).string(message.name);
- }
- if (message.view !== ChangelogView.CHANGELOG_VIEW_UNSPECIFIED) {
- writer.uint32(16).int32(changelogViewToNumber(message.view));
- }
- if (message.sdlFormat !== false) {
- writer.uint32(24).bool(message.sdlFormat);
+export const GetSchemaStringResponse: MessageFns<GetSchemaStringResponse> = {
+ encode(message: GetSchemaStringResponse, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
+ if (message.schemaString !== "") {
+ writer.uint32(10).string(message.schemaString);
}
return writer;
},
- decode(input: BinaryReader | Uint8Array, length?: number): GetChangelogRequest {
+ decode(input: BinaryReader | Uint8Array, length?: number): GetSchemaStringResponse {
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
let end = length === undefined ? reader.len : reader.pos + length;
- const message = createBaseGetChangelogRequest();
+ const message = createBaseGetSchemaStringResponse();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
@@ -9705,23 +9494,7 @@ export const GetChangelogRequest: MessageFns<GetChangelogRequest> = {
break;
}
- message.name = reader.string();
- continue;
- }
- case 2: {
- if (tag !== 16) {
- break;
- }
-
- message.view = changelogViewFromJSON(reader.int32());
- continue;
- }
- case 3: {
- if (tag !== 24) {
- break;
- }
-
- message.sdlFormat = reader.bool();
+ message.schemaString = reader.string();
continue;
}
}
@@ -9733,743 +9506,46 @@ export const GetChangelogRequest: MessageFns<GetChangelogRequest> = {
return message;
},
- fromJSON(object: any): GetChangelogRequest {
- return {
- name: isSet(object.name) ? globalThis.String(object.name) : "",
- view: isSet(object.view) ? changelogViewFromJSON(object.view) : ChangelogView.CHANGELOG_VIEW_UNSPECIFIED,
- sdlFormat: isSet(object.sdlFormat) ? globalThis.Boolean(object.sdlFormat) : false,
- };
+ fromJSON(object: any): GetSchemaStringResponse {
+ return { schemaString: isSet(object.schemaString) ? globalThis.String(object.schemaString) : "" };
},
- toJSON(message: GetChangelogRequest): unknown {
+ toJSON(message: GetSchemaStringResponse): unknown {
const obj: any = {};
- if (message.name !== "") {
- obj.name = message.name;
- }
- if (message.view !== ChangelogView.CHANGELOG_VIEW_UNSPECIFIED) {
- obj.view = changelogViewToJSON(message.view);
- }
- if (message.sdlFormat !== false) {
- obj.sdlFormat = message.sdlFormat;
+ if (message.schemaString !== "") {
+ obj.schemaString = message.schemaString;
}
return obj;
},
- create(base?: DeepPartial<GetChangelogRequest>): GetChangelogRequest {
- return GetChangelogRequest.fromPartial(base ?? {});
+ create(base?: DeepPartial<GetSchemaStringResponse>): GetSchemaStringResponse {
+ return GetSchemaStringResponse.fromPartial(base ?? {});
},
- fromPartial(object: DeepPartial<GetChangelogRequest>): GetChangelogRequest {
- const message = createBaseGetChangelogRequest();
- message.name = object.name ?? "";
- message.view = object.view ?? ChangelogView.CHANGELOG_VIEW_UNSPECIFIED;
- message.sdlFormat = object.sdlFormat ?? false;
+ fromPartial(object: DeepPartial<GetSchemaStringResponse>): GetSchemaStringResponse {
+ const message = createBaseGetSchemaStringResponse();
+ message.schemaString = object.schemaString ?? "";
return message;
},
};
-function createBaseChangelog(): Changelog {
- return {
- name: "",
- createTime: undefined,
- status: Changelog_Status.STATUS_UNSPECIFIED,
- statement: "",
- statementSize: Long.ZERO,
- statementSheet: "",
- schema: "",
- schemaSize: Long.ZERO,
- prevSchema: "",
- prevSchemaSize: Long.ZERO,
- issue: "",
- taskRun: "",
- version: "",
- revision: "",
- changedResources: undefined,
- type: Changelog_Type.TYPE_UNSPECIFIED,
- };
-}
-
-export const Changelog: MessageFns<Changelog> = {
- encode(message: Changelog, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
- if (message.name !== "") {
- writer.uint32(10).string(message.name);
- }
- if (message.createTime !== undefined) {
- Timestamp.encode(message.createTime, writer.uint32(26).fork()).join();
- }
- if (message.status !== Changelog_Status.STATUS_UNSPECIFIED) {
- writer.uint32(32).int32(changelog_StatusToNumber(message.status));
- }
- if (message.statement !== "") {
- writer.uint32(42).string(message.statement);
- }
- if (!message.statementSize.equals(Long.ZERO)) {
- writer.uint32(48).int64(message.statementSize.toString());
- }
- if (message.statementSheet !== "") {
- writer.uint32(58).string(message.statementSheet);
- }
- if (message.schema !== "") {
- writer.uint32(66).string(message.schema);
- }
- if (!message.schemaSize.equals(Long.ZERO)) {
- writer.uint32(72).int64(message.schemaSize.toString());
- }
- if (message.prevSchema !== "") {
- writer.uint32(82).string(message.prevSchema);
- }
- if (!message.prevSchemaSize.equals(Long.ZERO)) {
- writer.uint32(88).int64(message.prevSchemaSize.toString());
- }
- if (message.issue !== "") {
- writer.uint32(98).string(message.issue);
- }
- if (message.taskRun !== "") {
- writer.uint32(106).string(message.taskRun);
- }
- if (message.version !== "") {
- writer.uint32(114).string(message.version);
- }
- if (message.revision !== "") {
- writer.uint32(122).string(message.revision);
- }
- if (message.changedResources !== undefined) {
- ChangedResources.encode(message.changedResources, writer.uint32(130).fork()).join();
- }
- if (message.type !== Changelog_Type.TYPE_UNSPECIFIED) {
- writer.uint32(136).int32(changelog_TypeToNumber(message.type));
- }
- return writer;
- },
-
- decode(input: BinaryReader | Uint8Array, length?: number): Changelog {
- const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
- let end = length === undefined ? reader.len : reader.pos + length;
- const message = createBaseChangelog();
- while (reader.pos < end) {
- const tag = reader.uint32();
- switch (tag >>> 3) {
- case 1: {
- if (tag !== 10) {
- break;
- }
-
- message.name = reader.string();
- continue;
- }
- case 3: {
- if (tag !== 26) {
- break;
- }
-
- message.createTime = Timestamp.decode(reader, reader.uint32());
- continue;
- }
- case 4: {
- if (tag !== 32) {
- break;
- }
-
- message.status = changelog_StatusFromJSON(reader.int32());
- continue;
- }
- case 5: {
- if (tag !== 42) {
- break;
- }
-
- message.statement = reader.string();
- continue;
- }
- case 6: {
- if (tag !== 48) {
- break;
- }
-
- message.statementSize = Long.fromString(reader.int64().toString());
- continue;
- }
- case 7: {
- if (tag !== 58) {
- break;
- }
-
- message.statementSheet = reader.string();
- continue;
- }
- case 8: {
- if (tag !== 66) {
- break;
- }
-
- message.schema = reader.string();
- continue;
- }
- case 9: {
- if (tag !== 72) {
- break;
- }
-
- message.schemaSize = Long.fromString(reader.int64().toString());
- continue;
- }
- case 10: {
- if (tag !== 82) {
- break;
- }
-
- message.prevSchema = reader.string();
- continue;
- }
- case 11: {
- if (tag !== 88) {
- break;
- }
-
- message.prevSchemaSize = Long.fromString(reader.int64().toString());
- continue;
- }
- case 12: {
- if (tag !== 98) {
- break;
- }
-
- message.issue = reader.string();
- continue;
- }
- case 13: {
- if (tag !== 106) {
- break;
- }
-
- message.taskRun = reader.string();
- continue;
- }
- case 14: {
- if (tag !== 114) {
- break;
- }
-
- message.version = reader.string();
- continue;
- }
- case 15: {
- if (tag !== 122) {
- break;
- }
-
- message.revision = reader.string();
- continue;
- }
- case 16: {
- if (tag !== 130) {
- break;
- }
-
- message.changedResources = ChangedResources.decode(reader, reader.uint32());
- continue;
- }
- case 17: {
- if (tag !== 136) {
- break;
- }
-
- message.type = changelog_TypeFromJSON(reader.int32());
- continue;
- }
- }
- if ((tag & 7) === 4 || tag === 0) {
- break;
- }
- reader.skip(tag & 7);
- }
- return message;
- },
-
- fromJSON(object: any): Changelog {
- return {
- name: isSet(object.name) ? globalThis.String(object.name) : "",
- createTime: isSet(object.createTime) ? fromJsonTimestamp(object.createTime) : undefined,
- status: isSet(object.status) ? changelog_StatusFromJSON(object.status) : Changelog_Status.STATUS_UNSPECIFIED,
- statement: isSet(object.statement) ? globalThis.String(object.statement) : "",
- statementSize: isSet(object.statementSize) ? Long.fromValue(object.statementSize) : Long.ZERO,
- statementSheet: isSet(object.statementSheet) ? globalThis.String(object.statementSheet) : "",
- schema: isSet(object.schema) ? globalThis.String(object.schema) : "",
- schemaSize: isSet(object.schemaSize) ? Long.fromValue(object.schemaSize) : Long.ZERO,
- prevSchema: isSet(object.prevSchema) ? globalThis.String(object.prevSchema) : "",
- prevSchemaSize: isSet(object.prevSchemaSize) ? Long.fromValue(object.prevSchemaSize) : Long.ZERO,
- issue: isSet(object.issue) ? globalThis.String(object.issue) : "",
- taskRun: isSet(object.taskRun) ? globalThis.String(object.taskRun) : "",
- version: isSet(object.version) ? globalThis.String(object.version) : "",
- revision: isSet(object.revision) ? globalThis.String(object.revision) : "",
- changedResources: isSet(object.changedResources) ? ChangedResources.fromJSON(object.changedResources) : undefined,
- type: isSet(object.type) ? changelog_TypeFromJSON(object.type) : Changelog_Type.TYPE_UNSPECIFIED,
- };
- },
-
- toJSON(message: Changelog): unknown {
- const obj: any = {};
- if (message.name !== "") {
- obj.name = message.name;
- }
- if (message.createTime !== undefined) {
- obj.createTime = fromTimestamp(message.createTime).toISOString();
- }
- if (message.status !== Changelog_Status.STATUS_UNSPECIFIED) {
- obj.status = changelog_StatusToJSON(message.status);
- }
- if (message.statement !== "") {
- obj.statement = message.statement;
- }
- if (!message.statementSize.equals(Long.ZERO)) {
- obj.statementSize = (message.statementSize || Long.ZERO).toString();
- }
- if (message.statementSheet !== "") {
- obj.statementSheet = message.statementSheet;
- }
- if (message.schema !== "") {
- obj.schema = message.schema;
- }
- if (!message.schemaSize.equals(Long.ZERO)) {
- obj.schemaSize = (message.schemaSize || Long.ZERO).toString();
- }
- if (message.prevSchema !== "") {
- obj.prevSchema = message.prevSchema;
- }
- if (!message.prevSchemaSize.equals(Long.ZERO)) {
- obj.prevSchemaSize = (message.prevSchemaSize || Long.ZERO).toString();
- }
- if (message.issue !== "") {
- obj.issue = message.issue;
- }
- if (message.taskRun !== "") {
- obj.taskRun = message.taskRun;
- }
- if (message.version !== "") {
- obj.version = message.version;
- }
- if (message.revision !== "") {
- obj.revision = message.revision;
- }
- if (message.changedResources !== undefined) {
- obj.changedResources = ChangedResources.toJSON(message.changedResources);
- }
- if (message.type !== Changelog_Type.TYPE_UNSPECIFIED) {
- obj.type = changelog_TypeToJSON(message.type);
- }
- return obj;
- },
-
- create(base?: DeepPartial<Changelog>): Changelog {
- return Changelog.fromPartial(base ?? {});
- },
- fromPartial(object: DeepPartial<Changelog>): Changelog {
- const message = createBaseChangelog();
- message.name = object.name ?? "";
- message.createTime = (object.createTime !== undefined && object.createTime !== null)
- ? Timestamp.fromPartial(object.createTime)
- : undefined;
- message.status = object.status ?? Changelog_Status.STATUS_UNSPECIFIED;
- message.statement = object.statement ?? "";
- message.statementSize = (object.statementSize !== undefined && object.statementSize !== null)
- ? Long.fromValue(object.statementSize)
- : Long.ZERO;
- message.statementSheet = object.statementSheet ?? "";
- message.schema = object.schema ?? "";
- message.schemaSize = (object.schemaSize !== undefined && object.schemaSize !== null)
- ? Long.fromValue(object.schemaSize)
- : Long.ZERO;
- message.prevSchema = object.prevSchema ?? "";
- message.prevSchemaSize = (object.prevSchemaSize !== undefined && object.prevSchemaSize !== null)
- ? Long.fromValue(object.prevSchemaSize)
- : Long.ZERO;
- message.issue = object.issue ?? "";
- message.taskRun = object.taskRun ?? "";
- message.version = object.version ?? "";
- message.revision = object.revision ?? "";
- message.changedResources = (object.changedResources !== undefined && object.changedResources !== null)
- ? ChangedResources.fromPartial(object.changedResources)
- : undefined;
- message.type = object.type ?? Changelog_Type.TYPE_UNSPECIFIED;
- return message;
- },
-};
-
-function createBaseGetSchemaStringRequest(): GetSchemaStringRequest {
- return {
- name: "",
- type: GetSchemaStringRequest_ObjectType.OBJECT_TYPE_UNSPECIFIED,
- schema: "",
- object: "",
- metadata: undefined,
- };
-}
-
-export const GetSchemaStringRequest: MessageFns<GetSchemaStringRequest> = {
- encode(message: GetSchemaStringRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
- if (message.name !== "") {
- writer.uint32(10).string(message.name);
- }
- if (message.type !== GetSchemaStringRequest_ObjectType.OBJECT_TYPE_UNSPECIFIED) {
- writer.uint32(16).int32(getSchemaStringRequest_ObjectTypeToNumber(message.type));
- }
- if (message.schema !== "") {
- writer.uint32(26).string(message.schema);
- }
- if (message.object !== "") {
- writer.uint32(34).string(message.object);
- }
- if (message.metadata !== undefined) {
- DatabaseMetadata.encode(message.metadata, writer.uint32(42).fork()).join();
- }
- return writer;
- },
-
- decode(input: BinaryReader | Uint8Array, length?: number): GetSchemaStringRequest {
- const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
- let end = length === undefined ? reader.len : reader.pos + length;
- const message = createBaseGetSchemaStringRequest();
- while (reader.pos < end) {
- const tag = reader.uint32();
- switch (tag >>> 3) {
- case 1: {
- if (tag !== 10) {
- break;
- }
-
- message.name = reader.string();
- continue;
- }
- case 2: {
- if (tag !== 16) {
- break;
- }
-
- message.type = getSchemaStringRequest_ObjectTypeFromJSON(reader.int32());
- continue;
- }
- case 3: {
- if (tag !== 26) {
- break;
- }
-
- message.schema = reader.string();
- continue;
- }
- case 4: {
- if (tag !== 34) {
- break;
- }
-
- message.object = reader.string();
- continue;
- }
- case 5: {
- if (tag !== 42) {
- break;
- }
-
- message.metadata = DatabaseMetadata.decode(reader, reader.uint32());
- continue;
- }
- }
- if ((tag & 7) === 4 || tag === 0) {
- break;
- }
- reader.skip(tag & 7);
- }
- return message;
- },
-
- fromJSON(object: any): GetSchemaStringRequest {
- return {
- name: isSet(object.name) ? globalThis.String(object.name) : "",
- type: isSet(object.type)
- ? getSchemaStringRequest_ObjectTypeFromJSON(object.type)
- : GetSchemaStringRequest_ObjectType.OBJECT_TYPE_UNSPECIFIED,
- schema: isSet(object.schema) ? globalThis.String(object.schema) : "",
- object: isSet(object.object) ? globalThis.String(object.object) : "",
- metadata: isSet(object.metadata) ? DatabaseMetadata.fromJSON(object.metadata) : undefined,
- };
- },
-
- toJSON(message: GetSchemaStringRequest): unknown {
- const obj: any = {};
- if (message.name !== "") {
- obj.name = message.name;
- }
- if (message.type !== GetSchemaStringRequest_ObjectType.OBJECT_TYPE_UNSPECIFIED) {
- obj.type = getSchemaStringRequest_ObjectTypeToJSON(message.type);
- }
- if (message.schema !== "") {
- obj.schema = message.schema;
- }
- if (message.object !== "") {
- obj.object = message.object;
- }
- if (message.metadata !== undefined) {
- obj.metadata = DatabaseMetadata.toJSON(message.metadata);
- }
- return obj;
- },
-
- create(base?: DeepPartial<GetSchemaStringRequest>): GetSchemaStringRequest {
- return GetSchemaStringRequest.fromPartial(base ?? {});
- },
- fromPartial(object: DeepPartial<GetSchemaStringRequest>): GetSchemaStringRequest {
- const message = createBaseGetSchemaStringRequest();
- message.name = object.name ?? "";
- message.type = object.type ?? GetSchemaStringRequest_ObjectType.OBJECT_TYPE_UNSPECIFIED;
- message.schema = object.schema ?? "";
- message.object = object.object ?? "";
- message.metadata = (object.metadata !== undefined && object.metadata !== null)
- ? DatabaseMetadata.fromPartial(object.metadata)
- : undefined;
- return message;
- },
-};
-
-function createBaseGetSchemaStringResponse(): GetSchemaStringResponse {
- return { schemaString: "" };
-}
-
-export const GetSchemaStringResponse: MessageFns<GetSchemaStringResponse> = {
- encode(message: GetSchemaStringResponse, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
- if (message.schemaString !== "") {
- writer.uint32(10).string(message.schemaString);
- }
- return writer;
- },
-
- decode(input: BinaryReader | Uint8Array, length?: number): GetSchemaStringResponse {
- const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
- let end = length === undefined ? reader.len : reader.pos + length;
- const message = createBaseGetSchemaStringResponse();
- while (reader.pos < end) {
- const tag = reader.uint32();
- switch (tag >>> 3) {
- case 1: {
- if (tag !== 10) {
- break;
- }
-
- message.schemaString = reader.string();
- continue;
- }
- }
- if ((tag & 7) === 4 || tag === 0) {
- break;
- }
- reader.skip(tag & 7);
- }
- return message;
- },
-
- fromJSON(object: any): GetSchemaStringResponse {
- return { schemaString: isSet(object.schemaString) ? globalThis.String(object.schemaString) : "" };
- },
-
- toJSON(message: GetSchemaStringResponse): unknown {
- const obj: any = {};
- if (message.schemaString !== "") {
- obj.schemaString = message.schemaString;
- }
- return obj;
- },
-
- create(base?: DeepPartial<GetSchemaStringResponse>): GetSchemaStringResponse {
- return GetSchemaStringResponse.fromPartial(base ?? {});
- },
- fromPartial(object: DeepPartial<GetSchemaStringResponse>): GetSchemaStringResponse {
- const message = createBaseGetSchemaStringResponse();
- message.schemaString = object.schemaString ?? "";
- return message;
- },
-};
-
-export type DatabaseServiceDefinition = typeof DatabaseServiceDefinition;
-export const DatabaseServiceDefinition = {
- name: "DatabaseService",
- fullName: "bytebase.v1.DatabaseService",
- methods: {
- getDatabase: {
- name: "GetDatabase",
- requestType: GetDatabaseRequest,
- requestStream: false,
- responseType: Database,
- responseStream: false,
- options: {
- _unknownFields: {
- 8410: [new Uint8Array([4, 110, 97, 109, 101])],
- 800010: [new Uint8Array([16, 98, 98, 46, 100, 97, 116, 97, 98, 97, 115, 101, 115, 46, 103, 101, 116])],
- 800016: [new Uint8Array([1])],
- 578365826: [
- new Uint8Array([
- 36,
- 18,
- 34,
- 47,
- 118,
- 49,
- 47,
- 123,
- 110,
- 97,
- 109,
- 101,
- 61,
- 105,
- 110,
- 115,
- 116,
- 97,
- 110,
- 99,
- 101,
- 115,
- 47,
- 42,
- 47,
- 100,
- 97,
- 116,
- 97,
- 98,
- 97,
- 115,
- 101,
- 115,
- 47,
- 42,
- 125,
- ]),
- ],
- },
- },
- },
- batchGetDatabases: {
- name: "BatchGetDatabases",
- requestType: BatchGetDatabasesRequest,
- requestStream: false,
- responseType: BatchGetDatabasesResponse,
- responseStream: false,
- options: {
- _unknownFields: {
- 800010: [new Uint8Array([16, 98, 98, 46, 100, 97, 116, 97, 98, 97, 115, 101, 115, 46, 103, 101, 116])],
- 800016: [new Uint8Array([1])],
- 578365826: [
- new Uint8Array([
- 91,
- 90,
- 45,
- 18,
- 43,
- 47,
- 118,
- 49,
- 47,
- 123,
- 112,
- 97,
- 114,
- 101,
- 110,
- 116,
- 61,
- 105,
- 110,
- 115,
- 116,
- 97,
- 110,
- 99,
- 101,
- 115,
- 47,
- 42,
- 125,
- 47,
- 100,
- 97,
- 116,
- 97,
- 98,
- 97,
- 115,
- 101,
- 115,
- 58,
- 98,
- 97,
- 116,
- 99,
- 104,
- 71,
- 101,
- 116,
- 18,
- 42,
- 47,
- 118,
- 49,
- 47,
- 123,
- 112,
- 97,
- 114,
- 101,
- 110,
- 116,
- 61,
- 112,
- 114,
- 111,
- 106,
- 101,
- 99,
- 116,
- 115,
- 47,
- 42,
- 125,
- 47,
- 100,
- 97,
- 116,
- 97,
- 98,
- 97,
- 115,
- 101,
- 115,
- 58,
- 98,
- 97,
- 116,
- 99,
- 104,
- 71,
- 101,
- 116,
- ]),
- ],
- },
- },
- },
- listDatabases: {
- name: "ListDatabases",
- requestType: ListDatabasesRequest,
+export type DatabaseServiceDefinition = typeof DatabaseServiceDefinition;
+export const DatabaseServiceDefinition = {
+ name: "DatabaseService",
+ fullName: "bytebase.v1.DatabaseService",
+ methods: {
+ getDatabase: {
+ name: "GetDatabase",
+ requestType: GetDatabaseRequest,
requestStream: false,
- responseType: ListDatabasesResponse,
+ responseType: Database,
responseStream: false,
options: {
_unknownFields: {
- 8410: [new Uint8Array([0])],
- 800010: [new Uint8Array([17, 98, 98, 46, 100, 97, 116, 97, 98, 97, 115, 101, 115, 46, 108, 105, 115, 116])],
- 800016: [new Uint8Array([2])],
+ 8410: [new Uint8Array([4, 110, 97, 109, 101])],
+ 800010: [new Uint8Array([16, 98, 98, 46, 100, 97, 116, 97, 98, 97, 115, 101, 115, 46, 103, 101, 116])],
+ 800016: [new Uint8Array([1])],
578365826: [
new Uint8Array([
- 112,
- 90,
36,
18,
34,
@@ -10478,12 +9554,10 @@ export const DatabaseServiceDefinition = {
49,
47,
123,
- 112,
+ 110,
97,
- 114,
+ 109,
101,
- 110,
- 116,
61,
105,
110,
@@ -10496,46 +9570,6 @@ export const DatabaseServiceDefinition = {
115,
47,
42,
- 125,
- 47,
- 100,
- 97,
- 116,
- 97,
- 98,
- 97,
- 115,
- 101,
- 115,
- 90,
- 37,
- 18,
- 35,
- 47,
- 118,
- 49,
- 47,
- 123,
- 112,
- 97,
- 114,
- 101,
- 110,
- 116,
- 61,
- 119,
- 111,
- 114,
- 107,
- 115,
- 112,
- 97,
- 99,
- 101,
- 115,
- 47,
- 42,
- 125,
47,
100,
97,
@@ -10546,117 +9580,42 @@ export const DatabaseServiceDefinition = {
115,
101,
115,
- 18,
- 33,
- 47,
- 118,
- 49,
- 47,
- 123,
- 112,
- 97,
- 114,
- 101,
- 110,
- 116,
- 61,
- 112,
- 114,
- 111,
- 106,
- 101,
- 99,
- 116,
- 115,
47,
42,
125,
- 47,
- 100,
- 97,
- 116,
- 97,
- 98,
- 97,
- 115,
- 101,
- 115,
]),
],
},
},
},
- updateDatabase: {
- name: "UpdateDatabase",
- requestType: UpdateDatabaseRequest,
+ batchGetDatabases: {
+ name: "BatchGetDatabases",
+ requestType: BatchGetDatabasesRequest,
requestStream: false,
- responseType: Database,
+ responseType: BatchGetDatabasesResponse,
responseStream: false,
options: {
_unknownFields: {
- 8410: [
- new Uint8Array([
- 20,
- 100,
- 97,
- 116,
- 97,
- 98,
- 97,
- 115,
- 101,
- 44,
- 117,
- 112,
- 100,
- 97,
- 116,
- 101,
- 95,
- 109,
- 97,
- 115,
- 107,
- ]),
- ],
- 800010: [
- new Uint8Array([19, 98, 98, 46, 100, 97, 116, 97, 98, 97, 115, 101, 115, 46, 117, 112, 100, 97, 116, 101]),
- ],
+ 800010: [new Uint8Array([16, 98, 98, 46, 100, 97, 116, 97, 98, 97, 115, 101, 115, 46, 103, 101, 116])],
800016: [new Uint8Array([1])],
- 800024: [new Uint8Array([1])],
578365826: [
new Uint8Array([
- 55,
- 58,
- 8,
- 100,
- 97,
- 116,
- 97,
- 98,
- 97,
- 115,
- 101,
- 50,
+ 91,
+ 90,
+ 45,
+ 18,
43,
47,
118,
49,
47,
123,
- 100,
- 97,
- 116,
- 97,
- 98,
+ 112,
97,
- 115,
+ 114,
101,
- 46,
110,
- 97,
- 109,
- 101,
+ 116,
61,
105,
110,
@@ -10669,6 +9628,7 @@ export const DatabaseServiceDefinition = {
115,
47,
42,
+ 125,
47,
100,
97,
@@ -10679,35 +9639,17 @@ export const DatabaseServiceDefinition = {
115,
101,
115,
- 47,
- 42,
- 125,
- ]),
- ],
- },
- },
- },
- batchUpdateDatabases: {
- name: "BatchUpdateDatabases",
- requestType: BatchUpdateDatabasesRequest,
- requestStream: false,
- responseType: BatchUpdateDatabasesResponse,
- responseStream: false,
- options: {
- _unknownFields: {
- 800010: [
- new Uint8Array([19, 98, 98, 46, 100, 97, 116, 97, 98, 97, 115, 101, 115, 46, 117, 112, 100, 97, 116, 101]),
- ],
- 800016: [new Uint8Array([1])],
- 800024: [new Uint8Array([1])],
- 578365826: [
- new Uint8Array([
- 51,
58,
- 1,
+ 98,
+ 97,
+ 116,
+ 99,
+ 104,
+ 71,
+ 101,
+ 116,
+ 18,
42,
- 34,
- 46,
47,
118,
49,
@@ -10720,14 +9662,13 @@ export const DatabaseServiceDefinition = {
110,
116,
61,
- 105,
- 110,
- 115,
- 116,
- 97,
- 110,
- 99,
+ 112,
+ 114,
+ 111,
+ 106,
101,
+ 99,
+ 116,
115,
47,
42,
@@ -10748,44 +9689,43 @@ export const DatabaseServiceDefinition = {
116,
99,
104,
- 85,
- 112,
- 100,
- 97,
- 116,
+ 71,
101,
+ 116,
]),
],
},
},
},
- syncDatabase: {
- name: "SyncDatabase",
- requestType: SyncDatabaseRequest,
+ listDatabases: {
+ name: "ListDatabases",
+ requestType: ListDatabasesRequest,
requestStream: false,
- responseType: SyncDatabaseResponse,
+ responseType: ListDatabasesResponse,
responseStream: false,
options: {
_unknownFields: {
- 800010: [new Uint8Array([17, 98, 98, 46, 100, 97, 116, 97, 98, 97, 115, 101, 115, 46, 115, 121, 110, 99])],
- 800016: [new Uint8Array([1])],
+ 8410: [new Uint8Array([0])],
+ 800010: [new Uint8Array([17, 98, 98, 46, 100, 97, 116, 97, 98, 97, 115, 101, 115, 46, 108, 105, 115, 116])],
+ 800016: [new Uint8Array([2])],
578365826: [
new Uint8Array([
- 44,
- 58,
- 1,
- 42,
+ 112,
+ 90,
+ 36,
+ 18,
34,
- 39,
47,
118,
49,
47,
123,
- 110,
+ 112,
97,
- 109,
+ 114,
101,
+ 110,
+ 116,
61,
105,
110,
@@ -10798,6 +9738,7 @@ export const DatabaseServiceDefinition = {
115,
47,
42,
+ 125,
47,
100,
97,
@@ -10808,37 +9749,10 @@ export const DatabaseServiceDefinition = {
115,
101,
115,
- 47,
- 42,
- 125,
- 58,
- 115,
- 121,
- 110,
- 99,
- ]),
- ],
- },
- },
- },
- batchSyncDatabases: {
- name: "BatchSyncDatabases",
- requestType: BatchSyncDatabasesRequest,
- requestStream: false,
- responseType: BatchSyncDatabasesResponse,
- responseStream: false,
- options: {
- _unknownFields: {
- 800010: [new Uint8Array([17, 98, 98, 46, 100, 97, 116, 97, 98, 97, 115, 101, 115, 46, 115, 121, 110, 99])],
- 800016: [new Uint8Array([1])],
- 578365826: [
- new Uint8Array([
- 49,
- 58,
- 1,
- 42,
- 34,
- 44,
+ 90,
+ 37,
+ 18,
+ 35,
47,
118,
49,
@@ -10851,12 +9765,13 @@ export const DatabaseServiceDefinition = {
110,
116,
61,
- 105,
- 110,
+ 119,
+ 111,
+ 114,
+ 107,
115,
- 116,
+ 112,
97,
- 110,
99,
101,
115,
@@ -10873,35 +9788,57 @@ export const DatabaseServiceDefinition = {
115,
101,
115,
- 58,
- 98,
+ 18,
+ 33,
+ 47,
+ 118,
+ 49,
+ 47,
+ 123,
+ 112,
97,
- 116,
- 99,
- 104,
- 83,
- 121,
+ 114,
+ 101,
110,
+ 116,
+ 61,
+ 112,
+ 114,
+ 111,
+ 106,
+ 101,
99,
+ 116,
+ 115,
+ 47,
+ 42,
+ 125,
+ 47,
+ 100,
+ 97,
+ 116,
+ 97,
+ 98,
+ 97,
+ 115,
+ 101,
+ 115,
]),
],
},
},
},
- getDatabaseMetadata: {
- name: "GetDatabaseMetadata",
- requestType: GetDatabaseMetadataRequest,
+ updateDatabase: {
+ name: "UpdateDatabase",
+ requestType: UpdateDatabaseRequest,
requestStream: false,
- responseType: DatabaseMetadata,
+ responseType: Database,
responseStream: false,
options: {
_unknownFields: {
- 800010: [
+ 8410: [
new Uint8Array([
- 22,
- 98,
- 98,
- 46,
+ 20,
100,
97,
116,
@@ -10910,30 +9847,54 @@ export const DatabaseServiceDefinition = {
97,
115,
101,
- 115,
- 46,
- 103,
- 101,
+ 44,
+ 117,
+ 112,
+ 100,
+ 97,
116,
- 83,
- 99,
- 104,
101,
+ 95,
109,
97,
+ 115,
+ 107,
]),
],
+ 800010: [
+ new Uint8Array([19, 98, 98, 46, 100, 97, 116, 97, 98, 97, 115, 101, 115, 46, 117, 112, 100, 97, 116, 101]),
+ ],
800016: [new Uint8Array([1])],
+ 800024: [new Uint8Array([1])],
578365826: [
new Uint8Array([
- 45,
- 18,
+ 55,
+ 58,
+ 8,
+ 100,
+ 97,
+ 116,
+ 97,
+ 98,
+ 97,
+ 115,
+ 101,
+ 50,
43,
47,
118,
49,
47,
123,
+ 100,
+ 97,
+ 116,
+ 97,
+ 98,
+ 97,
+ 115,
+ 101,
+ 46,
110,
97,
109,
@@ -10962,71 +9923,44 @@ export const DatabaseServiceDefinition = {
115,
47,
42,
- 47,
- 109,
- 101,
- 116,
- 97,
- 100,
- 97,
- 116,
- 97,
125,
]),
],
},
},
},
- getDatabaseSchema: {
- name: "GetDatabaseSchema",
- requestType: GetDatabaseSchemaRequest,
+ batchUpdateDatabases: {
+ name: "BatchUpdateDatabases",
+ requestType: BatchUpdateDatabasesRequest,
requestStream: false,
- responseType: DatabaseSchema,
+ responseType: BatchUpdateDatabasesResponse,
responseStream: false,
options: {
_unknownFields: {
800010: [
- new Uint8Array([
- 22,
- 98,
- 98,
- 46,
- 100,
- 97,
- 116,
- 97,
- 98,
- 97,
- 115,
- 101,
- 115,
- 46,
- 103,
- 101,
- 116,
- 83,
- 99,
- 104,
- 101,
- 109,
- 97,
- ]),
+ new Uint8Array([19, 98, 98, 46, 100, 97, 116, 97, 98, 97, 115, 101, 115, 46, 117, 112, 100, 97, 116, 101]),
],
800016: [new Uint8Array([1])],
+ 800024: [new Uint8Array([1])],
578365826: [
new Uint8Array([
- 43,
- 18,
- 41,
+ 51,
+ 58,
+ 1,
+ 42,
+ 34,
+ 46,
47,
118,
49,
47,
123,
- 110,
+ 112,
97,
- 109,
+ 114,
101,
+ 110,
+ 116,
61,
105,
110,
@@ -11039,6 +9973,7 @@ export const DatabaseServiceDefinition = {
115,
47,
42,
+ 125,
47,
100,
97,
@@ -11049,44 +9984,41 @@ export const DatabaseServiceDefinition = {
115,
101,
115,
- 47,
- 42,
- 47,
- 115,
+ 58,
+ 98,
+ 97,
+ 116,
99,
104,
- 101,
- 109,
+ 85,
+ 112,
+ 100,
97,
- 125,
+ 116,
+ 101,
]),
],
},
},
},
- diffSchema: {
- name: "DiffSchema",
- requestType: DiffSchemaRequest,
+ syncDatabase: {
+ name: "SyncDatabase",
+ requestType: SyncDatabaseRequest,
requestStream: false,
- responseType: DiffSchemaResponse,
+ responseType: SyncDatabaseResponse,
responseStream: false,
options: {
_unknownFields: {
- 800010: [new Uint8Array([16, 98, 98, 46, 100, 97, 116, 97, 98, 97, 115, 101, 115, 46, 103, 101, 116])],
+ 800010: [new Uint8Array([17, 98, 98, 46, 100, 97, 116, 97, 98, 97, 115, 101, 115, 46, 115, 121, 110, 99])],
800016: [new Uint8Array([1])],
578365826: [
new Uint8Array([
- 115,
- 58,
- 1,
- 42,
- 90,
- 63,
+ 44,
58,
1,
42,
34,
- 58,
+ 39,
47,
118,
49,
@@ -11120,42 +10052,46 @@ export const DatabaseServiceDefinition = {
115,
47,
42,
- 47,
- 99,
- 104,
- 97,
- 110,
- 103,
- 101,
- 108,
- 111,
- 103,
- 115,
- 47,
- 42,
125,
58,
- 100,
- 105,
- 102,
- 102,
- 83,
+ 115,
+ 121,
+ 110,
99,
- 104,
- 101,
- 109,
- 97,
+ ]),
+ ],
+ },
+ },
+ },
+ batchSyncDatabases: {
+ name: "BatchSyncDatabases",
+ requestType: BatchSyncDatabasesRequest,
+ requestStream: false,
+ responseType: BatchSyncDatabasesResponse,
+ responseStream: false,
+ options: {
+ _unknownFields: {
+ 800010: [new Uint8Array([17, 98, 98, 46, 100, 97, 116, 97, 98, 97, 115, 101, 115, 46, 115, 121, 110, 99])],
+ 800016: [new Uint8Array([1])],
+ 578365826: [
+ new Uint8Array([
+ 49,
+ 58,
+ 1,
+ 42,
34,
- 45,
+ 44,
47,
118,
49,
47,
123,
- 110,
+ 112,
97,
- 109,
+ 114,
101,
+ 110,
+ 116,
61,
105,
110,
@@ -11168,6 +10104,7 @@ export const DatabaseServiceDefinition = {
115,
47,
42,
+ 125,
47,
100,
97,
@@ -11178,37 +10115,32 @@ export const DatabaseServiceDefinition = {
115,
101,
115,
- 47,
- 42,
- 125,
58,
- 100,
- 105,
- 102,
- 102,
- 83,
+ 98,
+ 97,
+ 116,
99,
104,
- 101,
- 109,
- 97,
+ 83,
+ 121,
+ 110,
+ 99,
]),
],
},
},
},
- listSecrets: {
- name: "ListSecrets",
- requestType: ListSecretsRequest,
+ getDatabaseMetadata: {
+ name: "GetDatabaseMetadata",
+ requestType: GetDatabaseMetadataRequest,
requestStream: false,
- responseType: ListSecretsResponse,
+ responseType: DatabaseMetadata,
responseStream: false,
options: {
_unknownFields: {
- 8410: [new Uint8Array([6, 112, 97, 114, 101, 110, 116])],
800010: [
new Uint8Array([
- 23,
+ 22,
98,
98,
46,
@@ -11220,37 +10152,34 @@ export const DatabaseServiceDefinition = {
97,
115,
101,
- 83,
- 101,
- 99,
- 114,
- 101,
- 116,
115,
46,
- 108,
- 105,
- 115,
+ 103,
+ 101,
116,
+ 83,
+ 99,
+ 104,
+ 101,
+ 109,
+ 97,
]),
],
800016: [new Uint8Array([1])],
578365826: [
new Uint8Array([
- 46,
+ 45,
18,
- 44,
+ 43,
47,
118,
49,
47,
123,
- 112,
+ 110,
97,
- 114,
+ 109,
101,
- 110,
- 116,
61,
105,
110,
@@ -11275,31 +10204,32 @@ export const DatabaseServiceDefinition = {
115,
47,
42,
- 125,
47,
- 115,
- 101,
- 99,
- 114,
+ 109,
101,
116,
- 115,
+ 97,
+ 100,
+ 97,
+ 116,
+ 97,
+ 125,
]),
],
},
},
},
- updateSecret: {
- name: "UpdateSecret",
- requestType: UpdateSecretRequest,
+ getDatabaseSchema: {
+ name: "GetDatabaseSchema",
+ requestType: GetDatabaseSchemaRequest,
requestStream: false,
- responseType: Secret,
+ responseType: DatabaseSchema,
responseStream: false,
options: {
_unknownFields: {
800010: [
new Uint8Array([
- 25,
+ 22,
98,
98,
46,
@@ -11311,49 +10241,30 @@ export const DatabaseServiceDefinition = {
97,
115,
101,
- 83,
- 101,
- 99,
- 114,
- 101,
- 116,
115,
46,
- 117,
- 112,
- 100,
- 97,
+ 103,
+ 101,
116,
+ 83,
+ 99,
+ 104,
101,
+ 109,
+ 97,
]),
],
800016: [new Uint8Array([1])],
- 800024: [new Uint8Array([1])],
578365826: [
new Uint8Array([
- 61,
- 58,
- 6,
- 115,
- 101,
- 99,
- 114,
- 101,
- 116,
- 50,
- 51,
+ 43,
+ 18,
+ 41,
47,
118,
49,
47,
123,
- 115,
- 101,
- 99,
- 114,
- 101,
- 116,
- 46,
110,
97,
109,
@@ -11384,65 +10295,40 @@ export const DatabaseServiceDefinition = {
42,
47,
115,
- 101,
99,
- 114,
+ 104,
101,
- 116,
- 115,
- 47,
- 42,
+ 109,
+ 97,
125,
]),
],
},
},
- },
- deleteSecret: {
- name: "DeleteSecret",
- requestType: DeleteSecretRequest,
- requestStream: false,
- responseType: Empty,
- responseStream: false,
- options: {
- _unknownFields: {
- 800010: [
- new Uint8Array([
- 25,
- 98,
- 98,
- 46,
- 100,
- 97,
- 116,
- 97,
- 98,
- 97,
- 115,
- 101,
- 83,
- 101,
- 99,
- 114,
- 101,
- 116,
- 115,
- 46,
- 100,
- 101,
- 108,
- 101,
- 116,
- 101,
- ]),
- ],
+ },
+ diffSchema: {
+ name: "DiffSchema",
+ requestType: DiffSchemaRequest,
+ requestStream: false,
+ responseType: DiffSchemaResponse,
+ responseStream: false,
+ options: {
+ _unknownFields: {
+ 800010: [new Uint8Array([16, 98, 98, 46, 100, 97, 116, 97, 98, 97, 115, 101, 115, 46, 103, 101, 116])],
800016: [new Uint8Array([1])],
- 800024: [new Uint8Array([1])],
578365826: [
new Uint8Array([
- 46,
+ 115,
+ 58,
+ 1,
42,
- 44,
+ 90,
+ 63,
+ 58,
+ 1,
+ 42,
+ 34,
+ 58,
47,
118,
49,
@@ -11477,50 +10363,41 @@ export const DatabaseServiceDefinition = {
47,
42,
47,
- 115,
- 101,
99,
- 114,
+ 104,
+ 97,
+ 110,
+ 103,
101,
- 116,
+ 108,
+ 111,
+ 103,
115,
47,
42,
125,
- ]),
- ],
- },
- },
- },
- listRevisions: {
- name: "ListRevisions",
- requestType: ListRevisionsRequest,
- requestStream: false,
- responseType: ListRevisionsResponse,
- responseStream: false,
- options: {
- _unknownFields: {
- 8410: [new Uint8Array([6, 112, 97, 114, 101, 110, 116])],
- 800010: [
- new Uint8Array([17, 98, 98, 46, 114, 101, 118, 105, 115, 105, 111, 110, 115, 46, 108, 105, 115, 116]),
- ],
- 800016: [new Uint8Array([1])],
- 578365826: [
- new Uint8Array([
- 48,
- 18,
- 46,
+ 58,
+ 100,
+ 105,
+ 102,
+ 102,
+ 83,
+ 99,
+ 104,
+ 101,
+ 109,
+ 97,
+ 34,
+ 45,
47,
118,
49,
47,
123,
- 112,
+ 110,
97,
- 114,
+ 109,
101,
- 110,
- 116,
61,
105,
110,
@@ -11546,46 +10423,76 @@ export const DatabaseServiceDefinition = {
47,
42,
125,
- 47,
- 114,
- 101,
- 118,
- 105,
- 115,
+ 58,
+ 100,
105,
- 111,
- 110,
- 115,
+ 102,
+ 102,
+ 83,
+ 99,
+ 104,
+ 101,
+ 109,
+ 97,
]),
],
},
},
},
- getRevision: {
- name: "GetRevision",
- requestType: GetRevisionRequest,
+ listSecrets: {
+ name: "ListSecrets",
+ requestType: ListSecretsRequest,
requestStream: false,
- responseType: Revision,
+ responseType: ListSecretsResponse,
responseStream: false,
options: {
_unknownFields: {
- 8410: [new Uint8Array([4, 110, 97, 109, 101])],
- 800010: [new Uint8Array([16, 98, 98, 46, 114, 101, 118, 105, 115, 105, 111, 110, 115, 46, 103, 101, 116])],
+ 8410: [new Uint8Array([6, 112, 97, 114, 101, 110, 116])],
+ 800010: [
+ new Uint8Array([
+ 23,
+ 98,
+ 98,
+ 46,
+ 100,
+ 97,
+ 116,
+ 97,
+ 98,
+ 97,
+ 115,
+ 101,
+ 83,
+ 101,
+ 99,
+ 114,
+ 101,
+ 116,
+ 115,
+ 46,
+ 108,
+ 105,
+ 115,
+ 116,
+ ]),
+ ],
800016: [new Uint8Array([1])],
578365826: [
new Uint8Array([
- 48,
- 18,
46,
+ 18,
+ 44,
47,
118,
49,
47,
123,
- 110,
+ 112,
97,
- 109,
+ 114,
101,
+ 110,
+ 116,
61,
105,
110,
@@ -11610,83 +10517,89 @@ export const DatabaseServiceDefinition = {
115,
47,
42,
+ 125,
47,
+ 115,
+ 101,
+ 99,
114,
101,
- 118,
- 105,
- 115,
- 105,
- 111,
- 110,
+ 116,
115,
- 47,
- 42,
- 125,
]),
],
},
},
},
- createRevision: {
- name: "CreateRevision",
- requestType: CreateRevisionRequest,
+ updateSecret: {
+ name: "UpdateSecret",
+ requestType: UpdateSecretRequest,
requestStream: false,
- responseType: Revision,
+ responseType: Secret,
responseStream: false,
options: {
_unknownFields: {
800010: [
new Uint8Array([
- 19,
+ 25,
98,
98,
46,
- 114,
- 101,
- 118,
- 105,
- 115,
- 105,
- 111,
- 110,
+ 100,
+ 97,
+ 116,
+ 97,
+ 98,
+ 97,
115,
- 46,
+ 101,
+ 83,
+ 101,
99,
114,
101,
+ 116,
+ 115,
+ 46,
+ 117,
+ 112,
+ 100,
97,
116,
101,
]),
],
800016: [new Uint8Array([1])],
+ 800024: [new Uint8Array([1])],
578365826: [
new Uint8Array([
+ 61,
58,
- 58,
- 8,
+ 6,
+ 115,
+ 101,
+ 99,
114,
101,
- 118,
- 105,
- 115,
- 105,
- 111,
- 110,
- 34,
- 46,
+ 116,
+ 50,
+ 51,
47,
118,
49,
47,
123,
- 112,
- 97,
+ 115,
+ 101,
+ 99,
114,
101,
- 110,
116,
+ 46,
+ 110,
+ 97,
+ 109,
+ 101,
61,
105,
110,
@@ -11711,45 +10624,50 @@ export const DatabaseServiceDefinition = {
115,
47,
42,
- 125,
47,
+ 115,
+ 101,
+ 99,
114,
101,
- 118,
- 105,
- 115,
- 105,
- 111,
- 110,
+ 116,
115,
+ 47,
+ 42,
+ 125,
]),
],
},
},
},
- deleteRevision: {
- name: "DeleteRevision",
- requestType: DeleteRevisionRequest,
+ deleteSecret: {
+ name: "DeleteSecret",
+ requestType: DeleteSecretRequest,
requestStream: false,
responseType: Empty,
responseStream: false,
options: {
_unknownFields: {
- 8410: [new Uint8Array([4, 110, 97, 109, 101])],
800010: [
new Uint8Array([
- 19,
+ 25,
98,
98,
46,
+ 100,
+ 97,
+ 116,
+ 97,
+ 98,
+ 97,
+ 115,
+ 101,
+ 83,
+ 101,
+ 99,
114,
101,
- 118,
- 105,
- 115,
- 105,
- 111,
- 110,
+ 116,
115,
46,
100,
@@ -11761,11 +10679,12 @@ export const DatabaseServiceDefinition = {
]),
],
800016: [new Uint8Array([1])],
+ 800024: [new Uint8Array([1])],
578365826: [
new Uint8Array([
- 48,
- 42,
46,
+ 42,
+ 44,
47,
118,
49,
@@ -11800,14 +10719,12 @@ export const DatabaseServiceDefinition = {
47,
42,
47,
+ 115,
+ 101,
+ 99,
114,
101,
- 118,
- 105,
- 115,
- 105,
- 111,
- 110,
+ 116,
115,
47,
42,
diff --git a/frontend/src/types/proto/v1/revision_service.ts b/frontend/src/types/proto/v1/revision_service.ts
new file mode 100644
index 0000000000..f3c6dd3711
--- /dev/null
+++ b/frontend/src/types/proto/v1/revision_service.ts
@@ -0,0 +1,1151 @@
+// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
+// versions:
+// protoc-gen-ts_proto v2.3.0
+// protoc unknown
+// source: v1/revision_service.proto
+
+/* eslint-disable */
+import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
+import Long from "long";
+import { Empty } from "../google/protobuf/empty";
+import { Timestamp } from "../google/protobuf/timestamp";
+
+export const protobufPackage = "bytebase.v1";
+
+export interface ListRevisionsRequest {
+ /**
+ * The parent of the revisions.
+ * Format: instances/{instance}/databases/{database}
+ */
+ parent: string;
+ /**
+ * The maximum number of revisions to return. The service may return fewer
+ * than this value. If unspecified, at most 10 revisions 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 `ListRevisions` call.
+ * Provide this to retrieve the subsequent page.
+ *
+ * When paginating, all other parameters provided to `ListRevisions` must
+ * match the call that provided the page token.
+ */
+ pageToken: string;
+ showDeleted: boolean;
+}
+
+export interface ListRevisionsResponse {
+ revisions: Revision[];
+ /**
+ * 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 CreateRevisionRequest {
+ /** Format: instances/{instance}/databases/{database} */
+ parent: string;
+ /** The revision to create. */
+ revision: Revision | undefined;
+}
+
+export interface GetRevisionRequest {
+ /**
+ * The name of the revision.
+ * Format: instances/{instance}/databases/{database}/revisions/{revision}
+ */
+ name: string;
+}
+
+export interface DeleteRevisionRequest {
+ /**
+ * The name of the revision to delete.
+ * Format: instances/{instance}/databases/{database}/revisions/{revision}
+ */
+ name: string;
+}
+
+export interface Revision {
+ /** Format: instances/{instance}/databases/{database}/revisions/{revision} */
+ name: string;
+ /**
+ * Format: projects/{project}/releases/{release}
+ * Can be empty.
+ */
+ release: string;
+ createTime:
+ | Timestamp
+ | undefined;
+ /**
+ * Format: users/[email protected]
+ * Can be empty.
+ */
+ deleter: string;
+ /** Can be empty. */
+ deleteTime:
+ | Timestamp
+ | undefined;
+ /**
+ * Format: projects/{project}/releases/{release}/files/{id}
+ * Can be empty.
+ */
+ file: string;
+ version: string;
+ /**
+ * The sheet that holds the content.
+ * Format: projects/{project}/sheets/{sheet}
+ */
+ sheet: string;
+ /** The SHA256 hash value of the sheet. */
+ sheetSha256: string;
+ /** The statement is used for preview purpose. */
+ statement: string;
+ statementSize: Long;
+ /**
+ * The issue associated with the revision.
+ * Can be empty.
+ * Format: projects/{project}/issues/{issue}
+ */
+ issue: string;
+ /**
+ * The task run associated with the revision.
+ * Can be empty.
+ * Format:
+ * projects/{project}/rollouts/{rollout}/stages/{stage}/tasks/{task}/taskRuns/{taskRun}
+ */
+ taskRun: string;
+}
+
+function createBaseListRevisionsRequest(): ListRevisionsRequest {
+ return { parent: "", pageSize: 0, pageToken: "", showDeleted: false };
+}
+
+export const ListRevisionsRequest: MessageFns<ListRevisionsRequest> = {
+ encode(message: ListRevisionsRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
+ 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);
+ }
+ if (message.showDeleted !== false) {
+ writer.uint32(32).bool(message.showDeleted);
+ }
+ return writer;
+ },
+
+ decode(input: BinaryReader | Uint8Array, length?: number): ListRevisionsRequest {
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
+ let end = length === undefined ? reader.len : reader.pos + length;
+ const message = createBaseListRevisionsRequest();
+ 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;
+ }
+ case 4: {
+ if (tag !== 32) {
+ break;
+ }
+
+ message.showDeleted = reader.bool();
+ continue;
+ }
+ }
+ if ((tag & 7) === 4 || tag === 0) {
+ break;
+ }
+ reader.skip(tag & 7);
+ }
+ return message;
+ },
+
+ fromJSON(object: any): ListRevisionsRequest {
+ return {
+ parent: isSet(object.parent) ? globalThis.String(object.parent) : "",
+ pageSize: isSet(object.pageSize) ? globalThis.Number(object.pageSize) : 0,
+ pageToken: isSet(object.pageToken) ? globalThis.String(object.pageToken) : "",
+ showDeleted: isSet(object.showDeleted) ? globalThis.Boolean(object.showDeleted) : false,
+ };
+ },
+
+ toJSON(message: ListRevisionsRequest): unknown {
+ const obj: any = {};
+ if (message.parent !== "") {
+ obj.parent = message.parent;
+ }
+ if (message.pageSize !== 0) {
+ obj.pageSize = Math.round(message.pageSize);
+ }
+ if (message.pageToken !== "") {
+ obj.pageToken = message.pageToken;
+ }
+ if (message.showDeleted !== false) {
+ obj.showDeleted = message.showDeleted;
+ }
+ return obj;
+ },
+
+ create(base?: DeepPartial<ListRevisionsRequest>): ListRevisionsRequest {
+ return ListRevisionsRequest.fromPartial(base ?? {});
+ },
+ fromPartial(object: DeepPartial<ListRevisionsRequest>): ListRevisionsRequest {
+ const message = createBaseListRevisionsRequest();
+ message.parent = object.parent ?? "";
+ message.pageSize = object.pageSize ?? 0;
+ message.pageToken = object.pageToken ?? "";
+ message.showDeleted = object.showDeleted ?? false;
+ return message;
+ },
+};
+
+function createBaseListRevisionsResponse(): ListRevisionsResponse {
+ return { revisions: [], nextPageToken: "" };
+}
+
+export const ListRevisionsResponse: MessageFns<ListRevisionsResponse> = {
+ encode(message: ListRevisionsResponse, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
+ for (const v of message.revisions) {
+ Revision.encode(v!, writer.uint32(10).fork()).join();
+ }
+ if (message.nextPageToken !== "") {
+ writer.uint32(18).string(message.nextPageToken);
+ }
+ return writer;
+ },
+
+ decode(input: BinaryReader | Uint8Array, length?: number): ListRevisionsResponse {
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
+ let end = length === undefined ? reader.len : reader.pos + length;
+ const message = createBaseListRevisionsResponse();
+ while (reader.pos < end) {
+ const tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1: {
+ if (tag !== 10) {
+ break;
+ }
+
+ message.revisions.push(Revision.decode(reader, reader.uint32()));
+ continue;
+ }
+ case 2: {
+ if (tag !== 18) {
+ break;
+ }
+
+ message.nextPageToken = reader.string();
+ continue;
+ }
+ }
+ if ((tag & 7) === 4 || tag === 0) {
+ break;
+ }
+ reader.skip(tag & 7);
+ }
+ return message;
+ },
+
+ fromJSON(object: any): ListRevisionsResponse {
+ return {
+ revisions: globalThis.Array.isArray(object?.revisions)
+ ? object.revisions.map((e: any) => Revision.fromJSON(e))
+ : [],
+ nextPageToken: isSet(object.nextPageToken) ? globalThis.String(object.nextPageToken) : "",
+ };
+ },
+
+ toJSON(message: ListRevisionsResponse): unknown {
+ const obj: any = {};
+ if (message.revisions?.length) {
+ obj.revisions = message.revisions.map((e) => Revision.toJSON(e));
+ }
+ if (message.nextPageToken !== "") {
+ obj.nextPageToken = message.nextPageToken;
+ }
+ return obj;
+ },
+
+ create(base?: DeepPartial<ListRevisionsResponse>): ListRevisionsResponse {
+ return ListRevisionsResponse.fromPartial(base ?? {});
+ },
+ fromPartial(object: DeepPartial<ListRevisionsResponse>): ListRevisionsResponse {
+ const message = createBaseListRevisionsResponse();
+ message.revisions = object.revisions?.map((e) => Revision.fromPartial(e)) || [];
+ message.nextPageToken = object.nextPageToken ?? "";
+ return message;
+ },
+};
+
+function createBaseCreateRevisionRequest(): CreateRevisionRequest {
+ return { parent: "", revision: undefined };
+}
+
+export const CreateRevisionRequest: MessageFns<CreateRevisionRequest> = {
+ encode(message: CreateRevisionRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
+ if (message.parent !== "") {
+ writer.uint32(10).string(message.parent);
+ }
+ if (message.revision !== undefined) {
+ Revision.encode(message.revision, writer.uint32(18).fork()).join();
+ }
+ return writer;
+ },
+
+ decode(input: BinaryReader | Uint8Array, length?: number): CreateRevisionRequest {
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
+ let end = length === undefined ? reader.len : reader.pos + length;
+ const message = createBaseCreateRevisionRequest();
+ 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 !== 18) {
+ break;
+ }
+
+ message.revision = Revision.decode(reader, reader.uint32());
+ continue;
+ }
+ }
+ if ((tag & 7) === 4 || tag === 0) {
+ break;
+ }
+ reader.skip(tag & 7);
+ }
+ return message;
+ },
+
+ fromJSON(object: any): CreateRevisionRequest {
+ return {
+ parent: isSet(object.parent) ? globalThis.String(object.parent) : "",
+ revision: isSet(object.revision) ? Revision.fromJSON(object.revision) : undefined,
+ };
+ },
+
+ toJSON(message: CreateRevisionRequest): unknown {
+ const obj: any = {};
+ if (message.parent !== "") {
+ obj.parent = message.parent;
+ }
+ if (message.revision !== undefined) {
+ obj.revision = Revision.toJSON(message.revision);
+ }
+ return obj;
+ },
+
+ create(base?: DeepPartial<CreateRevisionRequest>): CreateRevisionRequest {
+ return CreateRevisionRequest.fromPartial(base ?? {});
+ },
+ fromPartial(object: DeepPartial<CreateRevisionRequest>): CreateRevisionRequest {
+ const message = createBaseCreateRevisionRequest();
+ message.parent = object.parent ?? "";
+ message.revision = (object.revision !== undefined && object.revision !== null)
+ ? Revision.fromPartial(object.revision)
+ : undefined;
+ return message;
+ },
+};
+
+function createBaseGetRevisionRequest(): GetRevisionRequest {
+ return { name: "" };
+}
+
+export const GetRevisionRequest: MessageFns<GetRevisionRequest> = {
+ encode(message: GetRevisionRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
+ if (message.name !== "") {
+ writer.uint32(10).string(message.name);
+ }
+ return writer;
+ },
+
+ decode(input: BinaryReader | Uint8Array, length?: number): GetRevisionRequest {
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
+ let end = length === undefined ? reader.len : reader.pos + length;
+ const message = createBaseGetRevisionRequest();
+ while (reader.pos < end) {
+ const tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1: {
+ if (tag !== 10) {
+ break;
+ }
+
+ message.name = reader.string();
+ continue;
+ }
+ }
+ if ((tag & 7) === 4 || tag === 0) {
+ break;
+ }
+ reader.skip(tag & 7);
+ }
+ return message;
+ },
+
+ fromJSON(object: any): GetRevisionRequest {
+ return { name: isSet(object.name) ? globalThis.String(object.name) : "" };
+ },
+
+ toJSON(message: GetRevisionRequest): unknown {
+ const obj: any = {};
+ if (message.name !== "") {
+ obj.name = message.name;
+ }
+ return obj;
+ },
+
+ create(base?: DeepPartial<GetRevisionRequest>): GetRevisionRequest {
+ return GetRevisionRequest.fromPartial(base ?? {});
+ },
+ fromPartial(object: DeepPartial<GetRevisionRequest>): GetRevisionRequest {
+ const message = createBaseGetRevisionRequest();
+ message.name = object.name ?? "";
+ return message;
+ },
+};
+
+function createBaseDeleteRevisionRequest(): DeleteRevisionRequest {
+ return { name: "" };
+}
+
+export const DeleteRevisionRequest: MessageFns<DeleteRevisionRequest> = {
+ encode(message: DeleteRevisionRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
+ if (message.name !== "") {
+ writer.uint32(10).string(message.name);
+ }
+ return writer;
+ },
+
+ decode(input: BinaryReader | Uint8Array, length?: number): DeleteRevisionRequest {
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
+ let end = length === undefined ? reader.len : reader.pos + length;
+ const message = createBaseDeleteRevisionRequest();
+ while (reader.pos < end) {
+ const tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1: {
+ if (tag !== 10) {
+ break;
+ }
+
+ message.name = reader.string();
+ continue;
+ }
+ }
+ if ((tag & 7) === 4 || tag === 0) {
+ break;
+ }
+ reader.skip(tag & 7);
+ }
+ return message;
+ },
+
+ fromJSON(object: any): DeleteRevisionRequest {
+ return { name: isSet(object.name) ? globalThis.String(object.name) : "" };
+ },
+
+ toJSON(message: DeleteRevisionRequest): unknown {
+ const obj: any = {};
+ if (message.name !== "") {
+ obj.name = message.name;
+ }
+ return obj;
+ },
+
+ create(base?: DeepPartial<DeleteRevisionRequest>): DeleteRevisionRequest {
+ return DeleteRevisionRequest.fromPartial(base ?? {});
+ },
+ fromPartial(object: DeepPartial<DeleteRevisionRequest>): DeleteRevisionRequest {
+ const message = createBaseDeleteRevisionRequest();
+ message.name = object.name ?? "";
+ return message;
+ },
+};
+
+function createBaseRevision(): Revision {
+ return {
+ name: "",
+ release: "",
+ createTime: undefined,
+ deleter: "",
+ deleteTime: undefined,
+ file: "",
+ version: "",
+ sheet: "",
+ sheetSha256: "",
+ statement: "",
+ statementSize: Long.ZERO,
+ issue: "",
+ taskRun: "",
+ };
+}
+
+export const Revision: MessageFns<Revision> = {
+ encode(message: Revision, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
+ if (message.name !== "") {
+ writer.uint32(10).string(message.name);
+ }
+ if (message.release !== "") {
+ writer.uint32(18).string(message.release);
+ }
+ if (message.createTime !== undefined) {
+ Timestamp.encode(message.createTime, writer.uint32(34).fork()).join();
+ }
+ if (message.deleter !== "") {
+ writer.uint32(42).string(message.deleter);
+ }
+ if (message.deleteTime !== undefined) {
+ Timestamp.encode(message.deleteTime, writer.uint32(50).fork()).join();
+ }
+ if (message.file !== "") {
+ writer.uint32(58).string(message.file);
+ }
+ if (message.version !== "") {
+ writer.uint32(66).string(message.version);
+ }
+ if (message.sheet !== "") {
+ writer.uint32(74).string(message.sheet);
+ }
+ if (message.sheetSha256 !== "") {
+ writer.uint32(82).string(message.sheetSha256);
+ }
+ if (message.statement !== "") {
+ writer.uint32(90).string(message.statement);
+ }
+ if (!message.statementSize.equals(Long.ZERO)) {
+ writer.uint32(96).int64(message.statementSize.toString());
+ }
+ if (message.issue !== "") {
+ writer.uint32(106).string(message.issue);
+ }
+ if (message.taskRun !== "") {
+ writer.uint32(114).string(message.taskRun);
+ }
+ return writer;
+ },
+
+ decode(input: BinaryReader | Uint8Array, length?: number): Revision {
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
+ let end = length === undefined ? reader.len : reader.pos + length;
+ const message = createBaseRevision();
+ while (reader.pos < end) {
+ const tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1: {
+ if (tag !== 10) {
+ break;
+ }
+
+ message.name = reader.string();
+ continue;
+ }
+ case 2: {
+ if (tag !== 18) {
+ break;
+ }
+
+ message.release = reader.string();
+ continue;
+ }
+ case 4: {
+ if (tag !== 34) {
+ break;
+ }
+
+ message.createTime = Timestamp.decode(reader, reader.uint32());
+ continue;
+ }
+ case 5: {
+ if (tag !== 42) {
+ break;
+ }
+
+ message.deleter = reader.string();
+ continue;
+ }
+ case 6: {
+ if (tag !== 50) {
+ break;
+ }
+
+ message.deleteTime = Timestamp.decode(reader, reader.uint32());
+ continue;
+ }
+ case 7: {
+ if (tag !== 58) {
+ break;
+ }
+
+ message.file = reader.string();
+ continue;
+ }
+ case 8: {
+ if (tag !== 66) {
+ break;
+ }
+
+ message.version = reader.string();
+ continue;
+ }
+ case 9: {
+ if (tag !== 74) {
+ break;
+ }
+
+ message.sheet = reader.string();
+ continue;
+ }
+ case 10: {
+ if (tag !== 82) {
+ break;
+ }
+
+ message.sheetSha256 = reader.string();
+ continue;
+ }
+ case 11: {
+ if (tag !== 90) {
+ break;
+ }
+
+ message.statement = reader.string();
+ continue;
+ }
+ case 12: {
+ if (tag !== 96) {
+ break;
+ }
+
+ message.statementSize = Long.fromString(reader.int64().toString());
+ continue;
+ }
+ case 13: {
+ if (tag !== 106) {
+ break;
+ }
+
+ message.issue = reader.string();
+ continue;
+ }
+ case 14: {
+ if (tag !== 114) {
+ break;
+ }
+
+ message.taskRun = reader.string();
+ continue;
+ }
+ }
+ if ((tag & 7) === 4 || tag === 0) {
+ break;
+ }
+ reader.skip(tag & 7);
+ }
+ return message;
+ },
+
+ fromJSON(object: any): Revision {
+ return {
+ name: isSet(object.name) ? globalThis.String(object.name) : "",
+ release: isSet(object.release) ? globalThis.String(object.release) : "",
+ createTime: isSet(object.createTime) ? fromJsonTimestamp(object.createTime) : undefined,
+ deleter: isSet(object.deleter) ? globalThis.String(object.deleter) : "",
+ deleteTime: isSet(object.deleteTime) ? fromJsonTimestamp(object.deleteTime) : undefined,
+ file: isSet(object.file) ? globalThis.String(object.file) : "",
+ version: isSet(object.version) ? globalThis.String(object.version) : "",
+ sheet: isSet(object.sheet) ? globalThis.String(object.sheet) : "",
+ sheetSha256: isSet(object.sheetSha256) ? globalThis.String(object.sheetSha256) : "",
+ statement: isSet(object.statement) ? globalThis.String(object.statement) : "",
+ statementSize: isSet(object.statementSize) ? Long.fromValue(object.statementSize) : Long.ZERO,
+ issue: isSet(object.issue) ? globalThis.String(object.issue) : "",
+ taskRun: isSet(object.taskRun) ? globalThis.String(object.taskRun) : "",
+ };
+ },
+
+ toJSON(message: Revision): unknown {
+ const obj: any = {};
+ if (message.name !== "") {
+ obj.name = message.name;
+ }
+ if (message.release !== "") {
+ obj.release = message.release;
+ }
+ if (message.createTime !== undefined) {
+ obj.createTime = fromTimestamp(message.createTime).toISOString();
+ }
+ if (message.deleter !== "") {
+ obj.deleter = message.deleter;
+ }
+ if (message.deleteTime !== undefined) {
+ obj.deleteTime = fromTimestamp(message.deleteTime).toISOString();
+ }
+ if (message.file !== "") {
+ obj.file = message.file;
+ }
+ if (message.version !== "") {
+ obj.version = message.version;
+ }
+ if (message.sheet !== "") {
+ obj.sheet = message.sheet;
+ }
+ if (message.sheetSha256 !== "") {
+ obj.sheetSha256 = message.sheetSha256;
+ }
+ if (message.statement !== "") {
+ obj.statement = message.statement;
+ }
+ if (!message.statementSize.equals(Long.ZERO)) {
+ obj.statementSize = (message.statementSize || Long.ZERO).toString();
+ }
+ if (message.issue !== "") {
+ obj.issue = message.issue;
+ }
+ if (message.taskRun !== "") {
+ obj.taskRun = message.taskRun;
+ }
+ return obj;
+ },
+
+ create(base?: DeepPartial<Revision>): Revision {
+ return Revision.fromPartial(base ?? {});
+ },
+ fromPartial(object: DeepPartial<Revision>): Revision {
+ const message = createBaseRevision();
+ message.name = object.name ?? "";
+ message.release = object.release ?? "";
+ message.createTime = (object.createTime !== undefined && object.createTime !== null)
+ ? Timestamp.fromPartial(object.createTime)
+ : undefined;
+ message.deleter = object.deleter ?? "";
+ message.deleteTime = (object.deleteTime !== undefined && object.deleteTime !== null)
+ ? Timestamp.fromPartial(object.deleteTime)
+ : undefined;
+ message.file = object.file ?? "";
+ message.version = object.version ?? "";
+ message.sheet = object.sheet ?? "";
+ message.sheetSha256 = object.sheetSha256 ?? "";
+ message.statement = object.statement ?? "";
+ message.statementSize = (object.statementSize !== undefined && object.statementSize !== null)
+ ? Long.fromValue(object.statementSize)
+ : Long.ZERO;
+ message.issue = object.issue ?? "";
+ message.taskRun = object.taskRun ?? "";
+ return message;
+ },
+};
+
+export type RevisionServiceDefinition = typeof RevisionServiceDefinition;
+export const RevisionServiceDefinition = {
+ name: "RevisionService",
+ fullName: "bytebase.v1.RevisionService",
+ methods: {
+ listRevisions: {
+ name: "ListRevisions",
+ requestType: ListRevisionsRequest,
+ requestStream: false,
+ responseType: ListRevisionsResponse,
+ responseStream: false,
+ options: {
+ _unknownFields: {
+ 8410: [new Uint8Array([6, 112, 97, 114, 101, 110, 116])],
+ 800010: [
+ new Uint8Array([17, 98, 98, 46, 114, 101, 118, 105, 115, 105, 111, 110, 115, 46, 108, 105, 115, 116]),
+ ],
+ 800016: [new Uint8Array([1])],
+ 578365826: [
+ new Uint8Array([
+ 48,
+ 18,
+ 46,
+ 47,
+ 118,
+ 49,
+ 47,
+ 123,
+ 112,
+ 97,
+ 114,
+ 101,
+ 110,
+ 116,
+ 61,
+ 105,
+ 110,
+ 115,
+ 116,
+ 97,
+ 110,
+ 99,
+ 101,
+ 115,
+ 47,
+ 42,
+ 47,
+ 100,
+ 97,
+ 116,
+ 97,
+ 98,
+ 97,
+ 115,
+ 101,
+ 115,
+ 47,
+ 42,
+ 125,
+ 47,
+ 114,
+ 101,
+ 118,
+ 105,
+ 115,
+ 105,
+ 111,
+ 110,
+ 115,
+ ]),
+ ],
+ },
+ },
+ },
+ getRevision: {
+ name: "GetRevision",
+ requestType: GetRevisionRequest,
+ requestStream: false,
+ responseType: Revision,
+ responseStream: false,
+ options: {
+ _unknownFields: {
+ 8410: [new Uint8Array([4, 110, 97, 109, 101])],
+ 800010: [new Uint8Array([16, 98, 98, 46, 114, 101, 118, 105, 115, 105, 111, 110, 115, 46, 103, 101, 116])],
+ 800016: [new Uint8Array([1])],
+ 578365826: [
+ new Uint8Array([
+ 48,
+ 18,
+ 46,
+ 47,
+ 118,
+ 49,
+ 47,
+ 123,
+ 110,
+ 97,
+ 109,
+ 101,
+ 61,
+ 105,
+ 110,
+ 115,
+ 116,
+ 97,
+ 110,
+ 99,
+ 101,
+ 115,
+ 47,
+ 42,
+ 47,
+ 100,
+ 97,
+ 116,
+ 97,
+ 98,
+ 97,
+ 115,
+ 101,
+ 115,
+ 47,
+ 42,
+ 47,
+ 114,
+ 101,
+ 118,
+ 105,
+ 115,
+ 105,
+ 111,
+ 110,
+ 115,
+ 47,
+ 42,
+ 125,
+ ]),
+ ],
+ },
+ },
+ },
+ createRevision: {
+ name: "CreateRevision",
+ requestType: CreateRevisionRequest,
+ requestStream: false,
+ responseType: Revision,
+ responseStream: false,
+ options: {
+ _unknownFields: {
+ 800010: [
+ new Uint8Array([
+ 19,
+ 98,
+ 98,
+ 46,
+ 114,
+ 101,
+ 118,
+ 105,
+ 115,
+ 105,
+ 111,
+ 110,
+ 115,
+ 46,
+ 99,
+ 114,
+ 101,
+ 97,
+ 116,
+ 101,
+ ]),
+ ],
+ 800016: [new Uint8Array([1])],
+ 578365826: [
+ new Uint8Array([
+ 58,
+ 58,
+ 8,
+ 114,
+ 101,
+ 118,
+ 105,
+ 115,
+ 105,
+ 111,
+ 110,
+ 34,
+ 46,
+ 47,
+ 118,
+ 49,
+ 47,
+ 123,
+ 112,
+ 97,
+ 114,
+ 101,
+ 110,
+ 116,
+ 61,
+ 105,
+ 110,
+ 115,
+ 116,
+ 97,
+ 110,
+ 99,
+ 101,
+ 115,
+ 47,
+ 42,
+ 47,
+ 100,
+ 97,
+ 116,
+ 97,
+ 98,
+ 97,
+ 115,
+ 101,
+ 115,
+ 47,
+ 42,
+ 125,
+ 47,
+ 114,
+ 101,
+ 118,
+ 105,
+ 115,
+ 105,
+ 111,
+ 110,
+ 115,
+ ]),
+ ],
+ },
+ },
+ },
+ deleteRevision: {
+ name: "DeleteRevision",
+ requestType: DeleteRevisionRequest,
+ requestStream: false,
+ responseType: Empty,
+ responseStream: false,
+ options: {
+ _unknownFields: {
+ 8410: [new Uint8Array([4, 110, 97, 109, 101])],
+ 800010: [
+ new Uint8Array([
+ 19,
+ 98,
+ 98,
+ 46,
+ 114,
+ 101,
+ 118,
+ 105,
+ 115,
+ 105,
+ 111,
+ 110,
+ 115,
+ 46,
+ 100,
+ 101,
+ 108,
+ 101,
+ 116,
+ 101,
+ ]),
+ ],
+ 800016: [new Uint8Array([1])],
+ 578365826: [
+ new Uint8Array([
+ 48,
+ 42,
+ 46,
+ 47,
+ 118,
+ 49,
+ 47,
+ 123,
+ 110,
+ 97,
+ 109,
+ 101,
+ 61,
+ 105,
+ 110,
+ 115,
+ 116,
+ 97,
+ 110,
+ 99,
+ 101,
+ 115,
+ 47,
+ 42,
+ 47,
+ 100,
+ 97,
+ 116,
+ 97,
+ 98,
+ 97,
+ 115,
+ 101,
+ 115,
+ 47,
+ 42,
+ 47,
+ 114,
+ 101,
+ 118,
+ 105,
+ 115,
+ 105,
+ 111,
+ 110,
+ 115,
+ 47,
+ 42,
+ 125,
+ ]),
+ ],
+ },
+ },
+ },
+ },
+} as const;
+
+type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
+
+export type DeepPartial<T> = T extends Builtin ? T
+ : T extends Long ? string | number | Long : T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>>
+ : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>>
+ : T extends {} ? { [K in keyof T]?: DeepPartial<T[K]> }
+ : Partial<T>;
+
+function toTimestamp(date: Date): Timestamp {
+ const seconds = numberToLong(Math.trunc(date.getTime() / 1_000));
+ const nanos = (date.getTime() % 1_000) * 1_000_000;
+ return { seconds, nanos };
+}
+
+function fromTimestamp(t: Timestamp): Date {
+ let millis = (t.seconds.toNumber() || 0) * 1_000;
+ millis += (t.nanos || 0) / 1_000_000;
+ return new globalThis.Date(millis);
+}
+
+function fromJsonTimestamp(o: any): Timestamp {
+ if (o instanceof globalThis.Date) {
+ return toTimestamp(o);
+ } else if (typeof o === "string") {
+ return toTimestamp(new globalThis.Date(o));
+ } else {
+ return Timestamp.fromJSON(o);
+ }
+}
+
+function numberToLong(number: number) {
+ return Long.fromNumber(number);
+}
+
+function isSet(value: any): boolean {
+ return value !== null && value !== undefined;
+}
+
+export interface MessageFns<T> {
+ encode(message: T, writer?: BinaryWriter): BinaryWriter;
+ decode(input: BinaryReader | Uint8Array, length?: number): T;
+ fromJSON(object: any): T;
+ toJSON(message: T): unknown;
+ create(base?: DeepPartial<T>): T;
+ fromPartial(object: DeepPartial<T>): T;
+}
diff --git a/proto/gen/grpc-doc/openapi.yaml b/proto/gen/grpc-doc/openapi.yaml
index 93652abcdd..81fe20054b 100644
--- a/proto/gen/grpc-doc/openapi.yaml
+++ b/proto/gen/grpc-doc/openapi.yaml
@@ -1785,8 +1785,8 @@ paths:
/v1/instances/{instance}/databases/{database}/revisions:
get:
tags:
- - DatabaseService
- operationId: DatabaseService_ListRevisions
+ - RevisionService
+ operationId: RevisionService_ListRevisions
parameters:
- name: instance
in: path
@@ -1838,8 +1838,8 @@ paths:
$ref: '#/components/schemas/Status'
post:
tags:
- - DatabaseService
- operationId: DatabaseService_CreateRevision
+ - RevisionService
+ operationId: RevisionService_CreateRevision
parameters:
- name: instance
in: path
@@ -1875,8 +1875,8 @@ paths:
/v1/instances/{instance}/databases/{database}/revisions/{revision}:
get:
tags:
- - DatabaseService
- operationId: DatabaseService_GetRevision
+ - RevisionService
+ operationId: RevisionService_GetRevision
parameters:
- name: instance
in: path
@@ -1911,8 +1911,8 @@ paths:
$ref: '#/components/schemas/Status'
delete:
tags:
- - DatabaseService
- operationId: DatabaseService_DeleteRevision
+ - RevisionService
+ operationId: RevisionService_DeleteRevision
parameters:
- name: instance
in: path
@@ -14267,6 +14267,7 @@ tags:
- name: ProjectService
- name: ReleaseService
- name: ReviewConfigService
+ - name: RevisionService
- name: RiskService
- name: RoleService
- name: RolloutService
diff --git a/proto/gen/grpc-doc/v1/README.md b/proto/gen/grpc-doc/v1/README.md
index fdd48635ee..46395096f4 100644
--- a/proto/gen/grpc-doc/v1/README.md
+++ b/proto/gen/grpc-doc/v1/README.md
@@ -100,12 +100,10 @@
- [Changelog](#bytebase-v1-Changelog)
- [CheckConstraintMetadata](#bytebase-v1-CheckConstraintMetadata)
- [ColumnMetadata](#bytebase-v1-ColumnMetadata)
- - [CreateRevisionRequest](#bytebase-v1-CreateRevisionRequest)
- [Database](#bytebase-v1-Database)
- [Database.LabelsEntry](#bytebase-v1-Database-LabelsEntry)
- [DatabaseMetadata](#bytebase-v1-DatabaseMetadata)
- [DatabaseSchema](#bytebase-v1-DatabaseSchema)
- - [DeleteRevisionRequest](#bytebase-v1-DeleteRevisionRequest)
- [DeleteSecretRequest](#bytebase-v1-DeleteSecretRequest)
- [DependencyColumn](#bytebase-v1-DependencyColumn)
- [DependencyTable](#bytebase-v1-DependencyTable)
@@ -122,7 +120,6 @@
- [GetDatabaseMetadataRequest](#bytebase-v1-GetDatabaseMetadataRequest)
- [GetDatabaseRequest](#bytebase-v1-GetDatabaseRequest)
- [GetDatabaseSchemaRequest](#bytebase-v1-GetDatabaseSchemaRequest)
- - [GetRevisionRequest](#bytebase-v1-GetRevisionRequest)
- [GetSchemaStringRequest](#bytebase-v1-GetSchemaStringRequest)
- [GetSchemaStringResponse](#bytebase-v1-GetSchemaStringResponse)
- [IndexMetadata](#bytebase-v1-IndexMetadata)
@@ -130,14 +127,11 @@
- [ListChangelogsResponse](#bytebase-v1-ListChangelogsResponse)
- [ListDatabasesRequest](#bytebase-v1-ListDatabasesRequest)
- [ListDatabasesResponse](#bytebase-v1-ListDatabasesResponse)
- - [ListRevisionsRequest](#bytebase-v1-ListRevisionsRequest)
- - [ListRevisionsResponse](#bytebase-v1-ListRevisionsResponse)
- [ListSecretsRequest](#bytebase-v1-ListSecretsRequest)
- [ListSecretsResponse](#bytebase-v1-ListSecretsResponse)
- [MaterializedViewMetadata](#bytebase-v1-MaterializedViewMetadata)
- [PackageMetadata](#bytebase-v1-PackageMetadata)
- [ProcedureMetadata](#bytebase-v1-ProcedureMetadata)
- - [Revision](#bytebase-v1-Revision)
- [SchemaMetadata](#bytebase-v1-SchemaMetadata)
- [Secret](#bytebase-v1-Secret)
- [SequenceMetadata](#bytebase-v1-SequenceMetadata)
@@ -585,6 +579,16 @@
- [ReviewConfigService](#bytebase-v1-ReviewConfigService)
+- [v1/revision_service.proto](#v1_revision_service-proto)
+ - [CreateRevisionRequest](#bytebase-v1-CreateRevisionRequest)
+ - [DeleteRevisionRequest](#bytebase-v1-DeleteRevisionRequest)
+ - [GetRevisionRequest](#bytebase-v1-GetRevisionRequest)
+ - [ListRevisionsRequest](#bytebase-v1-ListRevisionsRequest)
+ - [ListRevisionsResponse](#bytebase-v1-ListRevisionsResponse)
+ - [Revision](#bytebase-v1-Revision)
+
+ - [RevisionService](#bytebase-v1-RevisionService)
+
- [v1/risk_service.proto](#v1_risk_service-proto)
- [CreateRiskRequest](#bytebase-v1-CreateRiskRequest)
- [DeleteRiskRequest](#bytebase-v1-DeleteRiskRequest)
@@ -2104,22 +2108,6 @@ ColumnMetadata is the metadata for columns.
-<a name="bytebase-v1-CreateRevisionRequest"></a>
-
-### CreateRevisionRequest
-
-
-
-| Field | Type | Label | Description |
-| ----- | ---- | ----- | ----------- |
-| parent | [string](#string) | | Format: instances/{instance}/databases/{database} |
-| revision | [Revision](#bytebase-v1-Revision) | | The revision to create. |
-
-
-
-
-
-
<a name="bytebase-v1-Database"></a>
### Database
@@ -2198,21 +2186,6 @@ DatabaseSchema is the metadata for databases.
-<a name="bytebase-v1-DeleteRevisionRequest"></a>
-
-### DeleteRevisionRequest
-
-
-
-| Field | Type | Label | Description |
-| ----- | ---- | ----- | ----------- |
-| name | [string](#string) | | The name of the revision to delete. Format: instances/{instance}/databases/{database}/revisions/{revision} |
-
-
-
-
-
-
<a name="bytebase-v1-DeleteSecretRequest"></a>
### DeleteSecretRequest
@@ -2498,21 +2471,6 @@ For example: schema == &#34;schema-a&#34; table == &#34;table-a&#34; schema == &
-<a name="bytebase-v1-GetRevisionRequest"></a>
-
-### GetRevisionRequest
-
-
-
-| Field | Type | Label | Description |
-| ----- | ---- | ----- | ----------- |
-| name | [string](#string) | | The name of the revision. Format: instances/{instance}/databases/{database}/revisions/{revision} |
-
-
-
-
-
-
<a name="bytebase-v1-GetSchemaStringRequest"></a>
### GetSchemaStringRequest
@@ -2659,42 +2617,6 @@ For example: environment == &#34;environments/{environment resource id}&#34; pro
-<a name="bytebase-v1-ListRevisionsRequest"></a>
-
-### ListRevisionsRequest
-
-
-
-| Field | Type | Label | Description |
-| ----- | ---- | ----- | ----------- |
-| parent | [string](#string) | | The parent of the revisions. Format: instances/{instance}/databases/{database} |
-| page_size | [int32](#int32) | | The maximum number of revisions to return. The service may return fewer than this value. If unspecified, at most 10 revisions 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 `ListRevisions` call. Provide this to retrieve the subsequent page.
-
-When paginating, all other parameters provided to `ListRevisions` must match the call that provided the page token. |
-| show_deleted | [bool](#bool) | | |
-
-
-
-
-
-
-<a name="bytebase-v1-ListRevisionsResponse"></a>
-
-### ListRevisionsResponse
-
-
-
-| Field | Type | Label | Description |
-| ----- | ---- | ----- | ----------- |
-| revisions | [Revision](#bytebase-v1-Revision) | repeated | |
-| 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-ListSecretsRequest"></a>
### ListSecretsRequest
@@ -2789,33 +2711,6 @@ ProcedureMetadata is the metadata for procedures.
-<a name="bytebase-v1-Revision"></a>
-
-### Revision
-
-
-
-| Field | Type | Label | Description |
-| ----- | ---- | ----- | ----------- |
-| name | [string](#string) | | Format: instances/{instance}/databases/{database}/revisions/{revision} |
-| release | [string](#string) | | Format: projects/{project}/releases/{release} Can be empty. |
-| create_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | |
-| deleter | [string](#string) | | Format: users/[email protected] Can be empty. |
-| delete_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | Can be empty. |
-| file | [string](#string) | | Format: projects/{project}/releases/{release}/files/{id} Can be empty. |
-| version | [string](#string) | | |
-| sheet | [string](#string) | | The sheet that holds the content. Format: projects/{project}/sheets/{sheet} |
-| sheet_sha256 | [string](#string) | | The SHA256 hash value of the sheet. |
-| statement | [string](#string) | | The statement is used for preview purpose. |
-| statement_size | [int64](#int64) | | |
-| issue | [string](#string) | | The issue associated with the revision. Can be empty. Format: projects/{project}/issues/{issue} |
-| task_run | [string](#string) | | The task run associated with the revision. Can be empty. Format: projects/{project}/rollouts/{rollout}/stages/{stage}/tasks/{task}/taskRuns/{taskRun} |
-
-
-
-
-
-
<a name="bytebase-v1-SchemaMetadata"></a>
### SchemaMetadata
@@ -3278,10 +3173,6 @@ LIST, HASH (https://www.postgresql.org/docs/current/ddl-partitioning.html)
| ListSecrets | [ListSecretsRequest](#bytebase-v1-ListSecretsRequest) | [ListSecretsResponse](#bytebase-v1-ListSecretsResponse) | |
| UpdateSecret | [UpdateSecretRequest](#bytebase-v1-UpdateSecretRequest) | [Secret](#bytebase-v1-Secret) | |
| DeleteSecret | [DeleteSecretRequest](#bytebase-v1-DeleteSecretRequest) | [.google.protobuf.Empty](#google-protobuf-Empty) | |
-| ListRevisions | [ListRevisionsRequest](#bytebase-v1-ListRevisionsRequest) | [ListRevisionsResponse](#bytebase-v1-ListRevisionsResponse) | |
-| GetRevision | [GetRevisionRequest](#bytebase-v1-GetRevisionRequest) | [Revision](#bytebase-v1-Revision) | |
-| CreateRevision | [CreateRevisionRequest](#bytebase-v1-CreateRevisionRequest) | [Revision](#bytebase-v1-Revision) | |
-| DeleteRevision | [DeleteRevisionRequest](#bytebase-v1-DeleteRevisionRequest) | [.google.protobuf.Empty](#google-protobuf-Empty) | |
| ListChangelogs | [ListChangelogsRequest](#bytebase-v1-ListChangelogsRequest) | [ListChangelogsResponse](#bytebase-v1-ListChangelogsResponse) | |
| GetChangelog | [GetChangelogRequest](#bytebase-v1-GetChangelogRequest) | [Changelog](#bytebase-v1-Changelog) | |
| GetSchemaString | [GetSchemaStringRequest](#bytebase-v1-GetSchemaStringRequest) | [GetSchemaStringResponse](#bytebase-v1-GetSchemaStringResponse) | |
@@ -9519,6 +9410,144 @@ The name field is used to identify the sql review to update. |
+<a name="v1_revision_service-proto"></a>
+<p align="right"><a href="#top">Top</a></p>
+
+## v1/revision_service.proto
+
+
+
+<a name="bytebase-v1-CreateRevisionRequest"></a>
+
+### CreateRevisionRequest
+
+
+
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| parent | [string](#string) | | Format: instances/{instance}/databases/{database} |
+| revision | [Revision](#bytebase-v1-Revision) | | The revision to create. |
+
+
+
+
+
+
+<a name="bytebase-v1-DeleteRevisionRequest"></a>
+
+### DeleteRevisionRequest
+
+
+
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| name | [string](#string) | | The name of the revision to delete. Format: instances/{instance}/databases/{database}/revisions/{revision} |
+
+
+
+
+
+
+<a name="bytebase-v1-GetRevisionRequest"></a>
+
+### GetRevisionRequest
+
+
+
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| name | [string](#string) | | The name of the revision. Format: instances/{instance}/databases/{database}/revisions/{revision} |
+
+
+
+
+
+
+<a name="bytebase-v1-ListRevisionsRequest"></a>
+
+### ListRevisionsRequest
+
+
+
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| parent | [string](#string) | | The parent of the revisions. Format: instances/{instance}/databases/{database} |
+| page_size | [int32](#int32) | | The maximum number of revisions to return. The service may return fewer than this value. If unspecified, at most 10 revisions 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 `ListRevisions` call. Provide this to retrieve the subsequent page.
+
+When paginating, all other parameters provided to `ListRevisions` must match the call that provided the page token. |
+| show_deleted | [bool](#bool) | | |
+
+
+
+
+
+
+<a name="bytebase-v1-ListRevisionsResponse"></a>
+
+### ListRevisionsResponse
+
+
+
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| revisions | [Revision](#bytebase-v1-Revision) | repeated | |
+| 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-Revision"></a>
+
+### Revision
+
+
+
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| name | [string](#string) | | Format: instances/{instance}/databases/{database}/revisions/{revision} |
+| release | [string](#string) | | Format: projects/{project}/releases/{release} Can be empty. |
+| create_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | |
+| deleter | [string](#string) | | Format: users/[email protected] Can be empty. |
+| delete_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | Can be empty. |
+| file | [string](#string) | | Format: projects/{project}/releases/{release}/files/{id} Can be empty. |
+| version | [string](#string) | | |
+| sheet | [string](#string) | | The sheet that holds the content. Format: projects/{project}/sheets/{sheet} |
+| sheet_sha256 | [string](#string) | | The SHA256 hash value of the sheet. |
+| statement | [string](#string) | | The statement is used for preview purpose. |
+| statement_size | [int64](#int64) | | |
+| issue | [string](#string) | | The issue associated with the revision. Can be empty. Format: projects/{project}/issues/{issue} |
+| task_run | [string](#string) | | The task run associated with the revision. Can be empty. Format: projects/{project}/rollouts/{rollout}/stages/{stage}/tasks/{task}/taskRuns/{taskRun} |
+
+
+
+
+
+
+
+
+
+
+
+
+<a name="bytebase-v1-RevisionService"></a>
+
+### RevisionService
+
+
+| Method Name | Request Type | Response Type | Description |
+| ----------- | ------------ | ------------- | ------------|
+| ListRevisions | [ListRevisionsRequest](#bytebase-v1-ListRevisionsRequest) | [ListRevisionsResponse](#bytebase-v1-ListRevisionsResponse) | |
+| GetRevision | [GetRevisionRequest](#bytebase-v1-GetRevisionRequest) | [Revision](#bytebase-v1-Revision) | |
+| CreateRevision | [CreateRevisionRequest](#bytebase-v1-CreateRevisionRequest) | [Revision](#bytebase-v1-Revision) | |
+| DeleteRevision | [DeleteRevisionRequest](#bytebase-v1-DeleteRevisionRequest) | [.google.protobuf.Empty](#google-protobuf-Empty) | |
+
+
+
+
+
<a name="v1_risk_service-proto"></a>
<p align="right"><a href="#top">Top</a></p>
diff --git a/proto/gen/grpc-doc/v1/index.html b/proto/gen/grpc-doc/v1/index.html
index 1cce618a28..4a1ff46844 100644
--- a/proto/gen/grpc-doc/v1/index.html
+++ b/proto/gen/grpc-doc/v1/index.html
@@ -549,10 +549,6 @@
<a href="#bytebase.v1.ColumnMetadata"><span class="badge">M</span>ColumnMetadata</a>
</li>
- <li>
- <a href="#bytebase.v1.CreateRevisionRequest"><span class="badge">M</span>CreateRevisionRequest</a>
- </li>
-
<li>
<a href="#bytebase.v1.Database"><span class="badge">M</span>Database</a>
</li>
@@ -569,10 +565,6 @@
<a href="#bytebase.v1.DatabaseSchema"><span class="badge">M</span>DatabaseSchema</a>
</li>
- <li>
- <a href="#bytebase.v1.DeleteRevisionRequest"><span class="badge">M</span>DeleteRevisionRequest</a>
- </li>
-
<li>
<a href="#bytebase.v1.DeleteSecretRequest"><span class="badge">M</span>DeleteSecretRequest</a>
</li>
@@ -637,10 +629,6 @@
<a href="#bytebase.v1.GetDatabaseSchemaRequest"><span class="badge">M</span>GetDatabaseSchemaRequest</a>
</li>
- <li>
- <a href="#bytebase.v1.GetRevisionRequest"><span class="badge">M</span>GetRevisionRequest</a>
- </li>
-
<li>
<a href="#bytebase.v1.GetSchemaStringRequest"><span class="badge">M</span>GetSchemaStringRequest</a>
</li>
@@ -669,14 +657,6 @@
<a href="#bytebase.v1.ListDatabasesResponse"><span class="badge">M</span>ListDatabasesResponse</a>
</li>
- <li>
- <a href="#bytebase.v1.ListRevisionsRequest"><span class="badge">M</span>ListRevisionsRequest</a>
- </li>
-
- <li>
- <a href="#bytebase.v1.ListRevisionsResponse"><span class="badge">M</span>ListRevisionsResponse</a>
- </li>
-
<li>
<a href="#bytebase.v1.ListSecretsRequest"><span class="badge">M</span>ListSecretsRequest</a>
</li>
@@ -697,10 +677,6 @@
<a href="#bytebase.v1.ProcedureMetadata"><span class="badge">M</span>ProcedureMetadata</a>
</li>
- <li>
- <a href="#bytebase.v1.Revision"><span class="badge">M</span>Revision</a>
- </li>
-
<li>
<a href="#bytebase.v1.SchemaMetadata"><span class="badge">M</span>SchemaMetadata</a>
</li>
@@ -2413,6 +2389,45 @@
</li>
+ <li>
+ <a href="#v1%2frevision_service.proto">v1/revision_service.proto</a>
+ <ul>
+
+ <li>
+ <a href="#bytebase.v1.CreateRevisionRequest"><span class="badge">M</span>CreateRevisionRequest</a>
+ </li>
+
+ <li>
+ <a href="#bytebase.v1.DeleteRevisionRequest"><span class="badge">M</span>DeleteRevisionRequest</a>
+ </li>
+
+ <li>
+ <a href="#bytebase.v1.GetRevisionRequest"><span class="badge">M</span>GetRevisionRequest</a>
+ </li>
+
+ <li>
+ <a href="#bytebase.v1.ListRevisionsRequest"><span class="badge">M</span>ListRevisionsRequest</a>
+ </li>
+
+ <li>
+ <a href="#bytebase.v1.ListRevisionsResponse"><span class="badge">M</span>ListRevisionsResponse</a>
+ </li>
+
+ <li>
+ <a href="#bytebase.v1.Revision"><span class="badge">M</span>Revision</a>
+ </li>
+
+
+
+
+ <li>
+ <a href="#bytebase.v1.RevisionService"><span class="badge">S</span>RevisionService</a>
+ </li>
+
+ </ul>
+ </li>
+
+
<li>
<a href="#v1%2frisk_service.proto">v1/risk_service.proto</a>
<ul>
@@ -6543,37 +6558,6 @@ classification and user_comment is parsed from the comment. </p></td>
- <h3 id="bytebase.v1.CreateRevisionRequest">CreateRevisionRequest</h3>
- <p></p>
-
-
- <table class="field-table">
- <thead>
- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
- </thead>
- <tbody>
-
- <tr>
- <td>parent</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>Format: instances/{instance}/databases/{database} </p></td>
- </tr>
-
- <tr>
- <td>revision</td>
- <td><a href="#bytebase.v1.Revision">Revision</a></td>
- <td></td>
- <td><p>The revision to create. </p></td>
- </tr>
-
- </tbody>
- </table>
-
-
-
-
-
<h3 id="bytebase.v1.Database">Database</h3>
<p></p>
@@ -6790,31 +6774,6 @@ Format: instances/{instance}/databases/{database}/metadata </p></td>
- <h3 id="bytebase.v1.DeleteRevisionRequest">DeleteRevisionRequest</h3>
- <p></p>
-
-
- <table class="field-table">
- <thead>
- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
- </thead>
- <tbody>
-
- <tr>
- <td>name</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The name of the revision to delete.
-Format: instances/{instance}/databases/{database}/revisions/{revision} </p></td>
- </tr>
-
- </tbody>
- </table>
-
-
-
-
-
<h3 id="bytebase.v1.DeleteSecretRequest">DeleteSecretRequest</h3>
<p></p>
@@ -7516,31 +7475,6 @@ Format: instances/{instance}/databases/{database}/schema </p></td>
- <h3 id="bytebase.v1.GetRevisionRequest">GetRevisionRequest</h3>
- <p></p>
-
-
- <table class="field-table">
- <thead>
- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
- </thead>
- <tbody>
-
- <tr>
- <td>name</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The name of the revision.
-Format: instances/{instance}/databases/{database}/revisions/{revision} </p></td>
- </tr>
-
- </tbody>
- </table>
-
-
-
-
-
<h3 id="bytebase.v1.GetSchemaStringRequest">GetSchemaStringRequest</h3>
<p></p>
@@ -7977,90 +7911,6 @@ If this field is omitted, there are no subsequent pages. </p></td>
- <h3 id="bytebase.v1.ListRevisionsRequest">ListRevisionsRequest</h3>
- <p></p>
-
-
- <table class="field-table">
- <thead>
- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
- </thead>
- <tbody>
-
- <tr>
- <td>parent</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The parent of the revisions.
-Format: instances/{instance}/databases/{database} </p></td>
- </tr>
-
- <tr>
- <td>page_size</td>
- <td><a href="#int32">int32</a></td>
- <td></td>
- <td><p>The maximum number of revisions to return. The service may return fewer
-than this value. If unspecified, at most 10 revisions will be returned. The
-maximum value is 1000; values above 1000 will be coerced to 1000. </p></td>
- </tr>
-
- <tr>
- <td>page_token</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>A page token, received from a previous `ListRevisions` call.
-Provide this to retrieve the subsequent page.
-
-When paginating, all other parameters provided to `ListRevisions` must
-match the call that provided the page token. </p></td>
- </tr>
-
- <tr>
- <td>show_deleted</td>
- <td><a href="#bool">bool</a></td>
- <td></td>
- <td><p> </p></td>
- </tr>
-
- </tbody>
- </table>
-
-
-
-
-
- <h3 id="bytebase.v1.ListRevisionsResponse">ListRevisionsResponse</h3>
- <p></p>
-
-
- <table class="field-table">
- <thead>
- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
- </thead>
- <tbody>
-
- <tr>
- <td>revisions</td>
- <td><a href="#bytebase.v1.Revision">Revision</a></td>
- <td>repeated</td>
- <td><p> </p></td>
- </tr>
-
- <tr>
- <td>next_page_token</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>A token, which can be sent as `page_token` to retrieve the next page.
-If this field is omitted, there are no subsequent pages. </p></td>
- </tr>
-
- </tbody>
- </table>
-
-
-
-
-
<h3 id="bytebase.v1.ListSecretsRequest">ListSecretsRequest</h3>
<p></p>
@@ -8313,8 +8163,8 @@ function takes. </p></td>
- <h3 id="bytebase.v1.Revision">Revision</h3>
- <p></p>
+ <h3 id="bytebase.v1.SchemaMetadata">SchemaMetadata</h3>
+ <p>SchemaMetadata is the metadata for schemas.</p><p>This is the concept of schema in Postgres, but it's a no-op for MySQL.</p>
<table class="field-table">
@@ -8327,139 +8177,22 @@ function takes. </p></td>
<td>name</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>Format: instances/{instance}/databases/{database}/revisions/{revision} </p></td>
+ <td><p>The name is the schema name.
+It is an empty string for databases without such concept such as MySQL. </p></td>
</tr>
<tr>
- <td>release</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>Format: projects/{project}/releases/{release}
-Can be empty. </p></td>
+ <td>tables</td>
+ <td><a href="#bytebase.v1.TableMetadata">TableMetadata</a></td>
+ <td>repeated</td>
+ <td><p>The tables is the list of tables in a schema. </p></td>
</tr>
<tr>
- <td>create_time</td>
- <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>
- <td></td>
- <td><p> </p></td>
- </tr>
-
- <tr>
- <td>deleter</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>Format: users/[email protected]
-Can be empty. </p></td>
- </tr>
-
- <tr>
- <td>delete_time</td>
- <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>
- <td></td>
- <td><p>Can be empty. </p></td>
- </tr>
-
- <tr>
- <td>file</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>Format: projects/{project}/releases/{release}/files/{id}
-Can be empty. </p></td>
- </tr>
-
- <tr>
- <td>version</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p> </p></td>
- </tr>
-
- <tr>
- <td>sheet</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The sheet that holds the content.
-Format: projects/{project}/sheets/{sheet} </p></td>
- </tr>
-
- <tr>
- <td>sheet_sha256</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The SHA256 hash value of the sheet. </p></td>
- </tr>
-
- <tr>
- <td>statement</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The statement is used for preview purpose. </p></td>
- </tr>
-
- <tr>
- <td>statement_size</td>
- <td><a href="#int64">int64</a></td>
- <td></td>
- <td><p> </p></td>
- </tr>
-
- <tr>
- <td>issue</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The issue associated with the revision.
-Can be empty.
-Format: projects/{project}/issues/{issue} </p></td>
- </tr>
-
- <tr>
- <td>task_run</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The task run associated with the revision.
-Can be empty.
-Format:
-projects/{project}/rollouts/{rollout}/stages/{stage}/tasks/{task}/taskRuns/{taskRun} </p></td>
- </tr>
-
- </tbody>
- </table>
-
-
-
-
-
- <h3 id="bytebase.v1.SchemaMetadata">SchemaMetadata</h3>
- <p>SchemaMetadata is the metadata for schemas.</p><p>This is the concept of schema in Postgres, but it's a no-op for MySQL.</p>
-
-
- <table class="field-table">
- <thead>
- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
- </thead>
- <tbody>
-
- <tr>
- <td>name</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The name is the schema name.
-It is an empty string for databases without such concept such as MySQL. </p></td>
- </tr>
-
- <tr>
- <td>tables</td>
- <td><a href="#bytebase.v1.TableMetadata">TableMetadata</a></td>
- <td>repeated</td>
- <td><p>The tables is the list of tables in a schema. </p></td>
- </tr>
-
- <tr>
- <td>external_tables</td>
- <td><a href="#bytebase.v1.ExternalTableMetadata">ExternalTableMetadata</a></td>
- <td>repeated</td>
- <td><p>The external_tables is the list of external tables in a schema. </p></td>
+ <td>external_tables</td>
+ <td><a href="#bytebase.v1.ExternalTableMetadata">ExternalTableMetadata</a></td>
+ <td>repeated</td>
+ <td><p>The external_tables is the list of external tables in a schema. </p></td>
</tr>
<tr>
@@ -9887,34 +9620,6 @@ The API will default to the BASIC view.</p></td>
<td><p></p></td>
</tr>
- <tr>
- <td>ListRevisions</td>
- <td><a href="#bytebase.v1.ListRevisionsRequest">ListRevisionsRequest</a></td>
- <td><a href="#bytebase.v1.ListRevisionsResponse">ListRevisionsResponse</a></td>
- <td><p></p></td>
- </tr>
-
- <tr>
- <td>GetRevision</td>
- <td><a href="#bytebase.v1.GetRevisionRequest">GetRevisionRequest</a></td>
- <td><a href="#bytebase.v1.Revision">Revision</a></td>
- <td><p></p></td>
- </tr>
-
- <tr>
- <td>CreateRevision</td>
- <td><a href="#bytebase.v1.CreateRevisionRequest">CreateRevisionRequest</a></td>
- <td><a href="#bytebase.v1.Revision">Revision</a></td>
- <td><p></p></td>
- </tr>
-
- <tr>
- <td>DeleteRevision</td>
- <td><a href="#bytebase.v1.DeleteRevisionRequest">DeleteRevisionRequest</a></td>
- <td><a href="#google.protobuf.Empty">.google.protobuf.Empty</a></td>
- <td><p></p></td>
- </tr>
-
<tr>
<td>ListChangelogs</td>
<td><a href="#bytebase.v1.ListChangelogsRequest">ListChangelogsRequest</a></td>
@@ -10114,46 +9819,6 @@ The API will default to the BASIC view.</p></td>
- <tr>
- <td>ListRevisions</td>
- <td>GET</td>
- <td>/v1/{parent=instances/*/databases/*}/revisions</td>
- <td></td>
- </tr>
-
-
-
-
- <tr>
- <td>GetRevision</td>
- <td>GET</td>
- <td>/v1/{name=instances/*/databases/*/revisions/*}</td>
- <td></td>
- </tr>
-
-
-
-
- <tr>
- <td>CreateRevision</td>
- <td>POST</td>
- <td>/v1/{parent=instances/*/databases/*}/revisions</td>
- <td>revision</td>
- </tr>
-
-
-
-
- <tr>
- <td>DeleteRevision</td>
- <td>DELETE</td>
- <td>/v1/{name=instances/*/databases/*/revisions/*}</td>
- <td></td>
- </tr>
-
-
-
-
<tr>
<td>ListChangelogs</td>
<td>GET</td>
@@ -26400,6 +26065,400 @@ In this situation, `update_mask` is ignored. </p></td>
+ <div class="file-heading">
+ <h2 id="v1/revision_service.proto">v1/revision_service.proto</h2><a href="#title">Top</a>
+ </div>
+ <p></p>
+
+
+ <h3 id="bytebase.v1.CreateRevisionRequest">CreateRevisionRequest</h3>
+ <p></p>
+
+
+ <table class="field-table">
+ <thead>
+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
+ <tr>
+ <td>parent</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>Format: instances/{instance}/databases/{database} </p></td>
+ </tr>
+
+ <tr>
+ <td>revision</td>
+ <td><a href="#bytebase.v1.Revision">Revision</a></td>
+ <td></td>
+ <td><p>The revision to create. </p></td>
+ </tr>
+
+ </tbody>
+ </table>
+
+
+
+
+
+ <h3 id="bytebase.v1.DeleteRevisionRequest">DeleteRevisionRequest</h3>
+ <p></p>
+
+
+ <table class="field-table">
+ <thead>
+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
+ <tr>
+ <td>name</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The name of the revision to delete.
+Format: instances/{instance}/databases/{database}/revisions/{revision} </p></td>
+ </tr>
+
+ </tbody>
+ </table>
+
+
+
+
+
+ <h3 id="bytebase.v1.GetRevisionRequest">GetRevisionRequest</h3>
+ <p></p>
+
+
+ <table class="field-table">
+ <thead>
+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
+ <tr>
+ <td>name</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The name of the revision.
+Format: instances/{instance}/databases/{database}/revisions/{revision} </p></td>
+ </tr>
+
+ </tbody>
+ </table>
+
+
+
+
+
+ <h3 id="bytebase.v1.ListRevisionsRequest">ListRevisionsRequest</h3>
+ <p></p>
+
+
+ <table class="field-table">
+ <thead>
+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
+ <tr>
+ <td>parent</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The parent of the revisions.
+Format: instances/{instance}/databases/{database} </p></td>
+ </tr>
+
+ <tr>
+ <td>page_size</td>
+ <td><a href="#int32">int32</a></td>
+ <td></td>
+ <td><p>The maximum number of revisions to return. The service may return fewer
+than this value. If unspecified, at most 10 revisions will be returned. The
+maximum value is 1000; values above 1000 will be coerced to 1000. </p></td>
+ </tr>
+
+ <tr>
+ <td>page_token</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>A page token, received from a previous `ListRevisions` call.
+Provide this to retrieve the subsequent page.
+
+When paginating, all other parameters provided to `ListRevisions` must
+match the call that provided the page token. </p></td>
+ </tr>
+
+ <tr>
+ <td>show_deleted</td>
+ <td><a href="#bool">bool</a></td>
+ <td></td>
+ <td><p> </p></td>
+ </tr>
+
+ </tbody>
+ </table>
+
+
+
+
+
+ <h3 id="bytebase.v1.ListRevisionsResponse">ListRevisionsResponse</h3>
+ <p></p>
+
+
+ <table class="field-table">
+ <thead>
+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
+ <tr>
+ <td>revisions</td>
+ <td><a href="#bytebase.v1.Revision">Revision</a></td>
+ <td>repeated</td>
+ <td><p> </p></td>
+ </tr>
+
+ <tr>
+ <td>next_page_token</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>A token, which can be sent as `page_token` to retrieve the next page.
+If this field is omitted, there are no subsequent pages. </p></td>
+ </tr>
+
+ </tbody>
+ </table>
+
+
+
+
+
+ <h3 id="bytebase.v1.Revision">Revision</h3>
+ <p></p>
+
+
+ <table class="field-table">
+ <thead>
+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
+ <tr>
+ <td>name</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>Format: instances/{instance}/databases/{database}/revisions/{revision} </p></td>
+ </tr>
+
+ <tr>
+ <td>release</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>Format: projects/{project}/releases/{release}
+Can be empty. </p></td>
+ </tr>
+
+ <tr>
+ <td>create_time</td>
+ <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>
+ <td></td>
+ <td><p> </p></td>
+ </tr>
+
+ <tr>
+ <td>deleter</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>Format: users/[email protected]
+Can be empty. </p></td>
+ </tr>
+
+ <tr>
+ <td>delete_time</td>
+ <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>
+ <td></td>
+ <td><p>Can be empty. </p></td>
+ </tr>
+
+ <tr>
+ <td>file</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>Format: projects/{project}/releases/{release}/files/{id}
+Can be empty. </p></td>
+ </tr>
+
+ <tr>
+ <td>version</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p> </p></td>
+ </tr>
+
+ <tr>
+ <td>sheet</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The sheet that holds the content.
+Format: projects/{project}/sheets/{sheet} </p></td>
+ </tr>
+
+ <tr>
+ <td>sheet_sha256</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The SHA256 hash value of the sheet. </p></td>
+ </tr>
+
+ <tr>
+ <td>statement</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The statement is used for preview purpose. </p></td>
+ </tr>
+
+ <tr>
+ <td>statement_size</td>
+ <td><a href="#int64">int64</a></td>
+ <td></td>
+ <td><p> </p></td>
+ </tr>
+
+ <tr>
+ <td>issue</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The issue associated with the revision.
+Can be empty.
+Format: projects/{project}/issues/{issue} </p></td>
+ </tr>
+
+ <tr>
+ <td>task_run</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The task run associated with the revision.
+Can be empty.
+Format:
+projects/{project}/rollouts/{rollout}/stages/{stage}/tasks/{task}/taskRuns/{taskRun} </p></td>
+ </tr>
+
+ </tbody>
+ </table>
+
+
+
+
+
+
+
+
+
+
+
+ <h3 id="bytebase.v1.RevisionService">RevisionService</h3>
+ <p></p>
+ <table class="enum-table">
+ <thead>
+ <tr><td>Method Name</td><td>Request Type</td><td>Response Type</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
+ <tr>
+ <td>ListRevisions</td>
+ <td><a href="#bytebase.v1.ListRevisionsRequest">ListRevisionsRequest</a></td>
+ <td><a href="#bytebase.v1.ListRevisionsResponse">ListRevisionsResponse</a></td>
+ <td><p></p></td>
+ </tr>
+
+ <tr>
+ <td>GetRevision</td>
+ <td><a href="#bytebase.v1.GetRevisionRequest">GetRevisionRequest</a></td>
+ <td><a href="#bytebase.v1.Revision">Revision</a></td>
+ <td><p></p></td>
+ </tr>
+
+ <tr>
+ <td>CreateRevision</td>
+ <td><a href="#bytebase.v1.CreateRevisionRequest">CreateRevisionRequest</a></td>
+ <td><a href="#bytebase.v1.Revision">Revision</a></td>
+ <td><p></p></td>
+ </tr>
+
+ <tr>
+ <td>DeleteRevision</td>
+ <td><a href="#bytebase.v1.DeleteRevisionRequest">DeleteRevisionRequest</a></td>
+ <td><a href="#google.protobuf.Empty">.google.protobuf.Empty</a></td>
+ <td><p></p></td>
+ </tr>
+
+ </tbody>
+ </table>
+
+
+
+
+ <h4>Methods with HTTP bindings</h4>
+ <table>
+ <thead>
+ <tr>
+ <td>Method Name</td>
+ <td>Method</td>
+ <td>Pattern</td>
+ <td>Body</td>
+ </tr>
+ </thead>
+ <tbody>
+
+
+
+ <tr>
+ <td>ListRevisions</td>
+ <td>GET</td>
+ <td>/v1/{parent=instances/*/databases/*}/revisions</td>
+ <td></td>
+ </tr>
+
+
+
+
+ <tr>
+ <td>GetRevision</td>
+ <td>GET</td>
+ <td>/v1/{name=instances/*/databases/*/revisions/*}</td>
+ <td></td>
+ </tr>
+
+
+
+
+ <tr>
+ <td>CreateRevision</td>
+ <td>POST</td>
+ <td>/v1/{parent=instances/*/databases/*}/revisions</td>
+ <td>revision</td>
+ </tr>
+
+
+
+
+ <tr>
+ <td>DeleteRevision</td>
+ <td>DELETE</td>
+ <td>/v1/{name=instances/*/databases/*/revisions/*}</td>
+ <td></td>
+ </tr>
+
+
+ </tbody>
+ </table>
+
+
+
+
<div class="file-heading">
<h2 id="v1/risk_service.proto">v1/risk_service.proto</h2><a href="#title">Top</a>
</div>
diff --git a/proto/generated-go/v1/database_service.pb.go b/proto/generated-go/v1/database_service.pb.go
index bbda0c2fd8..a03f42cecf 100644
--- a/proto/generated-go/v1/database_service.pb.go
+++ b/proto/generated-go/v1/database_service.pb.go
@@ -444,7 +444,7 @@ func (x Changelog_Status) Number() protoreflect.EnumNumber {
// Deprecated: Use Changelog_Status.Descriptor instead.
func (Changelog_Status) EnumDescriptor() ([]byte, []int) {
- return file_v1_database_service_proto_rawDescGZIP(), []int{63, 0}
+ return file_v1_database_service_proto_rawDescGZIP(), []int{57, 0}
}
type Changelog_Type int32
@@ -502,7 +502,7 @@ func (x Changelog_Type) Number() protoreflect.EnumNumber {
// Deprecated: Use Changelog_Type.Descriptor instead.
func (Changelog_Type) EnumDescriptor() ([]byte, []int) {
- return file_v1_database_service_proto_rawDescGZIP(), []int{63, 1}
+ return file_v1_database_service_proto_rawDescGZIP(), []int{57, 1}
}
type GetSchemaStringRequest_ObjectType int32
@@ -569,7 +569,7 @@ func (x GetSchemaStringRequest_ObjectType) Number() protoreflect.EnumNumber {
// Deprecated: Use GetSchemaStringRequest_ObjectType.Descriptor instead.
func (GetSchemaStringRequest_ObjectType) EnumDescriptor() ([]byte, []int) {
- return file_v1_database_service_proto_rawDescGZIP(), []int{64, 0}
+ return file_v1_database_service_proto_rawDescGZIP(), []int{58, 0}
}
type GetDatabaseRequest struct {
@@ -5055,443 +5055,6 @@ func (x *ChangedResourceProcedure) GetRanges() []*Range {
return nil
}
-type ListRevisionsRequest struct {
- state protoimpl.MessageState `protogen:"open.v1"`
- // The parent of the revisions.
- // Format: instances/{instance}/databases/{database}
- Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"`
- // The maximum number of revisions to return. The service may return fewer
- // than this value. If unspecified, at most 10 revisions 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 `ListRevisions` call.
- // Provide this to retrieve the subsequent page.
- //
- // When paginating, all other parameters provided to `ListRevisions` 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"`
- ShowDeleted bool `protobuf:"varint,4,opt,name=show_deleted,json=showDeleted,proto3" json:"show_deleted,omitempty"`
- unknownFields protoimpl.UnknownFields
- sizeCache protoimpl.SizeCache
-}
-
-func (x *ListRevisionsRequest) Reset() {
- *x = ListRevisionsRequest{}
- mi := &file_v1_database_service_proto_msgTypes[54]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
-}
-
-func (x *ListRevisionsRequest) String() string {
- return protoimpl.X.MessageStringOf(x)
-}
-
-func (*ListRevisionsRequest) ProtoMessage() {}
-
-func (x *ListRevisionsRequest) ProtoReflect() protoreflect.Message {
- mi := &file_v1_database_service_proto_msgTypes[54]
- if x != nil {
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- if ms.LoadMessageInfo() == nil {
- ms.StoreMessageInfo(mi)
- }
- return ms
- }
- return mi.MessageOf(x)
-}
-
-// Deprecated: Use ListRevisionsRequest.ProtoReflect.Descriptor instead.
-func (*ListRevisionsRequest) Descriptor() ([]byte, []int) {
- return file_v1_database_service_proto_rawDescGZIP(), []int{54}
-}
-
-func (x *ListRevisionsRequest) GetParent() string {
- if x != nil {
- return x.Parent
- }
- return ""
-}
-
-func (x *ListRevisionsRequest) GetPageSize() int32 {
- if x != nil {
- return x.PageSize
- }
- return 0
-}
-
-func (x *ListRevisionsRequest) GetPageToken() string {
- if x != nil {
- return x.PageToken
- }
- return ""
-}
-
-func (x *ListRevisionsRequest) GetShowDeleted() bool {
- if x != nil {
- return x.ShowDeleted
- }
- return false
-}
-
-type ListRevisionsResponse struct {
- state protoimpl.MessageState `protogen:"open.v1"`
- Revisions []*Revision `protobuf:"bytes,1,rep,name=revisions,proto3" json:"revisions,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"`
- unknownFields protoimpl.UnknownFields
- sizeCache protoimpl.SizeCache
-}
-
-func (x *ListRevisionsResponse) Reset() {
- *x = ListRevisionsResponse{}
- mi := &file_v1_database_service_proto_msgTypes[55]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
-}
-
-func (x *ListRevisionsResponse) String() string {
- return protoimpl.X.MessageStringOf(x)
-}
-
-func (*ListRevisionsResponse) ProtoMessage() {}
-
-func (x *ListRevisionsResponse) ProtoReflect() protoreflect.Message {
- mi := &file_v1_database_service_proto_msgTypes[55]
- if x != nil {
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- if ms.LoadMessageInfo() == nil {
- ms.StoreMessageInfo(mi)
- }
- return ms
- }
- return mi.MessageOf(x)
-}
-
-// Deprecated: Use ListRevisionsResponse.ProtoReflect.Descriptor instead.
-func (*ListRevisionsResponse) Descriptor() ([]byte, []int) {
- return file_v1_database_service_proto_rawDescGZIP(), []int{55}
-}
-
-func (x *ListRevisionsResponse) GetRevisions() []*Revision {
- if x != nil {
- return x.Revisions
- }
- return nil
-}
-
-func (x *ListRevisionsResponse) GetNextPageToken() string {
- if x != nil {
- return x.NextPageToken
- }
- return ""
-}
-
-type CreateRevisionRequest struct {
- state protoimpl.MessageState `protogen:"open.v1"`
- // Format: instances/{instance}/databases/{database}
- Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"`
- // The revision to create.
- Revision *Revision `protobuf:"bytes,2,opt,name=revision,proto3" json:"revision,omitempty"`
- unknownFields protoimpl.UnknownFields
- sizeCache protoimpl.SizeCache
-}
-
-func (x *CreateRevisionRequest) Reset() {
- *x = CreateRevisionRequest{}
- mi := &file_v1_database_service_proto_msgTypes[56]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
-}
-
-func (x *CreateRevisionRequest) String() string {
- return protoimpl.X.MessageStringOf(x)
-}
-
-func (*CreateRevisionRequest) ProtoMessage() {}
-
-func (x *CreateRevisionRequest) ProtoReflect() protoreflect.Message {
- mi := &file_v1_database_service_proto_msgTypes[56]
- if x != nil {
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- if ms.LoadMessageInfo() == nil {
- ms.StoreMessageInfo(mi)
- }
- return ms
- }
- return mi.MessageOf(x)
-}
-
-// Deprecated: Use CreateRevisionRequest.ProtoReflect.Descriptor instead.
-func (*CreateRevisionRequest) Descriptor() ([]byte, []int) {
- return file_v1_database_service_proto_rawDescGZIP(), []int{56}
-}
-
-func (x *CreateRevisionRequest) GetParent() string {
- if x != nil {
- return x.Parent
- }
- return ""
-}
-
-func (x *CreateRevisionRequest) GetRevision() *Revision {
- if x != nil {
- return x.Revision
- }
- return nil
-}
-
-type GetRevisionRequest struct {
- state protoimpl.MessageState `protogen:"open.v1"`
- // The name of the revision.
- // Format: instances/{instance}/databases/{database}/revisions/{revision}
- Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
- unknownFields protoimpl.UnknownFields
- sizeCache protoimpl.SizeCache
-}
-
-func (x *GetRevisionRequest) Reset() {
- *x = GetRevisionRequest{}
- mi := &file_v1_database_service_proto_msgTypes[57]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
-}
-
-func (x *GetRevisionRequest) String() string {
- return protoimpl.X.MessageStringOf(x)
-}
-
-func (*GetRevisionRequest) ProtoMessage() {}
-
-func (x *GetRevisionRequest) ProtoReflect() protoreflect.Message {
- mi := &file_v1_database_service_proto_msgTypes[57]
- if x != nil {
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- if ms.LoadMessageInfo() == nil {
- ms.StoreMessageInfo(mi)
- }
- return ms
- }
- return mi.MessageOf(x)
-}
-
-// Deprecated: Use GetRevisionRequest.ProtoReflect.Descriptor instead.
-func (*GetRevisionRequest) Descriptor() ([]byte, []int) {
- return file_v1_database_service_proto_rawDescGZIP(), []int{57}
-}
-
-func (x *GetRevisionRequest) GetName() string {
- if x != nil {
- return x.Name
- }
- return ""
-}
-
-type DeleteRevisionRequest struct {
- state protoimpl.MessageState `protogen:"open.v1"`
- // The name of the revision to delete.
- // Format: instances/{instance}/databases/{database}/revisions/{revision}
- Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
- unknownFields protoimpl.UnknownFields
- sizeCache protoimpl.SizeCache
-}
-
-func (x *DeleteRevisionRequest) Reset() {
- *x = DeleteRevisionRequest{}
- mi := &file_v1_database_service_proto_msgTypes[58]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
-}
-
-func (x *DeleteRevisionRequest) String() string {
- return protoimpl.X.MessageStringOf(x)
-}
-
-func (*DeleteRevisionRequest) ProtoMessage() {}
-
-func (x *DeleteRevisionRequest) ProtoReflect() protoreflect.Message {
- mi := &file_v1_database_service_proto_msgTypes[58]
- if x != nil {
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- if ms.LoadMessageInfo() == nil {
- ms.StoreMessageInfo(mi)
- }
- return ms
- }
- return mi.MessageOf(x)
-}
-
-// Deprecated: Use DeleteRevisionRequest.ProtoReflect.Descriptor instead.
-func (*DeleteRevisionRequest) Descriptor() ([]byte, []int) {
- return file_v1_database_service_proto_rawDescGZIP(), []int{58}
-}
-
-func (x *DeleteRevisionRequest) GetName() string {
- if x != nil {
- return x.Name
- }
- return ""
-}
-
-type Revision struct {
- state protoimpl.MessageState `protogen:"open.v1"`
- // Format: instances/{instance}/databases/{database}/revisions/{revision}
- Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
- // Format: projects/{project}/releases/{release}
- // Can be empty.
- Release string `protobuf:"bytes,2,opt,name=release,proto3" json:"release,omitempty"`
- CreateTime *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=create_time,json=createTime,proto3" json:"create_time,omitempty"`
- // Format: users/[email protected]
- // Can be empty.
- Deleter string `protobuf:"bytes,5,opt,name=deleter,proto3" json:"deleter,omitempty"`
- // Can be empty.
- DeleteTime *timestamppb.Timestamp `protobuf:"bytes,6,opt,name=delete_time,json=deleteTime,proto3" json:"delete_time,omitempty"`
- // Format: projects/{project}/releases/{release}/files/{id}
- // Can be empty.
- File string `protobuf:"bytes,7,opt,name=file,proto3" json:"file,omitempty"`
- Version string `protobuf:"bytes,8,opt,name=version,proto3" json:"version,omitempty"`
- // The sheet that holds the content.
- // Format: projects/{project}/sheets/{sheet}
- Sheet string `protobuf:"bytes,9,opt,name=sheet,proto3" json:"sheet,omitempty"`
- // The SHA256 hash value of the sheet.
- SheetSha256 string `protobuf:"bytes,10,opt,name=sheet_sha256,json=sheetSha256,proto3" json:"sheet_sha256,omitempty"`
- // The statement is used for preview purpose.
- Statement string `protobuf:"bytes,11,opt,name=statement,proto3" json:"statement,omitempty"`
- StatementSize int64 `protobuf:"varint,12,opt,name=statement_size,json=statementSize,proto3" json:"statement_size,omitempty"`
- // The issue associated with the revision.
- // Can be empty.
- // Format: projects/{project}/issues/{issue}
- Issue string `protobuf:"bytes,13,opt,name=issue,proto3" json:"issue,omitempty"`
- // The task run associated with the revision.
- // Can be empty.
- // Format:
- // projects/{project}/rollouts/{rollout}/stages/{stage}/tasks/{task}/taskRuns/{taskRun}
- TaskRun string `protobuf:"bytes,14,opt,name=task_run,json=taskRun,proto3" json:"task_run,omitempty"`
- unknownFields protoimpl.UnknownFields
- sizeCache protoimpl.SizeCache
-}
-
-func (x *Revision) Reset() {
- *x = Revision{}
- mi := &file_v1_database_service_proto_msgTypes[59]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
-}
-
-func (x *Revision) String() string {
- return protoimpl.X.MessageStringOf(x)
-}
-
-func (*Revision) ProtoMessage() {}
-
-func (x *Revision) ProtoReflect() protoreflect.Message {
- mi := &file_v1_database_service_proto_msgTypes[59]
- if x != nil {
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- if ms.LoadMessageInfo() == nil {
- ms.StoreMessageInfo(mi)
- }
- return ms
- }
- return mi.MessageOf(x)
-}
-
-// Deprecated: Use Revision.ProtoReflect.Descriptor instead.
-func (*Revision) Descriptor() ([]byte, []int) {
- return file_v1_database_service_proto_rawDescGZIP(), []int{59}
-}
-
-func (x *Revision) GetName() string {
- if x != nil {
- return x.Name
- }
- return ""
-}
-
-func (x *Revision) GetRelease() string {
- if x != nil {
- return x.Release
- }
- return ""
-}
-
-func (x *Revision) GetCreateTime() *timestamppb.Timestamp {
- if x != nil {
- return x.CreateTime
- }
- return nil
-}
-
-func (x *Revision) GetDeleter() string {
- if x != nil {
- return x.Deleter
- }
- return ""
-}
-
-func (x *Revision) GetDeleteTime() *timestamppb.Timestamp {
- if x != nil {
- return x.DeleteTime
- }
- return nil
-}
-
-func (x *Revision) GetFile() string {
- if x != nil {
- return x.File
- }
- return ""
-}
-
-func (x *Revision) GetVersion() string {
- if x != nil {
- return x.Version
- }
- return ""
-}
-
-func (x *Revision) GetSheet() string {
- if x != nil {
- return x.Sheet
- }
- return ""
-}
-
-func (x *Revision) GetSheetSha256() string {
- if x != nil {
- return x.SheetSha256
- }
- return ""
-}
-
-func (x *Revision) GetStatement() string {
- if x != nil {
- return x.Statement
- }
- return ""
-}
-
-func (x *Revision) GetStatementSize() int64 {
- if x != nil {
- return x.StatementSize
- }
- return 0
-}
-
-func (x *Revision) GetIssue() string {
- if x != nil {
- return x.Issue
- }
- return ""
-}
-
-func (x *Revision) GetTaskRun() string {
- if x != nil {
- return x.TaskRun
- }
- return ""
-}
-
type ListChangelogsRequest struct {
state protoimpl.MessageState `protogen:"open.v1"`
// The parent of the changelogs.
@@ -5551,7 +5114,7 @@ type ListChangelogsRequest struct {
func (x *ListChangelogsRequest) Reset() {
*x = ListChangelogsRequest{}
- mi := &file_v1_database_service_proto_msgTypes[60]
+ mi := &file_v1_database_service_proto_msgTypes[54]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -5563,7 +5126,7 @@ func (x *ListChangelogsRequest) String() string {
func (*ListChangelogsRequest) ProtoMessage() {}
func (x *ListChangelogsRequest) ProtoReflect() protoreflect.Message {
- mi := &file_v1_database_service_proto_msgTypes[60]
+ mi := &file_v1_database_service_proto_msgTypes[54]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -5576,7 +5139,7 @@ func (x *ListChangelogsRequest) ProtoReflect() protoreflect.Message {
// Deprecated: Use ListChangelogsRequest.ProtoReflect.Descriptor instead.
func (*ListChangelogsRequest) Descriptor() ([]byte, []int) {
- return file_v1_database_service_proto_rawDescGZIP(), []int{60}
+ return file_v1_database_service_proto_rawDescGZIP(), []int{54}
}
func (x *ListChangelogsRequest) GetParent() string {
@@ -5627,7 +5190,7 @@ type ListChangelogsResponse struct {
func (x *ListChangelogsResponse) Reset() {
*x = ListChangelogsResponse{}
- mi := &file_v1_database_service_proto_msgTypes[61]
+ mi := &file_v1_database_service_proto_msgTypes[55]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -5639,7 +5202,7 @@ func (x *ListChangelogsResponse) String() string {
func (*ListChangelogsResponse) ProtoMessage() {}
func (x *ListChangelogsResponse) ProtoReflect() protoreflect.Message {
- mi := &file_v1_database_service_proto_msgTypes[61]
+ mi := &file_v1_database_service_proto_msgTypes[55]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -5652,7 +5215,7 @@ func (x *ListChangelogsResponse) ProtoReflect() protoreflect.Message {
// Deprecated: Use ListChangelogsResponse.ProtoReflect.Descriptor instead.
func (*ListChangelogsResponse) Descriptor() ([]byte, []int) {
- return file_v1_database_service_proto_rawDescGZIP(), []int{61}
+ return file_v1_database_service_proto_rawDescGZIP(), []int{55}
}
func (x *ListChangelogsResponse) GetChangelogs() []*Changelog {
@@ -5683,7 +5246,7 @@ type GetChangelogRequest struct {
func (x *GetChangelogRequest) Reset() {
*x = GetChangelogRequest{}
- mi := &file_v1_database_service_proto_msgTypes[62]
+ mi := &file_v1_database_service_proto_msgTypes[56]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -5695,7 +5258,7 @@ func (x *GetChangelogRequest) String() string {
func (*GetChangelogRequest) ProtoMessage() {}
func (x *GetChangelogRequest) ProtoReflect() protoreflect.Message {
- mi := &file_v1_database_service_proto_msgTypes[62]
+ mi := &file_v1_database_service_proto_msgTypes[56]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -5708,7 +5271,7 @@ func (x *GetChangelogRequest) ProtoReflect() protoreflect.Message {
// Deprecated: Use GetChangelogRequest.ProtoReflect.Descriptor instead.
func (*GetChangelogRequest) Descriptor() ([]byte, []int) {
- return file_v1_database_service_proto_rawDescGZIP(), []int{62}
+ return file_v1_database_service_proto_rawDescGZIP(), []int{56}
}
func (x *GetChangelogRequest) GetName() string {
@@ -5765,7 +5328,7 @@ type Changelog struct {
func (x *Changelog) Reset() {
*x = Changelog{}
- mi := &file_v1_database_service_proto_msgTypes[63]
+ mi := &file_v1_database_service_proto_msgTypes[57]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -5777,7 +5340,7 @@ func (x *Changelog) String() string {
func (*Changelog) ProtoMessage() {}
func (x *Changelog) ProtoReflect() protoreflect.Message {
- mi := &file_v1_database_service_proto_msgTypes[63]
+ mi := &file_v1_database_service_proto_msgTypes[57]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -5790,7 +5353,7 @@ func (x *Changelog) ProtoReflect() protoreflect.Message {
// Deprecated: Use Changelog.ProtoReflect.Descriptor instead.
func (*Changelog) Descriptor() ([]byte, []int) {
- return file_v1_database_service_proto_rawDescGZIP(), []int{63}
+ return file_v1_database_service_proto_rawDescGZIP(), []int{57}
}
func (x *Changelog) GetName() string {
@@ -5924,7 +5487,7 @@ type GetSchemaStringRequest struct {
func (x *GetSchemaStringRequest) Reset() {
*x = GetSchemaStringRequest{}
- mi := &file_v1_database_service_proto_msgTypes[64]
+ mi := &file_v1_database_service_proto_msgTypes[58]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -5936,7 +5499,7 @@ func (x *GetSchemaStringRequest) String() string {
func (*GetSchemaStringRequest) ProtoMessage() {}
func (x *GetSchemaStringRequest) ProtoReflect() protoreflect.Message {
- mi := &file_v1_database_service_proto_msgTypes[64]
+ mi := &file_v1_database_service_proto_msgTypes[58]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -5949,7 +5512,7 @@ func (x *GetSchemaStringRequest) ProtoReflect() protoreflect.Message {
// Deprecated: Use GetSchemaStringRequest.ProtoReflect.Descriptor instead.
func (*GetSchemaStringRequest) Descriptor() ([]byte, []int) {
- return file_v1_database_service_proto_rawDescGZIP(), []int{64}
+ return file_v1_database_service_proto_rawDescGZIP(), []int{58}
}
func (x *GetSchemaStringRequest) GetName() string {
@@ -5996,7 +5559,7 @@ type GetSchemaStringResponse struct {
func (x *GetSchemaStringResponse) Reset() {
*x = GetSchemaStringResponse{}
- mi := &file_v1_database_service_proto_msgTypes[65]
+ mi := &file_v1_database_service_proto_msgTypes[59]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -6008,7 +5571,7 @@ func (x *GetSchemaStringResponse) String() string {
func (*GetSchemaStringResponse) ProtoMessage() {}
func (x *GetSchemaStringResponse) ProtoReflect() protoreflect.Message {
- mi := &file_v1_database_service_proto_msgTypes[65]
+ mi := &file_v1_database_service_proto_msgTypes[59]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -6021,7 +5584,7 @@ func (x *GetSchemaStringResponse) ProtoReflect() protoreflect.Message {
// Deprecated: Use GetSchemaStringResponse.ProtoReflect.Descriptor instead.
func (*GetSchemaStringResponse) Descriptor() ([]byte, []int) {
- return file_v1_database_service_proto_rawDescGZIP(), []int{65}
+ return file_v1_database_service_proto_rawDescGZIP(), []int{59}
}
func (x *GetSchemaStringResponse) GetSchemaString() string {
@@ -6465,49 +6028,7 @@ const file_v1_database_service_proto_rawDesc = "" +
"\x06ranges\x18\x02 \x03(\v2\x12.bytebase.v1.RangeR\x06ranges\"Z\n" +
"\x18ChangedResourceProcedure\x12\x12\n" +
"\x04name\x18\x01 \x01(\tR\x04name\x12*\n" +
- "\x06ranges\x18\x02 \x03(\v2\x12.bytebase.v1.RangeR\x06ranges\"\xad\x01\n" +
- "\x14ListRevisionsRequest\x126\n" +
- "\x06parent\x18\x01 \x01(\tB\x1e\xe2A\x01\x02\xfaA\x17\n" +
- "\x15bytebase.com/DatabaseR\x06parent\x12\x1b\n" +
- "\tpage_size\x18\x02 \x01(\x05R\bpageSize\x12\x1d\n" +
- "\n" +
- "page_token\x18\x03 \x01(\tR\tpageToken\x12!\n" +
- "\fshow_deleted\x18\x04 \x01(\bR\vshowDeleted\"t\n" +
- "\x15ListRevisionsResponse\x123\n" +
- "\trevisions\x18\x01 \x03(\v2\x15.bytebase.v1.RevisionR\trevisions\x12&\n" +
- "\x0fnext_page_token\x18\x02 \x01(\tR\rnextPageToken\"\x88\x01\n" +
- "\x15CreateRevisionRequest\x126\n" +
- "\x06parent\x18\x01 \x01(\tB\x1e\xe2A\x01\x02\xfaA\x17\n" +
- "\x15bytebase.com/DatabaseR\x06parent\x127\n" +
- "\brevision\x18\x02 \x01(\v2\x15.bytebase.v1.RevisionB\x04\xe2A\x01\x02R\brevision\"H\n" +
- "\x12GetRevisionRequest\x122\n" +
- "\x04name\x18\x01 \x01(\tB\x1e\xe2A\x01\x02\xfaA\x17\n" +
- "\x15bytebase.com/RevisionR\x04name\"K\n" +
- "\x15DeleteRevisionRequest\x122\n" +
- "\x04name\x18\x01 \x01(\tB\x1e\xe2A\x01\x02\xfaA\x17\n" +
- "\x15bytebase.com/RevisionR\x04name\"\x8b\x05\n" +
- "\bRevision\x12\x12\n" +
- "\x04name\x18\x01 \x01(\tR\x04name\x123\n" +
- "\arelease\x18\x02 \x01(\tB\x19\xfaA\x16\n" +
- "\x14bytebase.com/ReleaseR\arelease\x12A\n" +
- "\vcreate_time\x18\x04 \x01(\v2\x1a.google.protobuf.TimestampB\x04\xe2A\x01\x03R\n" +
- "createTime\x12\x18\n" +
- "\adeleter\x18\x05 \x01(\tR\adeleter\x12A\n" +
- "\vdelete_time\x18\x06 \x01(\v2\x1a.google.protobuf.TimestampB\x04\xe2A\x01\x03R\n" +
- "deleteTime\x12\x12\n" +
- "\x04file\x18\a \x01(\tR\x04file\x12\x18\n" +
- "\aversion\x18\b \x01(\tR\aversion\x12-\n" +
- "\x05sheet\x18\t \x01(\tB\x17\xfaA\x14\n" +
- "\x12bytebase.com/SheetR\x05sheet\x12'\n" +
- "\fsheet_sha256\x18\n" +
- " \x01(\tB\x04\xe2A\x01\x03R\vsheetSha256\x12\"\n" +
- "\tstatement\x18\v \x01(\tB\x04\xe2A\x01\x03R\tstatement\x12+\n" +
- "\x0estatement_size\x18\f \x01(\x03B\x04\xe2A\x01\x03R\rstatementSize\x12-\n" +
- "\x05issue\x18\r \x01(\tB\x17\xfaA\x14\n" +
- "\x12bytebase.com/IssueR\x05issue\x124\n" +
- "\btask_run\x18\x0e \x01(\tB\x19\xfaA\x16\n" +
- "\x14bytebase.com/TaskRunR\ataskRun:Z\xeaAW\n" +
- "\x15bytebase.com/Revision\x12>instances/{instance}/databases/{database}/revisions/{revision}\"\xd3\x01\n" +
+ "\x06ranges\x18\x02 \x03(\v2\x12.bytebase.v1.RangeR\x06ranges\"\xd3\x01\n" +
"\x15ListChangelogsRequest\x126\n" +
"\x06parent\x18\x01 \x01(\tB\x1e\xe2A\x01\x02\xfaA\x17\n" +
"\x15bytebase.com/DatabaseR\x06parent\x12\x1b\n" +
@@ -6586,7 +6107,7 @@ const file_v1_database_service_proto_rawDesc = "" +
"\rChangelogView\x12\x1e\n" +
"\x1aCHANGELOG_VIEW_UNSPECIFIED\x10\x00\x12\x18\n" +
"\x14CHANGELOG_VIEW_BASIC\x10\x01\x12\x17\n" +
- "\x13CHANGELOG_VIEW_FULL\x10\x022\xe4\x1c\n" +
+ "\x13CHANGELOG_VIEW_FULL\x10\x022\xbe\x17\n" +
"\x0fDatabaseService\x12\x90\x01\n" +
"\vGetDatabase\x12\x1f.bytebase.v1.GetDatabaseRequest\x1a\x15.bytebase.v1.Database\"I\xdaA\x04name\x8a\xea0\x10bb.databases.get\x90\xea0\x01\x82\xd3\xe4\x93\x02$\x12\"/v1/{name=instances/*/databases/*}\x12\xdd\x01\n" +
"\x11BatchGetDatabases\x12%.bytebase.v1.BatchGetDatabasesRequest\x1a&.bytebase.v1.BatchGetDatabasesResponse\"y\x8a\xea0\x10bb.databases.get\x90\xea0\x01\x82\xd3\xe4\x93\x02[Z-\x12+/v1/{parent=instances/*}/databases:batchGet\x12*/v1/{parent=projects/*}/databases:batchGet\x12\xeb\x01\n" +
@@ -6601,11 +6122,7 @@ const file_v1_database_service_proto_rawDesc = "" +
"DiffSchema\x12\x1e.bytebase.v1.DiffSchemaRequest\x1a\x1f.bytebase.v1.DiffSchemaResponse\"\x91\x01\x8a\xea0\x10bb.databases.get\x90\xea0\x01\x82\xd3\xe4\x93\x02s:\x01*Z?:\x01*\":/v1/{name=instances/*/databases/*/changelogs/*}:diffSchema\"-/v1/{name=instances/*/databases/*}:diffSchema\x12\xae\x01\n" +
"\vListSecrets\x12\x1f.bytebase.v1.ListSecretsRequest\x1a .bytebase.v1.ListSecretsResponse\"\\\xdaA\x06parent\x8a\xea0\x17bb.databaseSecrets.list\x90\xea0\x01\x82\xd3\xe4\x93\x02.\x12,/v1/{parent=instances/*/databases/*}/secrets\x12\xaf\x01\n" +
"\fUpdateSecret\x12 .bytebase.v1.UpdateSecretRequest\x1a\x13.bytebase.v1.Secret\"h\x8a\xea0\x19bb.databaseSecrets.update\x90\xea0\x01\x98\xea0\x01\x82\xd3\xe4\x93\x02=:\x06secret23/v1/{secret.name=instances/*/databases/*/secrets/*}\x12\xa3\x01\n" +
- "\fDeleteSecret\x12 .bytebase.v1.DeleteSecretRequest\x1a\x16.google.protobuf.Empty\"Y\x8a\xea0\x19bb.databaseSecrets.delete\x90\xea0\x01\x98\xea0\x01\x82\xd3\xe4\x93\x02.*,/v1/{name=instances/*/databases/*/secrets/*}\x12\xb0\x01\n" +
- "\rListRevisions\x12!.bytebase.v1.ListRevisionsRequest\x1a\".bytebase.v1.ListRevisionsResponse\"X\xdaA\x06parent\x8a\xea0\x11bb.revisions.list\x90\xea0\x01\x82\xd3\xe4\x93\x020\x12./v1/{parent=instances/*/databases/*}/revisions\x12\x9c\x01\n" +
- "\vGetRevision\x12\x1f.bytebase.v1.GetRevisionRequest\x1a\x15.bytebase.v1.Revision\"U\xdaA\x04name\x8a\xea0\x10bb.revisions.get\x90\xea0\x01\x82\xd3\xe4\x93\x020\x12./v1/{name=instances/*/databases/*/revisions/*}\x12\xa8\x01\n" +
- "\x0eCreateRevision\x12\".bytebase.v1.CreateRevisionRequest\x1a\x15.bytebase.v1.Revision\"[\x8a\xea0\x13bb.revisions.create\x90\xea0\x01\x82\xd3\xe4\x93\x02::\brevision\"./v1/{parent=instances/*/databases/*}/revisions\x12\xa6\x01\n" +
- "\x0eDeleteRevision\x12\".bytebase.v1.DeleteRevisionRequest\x1a\x16.google.protobuf.Empty\"X\xdaA\x04name\x8a\xea0\x13bb.revisions.delete\x90\xea0\x01\x82\xd3\xe4\x93\x020*./v1/{name=instances/*/databases/*/revisions/*}\x12\xb5\x01\n" +
+ "\fDeleteSecret\x12 .bytebase.v1.DeleteSecretRequest\x1a\x16.google.protobuf.Empty\"Y\x8a\xea0\x19bb.databaseSecrets.delete\x90\xea0\x01\x98\xea0\x01\x82\xd3\xe4\x93\x02.*,/v1/{name=instances/*/databases/*/secrets/*}\x12\xb5\x01\n" +
"\x0eListChangelogs\x12\".bytebase.v1.ListChangelogsRequest\x1a#.bytebase.v1.ListChangelogsResponse\"Z\xdaA\x06parent\x8a\xea0\x12bb.changelogs.list\x90\xea0\x01\x82\xd3\xe4\x93\x021\x12//v1/{parent=instances/*/databases/*}/changelogs\x12\xa1\x01\n" +
"\fGetChangelog\x12 .bytebase.v1.GetChangelogRequest\x1a\x16.bytebase.v1.Changelog\"W\xdaA\x04name\x8a\xea0\x11bb.changelogs.get\x90\xea0\x01\x82\xd3\xe4\x93\x021\x12//v1/{name=instances/*/databases/*/changelogs/*}\x12\xba\x01\n" +
"\x0fGetSchemaString\x12#.bytebase.v1.GetSchemaStringRequest\x1a$.bytebase.v1.GetSchemaStringResponse\"\\\xdaA\x04name\x8a\xea0\x16bb.databases.getSchema\x90\xea0\x01\x82\xd3\xe4\x93\x021\x12//v1/{name=instances/*/databases/*/schemaString}B\x11Z\x0fgenerated-go/v1b\x06proto3"
@@ -6623,7 +6140,7 @@ func file_v1_database_service_proto_rawDescGZIP() []byte {
}
var file_v1_database_service_proto_enumTypes = make([]protoimpl.EnumInfo, 10)
-var file_v1_database_service_proto_msgTypes = make([]protoimpl.MessageInfo, 67)
+var file_v1_database_service_proto_msgTypes = make([]protoimpl.MessageInfo, 61)
var file_v1_database_service_proto_goTypes = []any{
(ChangelogView)(0), // 0: bytebase.v1.ChangelogView
(TablePartitionMetadata_Type)(0), // 1: bytebase.v1.TablePartitionMetadata.Type
@@ -6689,37 +6206,31 @@ var file_v1_database_service_proto_goTypes = []any{
(*ChangedResourceView)(nil), // 61: bytebase.v1.ChangedResourceView
(*ChangedResourceFunction)(nil), // 62: bytebase.v1.ChangedResourceFunction
(*ChangedResourceProcedure)(nil), // 63: bytebase.v1.ChangedResourceProcedure
- (*ListRevisionsRequest)(nil), // 64: bytebase.v1.ListRevisionsRequest
- (*ListRevisionsResponse)(nil), // 65: bytebase.v1.ListRevisionsResponse
- (*CreateRevisionRequest)(nil), // 66: bytebase.v1.CreateRevisionRequest
- (*GetRevisionRequest)(nil), // 67: bytebase.v1.GetRevisionRequest
- (*DeleteRevisionRequest)(nil), // 68: bytebase.v1.DeleteRevisionRequest
- (*Revision)(nil), // 69: bytebase.v1.Revision
- (*ListChangelogsRequest)(nil), // 70: bytebase.v1.ListChangelogsRequest
- (*ListChangelogsResponse)(nil), // 71: bytebase.v1.ListChangelogsResponse
- (*GetChangelogRequest)(nil), // 72: bytebase.v1.GetChangelogRequest
- (*Changelog)(nil), // 73: bytebase.v1.Changelog
- (*GetSchemaStringRequest)(nil), // 74: bytebase.v1.GetSchemaStringRequest
- (*GetSchemaStringResponse)(nil), // 75: bytebase.v1.GetSchemaStringResponse
- nil, // 76: bytebase.v1.Database.LabelsEntry
- (*fieldmaskpb.FieldMask)(nil), // 77: google.protobuf.FieldMask
- (State)(0), // 78: bytebase.v1.State
- (*timestamppb.Timestamp)(nil), // 79: google.protobuf.Timestamp
- (*InstanceResource)(nil), // 80: bytebase.v1.InstanceResource
- (*Range)(nil), // 81: bytebase.v1.Range
- (*emptypb.Empty)(nil), // 82: google.protobuf.Empty
+ (*ListChangelogsRequest)(nil), // 64: bytebase.v1.ListChangelogsRequest
+ (*ListChangelogsResponse)(nil), // 65: bytebase.v1.ListChangelogsResponse
+ (*GetChangelogRequest)(nil), // 66: bytebase.v1.GetChangelogRequest
+ (*Changelog)(nil), // 67: bytebase.v1.Changelog
+ (*GetSchemaStringRequest)(nil), // 68: bytebase.v1.GetSchemaStringRequest
+ (*GetSchemaStringResponse)(nil), // 69: bytebase.v1.GetSchemaStringResponse
+ nil, // 70: bytebase.v1.Database.LabelsEntry
+ (*fieldmaskpb.FieldMask)(nil), // 71: google.protobuf.FieldMask
+ (State)(0), // 72: bytebase.v1.State
+ (*timestamppb.Timestamp)(nil), // 73: google.protobuf.Timestamp
+ (*InstanceResource)(nil), // 74: bytebase.v1.InstanceResource
+ (*Range)(nil), // 75: bytebase.v1.Range
+ (*emptypb.Empty)(nil), // 76: google.protobuf.Empty
}
var file_v1_database_service_proto_depIdxs = []int32{
26, // 0: bytebase.v1.BatchGetDatabasesResponse.databases:type_name -> bytebase.v1.Database
26, // 1: bytebase.v1.ListDatabasesResponse.databases:type_name -> bytebase.v1.Database
26, // 2: bytebase.v1.UpdateDatabaseRequest.database:type_name -> bytebase.v1.Database
- 77, // 3: bytebase.v1.UpdateDatabaseRequest.update_mask:type_name -> google.protobuf.FieldMask
+ 71, // 3: bytebase.v1.UpdateDatabaseRequest.update_mask:type_name -> google.protobuf.FieldMask
15, // 4: bytebase.v1.BatchUpdateDatabasesRequest.requests:type_name -> bytebase.v1.UpdateDatabaseRequest
26, // 5: bytebase.v1.BatchUpdateDatabasesResponse.databases:type_name -> bytebase.v1.Database
- 78, // 6: bytebase.v1.Database.state:type_name -> bytebase.v1.State
- 79, // 7: bytebase.v1.Database.successful_sync_time:type_name -> google.protobuf.Timestamp
- 76, // 8: bytebase.v1.Database.labels:type_name -> bytebase.v1.Database.LabelsEntry
- 80, // 9: bytebase.v1.Database.instance_resource:type_name -> bytebase.v1.InstanceResource
+ 72, // 6: bytebase.v1.Database.state:type_name -> bytebase.v1.State
+ 73, // 7: bytebase.v1.Database.successful_sync_time:type_name -> google.protobuf.Timestamp
+ 70, // 8: bytebase.v1.Database.labels:type_name -> bytebase.v1.Database.LabelsEntry
+ 74, // 9: bytebase.v1.Database.instance_resource:type_name -> bytebase.v1.InstanceResource
28, // 10: bytebase.v1.DatabaseMetadata.schemas:type_name -> bytebase.v1.SchemaMetadata
49, // 11: bytebase.v1.DatabaseMetadata.extensions:type_name -> bytebase.v1.ExtensionMetadata
34, // 12: bytebase.v1.SchemaMetadata.tables:type_name -> bytebase.v1.TableMetadata
@@ -6760,77 +6271,65 @@ var file_v1_database_service_proto_depIdxs = []int32{
6, // 47: bytebase.v1.StreamMetadata.mode:type_name -> bytebase.v1.StreamMetadata.Mode
56, // 48: bytebase.v1.ListSecretsResponse.secrets:type_name -> bytebase.v1.Secret
56, // 49: bytebase.v1.UpdateSecretRequest.secret:type_name -> bytebase.v1.Secret
- 77, // 50: bytebase.v1.UpdateSecretRequest.update_mask:type_name -> google.protobuf.FieldMask
- 79, // 51: bytebase.v1.Secret.created_time:type_name -> google.protobuf.Timestamp
- 79, // 52: bytebase.v1.Secret.updated_time:type_name -> google.protobuf.Timestamp
+ 71, // 50: bytebase.v1.UpdateSecretRequest.update_mask:type_name -> google.protobuf.FieldMask
+ 73, // 51: bytebase.v1.Secret.created_time:type_name -> google.protobuf.Timestamp
+ 73, // 52: bytebase.v1.Secret.updated_time:type_name -> google.protobuf.Timestamp
58, // 53: bytebase.v1.ChangedResources.databases:type_name -> bytebase.v1.ChangedResourceDatabase
59, // 54: bytebase.v1.ChangedResourceDatabase.schemas:type_name -> bytebase.v1.ChangedResourceSchema
60, // 55: bytebase.v1.ChangedResourceSchema.tables:type_name -> bytebase.v1.ChangedResourceTable
61, // 56: bytebase.v1.ChangedResourceSchema.views:type_name -> bytebase.v1.ChangedResourceView
62, // 57: bytebase.v1.ChangedResourceSchema.functions:type_name -> bytebase.v1.ChangedResourceFunction
63, // 58: bytebase.v1.ChangedResourceSchema.procedures:type_name -> bytebase.v1.ChangedResourceProcedure
- 81, // 59: bytebase.v1.ChangedResourceTable.ranges:type_name -> bytebase.v1.Range
- 81, // 60: bytebase.v1.ChangedResourceView.ranges:type_name -> bytebase.v1.Range
- 81, // 61: bytebase.v1.ChangedResourceFunction.ranges:type_name -> bytebase.v1.Range
- 81, // 62: bytebase.v1.ChangedResourceProcedure.ranges:type_name -> bytebase.v1.Range
- 69, // 63: bytebase.v1.ListRevisionsResponse.revisions:type_name -> bytebase.v1.Revision
- 69, // 64: bytebase.v1.CreateRevisionRequest.revision:type_name -> bytebase.v1.Revision
- 79, // 65: bytebase.v1.Revision.create_time:type_name -> google.protobuf.Timestamp
- 79, // 66: bytebase.v1.Revision.delete_time:type_name -> google.protobuf.Timestamp
- 0, // 67: bytebase.v1.ListChangelogsRequest.view:type_name -> bytebase.v1.ChangelogView
- 73, // 68: bytebase.v1.ListChangelogsResponse.changelogs:type_name -> bytebase.v1.Changelog
- 0, // 69: bytebase.v1.GetChangelogRequest.view:type_name -> bytebase.v1.ChangelogView
- 79, // 70: bytebase.v1.Changelog.create_time:type_name -> google.protobuf.Timestamp
- 7, // 71: bytebase.v1.Changelog.status:type_name -> bytebase.v1.Changelog.Status
- 57, // 72: bytebase.v1.Changelog.changed_resources:type_name -> bytebase.v1.ChangedResources
- 8, // 73: bytebase.v1.Changelog.type:type_name -> bytebase.v1.Changelog.Type
- 9, // 74: bytebase.v1.GetSchemaStringRequest.type:type_name -> bytebase.v1.GetSchemaStringRequest.ObjectType
- 27, // 75: bytebase.v1.GetSchemaStringRequest.metadata:type_name -> bytebase.v1.DatabaseMetadata
- 10, // 76: bytebase.v1.DatabaseService.GetDatabase:input_type -> bytebase.v1.GetDatabaseRequest
- 11, // 77: bytebase.v1.DatabaseService.BatchGetDatabases:input_type -> bytebase.v1.BatchGetDatabasesRequest
- 13, // 78: bytebase.v1.DatabaseService.ListDatabases:input_type -> bytebase.v1.ListDatabasesRequest
- 15, // 79: bytebase.v1.DatabaseService.UpdateDatabase:input_type -> bytebase.v1.UpdateDatabaseRequest
- 16, // 80: bytebase.v1.DatabaseService.BatchUpdateDatabases:input_type -> bytebase.v1.BatchUpdateDatabasesRequest
- 20, // 81: bytebase.v1.DatabaseService.SyncDatabase:input_type -> bytebase.v1.SyncDatabaseRequest
- 18, // 82: bytebase.v1.DatabaseService.BatchSyncDatabases:input_type -> bytebase.v1.BatchSyncDatabasesRequest
- 22, // 83: bytebase.v1.DatabaseService.GetDatabaseMetadata:input_type -> bytebase.v1.GetDatabaseMetadataRequest
- 23, // 84: bytebase.v1.DatabaseService.GetDatabaseSchema:input_type -> bytebase.v1.GetDatabaseSchemaRequest
- 24, // 85: bytebase.v1.DatabaseService.DiffSchema:input_type -> bytebase.v1.DiffSchemaRequest
- 52, // 86: bytebase.v1.DatabaseService.ListSecrets:input_type -> bytebase.v1.ListSecretsRequest
- 54, // 87: bytebase.v1.DatabaseService.UpdateSecret:input_type -> bytebase.v1.UpdateSecretRequest
- 55, // 88: bytebase.v1.DatabaseService.DeleteSecret:input_type -> bytebase.v1.DeleteSecretRequest
- 64, // 89: bytebase.v1.DatabaseService.ListRevisions:input_type -> bytebase.v1.ListRevisionsRequest
- 67, // 90: bytebase.v1.DatabaseService.GetRevision:input_type -> bytebase.v1.GetRevisionRequest
- 66, // 91: bytebase.v1.DatabaseService.CreateRevision:input_type -> bytebase.v1.CreateRevisionRequest
- 68, // 92: bytebase.v1.DatabaseService.DeleteRevision:input_type -> bytebase.v1.DeleteRevisionRequest
- 70, // 93: bytebase.v1.DatabaseService.ListChangelogs:input_type -> bytebase.v1.ListChangelogsRequest
- 72, // 94: bytebase.v1.DatabaseService.GetChangelog:input_type -> bytebase.v1.GetChangelogRequest
- 74, // 95: bytebase.v1.DatabaseService.GetSchemaString:input_type -> bytebase.v1.GetSchemaStringRequest
- 26, // 96: bytebase.v1.DatabaseService.GetDatabase:output_type -> bytebase.v1.Database
- 12, // 97: bytebase.v1.DatabaseService.BatchGetDatabases:output_type -> bytebase.v1.BatchGetDatabasesResponse
- 14, // 98: bytebase.v1.DatabaseService.ListDatabases:output_type -> bytebase.v1.ListDatabasesResponse
- 26, // 99: bytebase.v1.DatabaseService.UpdateDatabase:output_type -> bytebase.v1.Database
- 17, // 100: bytebase.v1.DatabaseService.BatchUpdateDatabases:output_type -> bytebase.v1.BatchUpdateDatabasesResponse
- 21, // 101: bytebase.v1.DatabaseService.SyncDatabase:output_type -> bytebase.v1.SyncDatabaseResponse
- 19, // 102: bytebase.v1.DatabaseService.BatchSyncDatabases:output_type -> bytebase.v1.BatchSyncDatabasesResponse
- 27, // 103: bytebase.v1.DatabaseService.GetDatabaseMetadata:output_type -> bytebase.v1.DatabaseMetadata
- 51, // 104: bytebase.v1.DatabaseService.GetDatabaseSchema:output_type -> bytebase.v1.DatabaseSchema
- 25, // 105: bytebase.v1.DatabaseService.DiffSchema:output_type -> bytebase.v1.DiffSchemaResponse
- 53, // 106: bytebase.v1.DatabaseService.ListSecrets:output_type -> bytebase.v1.ListSecretsResponse
- 56, // 107: bytebase.v1.DatabaseService.UpdateSecret:output_type -> bytebase.v1.Secret
- 82, // 108: bytebase.v1.DatabaseService.DeleteSecret:output_type -> google.protobuf.Empty
- 65, // 109: bytebase.v1.DatabaseService.ListRevisions:output_type -> bytebase.v1.ListRevisionsResponse
- 69, // 110: bytebase.v1.DatabaseService.GetRevision:output_type -> bytebase.v1.Revision
- 69, // 111: bytebase.v1.DatabaseService.CreateRevision:output_type -> bytebase.v1.Revision
- 82, // 112: bytebase.v1.DatabaseService.DeleteRevision:output_type -> google.protobuf.Empty
- 71, // 113: bytebase.v1.DatabaseService.ListChangelogs:output_type -> bytebase.v1.ListChangelogsResponse
- 73, // 114: bytebase.v1.DatabaseService.GetChangelog:output_type -> bytebase.v1.Changelog
- 75, // 115: bytebase.v1.DatabaseService.GetSchemaString:output_type -> bytebase.v1.GetSchemaStringResponse
- 96, // [96:116] is the sub-list for method output_type
- 76, // [76:96] is the sub-list for method input_type
- 76, // [76:76] is the sub-list for extension type_name
- 76, // [76:76] is the sub-list for extension extendee
- 0, // [0:76] is the sub-list for field type_name
+ 75, // 59: bytebase.v1.ChangedResourceTable.ranges:type_name -> bytebase.v1.Range
+ 75, // 60: bytebase.v1.ChangedResourceView.ranges:type_name -> bytebase.v1.Range
+ 75, // 61: bytebase.v1.ChangedResourceFunction.ranges:type_name -> bytebase.v1.Range
+ 75, // 62: bytebase.v1.ChangedResourceProcedure.ranges:type_name -> bytebase.v1.Range
+ 0, // 63: bytebase.v1.ListChangelogsRequest.view:type_name -> bytebase.v1.ChangelogView
+ 67, // 64: bytebase.v1.ListChangelogsResponse.changelogs:type_name -> bytebase.v1.Changelog
+ 0, // 65: bytebase.v1.GetChangelogRequest.view:type_name -> bytebase.v1.ChangelogView
+ 73, // 66: bytebase.v1.Changelog.create_time:type_name -> google.protobuf.Timestamp
+ 7, // 67: bytebase.v1.Changelog.status:type_name -> bytebase.v1.Changelog.Status
+ 57, // 68: bytebase.v1.Changelog.changed_resources:type_name -> bytebase.v1.ChangedResources
+ 8, // 69: bytebase.v1.Changelog.type:type_name -> bytebase.v1.Changelog.Type
+ 9, // 70: bytebase.v1.GetSchemaStringRequest.type:type_name -> bytebase.v1.GetSchemaStringRequest.ObjectType
+ 27, // 71: bytebase.v1.GetSchemaStringRequest.metadata:type_name -> bytebase.v1.DatabaseMetadata
+ 10, // 72: bytebase.v1.DatabaseService.GetDatabase:input_type -> bytebase.v1.GetDatabaseRequest
+ 11, // 73: bytebase.v1.DatabaseService.BatchGetDatabases:input_type -> bytebase.v1.BatchGetDatabasesRequest
+ 13, // 74: bytebase.v1.DatabaseService.ListDatabases:input_type -> bytebase.v1.ListDatabasesRequest
+ 15, // 75: bytebase.v1.DatabaseService.UpdateDatabase:input_type -> bytebase.v1.UpdateDatabaseRequest
+ 16, // 76: bytebase.v1.DatabaseService.BatchUpdateDatabases:input_type -> bytebase.v1.BatchUpdateDatabasesRequest
+ 20, // 77: bytebase.v1.DatabaseService.SyncDatabase:input_type -> bytebase.v1.SyncDatabaseRequest
+ 18, // 78: bytebase.v1.DatabaseService.BatchSyncDatabases:input_type -> bytebase.v1.BatchSyncDatabasesRequest
+ 22, // 79: bytebase.v1.DatabaseService.GetDatabaseMetadata:input_type -> bytebase.v1.GetDatabaseMetadataRequest
+ 23, // 80: bytebase.v1.DatabaseService.GetDatabaseSchema:input_type -> bytebase.v1.GetDatabaseSchemaRequest
+ 24, // 81: bytebase.v1.DatabaseService.DiffSchema:input_type -> bytebase.v1.DiffSchemaRequest
+ 52, // 82: bytebase.v1.DatabaseService.ListSecrets:input_type -> bytebase.v1.ListSecretsRequest
+ 54, // 83: bytebase.v1.DatabaseService.UpdateSecret:input_type -> bytebase.v1.UpdateSecretRequest
+ 55, // 84: bytebase.v1.DatabaseService.DeleteSecret:input_type -> bytebase.v1.DeleteSecretRequest
+ 64, // 85: bytebase.v1.DatabaseService.ListChangelogs:input_type -> bytebase.v1.ListChangelogsRequest
+ 66, // 86: bytebase.v1.DatabaseService.GetChangelog:input_type -> bytebase.v1.GetChangelogRequest
+ 68, // 87: bytebase.v1.DatabaseService.GetSchemaString:input_type -> bytebase.v1.GetSchemaStringRequest
+ 26, // 88: bytebase.v1.DatabaseService.GetDatabase:output_type -> bytebase.v1.Database
+ 12, // 89: bytebase.v1.DatabaseService.BatchGetDatabases:output_type -> bytebase.v1.BatchGetDatabasesResponse
+ 14, // 90: bytebase.v1.DatabaseService.ListDatabases:output_type -> bytebase.v1.ListDatabasesResponse
+ 26, // 91: bytebase.v1.DatabaseService.UpdateDatabase:output_type -> bytebase.v1.Database
+ 17, // 92: bytebase.v1.DatabaseService.BatchUpdateDatabases:output_type -> bytebase.v1.BatchUpdateDatabasesResponse
+ 21, // 93: bytebase.v1.DatabaseService.SyncDatabase:output_type -> bytebase.v1.SyncDatabaseResponse
+ 19, // 94: bytebase.v1.DatabaseService.BatchSyncDatabases:output_type -> bytebase.v1.BatchSyncDatabasesResponse
+ 27, // 95: bytebase.v1.DatabaseService.GetDatabaseMetadata:output_type -> bytebase.v1.DatabaseMetadata
+ 51, // 96: bytebase.v1.DatabaseService.GetDatabaseSchema:output_type -> bytebase.v1.DatabaseSchema
+ 25, // 97: bytebase.v1.DatabaseService.DiffSchema:output_type -> bytebase.v1.DiffSchemaResponse
+ 53, // 98: bytebase.v1.DatabaseService.ListSecrets:output_type -> bytebase.v1.ListSecretsResponse
+ 56, // 99: bytebase.v1.DatabaseService.UpdateSecret:output_type -> bytebase.v1.Secret
+ 76, // 100: bytebase.v1.DatabaseService.DeleteSecret:output_type -> google.protobuf.Empty
+ 65, // 101: bytebase.v1.DatabaseService.ListChangelogs:output_type -> bytebase.v1.ListChangelogsResponse
+ 67, // 102: bytebase.v1.DatabaseService.GetChangelog:output_type -> bytebase.v1.Changelog
+ 69, // 103: bytebase.v1.DatabaseService.GetSchemaString:output_type -> bytebase.v1.GetSchemaStringResponse
+ 88, // [88:104] is the sub-list for method output_type
+ 72, // [72:88] is the sub-list for method input_type
+ 72, // [72:72] is the sub-list for extension type_name
+ 72, // [72:72] is the sub-list for extension extendee
+ 0, // [0:72] is the sub-list for field type_name
}
func init() { file_v1_database_service_proto_init() }
@@ -6856,7 +6355,7 @@ func file_v1_database_service_proto_init() {
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: unsafe.Slice(unsafe.StringData(file_v1_database_service_proto_rawDesc), len(file_v1_database_service_proto_rawDesc)),
NumEnums: 10,
- NumMessages: 67,
+ NumMessages: 61,
NumExtensions: 0,
NumServices: 1,
},
diff --git a/proto/generated-go/v1/database_service.pb.gw.go b/proto/generated-go/v1/database_service.pb.gw.go
index 4890548e93..fd82b78c9a 100644
--- a/proto/generated-go/v1/database_service.pb.gw.go
+++ b/proto/generated-go/v1/database_service.pb.gw.go
@@ -883,173 +883,6 @@ func local_request_DatabaseService_DeleteSecret_0(ctx context.Context, marshaler
return msg, metadata, err
}
-var filter_DatabaseService_ListRevisions_0 = &utilities.DoubleArray{Encoding: map[string]int{"parent": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}}
-
-func request_DatabaseService_ListRevisions_0(ctx context.Context, marshaler runtime.Marshaler, client DatabaseServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
- var (
- protoReq ListRevisionsRequest
- metadata runtime.ServerMetadata
- err error
- )
- io.Copy(io.Discard, req.Body)
- 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_DatabaseService_ListRevisions_0); err != nil {
- return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
- }
- msg, err := client.ListRevisions(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
- return msg, metadata, err
-}
-
-func local_request_DatabaseService_ListRevisions_0(ctx context.Context, marshaler runtime.Marshaler, server DatabaseServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
- var (
- protoReq ListRevisionsRequest
- metadata runtime.ServerMetadata
- err error
- )
- 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_DatabaseService_ListRevisions_0); err != nil {
- return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
- }
- msg, err := server.ListRevisions(ctx, &protoReq)
- return msg, metadata, err
-}
-
-func request_DatabaseService_GetRevision_0(ctx context.Context, marshaler runtime.Marshaler, client DatabaseServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
- var (
- protoReq GetRevisionRequest
- metadata runtime.ServerMetadata
- err error
- )
- io.Copy(io.Discard, req.Body)
- val, ok := pathParams["name"]
- if !ok {
- return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name")
- }
- protoReq.Name, err = runtime.String(val)
- if err != nil {
- return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err)
- }
- msg, err := client.GetRevision(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
- return msg, metadata, err
-}
-
-func local_request_DatabaseService_GetRevision_0(ctx context.Context, marshaler runtime.Marshaler, server DatabaseServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
- var (
- protoReq GetRevisionRequest
- metadata runtime.ServerMetadata
- err error
- )
- val, ok := pathParams["name"]
- if !ok {
- return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name")
- }
- protoReq.Name, err = runtime.String(val)
- if err != nil {
- return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err)
- }
- msg, err := server.GetRevision(ctx, &protoReq)
- return msg, metadata, err
-}
-
-func request_DatabaseService_CreateRevision_0(ctx context.Context, marshaler runtime.Marshaler, client DatabaseServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
- var (
- protoReq CreateRevisionRequest
- metadata runtime.ServerMetadata
- err error
- )
- if err := marshaler.NewDecoder(req.Body).Decode(&protoReq.Revision); err != nil && !errors.Is(err, io.EOF) {
- return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", 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)
- }
- msg, err := client.CreateRevision(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
- return msg, metadata, err
-}
-
-func local_request_DatabaseService_CreateRevision_0(ctx context.Context, marshaler runtime.Marshaler, server DatabaseServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
- var (
- protoReq CreateRevisionRequest
- metadata runtime.ServerMetadata
- err error
- )
- if err := marshaler.NewDecoder(req.Body).Decode(&protoReq.Revision); err != nil && !errors.Is(err, io.EOF) {
- return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", 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)
- }
- msg, err := server.CreateRevision(ctx, &protoReq)
- return msg, metadata, err
-}
-
-func request_DatabaseService_DeleteRevision_0(ctx context.Context, marshaler runtime.Marshaler, client DatabaseServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
- var (
- protoReq DeleteRevisionRequest
- metadata runtime.ServerMetadata
- err error
- )
- io.Copy(io.Discard, req.Body)
- val, ok := pathParams["name"]
- if !ok {
- return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name")
- }
- protoReq.Name, err = runtime.String(val)
- if err != nil {
- return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err)
- }
- msg, err := client.DeleteRevision(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
- return msg, metadata, err
-}
-
-func local_request_DatabaseService_DeleteRevision_0(ctx context.Context, marshaler runtime.Marshaler, server DatabaseServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
- var (
- protoReq DeleteRevisionRequest
- metadata runtime.ServerMetadata
- err error
- )
- val, ok := pathParams["name"]
- if !ok {
- return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name")
- }
- protoReq.Name, err = runtime.String(val)
- if err != nil {
- return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err)
- }
- msg, err := server.DeleteRevision(ctx, &protoReq)
- return msg, metadata, err
-}
-
var filter_DatabaseService_ListChangelogs_0 = &utilities.DoubleArray{Encoding: map[string]int{"parent": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}}
func request_DatabaseService_ListChangelogs_0(ctx context.Context, marshaler runtime.Marshaler, client DatabaseServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
@@ -1549,86 +1382,6 @@ func RegisterDatabaseServiceHandlerServer(ctx context.Context, mux *runtime.Serv
}
forward_DatabaseService_DeleteSecret_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
- mux.Handle(http.MethodGet, pattern_DatabaseService_ListRevisions_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)
- annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/bytebase.v1.DatabaseService/ListRevisions", runtime.WithHTTPPathPattern("/v1/{parent=instances/*/databases/*}/revisions"))
- if err != nil {
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
- return
- }
- resp, md, err := local_request_DatabaseService_ListRevisions_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_DatabaseService_ListRevisions_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
- })
- mux.Handle(http.MethodGet, pattern_DatabaseService_GetRevision_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)
- annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/bytebase.v1.DatabaseService/GetRevision", runtime.WithHTTPPathPattern("/v1/{name=instances/*/databases/*/revisions/*}"))
- if err != nil {
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
- return
- }
- resp, md, err := local_request_DatabaseService_GetRevision_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_DatabaseService_GetRevision_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
- })
- mux.Handle(http.MethodPost, pattern_DatabaseService_CreateRevision_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)
- annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/bytebase.v1.DatabaseService/CreateRevision", runtime.WithHTTPPathPattern("/v1/{parent=instances/*/databases/*}/revisions"))
- if err != nil {
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
- return
- }
- resp, md, err := local_request_DatabaseService_CreateRevision_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_DatabaseService_CreateRevision_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
- })
- mux.Handle(http.MethodDelete, pattern_DatabaseService_DeleteRevision_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)
- annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/bytebase.v1.DatabaseService/DeleteRevision", runtime.WithHTTPPathPattern("/v1/{name=instances/*/databases/*/revisions/*}"))
- if err != nil {
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
- return
- }
- resp, md, err := local_request_DatabaseService_DeleteRevision_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_DatabaseService_DeleteRevision_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
- })
mux.Handle(http.MethodGet, pattern_DatabaseService_ListChangelogs_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
@@ -2018,74 +1771,6 @@ func RegisterDatabaseServiceHandlerClient(ctx context.Context, mux *runtime.Serv
}
forward_DatabaseService_DeleteSecret_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
- mux.Handle(http.MethodGet, pattern_DatabaseService_ListRevisions_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)
- annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/bytebase.v1.DatabaseService/ListRevisions", runtime.WithHTTPPathPattern("/v1/{parent=instances/*/databases/*}/revisions"))
- if err != nil {
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
- return
- }
- resp, md, err := request_DatabaseService_ListRevisions_0(annotatedContext, inboundMarshaler, client, req, pathParams)
- annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
- if err != nil {
- runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
- return
- }
- forward_DatabaseService_ListRevisions_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
- })
- mux.Handle(http.MethodGet, pattern_DatabaseService_GetRevision_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)
- annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/bytebase.v1.DatabaseService/GetRevision", runtime.WithHTTPPathPattern("/v1/{name=instances/*/databases/*/revisions/*}"))
- if err != nil {
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
- return
- }
- resp, md, err := request_DatabaseService_GetRevision_0(annotatedContext, inboundMarshaler, client, req, pathParams)
- annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
- if err != nil {
- runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
- return
- }
- forward_DatabaseService_GetRevision_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
- })
- mux.Handle(http.MethodPost, pattern_DatabaseService_CreateRevision_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)
- annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/bytebase.v1.DatabaseService/CreateRevision", runtime.WithHTTPPathPattern("/v1/{parent=instances/*/databases/*}/revisions"))
- if err != nil {
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
- return
- }
- resp, md, err := request_DatabaseService_CreateRevision_0(annotatedContext, inboundMarshaler, client, req, pathParams)
- annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
- if err != nil {
- runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
- return
- }
- forward_DatabaseService_CreateRevision_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
- })
- mux.Handle(http.MethodDelete, pattern_DatabaseService_DeleteRevision_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)
- annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/bytebase.v1.DatabaseService/DeleteRevision", runtime.WithHTTPPathPattern("/v1/{name=instances/*/databases/*/revisions/*}"))
- if err != nil {
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
- return
- }
- resp, md, err := request_DatabaseService_DeleteRevision_0(annotatedContext, inboundMarshaler, client, req, pathParams)
- annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
- if err != nil {
- runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
- return
- }
- forward_DatabaseService_DeleteRevision_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
- })
mux.Handle(http.MethodGet, pattern_DatabaseService_ListChangelogs_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
@@ -2158,10 +1843,6 @@ var (
pattern_DatabaseService_ListSecrets_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 2, 2, 1, 0, 4, 4, 5, 3, 2, 4}, []string{"v1", "instances", "databases", "parent", "secrets"}, ""))
pattern_DatabaseService_UpdateSecret_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 2, 2, 1, 0, 2, 3, 1, 0, 4, 6, 5, 4}, []string{"v1", "instances", "databases", "secrets", "secret.name"}, ""))
pattern_DatabaseService_DeleteSecret_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 2, 2, 1, 0, 2, 3, 1, 0, 4, 6, 5, 4}, []string{"v1", "instances", "databases", "secrets", "name"}, ""))
- pattern_DatabaseService_ListRevisions_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 2, 2, 1, 0, 4, 4, 5, 3, 2, 4}, []string{"v1", "instances", "databases", "parent", "revisions"}, ""))
- pattern_DatabaseService_GetRevision_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 2, 2, 1, 0, 2, 3, 1, 0, 4, 6, 5, 4}, []string{"v1", "instances", "databases", "revisions", "name"}, ""))
- pattern_DatabaseService_CreateRevision_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 2, 2, 1, 0, 4, 4, 5, 3, 2, 4}, []string{"v1", "instances", "databases", "parent", "revisions"}, ""))
- pattern_DatabaseService_DeleteRevision_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 2, 2, 1, 0, 2, 3, 1, 0, 4, 6, 5, 4}, []string{"v1", "instances", "databases", "revisions", "name"}, ""))
pattern_DatabaseService_ListChangelogs_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 2, 2, 1, 0, 4, 4, 5, 3, 2, 4}, []string{"v1", "instances", "databases", "parent", "changelogs"}, ""))
pattern_DatabaseService_GetChangelog_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 2, 2, 1, 0, 2, 3, 1, 0, 4, 6, 5, 4}, []string{"v1", "instances", "databases", "changelogs", "name"}, ""))
pattern_DatabaseService_GetSchemaString_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 2, 2, 1, 0, 2, 3, 4, 5, 5, 4}, []string{"v1", "instances", "databases", "schemaString", "name"}, ""))
@@ -2185,10 +1866,6 @@ var (
forward_DatabaseService_ListSecrets_0 = runtime.ForwardResponseMessage
forward_DatabaseService_UpdateSecret_0 = runtime.ForwardResponseMessage
forward_DatabaseService_DeleteSecret_0 = runtime.ForwardResponseMessage
- forward_DatabaseService_ListRevisions_0 = runtime.ForwardResponseMessage
- forward_DatabaseService_GetRevision_0 = runtime.ForwardResponseMessage
- forward_DatabaseService_CreateRevision_0 = runtime.ForwardResponseMessage
- forward_DatabaseService_DeleteRevision_0 = runtime.ForwardResponseMessage
forward_DatabaseService_ListChangelogs_0 = runtime.ForwardResponseMessage
forward_DatabaseService_GetChangelog_0 = runtime.ForwardResponseMessage
forward_DatabaseService_GetSchemaString_0 = runtime.ForwardResponseMessage
diff --git a/proto/generated-go/v1/database_service_grpc.pb.go b/proto/generated-go/v1/database_service_grpc.pb.go
index 263253ddd1..2c612c88e5 100644
--- a/proto/generated-go/v1/database_service_grpc.pb.go
+++ b/proto/generated-go/v1/database_service_grpc.pb.go
@@ -33,10 +33,6 @@ const (
DatabaseService_ListSecrets_FullMethodName = "/bytebase.v1.DatabaseService/ListSecrets"
DatabaseService_UpdateSecret_FullMethodName = "/bytebase.v1.DatabaseService/UpdateSecret"
DatabaseService_DeleteSecret_FullMethodName = "/bytebase.v1.DatabaseService/DeleteSecret"
- DatabaseService_ListRevisions_FullMethodName = "/bytebase.v1.DatabaseService/ListRevisions"
- DatabaseService_GetRevision_FullMethodName = "/bytebase.v1.DatabaseService/GetRevision"
- DatabaseService_CreateRevision_FullMethodName = "/bytebase.v1.DatabaseService/CreateRevision"
- DatabaseService_DeleteRevision_FullMethodName = "/bytebase.v1.DatabaseService/DeleteRevision"
DatabaseService_ListChangelogs_FullMethodName = "/bytebase.v1.DatabaseService/ListChangelogs"
DatabaseService_GetChangelog_FullMethodName = "/bytebase.v1.DatabaseService/GetChangelog"
DatabaseService_GetSchemaString_FullMethodName = "/bytebase.v1.DatabaseService/GetSchemaString"
@@ -59,10 +55,6 @@ type DatabaseServiceClient interface {
ListSecrets(ctx context.Context, in *ListSecretsRequest, opts ...grpc.CallOption) (*ListSecretsResponse, error)
UpdateSecret(ctx context.Context, in *UpdateSecretRequest, opts ...grpc.CallOption) (*Secret, error)
DeleteSecret(ctx context.Context, in *DeleteSecretRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
- ListRevisions(ctx context.Context, in *ListRevisionsRequest, opts ...grpc.CallOption) (*ListRevisionsResponse, error)
- GetRevision(ctx context.Context, in *GetRevisionRequest, opts ...grpc.CallOption) (*Revision, error)
- CreateRevision(ctx context.Context, in *CreateRevisionRequest, opts ...grpc.CallOption) (*Revision, error)
- DeleteRevision(ctx context.Context, in *DeleteRevisionRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
ListChangelogs(ctx context.Context, in *ListChangelogsRequest, opts ...grpc.CallOption) (*ListChangelogsResponse, error)
GetChangelog(ctx context.Context, in *GetChangelogRequest, opts ...grpc.CallOption) (*Changelog, error)
GetSchemaString(ctx context.Context, in *GetSchemaStringRequest, opts ...grpc.CallOption) (*GetSchemaStringResponse, error)
@@ -206,46 +198,6 @@ func (c *databaseServiceClient) DeleteSecret(ctx context.Context, in *DeleteSecr
return out, nil
}
-func (c *databaseServiceClient) ListRevisions(ctx context.Context, in *ListRevisionsRequest, opts ...grpc.CallOption) (*ListRevisionsResponse, error) {
- cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
- out := new(ListRevisionsResponse)
- err := c.cc.Invoke(ctx, DatabaseService_ListRevisions_FullMethodName, in, out, cOpts...)
- if err != nil {
- return nil, err
- }
- return out, nil
-}
-
-func (c *databaseServiceClient) GetRevision(ctx context.Context, in *GetRevisionRequest, opts ...grpc.CallOption) (*Revision, error) {
- cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
- out := new(Revision)
- err := c.cc.Invoke(ctx, DatabaseService_GetRevision_FullMethodName, in, out, cOpts...)
- if err != nil {
- return nil, err
- }
- return out, nil
-}
-
-func (c *databaseServiceClient) CreateRevision(ctx context.Context, in *CreateRevisionRequest, opts ...grpc.CallOption) (*Revision, error) {
- cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
- out := new(Revision)
- err := c.cc.Invoke(ctx, DatabaseService_CreateRevision_FullMethodName, in, out, cOpts...)
- if err != nil {
- return nil, err
- }
- return out, nil
-}
-
-func (c *databaseServiceClient) DeleteRevision(ctx context.Context, in *DeleteRevisionRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
- cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
- out := new(emptypb.Empty)
- err := c.cc.Invoke(ctx, DatabaseService_DeleteRevision_FullMethodName, in, out, cOpts...)
- if err != nil {
- return nil, err
- }
- return out, nil
-}
-
func (c *databaseServiceClient) ListChangelogs(ctx context.Context, in *ListChangelogsRequest, opts ...grpc.CallOption) (*ListChangelogsResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(ListChangelogsResponse)
@@ -293,10 +245,6 @@ type DatabaseServiceServer interface {
ListSecrets(context.Context, *ListSecretsRequest) (*ListSecretsResponse, error)
UpdateSecret(context.Context, *UpdateSecretRequest) (*Secret, error)
DeleteSecret(context.Context, *DeleteSecretRequest) (*emptypb.Empty, error)
- ListRevisions(context.Context, *ListRevisionsRequest) (*ListRevisionsResponse, error)
- GetRevision(context.Context, *GetRevisionRequest) (*Revision, error)
- CreateRevision(context.Context, *CreateRevisionRequest) (*Revision, error)
- DeleteRevision(context.Context, *DeleteRevisionRequest) (*emptypb.Empty, error)
ListChangelogs(context.Context, *ListChangelogsRequest) (*ListChangelogsResponse, error)
GetChangelog(context.Context, *GetChangelogRequest) (*Changelog, error)
GetSchemaString(context.Context, *GetSchemaStringRequest) (*GetSchemaStringResponse, error)
@@ -349,18 +297,6 @@ func (UnimplementedDatabaseServiceServer) UpdateSecret(context.Context, *UpdateS
func (UnimplementedDatabaseServiceServer) DeleteSecret(context.Context, *DeleteSecretRequest) (*emptypb.Empty, error) {
return nil, status.Errorf(codes.Unimplemented, "method DeleteSecret not implemented")
}
-func (UnimplementedDatabaseServiceServer) ListRevisions(context.Context, *ListRevisionsRequest) (*ListRevisionsResponse, error) {
- return nil, status.Errorf(codes.Unimplemented, "method ListRevisions not implemented")
-}
-func (UnimplementedDatabaseServiceServer) GetRevision(context.Context, *GetRevisionRequest) (*Revision, error) {
- return nil, status.Errorf(codes.Unimplemented, "method GetRevision not implemented")
-}
-func (UnimplementedDatabaseServiceServer) CreateRevision(context.Context, *CreateRevisionRequest) (*Revision, error) {
- return nil, status.Errorf(codes.Unimplemented, "method CreateRevision not implemented")
-}
-func (UnimplementedDatabaseServiceServer) DeleteRevision(context.Context, *DeleteRevisionRequest) (*emptypb.Empty, error) {
- return nil, status.Errorf(codes.Unimplemented, "method DeleteRevision not implemented")
-}
func (UnimplementedDatabaseServiceServer) ListChangelogs(context.Context, *ListChangelogsRequest) (*ListChangelogsResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method ListChangelogs not implemented")
}
@@ -625,78 +561,6 @@ func _DatabaseService_DeleteSecret_Handler(srv interface{}, ctx context.Context,
return interceptor(ctx, in, info, handler)
}
-func _DatabaseService_ListRevisions_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
- in := new(ListRevisionsRequest)
- if err := dec(in); err != nil {
- return nil, err
- }
- if interceptor == nil {
- return srv.(DatabaseServiceServer).ListRevisions(ctx, in)
- }
- info := &grpc.UnaryServerInfo{
- Server: srv,
- FullMethod: DatabaseService_ListRevisions_FullMethodName,
- }
- handler := func(ctx context.Context, req interface{}) (interface{}, error) {
- return srv.(DatabaseServiceServer).ListRevisions(ctx, req.(*ListRevisionsRequest))
- }
- return interceptor(ctx, in, info, handler)
-}
-
-func _DatabaseService_GetRevision_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
- in := new(GetRevisionRequest)
- if err := dec(in); err != nil {
- return nil, err
- }
- if interceptor == nil {
- return srv.(DatabaseServiceServer).GetRevision(ctx, in)
- }
- info := &grpc.UnaryServerInfo{
- Server: srv,
- FullMethod: DatabaseService_GetRevision_FullMethodName,
- }
- handler := func(ctx context.Context, req interface{}) (interface{}, error) {
- return srv.(DatabaseServiceServer).GetRevision(ctx, req.(*GetRevisionRequest))
- }
- return interceptor(ctx, in, info, handler)
-}
-
-func _DatabaseService_CreateRevision_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
- in := new(CreateRevisionRequest)
- if err := dec(in); err != nil {
- return nil, err
- }
- if interceptor == nil {
- return srv.(DatabaseServiceServer).CreateRevision(ctx, in)
- }
- info := &grpc.UnaryServerInfo{
- Server: srv,
- FullMethod: DatabaseService_CreateRevision_FullMethodName,
- }
- handler := func(ctx context.Context, req interface{}) (interface{}, error) {
- return srv.(DatabaseServiceServer).CreateRevision(ctx, req.(*CreateRevisionRequest))
- }
- return interceptor(ctx, in, info, handler)
-}
-
-func _DatabaseService_DeleteRevision_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
- in := new(DeleteRevisionRequest)
- if err := dec(in); err != nil {
- return nil, err
- }
- if interceptor == nil {
- return srv.(DatabaseServiceServer).DeleteRevision(ctx, in)
- }
- info := &grpc.UnaryServerInfo{
- Server: srv,
- FullMethod: DatabaseService_DeleteRevision_FullMethodName,
- }
- handler := func(ctx context.Context, req interface{}) (interface{}, error) {
- return srv.(DatabaseServiceServer).DeleteRevision(ctx, req.(*DeleteRevisionRequest))
- }
- return interceptor(ctx, in, info, handler)
-}
-
func _DatabaseService_ListChangelogs_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ListChangelogsRequest)
if err := dec(in); err != nil {
@@ -810,22 +674,6 @@ var DatabaseService_ServiceDesc = grpc.ServiceDesc{
MethodName: "DeleteSecret",
Handler: _DatabaseService_DeleteSecret_Handler,
},
- {
- MethodName: "ListRevisions",
- Handler: _DatabaseService_ListRevisions_Handler,
- },
- {
- MethodName: "GetRevision",
- Handler: _DatabaseService_GetRevision_Handler,
- },
- {
- MethodName: "CreateRevision",
- Handler: _DatabaseService_CreateRevision_Handler,
- },
- {
- MethodName: "DeleteRevision",
- Handler: _DatabaseService_DeleteRevision_Handler,
- },
{
MethodName: "ListChangelogs",
Handler: _DatabaseService_ListChangelogs_Handler,
diff --git a/proto/generated-go/v1/revision_service.pb.go b/proto/generated-go/v1/revision_service.pb.go
new file mode 100644
index 0000000000..7862115688
--- /dev/null
+++ b/proto/generated-go/v1/revision_service.pb.go
@@ -0,0 +1,583 @@
+// Code generated by protoc-gen-go. DO NOT EDIT.
+// versions:
+// protoc-gen-go v1.36.6
+// protoc (unknown)
+// source: v1/revision_service.proto
+
+package v1
+
+import (
+ _ "google.golang.org/genproto/googleapis/api/annotations"
+ protoreflect "google.golang.org/protobuf/reflect/protoreflect"
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+ emptypb "google.golang.org/protobuf/types/known/emptypb"
+ timestamppb "google.golang.org/protobuf/types/known/timestamppb"
+ reflect "reflect"
+ sync "sync"
+ unsafe "unsafe"
+)
+
+const (
+ // Verify that this generated code is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
+ // Verify that runtime/protoimpl is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
+)
+
+type ListRevisionsRequest struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ // The parent of the revisions.
+ // Format: instances/{instance}/databases/{database}
+ Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"`
+ // The maximum number of revisions to return. The service may return fewer
+ // than this value. If unspecified, at most 10 revisions 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 `ListRevisions` call.
+ // Provide this to retrieve the subsequent page.
+ //
+ // When paginating, all other parameters provided to `ListRevisions` 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"`
+ ShowDeleted bool `protobuf:"varint,4,opt,name=show_deleted,json=showDeleted,proto3" json:"show_deleted,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *ListRevisionsRequest) Reset() {
+ *x = ListRevisionsRequest{}
+ mi := &file_v1_revision_service_proto_msgTypes[0]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *ListRevisionsRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ListRevisionsRequest) ProtoMessage() {}
+
+func (x *ListRevisionsRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_v1_revision_service_proto_msgTypes[0]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use ListRevisionsRequest.ProtoReflect.Descriptor instead.
+func (*ListRevisionsRequest) Descriptor() ([]byte, []int) {
+ return file_v1_revision_service_proto_rawDescGZIP(), []int{0}
+}
+
+func (x *ListRevisionsRequest) GetParent() string {
+ if x != nil {
+ return x.Parent
+ }
+ return ""
+}
+
+func (x *ListRevisionsRequest) GetPageSize() int32 {
+ if x != nil {
+ return x.PageSize
+ }
+ return 0
+}
+
+func (x *ListRevisionsRequest) GetPageToken() string {
+ if x != nil {
+ return x.PageToken
+ }
+ return ""
+}
+
+func (x *ListRevisionsRequest) GetShowDeleted() bool {
+ if x != nil {
+ return x.ShowDeleted
+ }
+ return false
+}
+
+type ListRevisionsResponse struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ Revisions []*Revision `protobuf:"bytes,1,rep,name=revisions,proto3" json:"revisions,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"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *ListRevisionsResponse) Reset() {
+ *x = ListRevisionsResponse{}
+ mi := &file_v1_revision_service_proto_msgTypes[1]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *ListRevisionsResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ListRevisionsResponse) ProtoMessage() {}
+
+func (x *ListRevisionsResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_v1_revision_service_proto_msgTypes[1]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use ListRevisionsResponse.ProtoReflect.Descriptor instead.
+func (*ListRevisionsResponse) Descriptor() ([]byte, []int) {
+ return file_v1_revision_service_proto_rawDescGZIP(), []int{1}
+}
+
+func (x *ListRevisionsResponse) GetRevisions() []*Revision {
+ if x != nil {
+ return x.Revisions
+ }
+ return nil
+}
+
+func (x *ListRevisionsResponse) GetNextPageToken() string {
+ if x != nil {
+ return x.NextPageToken
+ }
+ return ""
+}
+
+type CreateRevisionRequest struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ // Format: instances/{instance}/databases/{database}
+ Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"`
+ // The revision to create.
+ Revision *Revision `protobuf:"bytes,2,opt,name=revision,proto3" json:"revision,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *CreateRevisionRequest) Reset() {
+ *x = CreateRevisionRequest{}
+ mi := &file_v1_revision_service_proto_msgTypes[2]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *CreateRevisionRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*CreateRevisionRequest) ProtoMessage() {}
+
+func (x *CreateRevisionRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_v1_revision_service_proto_msgTypes[2]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use CreateRevisionRequest.ProtoReflect.Descriptor instead.
+func (*CreateRevisionRequest) Descriptor() ([]byte, []int) {
+ return file_v1_revision_service_proto_rawDescGZIP(), []int{2}
+}
+
+func (x *CreateRevisionRequest) GetParent() string {
+ if x != nil {
+ return x.Parent
+ }
+ return ""
+}
+
+func (x *CreateRevisionRequest) GetRevision() *Revision {
+ if x != nil {
+ return x.Revision
+ }
+ return nil
+}
+
+type GetRevisionRequest struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ // The name of the revision.
+ // Format: instances/{instance}/databases/{database}/revisions/{revision}
+ Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *GetRevisionRequest) Reset() {
+ *x = GetRevisionRequest{}
+ mi := &file_v1_revision_service_proto_msgTypes[3]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *GetRevisionRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*GetRevisionRequest) ProtoMessage() {}
+
+func (x *GetRevisionRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_v1_revision_service_proto_msgTypes[3]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use GetRevisionRequest.ProtoReflect.Descriptor instead.
+func (*GetRevisionRequest) Descriptor() ([]byte, []int) {
+ return file_v1_revision_service_proto_rawDescGZIP(), []int{3}
+}
+
+func (x *GetRevisionRequest) GetName() string {
+ if x != nil {
+ return x.Name
+ }
+ return ""
+}
+
+type DeleteRevisionRequest struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ // The name of the revision to delete.
+ // Format: instances/{instance}/databases/{database}/revisions/{revision}
+ Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *DeleteRevisionRequest) Reset() {
+ *x = DeleteRevisionRequest{}
+ mi := &file_v1_revision_service_proto_msgTypes[4]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *DeleteRevisionRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*DeleteRevisionRequest) ProtoMessage() {}
+
+func (x *DeleteRevisionRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_v1_revision_service_proto_msgTypes[4]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use DeleteRevisionRequest.ProtoReflect.Descriptor instead.
+func (*DeleteRevisionRequest) Descriptor() ([]byte, []int) {
+ return file_v1_revision_service_proto_rawDescGZIP(), []int{4}
+}
+
+func (x *DeleteRevisionRequest) GetName() string {
+ if x != nil {
+ return x.Name
+ }
+ return ""
+}
+
+type Revision struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ // Format: instances/{instance}/databases/{database}/revisions/{revision}
+ Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
+ // Format: projects/{project}/releases/{release}
+ // Can be empty.
+ Release string `protobuf:"bytes,2,opt,name=release,proto3" json:"release,omitempty"`
+ CreateTime *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=create_time,json=createTime,proto3" json:"create_time,omitempty"`
+ // Format: users/[email protected]
+ // Can be empty.
+ Deleter string `protobuf:"bytes,5,opt,name=deleter,proto3" json:"deleter,omitempty"`
+ // Can be empty.
+ DeleteTime *timestamppb.Timestamp `protobuf:"bytes,6,opt,name=delete_time,json=deleteTime,proto3" json:"delete_time,omitempty"`
+ // Format: projects/{project}/releases/{release}/files/{id}
+ // Can be empty.
+ File string `protobuf:"bytes,7,opt,name=file,proto3" json:"file,omitempty"`
+ Version string `protobuf:"bytes,8,opt,name=version,proto3" json:"version,omitempty"`
+ // The sheet that holds the content.
+ // Format: projects/{project}/sheets/{sheet}
+ Sheet string `protobuf:"bytes,9,opt,name=sheet,proto3" json:"sheet,omitempty"`
+ // The SHA256 hash value of the sheet.
+ SheetSha256 string `protobuf:"bytes,10,opt,name=sheet_sha256,json=sheetSha256,proto3" json:"sheet_sha256,omitempty"`
+ // The statement is used for preview purpose.
+ Statement string `protobuf:"bytes,11,opt,name=statement,proto3" json:"statement,omitempty"`
+ StatementSize int64 `protobuf:"varint,12,opt,name=statement_size,json=statementSize,proto3" json:"statement_size,omitempty"`
+ // The issue associated with the revision.
+ // Can be empty.
+ // Format: projects/{project}/issues/{issue}
+ Issue string `protobuf:"bytes,13,opt,name=issue,proto3" json:"issue,omitempty"`
+ // The task run associated with the revision.
+ // Can be empty.
+ // Format:
+ // projects/{project}/rollouts/{rollout}/stages/{stage}/tasks/{task}/taskRuns/{taskRun}
+ TaskRun string `protobuf:"bytes,14,opt,name=task_run,json=taskRun,proto3" json:"task_run,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *Revision) Reset() {
+ *x = Revision{}
+ mi := &file_v1_revision_service_proto_msgTypes[5]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *Revision) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*Revision) ProtoMessage() {}
+
+func (x *Revision) ProtoReflect() protoreflect.Message {
+ mi := &file_v1_revision_service_proto_msgTypes[5]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use Revision.ProtoReflect.Descriptor instead.
+func (*Revision) Descriptor() ([]byte, []int) {
+ return file_v1_revision_service_proto_rawDescGZIP(), []int{5}
+}
+
+func (x *Revision) GetName() string {
+ if x != nil {
+ return x.Name
+ }
+ return ""
+}
+
+func (x *Revision) GetRelease() string {
+ if x != nil {
+ return x.Release
+ }
+ return ""
+}
+
+func (x *Revision) GetCreateTime() *timestamppb.Timestamp {
+ if x != nil {
+ return x.CreateTime
+ }
+ return nil
+}
+
+func (x *Revision) GetDeleter() string {
+ if x != nil {
+ return x.Deleter
+ }
+ return ""
+}
+
+func (x *Revision) GetDeleteTime() *timestamppb.Timestamp {
+ if x != nil {
+ return x.DeleteTime
+ }
+ return nil
+}
+
+func (x *Revision) GetFile() string {
+ if x != nil {
+ return x.File
+ }
+ return ""
+}
+
+func (x *Revision) GetVersion() string {
+ if x != nil {
+ return x.Version
+ }
+ return ""
+}
+
+func (x *Revision) GetSheet() string {
+ if x != nil {
+ return x.Sheet
+ }
+ return ""
+}
+
+func (x *Revision) GetSheetSha256() string {
+ if x != nil {
+ return x.SheetSha256
+ }
+ return ""
+}
+
+func (x *Revision) GetStatement() string {
+ if x != nil {
+ return x.Statement
+ }
+ return ""
+}
+
+func (x *Revision) GetStatementSize() int64 {
+ if x != nil {
+ return x.StatementSize
+ }
+ return 0
+}
+
+func (x *Revision) GetIssue() string {
+ if x != nil {
+ return x.Issue
+ }
+ return ""
+}
+
+func (x *Revision) GetTaskRun() string {
+ if x != nil {
+ return x.TaskRun
+ }
+ return ""
+}
+
+var File_v1_revision_service_proto protoreflect.FileDescriptor
+
+const file_v1_revision_service_proto_rawDesc = "" +
+ "\n" +
+ "\x19v1/revision_service.proto\x12\vbytebase.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x13v1/annotation.proto\"\xad\x01\n" +
+ "\x14ListRevisionsRequest\x126\n" +
+ "\x06parent\x18\x01 \x01(\tB\x1e\xe2A\x01\x02\xfaA\x17\n" +
+ "\x15bytebase.com/DatabaseR\x06parent\x12\x1b\n" +
+ "\tpage_size\x18\x02 \x01(\x05R\bpageSize\x12\x1d\n" +
+ "\n" +
+ "page_token\x18\x03 \x01(\tR\tpageToken\x12!\n" +
+ "\fshow_deleted\x18\x04 \x01(\bR\vshowDeleted\"t\n" +
+ "\x15ListRevisionsResponse\x123\n" +
+ "\trevisions\x18\x01 \x03(\v2\x15.bytebase.v1.RevisionR\trevisions\x12&\n" +
+ "\x0fnext_page_token\x18\x02 \x01(\tR\rnextPageToken\"\x88\x01\n" +
+ "\x15CreateRevisionRequest\x126\n" +
+ "\x06parent\x18\x01 \x01(\tB\x1e\xe2A\x01\x02\xfaA\x17\n" +
+ "\x15bytebase.com/DatabaseR\x06parent\x127\n" +
+ "\brevision\x18\x02 \x01(\v2\x15.bytebase.v1.RevisionB\x04\xe2A\x01\x02R\brevision\"H\n" +
+ "\x12GetRevisionRequest\x122\n" +
+ "\x04name\x18\x01 \x01(\tB\x1e\xe2A\x01\x02\xfaA\x17\n" +
+ "\x15bytebase.com/RevisionR\x04name\"K\n" +
+ "\x15DeleteRevisionRequest\x122\n" +
+ "\x04name\x18\x01 \x01(\tB\x1e\xe2A\x01\x02\xfaA\x17\n" +
+ "\x15bytebase.com/RevisionR\x04name\"\x8b\x05\n" +
+ "\bRevision\x12\x12\n" +
+ "\x04name\x18\x01 \x01(\tR\x04name\x123\n" +
+ "\arelease\x18\x02 \x01(\tB\x19\xfaA\x16\n" +
+ "\x14bytebase.com/ReleaseR\arelease\x12A\n" +
+ "\vcreate_time\x18\x04 \x01(\v2\x1a.google.protobuf.TimestampB\x04\xe2A\x01\x03R\n" +
+ "createTime\x12\x18\n" +
+ "\adeleter\x18\x05 \x01(\tR\adeleter\x12A\n" +
+ "\vdelete_time\x18\x06 \x01(\v2\x1a.google.protobuf.TimestampB\x04\xe2A\x01\x03R\n" +
+ "deleteTime\x12\x12\n" +
+ "\x04file\x18\a \x01(\tR\x04file\x12\x18\n" +
+ "\aversion\x18\b \x01(\tR\aversion\x12-\n" +
+ "\x05sheet\x18\t \x01(\tB\x17\xfaA\x14\n" +
+ "\x12bytebase.com/SheetR\x05sheet\x12'\n" +
+ "\fsheet_sha256\x18\n" +
+ " \x01(\tB\x04\xe2A\x01\x03R\vsheetSha256\x12\"\n" +
+ "\tstatement\x18\v \x01(\tB\x04\xe2A\x01\x03R\tstatement\x12+\n" +
+ "\x0estatement_size\x18\f \x01(\x03B\x04\xe2A\x01\x03R\rstatementSize\x12-\n" +
+ "\x05issue\x18\r \x01(\tB\x17\xfaA\x14\n" +
+ "\x12bytebase.com/IssueR\x05issue\x124\n" +
+ "\btask_run\x18\x0e \x01(\tB\x19\xfaA\x16\n" +
+ "\x14bytebase.com/TaskRunR\ataskRun:Z\xeaAW\n" +
+ "\x15bytebase.com/Revision\x12>instances/{instance}/databases/{database}/revisions/{revision}2\xb7\x05\n" +
+ "\x0fRevisionService\x12\xb0\x01\n" +
+ "\rListRevisions\x12!.bytebase.v1.ListRevisionsRequest\x1a\".bytebase.v1.ListRevisionsResponse\"X\xdaA\x06parent\x8a\xea0\x11bb.revisions.list\x90\xea0\x01\x82\xd3\xe4\x93\x020\x12./v1/{parent=instances/*/databases/*}/revisions\x12\x9c\x01\n" +
+ "\vGetRevision\x12\x1f.bytebase.v1.GetRevisionRequest\x1a\x15.bytebase.v1.Revision\"U\xdaA\x04name\x8a\xea0\x10bb.revisions.get\x90\xea0\x01\x82\xd3\xe4\x93\x020\x12./v1/{name=instances/*/databases/*/revisions/*}\x12\xa8\x01\n" +
+ "\x0eCreateRevision\x12\".bytebase.v1.CreateRevisionRequest\x1a\x15.bytebase.v1.Revision\"[\x8a\xea0\x13bb.revisions.create\x90\xea0\x01\x82\xd3\xe4\x93\x02::\brevision\"./v1/{parent=instances/*/databases/*}/revisions\x12\xa6\x01\n" +
+ "\x0eDeleteRevision\x12\".bytebase.v1.DeleteRevisionRequest\x1a\x16.google.protobuf.Empty\"X\xdaA\x04name\x8a\xea0\x13bb.revisions.delete\x90\xea0\x01\x82\xd3\xe4\x93\x020*./v1/{name=instances/*/databases/*/revisions/*}B\x11Z\x0fgenerated-go/v1b\x06proto3"
+
+var (
+ file_v1_revision_service_proto_rawDescOnce sync.Once
+ file_v1_revision_service_proto_rawDescData []byte
+)
+
+func file_v1_revision_service_proto_rawDescGZIP() []byte {
+ file_v1_revision_service_proto_rawDescOnce.Do(func() {
+ file_v1_revision_service_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_v1_revision_service_proto_rawDesc), len(file_v1_revision_service_proto_rawDesc)))
+ })
+ return file_v1_revision_service_proto_rawDescData
+}
+
+var file_v1_revision_service_proto_msgTypes = make([]protoimpl.MessageInfo, 6)
+var file_v1_revision_service_proto_goTypes = []any{
+ (*ListRevisionsRequest)(nil), // 0: bytebase.v1.ListRevisionsRequest
+ (*ListRevisionsResponse)(nil), // 1: bytebase.v1.ListRevisionsResponse
+ (*CreateRevisionRequest)(nil), // 2: bytebase.v1.CreateRevisionRequest
+ (*GetRevisionRequest)(nil), // 3: bytebase.v1.GetRevisionRequest
+ (*DeleteRevisionRequest)(nil), // 4: bytebase.v1.DeleteRevisionRequest
+ (*Revision)(nil), // 5: bytebase.v1.Revision
+ (*timestamppb.Timestamp)(nil), // 6: google.protobuf.Timestamp
+ (*emptypb.Empty)(nil), // 7: google.protobuf.Empty
+}
+var file_v1_revision_service_proto_depIdxs = []int32{
+ 5, // 0: bytebase.v1.ListRevisionsResponse.revisions:type_name -> bytebase.v1.Revision
+ 5, // 1: bytebase.v1.CreateRevisionRequest.revision:type_name -> bytebase.v1.Revision
+ 6, // 2: bytebase.v1.Revision.create_time:type_name -> google.protobuf.Timestamp
+ 6, // 3: bytebase.v1.Revision.delete_time:type_name -> google.protobuf.Timestamp
+ 0, // 4: bytebase.v1.RevisionService.ListRevisions:input_type -> bytebase.v1.ListRevisionsRequest
+ 3, // 5: bytebase.v1.RevisionService.GetRevision:input_type -> bytebase.v1.GetRevisionRequest
+ 2, // 6: bytebase.v1.RevisionService.CreateRevision:input_type -> bytebase.v1.CreateRevisionRequest
+ 4, // 7: bytebase.v1.RevisionService.DeleteRevision:input_type -> bytebase.v1.DeleteRevisionRequest
+ 1, // 8: bytebase.v1.RevisionService.ListRevisions:output_type -> bytebase.v1.ListRevisionsResponse
+ 5, // 9: bytebase.v1.RevisionService.GetRevision:output_type -> bytebase.v1.Revision
+ 5, // 10: bytebase.v1.RevisionService.CreateRevision:output_type -> bytebase.v1.Revision
+ 7, // 11: bytebase.v1.RevisionService.DeleteRevision:output_type -> google.protobuf.Empty
+ 8, // [8:12] is the sub-list for method output_type
+ 4, // [4:8] 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_v1_revision_service_proto_init() }
+func file_v1_revision_service_proto_init() {
+ if File_v1_revision_service_proto != nil {
+ return
+ }
+ file_v1_annotation_proto_init()
+ type x struct{}
+ out := protoimpl.TypeBuilder{
+ File: protoimpl.DescBuilder{
+ GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
+ RawDescriptor: unsafe.Slice(unsafe.StringData(file_v1_revision_service_proto_rawDesc), len(file_v1_revision_service_proto_rawDesc)),
+ NumEnums: 0,
+ NumMessages: 6,
+ NumExtensions: 0,
+ NumServices: 1,
+ },
+ GoTypes: file_v1_revision_service_proto_goTypes,
+ DependencyIndexes: file_v1_revision_service_proto_depIdxs,
+ MessageInfos: file_v1_revision_service_proto_msgTypes,
+ }.Build()
+ File_v1_revision_service_proto = out.File
+ file_v1_revision_service_proto_goTypes = nil
+ file_v1_revision_service_proto_depIdxs = nil
+}
diff --git a/proto/generated-go/v1/revision_service.pb.gw.go b/proto/generated-go/v1/revision_service.pb.gw.go
new file mode 100644
index 0000000000..500dffeb5a
--- /dev/null
+++ b/proto/generated-go/v1/revision_service.pb.gw.go
@@ -0,0 +1,414 @@
+// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT.
+// source: v1/revision_service.proto
+
+/*
+Package v1 is a reverse proxy.
+
+It translates gRPC into RESTful JSON APIs.
+*/
+package v1
+
+import (
+ "context"
+ "errors"
+ "io"
+ "net/http"
+
+ "github.com/grpc-ecosystem/grpc-gateway/v2/runtime"
+ "github.com/grpc-ecosystem/grpc-gateway/v2/utilities"
+ "google.golang.org/grpc"
+ "google.golang.org/grpc/codes"
+ "google.golang.org/grpc/grpclog"
+ "google.golang.org/grpc/metadata"
+ "google.golang.org/grpc/status"
+ "google.golang.org/protobuf/proto"
+)
+
+// Suppress "imported and not used" errors
+var (
+ _ codes.Code
+ _ io.Reader
+ _ status.Status
+ _ = errors.New
+ _ = runtime.String
+ _ = utilities.NewDoubleArray
+ _ = metadata.Join
+)
+
+var filter_RevisionService_ListRevisions_0 = &utilities.DoubleArray{Encoding: map[string]int{"parent": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}}
+
+func request_RevisionService_ListRevisions_0(ctx context.Context, marshaler runtime.Marshaler, client RevisionServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
+ var (
+ protoReq ListRevisionsRequest
+ metadata runtime.ServerMetadata
+ err error
+ )
+ io.Copy(io.Discard, req.Body)
+ 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_RevisionService_ListRevisions_0); err != nil {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
+ }
+ msg, err := client.ListRevisions(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
+ return msg, metadata, err
+}
+
+func local_request_RevisionService_ListRevisions_0(ctx context.Context, marshaler runtime.Marshaler, server RevisionServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
+ var (
+ protoReq ListRevisionsRequest
+ metadata runtime.ServerMetadata
+ err error
+ )
+ 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_RevisionService_ListRevisions_0); err != nil {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
+ }
+ msg, err := server.ListRevisions(ctx, &protoReq)
+ return msg, metadata, err
+}
+
+func request_RevisionService_GetRevision_0(ctx context.Context, marshaler runtime.Marshaler, client RevisionServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
+ var (
+ protoReq GetRevisionRequest
+ metadata runtime.ServerMetadata
+ err error
+ )
+ io.Copy(io.Discard, req.Body)
+ val, ok := pathParams["name"]
+ if !ok {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name")
+ }
+ protoReq.Name, err = runtime.String(val)
+ if err != nil {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err)
+ }
+ msg, err := client.GetRevision(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
+ return msg, metadata, err
+}
+
+func local_request_RevisionService_GetRevision_0(ctx context.Context, marshaler runtime.Marshaler, server RevisionServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
+ var (
+ protoReq GetRevisionRequest
+ metadata runtime.ServerMetadata
+ err error
+ )
+ val, ok := pathParams["name"]
+ if !ok {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name")
+ }
+ protoReq.Name, err = runtime.String(val)
+ if err != nil {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err)
+ }
+ msg, err := server.GetRevision(ctx, &protoReq)
+ return msg, metadata, err
+}
+
+func request_RevisionService_CreateRevision_0(ctx context.Context, marshaler runtime.Marshaler, client RevisionServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
+ var (
+ protoReq CreateRevisionRequest
+ metadata runtime.ServerMetadata
+ err error
+ )
+ if err := marshaler.NewDecoder(req.Body).Decode(&protoReq.Revision); err != nil && !errors.Is(err, io.EOF) {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", 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)
+ }
+ msg, err := client.CreateRevision(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
+ return msg, metadata, err
+}
+
+func local_request_RevisionService_CreateRevision_0(ctx context.Context, marshaler runtime.Marshaler, server RevisionServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
+ var (
+ protoReq CreateRevisionRequest
+ metadata runtime.ServerMetadata
+ err error
+ )
+ if err := marshaler.NewDecoder(req.Body).Decode(&protoReq.Revision); err != nil && !errors.Is(err, io.EOF) {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", 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)
+ }
+ msg, err := server.CreateRevision(ctx, &protoReq)
+ return msg, metadata, err
+}
+
+func request_RevisionService_DeleteRevision_0(ctx context.Context, marshaler runtime.Marshaler, client RevisionServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
+ var (
+ protoReq DeleteRevisionRequest
+ metadata runtime.ServerMetadata
+ err error
+ )
+ io.Copy(io.Discard, req.Body)
+ val, ok := pathParams["name"]
+ if !ok {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name")
+ }
+ protoReq.Name, err = runtime.String(val)
+ if err != nil {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err)
+ }
+ msg, err := client.DeleteRevision(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
+ return msg, metadata, err
+}
+
+func local_request_RevisionService_DeleteRevision_0(ctx context.Context, marshaler runtime.Marshaler, server RevisionServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
+ var (
+ protoReq DeleteRevisionRequest
+ metadata runtime.ServerMetadata
+ err error
+ )
+ val, ok := pathParams["name"]
+ if !ok {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name")
+ }
+ protoReq.Name, err = runtime.String(val)
+ if err != nil {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err)
+ }
+ msg, err := server.DeleteRevision(ctx, &protoReq)
+ return msg, metadata, err
+}
+
+// RegisterRevisionServiceHandlerServer registers the http handlers for service RevisionService to "mux".
+// UnaryRPC :call RevisionServiceServer directly.
+// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906.
+// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterRevisionServiceHandlerFromEndpoint instead.
+// GRPC interceptors will not work for this type of registration. To use interceptors, you must use the "runtime.WithMiddlewares" option in the "runtime.NewServeMux" call.
+func RegisterRevisionServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server RevisionServiceServer) error {
+ mux.Handle(http.MethodGet, pattern_RevisionService_ListRevisions_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)
+ annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/bytebase.v1.RevisionService/ListRevisions", runtime.WithHTTPPathPattern("/v1/{parent=instances/*/databases/*}/revisions"))
+ if err != nil {
+ runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ return
+ }
+ resp, md, err := local_request_RevisionService_ListRevisions_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_RevisionService_ListRevisions_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+ })
+ mux.Handle(http.MethodGet, pattern_RevisionService_GetRevision_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)
+ annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/bytebase.v1.RevisionService/GetRevision", runtime.WithHTTPPathPattern("/v1/{name=instances/*/databases/*/revisions/*}"))
+ if err != nil {
+ runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ return
+ }
+ resp, md, err := local_request_RevisionService_GetRevision_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_RevisionService_GetRevision_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+ })
+ mux.Handle(http.MethodPost, pattern_RevisionService_CreateRevision_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)
+ annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/bytebase.v1.RevisionService/CreateRevision", runtime.WithHTTPPathPattern("/v1/{parent=instances/*/databases/*}/revisions"))
+ if err != nil {
+ runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ return
+ }
+ resp, md, err := local_request_RevisionService_CreateRevision_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_RevisionService_CreateRevision_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+ })
+ mux.Handle(http.MethodDelete, pattern_RevisionService_DeleteRevision_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)
+ annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/bytebase.v1.RevisionService/DeleteRevision", runtime.WithHTTPPathPattern("/v1/{name=instances/*/databases/*/revisions/*}"))
+ if err != nil {
+ runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ return
+ }
+ resp, md, err := local_request_RevisionService_DeleteRevision_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_RevisionService_DeleteRevision_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+ })
+
+ return nil
+}
+
+// RegisterRevisionServiceHandlerFromEndpoint is same as RegisterRevisionServiceHandler but
+// automatically dials to "endpoint" and closes the connection when "ctx" gets done.
+func RegisterRevisionServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) {
+ conn, err := grpc.NewClient(endpoint, opts...)
+ if err != nil {
+ return err
+ }
+ defer func() {
+ if err != nil {
+ if cerr := conn.Close(); cerr != nil {
+ grpclog.Errorf("Failed to close conn to %s: %v", endpoint, cerr)
+ }
+ return
+ }
+ go func() {
+ <-ctx.Done()
+ if cerr := conn.Close(); cerr != nil {
+ grpclog.Errorf("Failed to close conn to %s: %v", endpoint, cerr)
+ }
+ }()
+ }()
+ return RegisterRevisionServiceHandler(ctx, mux, conn)
+}
+
+// RegisterRevisionServiceHandler registers the http handlers for service RevisionService to "mux".
+// The handlers forward requests to the grpc endpoint over "conn".
+func RegisterRevisionServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error {
+ return RegisterRevisionServiceHandlerClient(ctx, mux, NewRevisionServiceClient(conn))
+}
+
+// RegisterRevisionServiceHandlerClient registers the http handlers for service RevisionService
+// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "RevisionServiceClient".
+// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "RevisionServiceClient"
+// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in
+// "RevisionServiceClient" to call the correct interceptors. This client ignores the HTTP middlewares.
+func RegisterRevisionServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client RevisionServiceClient) error {
+ mux.Handle(http.MethodGet, pattern_RevisionService_ListRevisions_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)
+ annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/bytebase.v1.RevisionService/ListRevisions", runtime.WithHTTPPathPattern("/v1/{parent=instances/*/databases/*}/revisions"))
+ if err != nil {
+ runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ return
+ }
+ resp, md, err := request_RevisionService_ListRevisions_0(annotatedContext, inboundMarshaler, client, req, pathParams)
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
+ if err != nil {
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
+ return
+ }
+ forward_RevisionService_ListRevisions_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+ })
+ mux.Handle(http.MethodGet, pattern_RevisionService_GetRevision_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)
+ annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/bytebase.v1.RevisionService/GetRevision", runtime.WithHTTPPathPattern("/v1/{name=instances/*/databases/*/revisions/*}"))
+ if err != nil {
+ runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ return
+ }
+ resp, md, err := request_RevisionService_GetRevision_0(annotatedContext, inboundMarshaler, client, req, pathParams)
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
+ if err != nil {
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
+ return
+ }
+ forward_RevisionService_GetRevision_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+ })
+ mux.Handle(http.MethodPost, pattern_RevisionService_CreateRevision_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)
+ annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/bytebase.v1.RevisionService/CreateRevision", runtime.WithHTTPPathPattern("/v1/{parent=instances/*/databases/*}/revisions"))
+ if err != nil {
+ runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ return
+ }
+ resp, md, err := request_RevisionService_CreateRevision_0(annotatedContext, inboundMarshaler, client, req, pathParams)
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
+ if err != nil {
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
+ return
+ }
+ forward_RevisionService_CreateRevision_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+ })
+ mux.Handle(http.MethodDelete, pattern_RevisionService_DeleteRevision_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)
+ annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/bytebase.v1.RevisionService/DeleteRevision", runtime.WithHTTPPathPattern("/v1/{name=instances/*/databases/*/revisions/*}"))
+ if err != nil {
+ runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ return
+ }
+ resp, md, err := request_RevisionService_DeleteRevision_0(annotatedContext, inboundMarshaler, client, req, pathParams)
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
+ if err != nil {
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
+ return
+ }
+ forward_RevisionService_DeleteRevision_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+ })
+ return nil
+}
+
+var (
+ pattern_RevisionService_ListRevisions_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 2, 2, 1, 0, 4, 4, 5, 3, 2, 4}, []string{"v1", "instances", "databases", "parent", "revisions"}, ""))
+ pattern_RevisionService_GetRevision_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 2, 2, 1, 0, 2, 3, 1, 0, 4, 6, 5, 4}, []string{"v1", "instances", "databases", "revisions", "name"}, ""))
+ pattern_RevisionService_CreateRevision_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 2, 2, 1, 0, 4, 4, 5, 3, 2, 4}, []string{"v1", "instances", "databases", "parent", "revisions"}, ""))
+ pattern_RevisionService_DeleteRevision_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 2, 2, 1, 0, 2, 3, 1, 0, 4, 6, 5, 4}, []string{"v1", "instances", "databases", "revisions", "name"}, ""))
+)
+
+var (
+ forward_RevisionService_ListRevisions_0 = runtime.ForwardResponseMessage
+ forward_RevisionService_GetRevision_0 = runtime.ForwardResponseMessage
+ forward_RevisionService_CreateRevision_0 = runtime.ForwardResponseMessage
+ forward_RevisionService_DeleteRevision_0 = runtime.ForwardResponseMessage
+)
diff --git a/proto/generated-go/v1/revision_service_grpc.pb.go b/proto/generated-go/v1/revision_service_grpc.pb.go
new file mode 100644
index 0000000000..5b6e38420c
--- /dev/null
+++ b/proto/generated-go/v1/revision_service_grpc.pb.go
@@ -0,0 +1,236 @@
+// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
+// versions:
+// - protoc-gen-go-grpc v1.5.1
+// - protoc (unknown)
+// source: v1/revision_service.proto
+
+package v1
+
+import (
+ context "context"
+ grpc "google.golang.org/grpc"
+ codes "google.golang.org/grpc/codes"
+ status "google.golang.org/grpc/status"
+ emptypb "google.golang.org/protobuf/types/known/emptypb"
+)
+
+// This is a compile-time assertion to ensure that this generated file
+// is compatible with the grpc package it is being compiled against.
+// Requires gRPC-Go v1.64.0 or later.
+const _ = grpc.SupportPackageIsVersion9
+
+const (
+ RevisionService_ListRevisions_FullMethodName = "/bytebase.v1.RevisionService/ListRevisions"
+ RevisionService_GetRevision_FullMethodName = "/bytebase.v1.RevisionService/GetRevision"
+ RevisionService_CreateRevision_FullMethodName = "/bytebase.v1.RevisionService/CreateRevision"
+ RevisionService_DeleteRevision_FullMethodName = "/bytebase.v1.RevisionService/DeleteRevision"
+)
+
+// RevisionServiceClient is the client API for RevisionService service.
+//
+// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
+type RevisionServiceClient interface {
+ ListRevisions(ctx context.Context, in *ListRevisionsRequest, opts ...grpc.CallOption) (*ListRevisionsResponse, error)
+ GetRevision(ctx context.Context, in *GetRevisionRequest, opts ...grpc.CallOption) (*Revision, error)
+ CreateRevision(ctx context.Context, in *CreateRevisionRequest, opts ...grpc.CallOption) (*Revision, error)
+ DeleteRevision(ctx context.Context, in *DeleteRevisionRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
+}
+
+type revisionServiceClient struct {
+ cc grpc.ClientConnInterface
+}
+
+func NewRevisionServiceClient(cc grpc.ClientConnInterface) RevisionServiceClient {
+ return &revisionServiceClient{cc}
+}
+
+func (c *revisionServiceClient) ListRevisions(ctx context.Context, in *ListRevisionsRequest, opts ...grpc.CallOption) (*ListRevisionsResponse, error) {
+ cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
+ out := new(ListRevisionsResponse)
+ err := c.cc.Invoke(ctx, RevisionService_ListRevisions_FullMethodName, in, out, cOpts...)
+ if err != nil {
+ return nil, err
+ }
+ return out, nil
+}
+
+func (c *revisionServiceClient) GetRevision(ctx context.Context, in *GetRevisionRequest, opts ...grpc.CallOption) (*Revision, error) {
+ cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
+ out := new(Revision)
+ err := c.cc.Invoke(ctx, RevisionService_GetRevision_FullMethodName, in, out, cOpts...)
+ if err != nil {
+ return nil, err
+ }
+ return out, nil
+}
+
+func (c *revisionServiceClient) CreateRevision(ctx context.Context, in *CreateRevisionRequest, opts ...grpc.CallOption) (*Revision, error) {
+ cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
+ out := new(Revision)
+ err := c.cc.Invoke(ctx, RevisionService_CreateRevision_FullMethodName, in, out, cOpts...)
+ if err != nil {
+ return nil, err
+ }
+ return out, nil
+}
+
+func (c *revisionServiceClient) DeleteRevision(ctx context.Context, in *DeleteRevisionRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
+ cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
+ out := new(emptypb.Empty)
+ err := c.cc.Invoke(ctx, RevisionService_DeleteRevision_FullMethodName, in, out, cOpts...)
+ if err != nil {
+ return nil, err
+ }
+ return out, nil
+}
+
+// RevisionServiceServer is the server API for RevisionService service.
+// All implementations must embed UnimplementedRevisionServiceServer
+// for forward compatibility.
+type RevisionServiceServer interface {
+ ListRevisions(context.Context, *ListRevisionsRequest) (*ListRevisionsResponse, error)
+ GetRevision(context.Context, *GetRevisionRequest) (*Revision, error)
+ CreateRevision(context.Context, *CreateRevisionRequest) (*Revision, error)
+ DeleteRevision(context.Context, *DeleteRevisionRequest) (*emptypb.Empty, error)
+ mustEmbedUnimplementedRevisionServiceServer()
+}
+
+// UnimplementedRevisionServiceServer must be embedded to have
+// forward compatible implementations.
+//
+// NOTE: this should be embedded by value instead of pointer to avoid a nil
+// pointer dereference when methods are called.
+type UnimplementedRevisionServiceServer struct{}
+
+func (UnimplementedRevisionServiceServer) ListRevisions(context.Context, *ListRevisionsRequest) (*ListRevisionsResponse, error) {
+ return nil, status.Errorf(codes.Unimplemented, "method ListRevisions not implemented")
+}
+func (UnimplementedRevisionServiceServer) GetRevision(context.Context, *GetRevisionRequest) (*Revision, error) {
+ return nil, status.Errorf(codes.Unimplemented, "method GetRevision not implemented")
+}
+func (UnimplementedRevisionServiceServer) CreateRevision(context.Context, *CreateRevisionRequest) (*Revision, error) {
+ return nil, status.Errorf(codes.Unimplemented, "method CreateRevision not implemented")
+}
+func (UnimplementedRevisionServiceServer) DeleteRevision(context.Context, *DeleteRevisionRequest) (*emptypb.Empty, error) {
+ return nil, status.Errorf(codes.Unimplemented, "method DeleteRevision not implemented")
+}
+func (UnimplementedRevisionServiceServer) mustEmbedUnimplementedRevisionServiceServer() {}
+func (UnimplementedRevisionServiceServer) testEmbeddedByValue() {}
+
+// UnsafeRevisionServiceServer may be embedded to opt out of forward compatibility for this service.
+// Use of this interface is not recommended, as added methods to RevisionServiceServer will
+// result in compilation errors.
+type UnsafeRevisionServiceServer interface {
+ mustEmbedUnimplementedRevisionServiceServer()
+}
+
+func RegisterRevisionServiceServer(s grpc.ServiceRegistrar, srv RevisionServiceServer) {
+ // If the following call pancis, it indicates UnimplementedRevisionServiceServer was
+ // embedded by pointer and is nil. This will cause panics if an
+ // unimplemented method is ever invoked, so we test this at initialization
+ // time to prevent it from happening at runtime later due to I/O.
+ if t, ok := srv.(interface{ testEmbeddedByValue() }); ok {
+ t.testEmbeddedByValue()
+ }
+ s.RegisterService(&RevisionService_ServiceDesc, srv)
+}
+
+func _RevisionService_ListRevisions_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+ in := new(ListRevisionsRequest)
+ if err := dec(in); err != nil {
+ return nil, err
+ }
+ if interceptor == nil {
+ return srv.(RevisionServiceServer).ListRevisions(ctx, in)
+ }
+ info := &grpc.UnaryServerInfo{
+ Server: srv,
+ FullMethod: RevisionService_ListRevisions_FullMethodName,
+ }
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+ return srv.(RevisionServiceServer).ListRevisions(ctx, req.(*ListRevisionsRequest))
+ }
+ return interceptor(ctx, in, info, handler)
+}
+
+func _RevisionService_GetRevision_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+ in := new(GetRevisionRequest)
+ if err := dec(in); err != nil {
+ return nil, err
+ }
+ if interceptor == nil {
+ return srv.(RevisionServiceServer).GetRevision(ctx, in)
+ }
+ info := &grpc.UnaryServerInfo{
+ Server: srv,
+ FullMethod: RevisionService_GetRevision_FullMethodName,
+ }
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+ return srv.(RevisionServiceServer).GetRevision(ctx, req.(*GetRevisionRequest))
+ }
+ return interceptor(ctx, in, info, handler)
+}
+
+func _RevisionService_CreateRevision_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+ in := new(CreateRevisionRequest)
+ if err := dec(in); err != nil {
+ return nil, err
+ }
+ if interceptor == nil {
+ return srv.(RevisionServiceServer).CreateRevision(ctx, in)
+ }
+ info := &grpc.UnaryServerInfo{
+ Server: srv,
+ FullMethod: RevisionService_CreateRevision_FullMethodName,
+ }
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+ return srv.(RevisionServiceServer).CreateRevision(ctx, req.(*CreateRevisionRequest))
+ }
+ return interceptor(ctx, in, info, handler)
+}
+
+func _RevisionService_DeleteRevision_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+ in := new(DeleteRevisionRequest)
+ if err := dec(in); err != nil {
+ return nil, err
+ }
+ if interceptor == nil {
+ return srv.(RevisionServiceServer).DeleteRevision(ctx, in)
+ }
+ info := &grpc.UnaryServerInfo{
+ Server: srv,
+ FullMethod: RevisionService_DeleteRevision_FullMethodName,
+ }
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+ return srv.(RevisionServiceServer).DeleteRevision(ctx, req.(*DeleteRevisionRequest))
+ }
+ return interceptor(ctx, in, info, handler)
+}
+
+// RevisionService_ServiceDesc is the grpc.ServiceDesc for RevisionService service.
+// It's only intended for direct use with grpc.RegisterService,
+// and not to be introspected or modified (even as a copy)
+var RevisionService_ServiceDesc = grpc.ServiceDesc{
+ ServiceName: "bytebase.v1.RevisionService",
+ HandlerType: (*RevisionServiceServer)(nil),
+ Methods: []grpc.MethodDesc{
+ {
+ MethodName: "ListRevisions",
+ Handler: _RevisionService_ListRevisions_Handler,
+ },
+ {
+ MethodName: "GetRevision",
+ Handler: _RevisionService_GetRevision_Handler,
+ },
+ {
+ MethodName: "CreateRevision",
+ Handler: _RevisionService_CreateRevision_Handler,
+ },
+ {
+ MethodName: "DeleteRevision",
+ Handler: _RevisionService_DeleteRevision_Handler,
+ },
+ },
+ Streams: []grpc.StreamDesc{},
+ Metadata: "v1/revision_service.proto",
+}
diff --git a/proto/v1/v1/database_service.proto b/proto/v1/v1/database_service.proto
index 6a588c1c91..68e26fa2a4 100644
--- a/proto/v1/v1/database_service.proto
+++ b/proto/v1/v1/database_service.proto
@@ -135,33 +135,6 @@ service DatabaseService {
option (bytebase.v1.audit) = true;
}
- rpc ListRevisions(ListRevisionsRequest) returns (ListRevisionsResponse) {
- option (google.api.http) = {get: "/v1/{parent=instances/*/databases/*}/revisions"};
- option (google.api.method_signature) = "parent";
- option (bytebase.v1.permission) = "bb.revisions.list";
- option (bytebase.v1.auth_method) = IAM;
- }
- rpc GetRevision(GetRevisionRequest) returns (Revision) {
- option (google.api.http) = {get: "/v1/{name=instances/*/databases/*/revisions/*}"};
- option (google.api.method_signature) = "name";
- option (bytebase.v1.permission) = "bb.revisions.get";
- option (bytebase.v1.auth_method) = IAM;
- }
- rpc CreateRevision(CreateRevisionRequest) returns (Revision) {
- option (google.api.http) = {
- post: "/v1/{parent=instances/*/databases/*}/revisions"
- body: "revision"
- };
- option (bytebase.v1.permission) = "bb.revisions.create";
- option (bytebase.v1.auth_method) = IAM;
- }
- rpc DeleteRevision(DeleteRevisionRequest) returns (google.protobuf.Empty) {
- option (google.api.http) = {delete: "/v1/{name=instances/*/databases/*/revisions/*}"};
- option (google.api.method_signature) = "name";
- option (bytebase.v1.permission) = "bb.revisions.delete";
- option (bytebase.v1.auth_method) = IAM;
- }
-
rpc ListChangelogs(ListChangelogsRequest) returns (ListChangelogsResponse) {
option (google.api.http) = {get: "/v1/{parent=instances/*/databases/*}/changelogs"};
option (google.api.method_signature) = "parent";
@@ -1280,115 +1253,6 @@ message ChangedResourceProcedure {
repeated Range ranges = 2;
}
-message ListRevisionsRequest {
- // The parent of the revisions.
- // Format: instances/{instance}/databases/{database}
- string parent = 1 [
- (google.api.field_behavior) = REQUIRED,
- (google.api.resource_reference) = {type: "bytebase.com/Database"}
- ];
-
- // The maximum number of revisions to return. The service may return fewer
- // than this value. If unspecified, at most 10 revisions 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 `ListRevisions` call.
- // Provide this to retrieve the subsequent page.
- //
- // When paginating, all other parameters provided to `ListRevisions` must
- // match the call that provided the page token.
- string page_token = 3;
-
- bool show_deleted = 4;
-}
-
-message ListRevisionsResponse {
- repeated Revision revisions = 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 CreateRevisionRequest {
- // Format: instances/{instance}/databases/{database}
- string parent = 1 [
- (google.api.field_behavior) = REQUIRED,
- (google.api.resource_reference) = {type: "bytebase.com/Database"}
- ];
-
- // The revision to create.
- Revision revision = 2 [(google.api.field_behavior) = REQUIRED];
-}
-
-message GetRevisionRequest {
- // The name of the revision.
- // Format: instances/{instance}/databases/{database}/revisions/{revision}
- string name = 1 [
- (google.api.field_behavior) = REQUIRED,
- (google.api.resource_reference) = {type: "bytebase.com/Revision"}
- ];
-}
-
-message DeleteRevisionRequest {
- // The name of the revision to delete.
- // Format: instances/{instance}/databases/{database}/revisions/{revision}
- string name = 1 [
- (google.api.field_behavior) = REQUIRED,
- (google.api.resource_reference) = {type: "bytebase.com/Revision"}
- ];
-}
-
-message Revision {
- option (google.api.resource) = {
- type: "bytebase.com/Revision"
- pattern: "instances/{instance}/databases/{database}/revisions/{revision}"
- };
-
- // Format: instances/{instance}/databases/{database}/revisions/{revision}
- string name = 1;
-
- // Format: projects/{project}/releases/{release}
- // Can be empty.
- string release = 2 [(google.api.resource_reference) = {type: "bytebase.com/Release"}];
-
- google.protobuf.Timestamp create_time = 4 [(google.api.field_behavior) = OUTPUT_ONLY];
-
- // Format: users/[email protected]
- // Can be empty.
- string deleter = 5;
-
- // Can be empty.
- google.protobuf.Timestamp delete_time = 6 [(google.api.field_behavior) = OUTPUT_ONLY];
-
- // Format: projects/{project}/releases/{release}/files/{id}
- // Can be empty.
- string file = 7;
-
- string version = 8;
-
- // The sheet that holds the content.
- // Format: projects/{project}/sheets/{sheet}
- string sheet = 9 [(google.api.resource_reference) = {type: "bytebase.com/Sheet"}];
- // The SHA256 hash value of the sheet.
- string sheet_sha256 = 10 [(google.api.field_behavior) = OUTPUT_ONLY];
- // The statement is used for preview purpose.
- string statement = 11 [(google.api.field_behavior) = OUTPUT_ONLY];
- int64 statement_size = 12 [(google.api.field_behavior) = OUTPUT_ONLY];
-
- // The issue associated with the revision.
- // Can be empty.
- // Format: projects/{project}/issues/{issue}
- string issue = 13 [(google.api.resource_reference) = {type: "bytebase.com/Issue"}];
-
- // The task run associated with the revision.
- // Can be empty.
- // Format:
- // projects/{project}/rollouts/{rollout}/stages/{stage}/tasks/{task}/taskRuns/{taskRun}
- string task_run = 14 [(google.api.resource_reference) = {type: "bytebase.com/TaskRun"}];
-}
-
enum ChangelogView {
// The default / unset value.
// The API will default to the BASIC view.
diff --git a/proto/v1/v1/revision_service.proto b/proto/v1/v1/revision_service.proto
new file mode 100644
index 0000000000..8f545b052f
--- /dev/null
+++ b/proto/v1/v1/revision_service.proto
@@ -0,0 +1,151 @@
+syntax = "proto3";
+
+package bytebase.v1;
+
+import "google/api/annotations.proto";
+import "google/api/client.proto";
+import "google/api/field_behavior.proto";
+import "google/api/resource.proto";
+import "google/protobuf/empty.proto";
+import "google/protobuf/timestamp.proto";
+import "v1/annotation.proto";
+
+option go_package = "generated-go/v1";
+
+service RevisionService {
+ rpc ListRevisions(ListRevisionsRequest) returns (ListRevisionsResponse) {
+ option (google.api.http) = {get: "/v1/{parent=instances/*/databases/*}/revisions"};
+ option (google.api.method_signature) = "parent";
+ option (bytebase.v1.permission) = "bb.revisions.list";
+ option (bytebase.v1.auth_method) = IAM;
+ }
+ rpc GetRevision(GetRevisionRequest) returns (Revision) {
+ option (google.api.http) = {get: "/v1/{name=instances/*/databases/*/revisions/*}"};
+ option (google.api.method_signature) = "name";
+ option (bytebase.v1.permission) = "bb.revisions.get";
+ option (bytebase.v1.auth_method) = IAM;
+ }
+ rpc CreateRevision(CreateRevisionRequest) returns (Revision) {
+ option (google.api.http) = {
+ post: "/v1/{parent=instances/*/databases/*}/revisions"
+ body: "revision"
+ };
+ option (bytebase.v1.permission) = "bb.revisions.create";
+ option (bytebase.v1.auth_method) = IAM;
+ }
+ rpc DeleteRevision(DeleteRevisionRequest) returns (google.protobuf.Empty) {
+ option (google.api.http) = {delete: "/v1/{name=instances/*/databases/*/revisions/*}"};
+ option (google.api.method_signature) = "name";
+ option (bytebase.v1.permission) = "bb.revisions.delete";
+ option (bytebase.v1.auth_method) = IAM;
+ }
+}
+
+message ListRevisionsRequest {
+ // The parent of the revisions.
+ // Format: instances/{instance}/databases/{database}
+ string parent = 1 [
+ (google.api.field_behavior) = REQUIRED,
+ (google.api.resource_reference) = {type: "bytebase.com/Database"}
+ ];
+
+ // The maximum number of revisions to return. The service may return fewer
+ // than this value. If unspecified, at most 10 revisions 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 `ListRevisions` call.
+ // Provide this to retrieve the subsequent page.
+ //
+ // When paginating, all other parameters provided to `ListRevisions` must
+ // match the call that provided the page token.
+ string page_token = 3;
+
+ bool show_deleted = 4;
+}
+
+message ListRevisionsResponse {
+ repeated Revision revisions = 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 CreateRevisionRequest {
+ // Format: instances/{instance}/databases/{database}
+ string parent = 1 [
+ (google.api.field_behavior) = REQUIRED,
+ (google.api.resource_reference) = {type: "bytebase.com/Database"}
+ ];
+
+ // The revision to create.
+ Revision revision = 2 [(google.api.field_behavior) = REQUIRED];
+}
+
+message GetRevisionRequest {
+ // The name of the revision.
+ // Format: instances/{instance}/databases/{database}/revisions/{revision}
+ string name = 1 [
+ (google.api.field_behavior) = REQUIRED,
+ (google.api.resource_reference) = {type: "bytebase.com/Revision"}
+ ];
+}
+
+message DeleteRevisionRequest {
+ // The name of the revision to delete.
+ // Format: instances/{instance}/databases/{database}/revisions/{revision}
+ string name = 1 [
+ (google.api.field_behavior) = REQUIRED,
+ (google.api.resource_reference) = {type: "bytebase.com/Revision"}
+ ];
+}
+
+message Revision {
+ option (google.api.resource) = {
+ type: "bytebase.com/Revision"
+ pattern: "instances/{instance}/databases/{database}/revisions/{revision}"
+ };
+
+ // Format: instances/{instance}/databases/{database}/revisions/{revision}
+ string name = 1;
+
+ // Format: projects/{project}/releases/{release}
+ // Can be empty.
+ string release = 2 [(google.api.resource_reference) = {type: "bytebase.com/Release"}];
+
+ google.protobuf.Timestamp create_time = 4 [(google.api.field_behavior) = OUTPUT_ONLY];
+
+ // Format: users/[email protected]
+ // Can be empty.
+ string deleter = 5;
+
+ // Can be empty.
+ google.protobuf.Timestamp delete_time = 6 [(google.api.field_behavior) = OUTPUT_ONLY];
+
+ // Format: projects/{project}/releases/{release}/files/{id}
+ // Can be empty.
+ string file = 7;
+
+ string version = 8;
+
+ // The sheet that holds the content.
+ // Format: projects/{project}/sheets/{sheet}
+ string sheet = 9 [(google.api.resource_reference) = {type: "bytebase.com/Sheet"}];
+ // The SHA256 hash value of the sheet.
+ string sheet_sha256 = 10 [(google.api.field_behavior) = OUTPUT_ONLY];
+ // The statement is used for preview purpose.
+ string statement = 11 [(google.api.field_behavior) = OUTPUT_ONLY];
+ int64 statement_size = 12 [(google.api.field_behavior) = OUTPUT_ONLY];
+
+ // The issue associated with the revision.
+ // Can be empty.
+ // Format: projects/{project}/issues/{issue}
+ string issue = 13 [(google.api.resource_reference) = {type: "bytebase.com/Issue"}];
+
+ // The task run associated with the revision.
+ // Can be empty.
+ // Format:
+ // projects/{project}/rollouts/{rollout}/stages/{stage}/tasks/{task}/taskRuns/{taskRun}
+ string task_run = 14 [(google.api.resource_reference) = {type: "bytebase.com/TaskRun"}];
+}