Skip to content

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

feat: introduce database service proto (#4127)

Danny Xued0773d87226
diff --git a/frontend/src/types/proto/google/protobuf/timestamp.ts b/frontend/src/types/proto/google/protobuf/timestamp.ts
new file mode 100644
index 0000000000..b00bb1b72d
--- /dev/null
+++ b/frontend/src/types/proto/google/protobuf/timestamp.ts
@@ -0,0 +1,216 @@
+/* eslint-disable */
+import Long from "long";
+import _m0 from "protobufjs/minimal";
+
+export const protobufPackage = "google.protobuf";
+
+/**
+ * A Timestamp represents a point in time independent of any time zone or local
+ * calendar, encoded as a count of seconds and fractions of seconds at
+ * nanosecond resolution. The count is relative to an epoch at UTC midnight on
+ * January 1, 1970, in the proleptic Gregorian calendar which extends the
+ * Gregorian calendar backwards to year one.
+ *
+ * All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap
+ * second table is needed for interpretation, using a [24-hour linear
+ * smear](https://developers.google.com/time/smear).
+ *
+ * The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By
+ * restricting to that range, we ensure that we can convert to and from [RFC
+ * 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings.
+ *
+ * # Examples
+ *
+ * Example 1: Compute Timestamp from POSIX `time()`.
+ *
+ * Timestamp timestamp;
+ * timestamp.set_seconds(time(NULL));
+ * timestamp.set_nanos(0);
+ *
+ * Example 2: Compute Timestamp from POSIX `gettimeofday()`.
+ *
+ * struct timeval tv;
+ * gettimeofday(&tv, NULL);
+ *
+ * Timestamp timestamp;
+ * timestamp.set_seconds(tv.tv_sec);
+ * timestamp.set_nanos(tv.tv_usec * 1000);
+ *
+ * Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`.
+ *
+ * FILETIME ft;
+ * GetSystemTimeAsFileTime(&ft);
+ * UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime;
+ *
+ * // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z
+ * // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z.
+ * Timestamp timestamp;
+ * timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL));
+ * timestamp.set_nanos((INT32) ((ticks % 10000000) * 100));
+ *
+ * Example 4: Compute Timestamp from Java `System.currentTimeMillis()`.
+ *
+ * long millis = System.currentTimeMillis();
+ *
+ * Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000)
+ * .setNanos((int) ((millis % 1000) * 1000000)).build();
+ *
+ * Example 5: Compute Timestamp from Java `Instant.now()`.
+ *
+ * Instant now = Instant.now();
+ *
+ * Timestamp timestamp =
+ * Timestamp.newBuilder().setSeconds(now.getEpochSecond())
+ * .setNanos(now.getNano()).build();
+ *
+ * Example 6: Compute Timestamp from current time in Python.
+ *
+ * timestamp = Timestamp()
+ * timestamp.GetCurrentTime()
+ *
+ * # JSON Mapping
+ *
+ * In JSON format, the Timestamp type is encoded as a string in the
+ * [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the
+ * format is "{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z"
+ * where {year} is always expressed using four digits while {month}, {day},
+ * {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional
+ * seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution),
+ * are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone
+ * is required. A proto3 JSON serializer should always use UTC (as indicated by
+ * "Z") when printing the Timestamp type and a proto3 JSON parser should be
+ * able to accept both UTC and other timezones (as indicated by an offset).
+ *
+ * For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past
+ * 01:30 UTC on January 15, 2017.
+ *
+ * In JavaScript, one can convert a Date object to this format using the
+ * standard
+ * [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString)
+ * method. In Python, a standard `datetime.datetime` object can be converted
+ * to this format using
+ * [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with
+ * the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use
+ * the Joda Time's [`ISODateTimeFormat.dateTime()`](
+ * http://www.joda.org/joda-time/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime%2D%2D
+ * ) to obtain a formatter capable of generating timestamps in this format.
+ */
+export interface Timestamp {
+ /**
+ * Represents seconds of UTC time since Unix epoch
+ * 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to
+ * 9999-12-31T23:59:59Z inclusive.
+ */
+ seconds: number;
+ /**
+ * Non-negative fractions of a second at nanosecond resolution. Negative
+ * second values with fractions must still have non-negative nanos values
+ * that count forward in time. Must be from 0 to 999,999,999
+ * inclusive.
+ */
+ nanos: number;
+}
+
+function createBaseTimestamp(): Timestamp {
+ return { seconds: 0, nanos: 0 };
+}
+
+export const Timestamp = {
+ encode(message: Timestamp, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
+ if (message.seconds !== 0) {
+ writer.uint32(8).int64(message.seconds);
+ }
+ if (message.nanos !== 0) {
+ writer.uint32(16).int32(message.nanos);
+ }
+ return writer;
+ },
+
+ decode(input: _m0.Reader | Uint8Array, length?: number): Timestamp {
+ const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
+ let end = length === undefined ? reader.len : reader.pos + length;
+ const message = createBaseTimestamp();
+ while (reader.pos < end) {
+ const tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1:
+ message.seconds = longToNumber(reader.int64() as Long);
+ break;
+ case 2:
+ message.nanos = reader.int32();
+ break;
+ default:
+ reader.skipType(tag & 7);
+ break;
+ }
+ }
+ return message;
+ },
+
+ fromJSON(object: any): Timestamp {
+ return {
+ seconds: isSet(object.seconds) ? Number(object.seconds) : 0,
+ nanos: isSet(object.nanos) ? Number(object.nanos) : 0,
+ };
+ },
+
+ toJSON(message: Timestamp): unknown {
+ const obj: any = {};
+ message.seconds !== undefined && (obj.seconds = Math.round(message.seconds));
+ message.nanos !== undefined && (obj.nanos = Math.round(message.nanos));
+ return obj;
+ },
+
+ fromPartial<I extends Exact<DeepPartial<Timestamp>, I>>(object: I): Timestamp {
+ const message = createBaseTimestamp();
+ message.seconds = object.seconds ?? 0;
+ message.nanos = object.nanos ?? 0;
+ return message;
+ },
+};
+
+declare var self: any | undefined;
+declare var window: any | undefined;
+declare var global: any | undefined;
+var globalThis: any = (() => {
+ if (typeof globalThis !== "undefined") {
+ return globalThis;
+ }
+ if (typeof self !== "undefined") {
+ return self;
+ }
+ if (typeof window !== "undefined") {
+ return window;
+ }
+ if (typeof global !== "undefined") {
+ return global;
+ }
+ throw "Unable to locate global object";
+})();
+
+type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
+
+export type DeepPartial<T> = T extends Builtin ? T
+ : T extends Array<infer U> ? Array<DeepPartial<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>>
+ : T extends {} ? { [K in keyof T]?: DeepPartial<T[K]> }
+ : Partial<T>;
+
+type KeysOfUnion<T> = T extends T ? keyof T : never;
+export type Exact<P, I extends P> = P extends Builtin ? P
+ : P & { [K in keyof P]: Exact<P[K], I[K]> } & { [K in Exclude<keyof I, KeysOfUnion<P>>]: never };
+
+function longToNumber(long: Long): number {
+ if (long.gt(Number.MAX_SAFE_INTEGER)) {
+ throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER");
+ }
+ return long.toNumber();
+}
+
+if (_m0.util.Long !== Long) {
+ _m0.util.Long = Long as any;
+ _m0.configure();
+}
+
+function isSet(value: any): boolean {
+ return value !== null && value !== undefined;
+}
diff --git a/frontend/src/types/proto/v1/auth_service.ts b/frontend/src/types/proto/v1/auth_service.ts
index 887bb9bcd6..2207000c25 100644
--- a/frontend/src/types/proto/v1/auth_service.ts
+++ b/frontend/src/types/proto/v1/auth_service.ts
@@ -125,7 +125,7 @@ export interface ListUsersRequest {
}
export interface ListUsersResponse {
- /** The users from the specified publisher. */
+ /** The users from the specified request. */
users: User[];
/**
* A token, which can be sent as `page_token` to retrieve the next page.
diff --git a/frontend/src/types/proto/v1/database_service.ts b/frontend/src/types/proto/v1/database_service.ts
new file mode 100644
index 0000000000..7c19c57aff
--- /dev/null
+++ b/frontend/src/types/proto/v1/database_service.ts
@@ -0,0 +1,1965 @@
+/* eslint-disable */
+import Long from "long";
+import _m0 from "protobufjs/minimal";
+import { FieldMask } from "../google/protobuf/field_mask";
+import { Timestamp } from "../google/protobuf/timestamp";
+import { StringValue } from "../google/protobuf/wrappers";
+import { State, stateFromJSON, stateToJSON } from "./common";
+
+export const protobufPackage = "bytebase.v1";
+
+export interface GetDatabaseRequest {
+ /**
+ * The name of the database to retrieve.
+ * Format: environments/{environment}/instances/{instance}/databases/{database}
+ */
+ name: string;
+}
+
+export interface ListDatabasesRequest {
+ /**
+ * The parent, which owns this collection of databases.
+ * Format: environments/{environment}/instances/{instance}
+ * Use "environments/-/instances/-" to list all databases from all environments.
+ */
+ parent: string;
+ /**
+ * The maximum number of databases to return. The service may return fewer than
+ * this value.
+ * If unspecified, at most 50 databases will be returned.
+ * The maximum value is 1000; values above 1000 will be coerced to 1000.
+ */
+ pageSize: number;
+ /**
+ * A page token, received from a previous `ListDatabases` call.
+ * Provide this to retrieve the subsequent page.
+ *
+ * When paginating, all other parameters provided to `ListDatabases` must match
+ * the call that provided the page token.
+ */
+ pageToken: string;
+ /**
+ * Filter is used to filter databases returned in the list.
+ * For example, "project = projects/{project}" can be used to list databases in a project.
+ */
+ filter: string;
+}
+
+export interface ListDatabasesResponse {
+ /** The databases from the specified request. */
+ databases: Database[];
+ /**
+ * 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 UpdateDatabaseRequest {
+ /**
+ * The database to update.
+ *
+ * The database's `name` field is used to identify the database to update.
+ * Format: environments/{environment}/instances/{instance}/databases/{database}
+ */
+ database?: Database;
+ /** The list of fields to update. */
+ updateMask?: string[];
+}
+
+export interface BatchUpdateDatabasesRequest {
+ /**
+ * The parent resource shared by all databases being updated.
+ * Format: environments/{environment}/instances/{instance}
+ * If the operation spans parents, a dash (-) may be accepted as a wildcard.
+ * We only support updating the project of databases for now.
+ */
+ parent: string;
+ /**
+ * The request message specifying the resources to update.
+ * A maximum of 1000 databases can be modified in a batch.
+ */
+ requests: UpdateDatabaseRequest[];
+}
+
+export interface BatchUpdateDatabasesResponse {
+ /** Databases updated. */
+ databases: Database[];
+}
+
+export interface GetDatabaseMetadataRequest {
+ /**
+ * The name of the database to retrieve metadata.
+ * Format: environments/{environment}/instances/{instance}/databases/{database}
+ */
+ name: string;
+}
+
+export interface GetDatabaseSchemaRequest {
+ /**
+ * The name of the database to retrieve schema.
+ * Format: environments/{environment}/instances/{instance}/databases/{database}
+ */
+ name: string;
+}
+
+export interface Database {
+ /**
+ * The name of the database.
+ * Format: environments/{environment}/instances/{instance}/databases/{database}
+ * {database} is the database name in the instance.
+ */
+ name: string;
+ /** The existence of a database on latest sync. */
+ syncState: State;
+ /** The latest synchronization time. */
+ successfulSyncTime?: Date;
+ /**
+ * The project for a database.
+ * Format: projects/{project}
+ */
+ project: string;
+ characterSet: string;
+ collation: string;
+ /** The version of database schema. */
+ schemaVersion: string;
+ /** Labels will be used for deployment and policy control. */
+ labels: { [key: string]: string };
+}
+
+export interface Database_LabelsEntry {
+ key: string;
+ value: string;
+}
+
+/** DatabaseMetadata is the metadata for databases. */
+export interface DatabaseMetadata {
+ name: string;
+ /** The schemas is the list of schemas in a database. */
+ schemas: SchemaMetadata[];
+ /** The character_set is the character set of a database. */
+ characterSet: string;
+ /** The collation is the collation of a database. */
+ collation: string;
+ /** The extensions is the list of extensions in a database. */
+ extensions: ExtensionMetadata[];
+}
+
+/**
+ * SchemaMetadata is the metadata for schemas.
+ * This is the concept of schema in Postgres, but it's a no-op for MySQL.
+ */
+export interface SchemaMetadata {
+ /**
+ * The name is the schema name.
+ * It is an empty string for databases without such concept such as MySQL.
+ */
+ name: string;
+ /** The tables is the list of tables in a schema. */
+ tables: TableMetadata[];
+ /** The views is the list of views in a schema. */
+ views: ViewMetadata[];
+}
+
+/** TableMetadata is the metadata for tables. */
+export interface TableMetadata {
+ /** The name is the name of a table. */
+ name: string;
+ /** The columns is the ordered list of columns in a table. */
+ columns: ColumnMetadata[];
+ /** The indexes is the list of indexes in a table. */
+ indexes: IndexMetadata[];
+ /** The engine is the engine of a table. */
+ engine: string;
+ /** The collation is the collation of a table. */
+ collation: string;
+ /** The row_count is the estimated number of rows of a table. */
+ rowCount: number;
+ /** The data_size is the estimated data size of a table. */
+ dataSize: number;
+ /** The index_size is the estimated index size of a table. */
+ indexSize: number;
+ /** The data_free is the estimated free data size of a table. */
+ dataFree: number;
+ /** The create_options is the create option of a table. */
+ createOptions: string;
+ /** The comment is the comment of a table. */
+ comment: string;
+ /** The foreign_keys is the list of foreign keys in a table. */
+ foreignKeys: ForeignKeyMetadata[];
+}
+
+/** ColumnMetadata is the metadata for columns. */
+export interface ColumnMetadata {
+ /** The name is the name of a column. */
+ name: string;
+ /** The position is the position in columns. */
+ position: number;
+ /** The default is the default of a column. Use google.protobuf.StringValue to distinguish between an empty string default value or no default. */
+ default?: string;
+ /** The nullable is the nullable of a column. */
+ nullable: boolean;
+ /** The type is the type of a column. */
+ type: string;
+ /** The character_set is the character_set of a column. */
+ characterSet: string;
+ /** The collation is the collation of a column. */
+ collation: string;
+ /** The comment is the comment of a column. */
+ comment: string;
+}
+
+/** ViewMetadata is the metadata for views. */
+export interface ViewMetadata {
+ /** The name is the name of a view. */
+ name: string;
+ /** The definition is the definition of a view. */
+ definition: string;
+ /** The comment is the comment of a view. */
+ comment: string;
+}
+
+/** IndexMetadata is the metadata for indexes. */
+export interface IndexMetadata {
+ /** The name is the name of an index. */
+ name: string;
+ /**
+ * The expressions are the ordered columns or expressions of an index.
+ * This could refer to a column or an expression.
+ */
+ expressions: string[];
+ /** The type is the type of an index. */
+ type: string;
+ /** The unique is whether the index is unique. */
+ unique: boolean;
+ /** The primary is whether the index is a primary key index. */
+ primary: boolean;
+ /** The visible is whether the index is visible. */
+ visible: boolean;
+ /** The comment is the comment of an index. */
+ comment: string;
+}
+
+/** ExtensionMetadata is the metadata for extensions. */
+export interface ExtensionMetadata {
+ /** The name is the name of an extension. */
+ name: string;
+ /** The schema is the extension that is installed to. But the extension usage is not limited to the schema. */
+ schema: string;
+ /** The version is the version of an extension. */
+ version: string;
+ /** The description is the description of an extension. */
+ description: string;
+}
+
+/** ForeignKeyMetadata is the metadata for foreign keys. */
+export interface ForeignKeyMetadata {
+ /** The name is the name of a foreign key. */
+ name: string;
+ /** The columns are the ordered referencing columns of a foreign key. */
+ columns: string[];
+ /**
+ * The referenced_schema is the referenced schema name of a foreign key.
+ * It is an empty string for databases without such concept such as MySQL.
+ */
+ referencedSchema: string;
+ /** The referenced_table is the referenced table name of a foreign key. */
+ referencedTable: string;
+ /** The referenced_columns are the ordered referenced columns of a foreign key. */
+ referencedColumns: string[];
+ /** The on_delete is the on delete action of a foreign key. */
+ onDelete: string;
+ /** The on_update is the on update action of a foreign key. */
+ onUpdate: string;
+ /**
+ * The match_type is the match type of a foreign key.
+ * The match_type is the PostgreSQL specific field.
+ * It's empty string for other databases.
+ */
+ matchType: string;
+}
+
+/** DatabaseMetadata is the metadata for databases. */
+export interface DatabaseSchema {
+ /** The schema dump from database. */
+ schema: string;
+}
+
+function createBaseGetDatabaseRequest(): GetDatabaseRequest {
+ return { name: "" };
+}
+
+export const GetDatabaseRequest = {
+ encode(message: GetDatabaseRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
+ if (message.name !== "") {
+ writer.uint32(10).string(message.name);
+ }
+ return writer;
+ },
+
+ decode(input: _m0.Reader | Uint8Array, length?: number): GetDatabaseRequest {
+ const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
+ let end = length === undefined ? reader.len : reader.pos + length;
+ const message = createBaseGetDatabaseRequest();
+ while (reader.pos < end) {
+ const tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1:
+ message.name = reader.string();
+ break;
+ default:
+ reader.skipType(tag & 7);
+ break;
+ }
+ }
+ return message;
+ },
+
+ fromJSON(object: any): GetDatabaseRequest {
+ return { name: isSet(object.name) ? String(object.name) : "" };
+ },
+
+ toJSON(message: GetDatabaseRequest): unknown {
+ const obj: any = {};
+ message.name !== undefined && (obj.name = message.name);
+ return obj;
+ },
+
+ fromPartial<I extends Exact<DeepPartial<GetDatabaseRequest>, I>>(object: I): GetDatabaseRequest {
+ const message = createBaseGetDatabaseRequest();
+ message.name = object.name ?? "";
+ return message;
+ },
+};
+
+function createBaseListDatabasesRequest(): ListDatabasesRequest {
+ return { parent: "", pageSize: 0, pageToken: "", filter: "" };
+}
+
+export const ListDatabasesRequest = {
+ encode(message: ListDatabasesRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
+ if (message.parent !== "") {
+ writer.uint32(10).string(message.parent);
+ }
+ if (message.pageSize !== 0) {
+ writer.uint32(16).int32(message.pageSize);
+ }
+ if (message.pageToken !== "") {
+ writer.uint32(26).string(message.pageToken);
+ }
+ if (message.filter !== "") {
+ writer.uint32(34).string(message.filter);
+ }
+ return writer;
+ },
+
+ decode(input: _m0.Reader | Uint8Array, length?: number): ListDatabasesRequest {
+ const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
+ let end = length === undefined ? reader.len : reader.pos + length;
+ const message = createBaseListDatabasesRequest();
+ while (reader.pos < end) {
+ const tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1:
+ message.parent = reader.string();
+ break;
+ case 2:
+ message.pageSize = reader.int32();
+ break;
+ case 3:
+ message.pageToken = reader.string();
+ break;
+ case 4:
+ message.filter = reader.string();
+ break;
+ default:
+ reader.skipType(tag & 7);
+ break;
+ }
+ }
+ return message;
+ },
+
+ fromJSON(object: any): ListDatabasesRequest {
+ return {
+ parent: isSet(object.parent) ? String(object.parent) : "",
+ pageSize: isSet(object.pageSize) ? Number(object.pageSize) : 0,
+ pageToken: isSet(object.pageToken) ? String(object.pageToken) : "",
+ filter: isSet(object.filter) ? String(object.filter) : "",
+ };
+ },
+
+ toJSON(message: ListDatabasesRequest): unknown {
+ const obj: any = {};
+ message.parent !== undefined && (obj.parent = message.parent);
+ message.pageSize !== undefined && (obj.pageSize = Math.round(message.pageSize));
+ message.pageToken !== undefined && (obj.pageToken = message.pageToken);
+ message.filter !== undefined && (obj.filter = message.filter);
+ return obj;
+ },
+
+ fromPartial<I extends Exact<DeepPartial<ListDatabasesRequest>, I>>(object: I): ListDatabasesRequest {
+ const message = createBaseListDatabasesRequest();
+ message.parent = object.parent ?? "";
+ message.pageSize = object.pageSize ?? 0;
+ message.pageToken = object.pageToken ?? "";
+ message.filter = object.filter ?? "";
+ return message;
+ },
+};
+
+function createBaseListDatabasesResponse(): ListDatabasesResponse {
+ return { databases: [], nextPageToken: "" };
+}
+
+export const ListDatabasesResponse = {
+ encode(message: ListDatabasesResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
+ for (const v of message.databases) {
+ Database.encode(v!, writer.uint32(10).fork()).ldelim();
+ }
+ if (message.nextPageToken !== "") {
+ writer.uint32(18).string(message.nextPageToken);
+ }
+ return writer;
+ },
+
+ decode(input: _m0.Reader | Uint8Array, length?: number): ListDatabasesResponse {
+ const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
+ let end = length === undefined ? reader.len : reader.pos + length;
+ const message = createBaseListDatabasesResponse();
+ while (reader.pos < end) {
+ const tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1:
+ message.databases.push(Database.decode(reader, reader.uint32()));
+ break;
+ case 2:
+ message.nextPageToken = reader.string();
+ break;
+ default:
+ reader.skipType(tag & 7);
+ break;
+ }
+ }
+ return message;
+ },
+
+ fromJSON(object: any): ListDatabasesResponse {
+ return {
+ databases: Array.isArray(object?.databases) ? object.databases.map((e: any) => Database.fromJSON(e)) : [],
+ nextPageToken: isSet(object.nextPageToken) ? String(object.nextPageToken) : "",
+ };
+ },
+
+ toJSON(message: ListDatabasesResponse): unknown {
+ const obj: any = {};
+ if (message.databases) {
+ obj.databases = message.databases.map((e) => e ? Database.toJSON(e) : undefined);
+ } else {
+ obj.databases = [];
+ }
+ message.nextPageToken !== undefined && (obj.nextPageToken = message.nextPageToken);
+ return obj;
+ },
+
+ fromPartial<I extends Exact<DeepPartial<ListDatabasesResponse>, I>>(object: I): ListDatabasesResponse {
+ const message = createBaseListDatabasesResponse();
+ message.databases = object.databases?.map((e) => Database.fromPartial(e)) || [];
+ message.nextPageToken = object.nextPageToken ?? "";
+ return message;
+ },
+};
+
+function createBaseUpdateDatabaseRequest(): UpdateDatabaseRequest {
+ return { database: undefined, updateMask: undefined };
+}
+
+export const UpdateDatabaseRequest = {
+ encode(message: UpdateDatabaseRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
+ if (message.database !== undefined) {
+ Database.encode(message.database, writer.uint32(10).fork()).ldelim();
+ }
+ if (message.updateMask !== undefined) {
+ FieldMask.encode(FieldMask.wrap(message.updateMask), writer.uint32(18).fork()).ldelim();
+ }
+ return writer;
+ },
+
+ decode(input: _m0.Reader | Uint8Array, length?: number): UpdateDatabaseRequest {
+ const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
+ let end = length === undefined ? reader.len : reader.pos + length;
+ const message = createBaseUpdateDatabaseRequest();
+ while (reader.pos < end) {
+ const tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1:
+ message.database = Database.decode(reader, reader.uint32());
+ break;
+ case 2:
+ message.updateMask = FieldMask.unwrap(FieldMask.decode(reader, reader.uint32()));
+ break;
+ default:
+ reader.skipType(tag & 7);
+ break;
+ }
+ }
+ return message;
+ },
+
+ fromJSON(object: any): UpdateDatabaseRequest {
+ return {
+ database: isSet(object.database) ? Database.fromJSON(object.database) : undefined,
+ updateMask: isSet(object.updateMask) ? FieldMask.unwrap(FieldMask.fromJSON(object.updateMask)) : undefined,
+ };
+ },
+
+ toJSON(message: UpdateDatabaseRequest): unknown {
+ const obj: any = {};
+ message.database !== undefined && (obj.database = message.database ? Database.toJSON(message.database) : undefined);
+ message.updateMask !== undefined && (obj.updateMask = FieldMask.toJSON(FieldMask.wrap(message.updateMask)));
+ return obj;
+ },
+
+ fromPartial<I extends Exact<DeepPartial<UpdateDatabaseRequest>, I>>(object: I): UpdateDatabaseRequest {
+ const message = createBaseUpdateDatabaseRequest();
+ message.database = (object.database !== undefined && object.database !== null)
+ ? Database.fromPartial(object.database)
+ : undefined;
+ message.updateMask = object.updateMask ?? undefined;
+ return message;
+ },
+};
+
+function createBaseBatchUpdateDatabasesRequest(): BatchUpdateDatabasesRequest {
+ return { parent: "", requests: [] };
+}
+
+export const BatchUpdateDatabasesRequest = {
+ encode(message: BatchUpdateDatabasesRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
+ if (message.parent !== "") {
+ writer.uint32(10).string(message.parent);
+ }
+ for (const v of message.requests) {
+ UpdateDatabaseRequest.encode(v!, writer.uint32(18).fork()).ldelim();
+ }
+ return writer;
+ },
+
+ decode(input: _m0.Reader | Uint8Array, length?: number): BatchUpdateDatabasesRequest {
+ const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
+ let end = length === undefined ? reader.len : reader.pos + length;
+ const message = createBaseBatchUpdateDatabasesRequest();
+ while (reader.pos < end) {
+ const tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1:
+ message.parent = reader.string();
+ break;
+ case 2:
+ message.requests.push(UpdateDatabaseRequest.decode(reader, reader.uint32()));
+ break;
+ default:
+ reader.skipType(tag & 7);
+ break;
+ }
+ }
+ return message;
+ },
+
+ fromJSON(object: any): BatchUpdateDatabasesRequest {
+ return {
+ parent: isSet(object.parent) ? String(object.parent) : "",
+ requests: Array.isArray(object?.requests)
+ ? object.requests.map((e: any) => UpdateDatabaseRequest.fromJSON(e))
+ : [],
+ };
+ },
+
+ toJSON(message: BatchUpdateDatabasesRequest): unknown {
+ const obj: any = {};
+ message.parent !== undefined && (obj.parent = message.parent);
+ if (message.requests) {
+ obj.requests = message.requests.map((e) => e ? UpdateDatabaseRequest.toJSON(e) : undefined);
+ } else {
+ obj.requests = [];
+ }
+ return obj;
+ },
+
+ fromPartial<I extends Exact<DeepPartial<BatchUpdateDatabasesRequest>, I>>(object: I): BatchUpdateDatabasesRequest {
+ const message = createBaseBatchUpdateDatabasesRequest();
+ message.parent = object.parent ?? "";
+ message.requests = object.requests?.map((e) => UpdateDatabaseRequest.fromPartial(e)) || [];
+ return message;
+ },
+};
+
+function createBaseBatchUpdateDatabasesResponse(): BatchUpdateDatabasesResponse {
+ return { databases: [] };
+}
+
+export const BatchUpdateDatabasesResponse = {
+ encode(message: BatchUpdateDatabasesResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
+ for (const v of message.databases) {
+ Database.encode(v!, writer.uint32(10).fork()).ldelim();
+ }
+ return writer;
+ },
+
+ decode(input: _m0.Reader | Uint8Array, length?: number): BatchUpdateDatabasesResponse {
+ const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
+ let end = length === undefined ? reader.len : reader.pos + length;
+ const message = createBaseBatchUpdateDatabasesResponse();
+ while (reader.pos < end) {
+ const tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1:
+ message.databases.push(Database.decode(reader, reader.uint32()));
+ break;
+ default:
+ reader.skipType(tag & 7);
+ break;
+ }
+ }
+ return message;
+ },
+
+ fromJSON(object: any): BatchUpdateDatabasesResponse {
+ return {
+ databases: Array.isArray(object?.databases) ? object.databases.map((e: any) => Database.fromJSON(e)) : [],
+ };
+ },
+
+ toJSON(message: BatchUpdateDatabasesResponse): unknown {
+ const obj: any = {};
+ if (message.databases) {
+ obj.databases = message.databases.map((e) => e ? Database.toJSON(e) : undefined);
+ } else {
+ obj.databases = [];
+ }
+ return obj;
+ },
+
+ fromPartial<I extends Exact<DeepPartial<BatchUpdateDatabasesResponse>, I>>(object: I): BatchUpdateDatabasesResponse {
+ const message = createBaseBatchUpdateDatabasesResponse();
+ message.databases = object.databases?.map((e) => Database.fromPartial(e)) || [];
+ return message;
+ },
+};
+
+function createBaseGetDatabaseMetadataRequest(): GetDatabaseMetadataRequest {
+ return { name: "" };
+}
+
+export const GetDatabaseMetadataRequest = {
+ encode(message: GetDatabaseMetadataRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
+ if (message.name !== "") {
+ writer.uint32(10).string(message.name);
+ }
+ return writer;
+ },
+
+ decode(input: _m0.Reader | Uint8Array, length?: number): GetDatabaseMetadataRequest {
+ const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
+ let end = length === undefined ? reader.len : reader.pos + length;
+ const message = createBaseGetDatabaseMetadataRequest();
+ while (reader.pos < end) {
+ const tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1:
+ message.name = reader.string();
+ break;
+ default:
+ reader.skipType(tag & 7);
+ break;
+ }
+ }
+ return message;
+ },
+
+ fromJSON(object: any): GetDatabaseMetadataRequest {
+ return { name: isSet(object.name) ? String(object.name) : "" };
+ },
+
+ toJSON(message: GetDatabaseMetadataRequest): unknown {
+ const obj: any = {};
+ message.name !== undefined && (obj.name = message.name);
+ return obj;
+ },
+
+ fromPartial<I extends Exact<DeepPartial<GetDatabaseMetadataRequest>, I>>(object: I): GetDatabaseMetadataRequest {
+ const message = createBaseGetDatabaseMetadataRequest();
+ message.name = object.name ?? "";
+ return message;
+ },
+};
+
+function createBaseGetDatabaseSchemaRequest(): GetDatabaseSchemaRequest {
+ return { name: "" };
+}
+
+export const GetDatabaseSchemaRequest = {
+ encode(message: GetDatabaseSchemaRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
+ if (message.name !== "") {
+ writer.uint32(10).string(message.name);
+ }
+ return writer;
+ },
+
+ decode(input: _m0.Reader | Uint8Array, length?: number): GetDatabaseSchemaRequest {
+ const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
+ let end = length === undefined ? reader.len : reader.pos + length;
+ const message = createBaseGetDatabaseSchemaRequest();
+ while (reader.pos < end) {
+ const tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1:
+ message.name = reader.string();
+ break;
+ default:
+ reader.skipType(tag & 7);
+ break;
+ }
+ }
+ return message;
+ },
+
+ fromJSON(object: any): GetDatabaseSchemaRequest {
+ return { name: isSet(object.name) ? String(object.name) : "" };
+ },
+
+ toJSON(message: GetDatabaseSchemaRequest): unknown {
+ const obj: any = {};
+ message.name !== undefined && (obj.name = message.name);
+ return obj;
+ },
+
+ fromPartial<I extends Exact<DeepPartial<GetDatabaseSchemaRequest>, I>>(object: I): GetDatabaseSchemaRequest {
+ const message = createBaseGetDatabaseSchemaRequest();
+ message.name = object.name ?? "";
+ return message;
+ },
+};
+
+function createBaseDatabase(): Database {
+ return {
+ name: "",
+ syncState: 0,
+ successfulSyncTime: undefined,
+ project: "",
+ characterSet: "",
+ collation: "",
+ schemaVersion: "",
+ labels: {},
+ };
+}
+
+export const Database = {
+ encode(message: Database, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
+ if (message.name !== "") {
+ writer.uint32(10).string(message.name);
+ }
+ if (message.syncState !== 0) {
+ writer.uint32(16).int32(message.syncState);
+ }
+ if (message.successfulSyncTime !== undefined) {
+ Timestamp.encode(toTimestamp(message.successfulSyncTime), writer.uint32(26).fork()).ldelim();
+ }
+ if (message.project !== "") {
+ writer.uint32(34).string(message.project);
+ }
+ if (message.characterSet !== "") {
+ writer.uint32(42).string(message.characterSet);
+ }
+ if (message.collation !== "") {
+ writer.uint32(50).string(message.collation);
+ }
+ if (message.schemaVersion !== "") {
+ writer.uint32(58).string(message.schemaVersion);
+ }
+ Object.entries(message.labels).forEach(([key, value]) => {
+ Database_LabelsEntry.encode({ key: key as any, value }, writer.uint32(66).fork()).ldelim();
+ });
+ return writer;
+ },
+
+ decode(input: _m0.Reader | Uint8Array, length?: number): Database {
+ const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
+ let end = length === undefined ? reader.len : reader.pos + length;
+ const message = createBaseDatabase();
+ while (reader.pos < end) {
+ const tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1:
+ message.name = reader.string();
+ break;
+ case 2:
+ message.syncState = reader.int32() as any;
+ break;
+ case 3:
+ message.successfulSyncTime = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
+ break;
+ case 4:
+ message.project = reader.string();
+ break;
+ case 5:
+ message.characterSet = reader.string();
+ break;
+ case 6:
+ message.collation = reader.string();
+ break;
+ case 7:
+ message.schemaVersion = reader.string();
+ break;
+ case 8:
+ const entry8 = Database_LabelsEntry.decode(reader, reader.uint32());
+ if (entry8.value !== undefined) {
+ message.labels[entry8.key] = entry8.value;
+ }
+ break;
+ default:
+ reader.skipType(tag & 7);
+ break;
+ }
+ }
+ return message;
+ },
+
+ fromJSON(object: any): Database {
+ return {
+ name: isSet(object.name) ? String(object.name) : "",
+ syncState: isSet(object.syncState) ? stateFromJSON(object.syncState) : 0,
+ successfulSyncTime: isSet(object.successfulSyncTime) ? fromJsonTimestamp(object.successfulSyncTime) : undefined,
+ project: isSet(object.project) ? String(object.project) : "",
+ characterSet: isSet(object.characterSet) ? String(object.characterSet) : "",
+ collation: isSet(object.collation) ? String(object.collation) : "",
+ schemaVersion: isSet(object.schemaVersion) ? String(object.schemaVersion) : "",
+ labels: isObject(object.labels)
+ ? Object.entries(object.labels).reduce<{ [key: string]: string }>((acc, [key, value]) => {
+ acc[key] = String(value);
+ return acc;
+ }, {})
+ : {},
+ };
+ },
+
+ toJSON(message: Database): unknown {
+ const obj: any = {};
+ message.name !== undefined && (obj.name = message.name);
+ message.syncState !== undefined && (obj.syncState = stateToJSON(message.syncState));
+ message.successfulSyncTime !== undefined && (obj.successfulSyncTime = message.successfulSyncTime.toISOString());
+ message.project !== undefined && (obj.project = message.project);
+ message.characterSet !== undefined && (obj.characterSet = message.characterSet);
+ message.collation !== undefined && (obj.collation = message.collation);
+ message.schemaVersion !== undefined && (obj.schemaVersion = message.schemaVersion);
+ obj.labels = {};
+ if (message.labels) {
+ Object.entries(message.labels).forEach(([k, v]) => {
+ obj.labels[k] = v;
+ });
+ }
+ return obj;
+ },
+
+ fromPartial<I extends Exact<DeepPartial<Database>, I>>(object: I): Database {
+ const message = createBaseDatabase();
+ message.name = object.name ?? "";
+ message.syncState = object.syncState ?? 0;
+ message.successfulSyncTime = object.successfulSyncTime ?? undefined;
+ message.project = object.project ?? "";
+ message.characterSet = object.characterSet ?? "";
+ message.collation = object.collation ?? "";
+ message.schemaVersion = object.schemaVersion ?? "";
+ message.labels = Object.entries(object.labels ?? {}).reduce<{ [key: string]: string }>((acc, [key, value]) => {
+ if (value !== undefined) {
+ acc[key] = String(value);
+ }
+ return acc;
+ }, {});
+ return message;
+ },
+};
+
+function createBaseDatabase_LabelsEntry(): Database_LabelsEntry {
+ return { key: "", value: "" };
+}
+
+export const Database_LabelsEntry = {
+ encode(message: Database_LabelsEntry, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
+ if (message.key !== "") {
+ writer.uint32(10).string(message.key);
+ }
+ if (message.value !== "") {
+ writer.uint32(18).string(message.value);
+ }
+ return writer;
+ },
+
+ decode(input: _m0.Reader | Uint8Array, length?: number): Database_LabelsEntry {
+ const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
+ let end = length === undefined ? reader.len : reader.pos + length;
+ const message = createBaseDatabase_LabelsEntry();
+ while (reader.pos < end) {
+ const tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1:
+ message.key = reader.string();
+ break;
+ case 2:
+ message.value = reader.string();
+ break;
+ default:
+ reader.skipType(tag & 7);
+ break;
+ }
+ }
+ return message;
+ },
+
+ fromJSON(object: any): Database_LabelsEntry {
+ return { key: isSet(object.key) ? String(object.key) : "", value: isSet(object.value) ? String(object.value) : "" };
+ },
+
+ toJSON(message: Database_LabelsEntry): unknown {
+ const obj: any = {};
+ message.key !== undefined && (obj.key = message.key);
+ message.value !== undefined && (obj.value = message.value);
+ return obj;
+ },
+
+ fromPartial<I extends Exact<DeepPartial<Database_LabelsEntry>, I>>(object: I): Database_LabelsEntry {
+ const message = createBaseDatabase_LabelsEntry();
+ message.key = object.key ?? "";
+ message.value = object.value ?? "";
+ return message;
+ },
+};
+
+function createBaseDatabaseMetadata(): DatabaseMetadata {
+ return { name: "", schemas: [], characterSet: "", collation: "", extensions: [] };
+}
+
+export const DatabaseMetadata = {
+ encode(message: DatabaseMetadata, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
+ if (message.name !== "") {
+ writer.uint32(10).string(message.name);
+ }
+ for (const v of message.schemas) {
+ SchemaMetadata.encode(v!, writer.uint32(18).fork()).ldelim();
+ }
+ if (message.characterSet !== "") {
+ writer.uint32(26).string(message.characterSet);
+ }
+ if (message.collation !== "") {
+ writer.uint32(34).string(message.collation);
+ }
+ for (const v of message.extensions) {
+ ExtensionMetadata.encode(v!, writer.uint32(42).fork()).ldelim();
+ }
+ return writer;
+ },
+
+ decode(input: _m0.Reader | Uint8Array, length?: number): DatabaseMetadata {
+ const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
+ let end = length === undefined ? reader.len : reader.pos + length;
+ const message = createBaseDatabaseMetadata();
+ while (reader.pos < end) {
+ const tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1:
+ message.name = reader.string();
+ break;
+ case 2:
+ message.schemas.push(SchemaMetadata.decode(reader, reader.uint32()));
+ break;
+ case 3:
+ message.characterSet = reader.string();
+ break;
+ case 4:
+ message.collation = reader.string();
+ break;
+ case 5:
+ message.extensions.push(ExtensionMetadata.decode(reader, reader.uint32()));
+ break;
+ default:
+ reader.skipType(tag & 7);
+ break;
+ }
+ }
+ return message;
+ },
+
+ fromJSON(object: any): DatabaseMetadata {
+ return {
+ name: isSet(object.name) ? String(object.name) : "",
+ schemas: Array.isArray(object?.schemas) ? object.schemas.map((e: any) => SchemaMetadata.fromJSON(e)) : [],
+ characterSet: isSet(object.characterSet) ? String(object.characterSet) : "",
+ collation: isSet(object.collation) ? String(object.collation) : "",
+ extensions: Array.isArray(object?.extensions)
+ ? object.extensions.map((e: any) => ExtensionMetadata.fromJSON(e))
+ : [],
+ };
+ },
+
+ toJSON(message: DatabaseMetadata): unknown {
+ const obj: any = {};
+ message.name !== undefined && (obj.name = message.name);
+ if (message.schemas) {
+ obj.schemas = message.schemas.map((e) => e ? SchemaMetadata.toJSON(e) : undefined);
+ } else {
+ obj.schemas = [];
+ }
+ message.characterSet !== undefined && (obj.characterSet = message.characterSet);
+ message.collation !== undefined && (obj.collation = message.collation);
+ if (message.extensions) {
+ obj.extensions = message.extensions.map((e) => e ? ExtensionMetadata.toJSON(e) : undefined);
+ } else {
+ obj.extensions = [];
+ }
+ return obj;
+ },
+
+ fromPartial<I extends Exact<DeepPartial<DatabaseMetadata>, I>>(object: I): DatabaseMetadata {
+ const message = createBaseDatabaseMetadata();
+ message.name = object.name ?? "";
+ message.schemas = object.schemas?.map((e) => SchemaMetadata.fromPartial(e)) || [];
+ message.characterSet = object.characterSet ?? "";
+ message.collation = object.collation ?? "";
+ message.extensions = object.extensions?.map((e) => ExtensionMetadata.fromPartial(e)) || [];
+ return message;
+ },
+};
+
+function createBaseSchemaMetadata(): SchemaMetadata {
+ return { name: "", tables: [], views: [] };
+}
+
+export const SchemaMetadata = {
+ encode(message: SchemaMetadata, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
+ if (message.name !== "") {
+ writer.uint32(10).string(message.name);
+ }
+ for (const v of message.tables) {
+ TableMetadata.encode(v!, writer.uint32(18).fork()).ldelim();
+ }
+ for (const v of message.views) {
+ ViewMetadata.encode(v!, writer.uint32(26).fork()).ldelim();
+ }
+ return writer;
+ },
+
+ decode(input: _m0.Reader | Uint8Array, length?: number): SchemaMetadata {
+ const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
+ let end = length === undefined ? reader.len : reader.pos + length;
+ const message = createBaseSchemaMetadata();
+ while (reader.pos < end) {
+ const tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1:
+ message.name = reader.string();
+ break;
+ case 2:
+ message.tables.push(TableMetadata.decode(reader, reader.uint32()));
+ break;
+ case 3:
+ message.views.push(ViewMetadata.decode(reader, reader.uint32()));
+ break;
+ default:
+ reader.skipType(tag & 7);
+ break;
+ }
+ }
+ return message;
+ },
+
+ fromJSON(object: any): SchemaMetadata {
+ return {
+ name: isSet(object.name) ? String(object.name) : "",
+ tables: Array.isArray(object?.tables) ? object.tables.map((e: any) => TableMetadata.fromJSON(e)) : [],
+ views: Array.isArray(object?.views) ? object.views.map((e: any) => ViewMetadata.fromJSON(e)) : [],
+ };
+ },
+
+ toJSON(message: SchemaMetadata): unknown {
+ const obj: any = {};
+ message.name !== undefined && (obj.name = message.name);
+ if (message.tables) {
+ obj.tables = message.tables.map((e) => e ? TableMetadata.toJSON(e) : undefined);
+ } else {
+ obj.tables = [];
+ }
+ if (message.views) {
+ obj.views = message.views.map((e) => e ? ViewMetadata.toJSON(e) : undefined);
+ } else {
+ obj.views = [];
+ }
+ return obj;
+ },
+
+ fromPartial<I extends Exact<DeepPartial<SchemaMetadata>, I>>(object: I): SchemaMetadata {
+ const message = createBaseSchemaMetadata();
+ message.name = object.name ?? "";
+ message.tables = object.tables?.map((e) => TableMetadata.fromPartial(e)) || [];
+ message.views = object.views?.map((e) => ViewMetadata.fromPartial(e)) || [];
+ return message;
+ },
+};
+
+function createBaseTableMetadata(): TableMetadata {
+ return {
+ name: "",
+ columns: [],
+ indexes: [],
+ engine: "",
+ collation: "",
+ rowCount: 0,
+ dataSize: 0,
+ indexSize: 0,
+ dataFree: 0,
+ createOptions: "",
+ comment: "",
+ foreignKeys: [],
+ };
+}
+
+export const TableMetadata = {
+ encode(message: TableMetadata, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
+ if (message.name !== "") {
+ writer.uint32(10).string(message.name);
+ }
+ for (const v of message.columns) {
+ ColumnMetadata.encode(v!, writer.uint32(18).fork()).ldelim();
+ }
+ for (const v of message.indexes) {
+ IndexMetadata.encode(v!, writer.uint32(26).fork()).ldelim();
+ }
+ if (message.engine !== "") {
+ writer.uint32(34).string(message.engine);
+ }
+ if (message.collation !== "") {
+ writer.uint32(42).string(message.collation);
+ }
+ if (message.rowCount !== 0) {
+ writer.uint32(48).int64(message.rowCount);
+ }
+ if (message.dataSize !== 0) {
+ writer.uint32(56).int64(message.dataSize);
+ }
+ if (message.indexSize !== 0) {
+ writer.uint32(64).int64(message.indexSize);
+ }
+ if (message.dataFree !== 0) {
+ writer.uint32(72).int64(message.dataFree);
+ }
+ if (message.createOptions !== "") {
+ writer.uint32(82).string(message.createOptions);
+ }
+ if (message.comment !== "") {
+ writer.uint32(90).string(message.comment);
+ }
+ for (const v of message.foreignKeys) {
+ ForeignKeyMetadata.encode(v!, writer.uint32(98).fork()).ldelim();
+ }
+ return writer;
+ },
+
+ decode(input: _m0.Reader | Uint8Array, length?: number): TableMetadata {
+ const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
+ let end = length === undefined ? reader.len : reader.pos + length;
+ const message = createBaseTableMetadata();
+ while (reader.pos < end) {
+ const tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1:
+ message.name = reader.string();
+ break;
+ case 2:
+ message.columns.push(ColumnMetadata.decode(reader, reader.uint32()));
+ break;
+ case 3:
+ message.indexes.push(IndexMetadata.decode(reader, reader.uint32()));
+ break;
+ case 4:
+ message.engine = reader.string();
+ break;
+ case 5:
+ message.collation = reader.string();
+ break;
+ case 6:
+ message.rowCount = longToNumber(reader.int64() as Long);
+ break;
+ case 7:
+ message.dataSize = longToNumber(reader.int64() as Long);
+ break;
+ case 8:
+ message.indexSize = longToNumber(reader.int64() as Long);
+ break;
+ case 9:
+ message.dataFree = longToNumber(reader.int64() as Long);
+ break;
+ case 10:
+ message.createOptions = reader.string();
+ break;
+ case 11:
+ message.comment = reader.string();
+ break;
+ case 12:
+ message.foreignKeys.push(ForeignKeyMetadata.decode(reader, reader.uint32()));
+ break;
+ default:
+ reader.skipType(tag & 7);
+ break;
+ }
+ }
+ return message;
+ },
+
+ fromJSON(object: any): TableMetadata {
+ return {
+ name: isSet(object.name) ? String(object.name) : "",
+ columns: Array.isArray(object?.columns) ? object.columns.map((e: any) => ColumnMetadata.fromJSON(e)) : [],
+ indexes: Array.isArray(object?.indexes) ? object.indexes.map((e: any) => IndexMetadata.fromJSON(e)) : [],
+ engine: isSet(object.engine) ? String(object.engine) : "",
+ collation: isSet(object.collation) ? String(object.collation) : "",
+ rowCount: isSet(object.rowCount) ? Number(object.rowCount) : 0,
+ dataSize: isSet(object.dataSize) ? Number(object.dataSize) : 0,
+ indexSize: isSet(object.indexSize) ? Number(object.indexSize) : 0,
+ dataFree: isSet(object.dataFree) ? Number(object.dataFree) : 0,
+ createOptions: isSet(object.createOptions) ? String(object.createOptions) : "",
+ comment: isSet(object.comment) ? String(object.comment) : "",
+ foreignKeys: Array.isArray(object?.foreignKeys)
+ ? object.foreignKeys.map((e: any) => ForeignKeyMetadata.fromJSON(e))
+ : [],
+ };
+ },
+
+ toJSON(message: TableMetadata): unknown {
+ const obj: any = {};
+ message.name !== undefined && (obj.name = message.name);
+ if (message.columns) {
+ obj.columns = message.columns.map((e) => e ? ColumnMetadata.toJSON(e) : undefined);
+ } else {
+ obj.columns = [];
+ }
+ if (message.indexes) {
+ obj.indexes = message.indexes.map((e) => e ? IndexMetadata.toJSON(e) : undefined);
+ } else {
+ obj.indexes = [];
+ }
+ message.engine !== undefined && (obj.engine = message.engine);
+ message.collation !== undefined && (obj.collation = message.collation);
+ message.rowCount !== undefined && (obj.rowCount = Math.round(message.rowCount));
+ message.dataSize !== undefined && (obj.dataSize = Math.round(message.dataSize));
+ message.indexSize !== undefined && (obj.indexSize = Math.round(message.indexSize));
+ message.dataFree !== undefined && (obj.dataFree = Math.round(message.dataFree));
+ message.createOptions !== undefined && (obj.createOptions = message.createOptions);
+ message.comment !== undefined && (obj.comment = message.comment);
+ if (message.foreignKeys) {
+ obj.foreignKeys = message.foreignKeys.map((e) => e ? ForeignKeyMetadata.toJSON(e) : undefined);
+ } else {
+ obj.foreignKeys = [];
+ }
+ return obj;
+ },
+
+ fromPartial<I extends Exact<DeepPartial<TableMetadata>, I>>(object: I): TableMetadata {
+ const message = createBaseTableMetadata();
+ message.name = object.name ?? "";
+ message.columns = object.columns?.map((e) => ColumnMetadata.fromPartial(e)) || [];
+ message.indexes = object.indexes?.map((e) => IndexMetadata.fromPartial(e)) || [];
+ message.engine = object.engine ?? "";
+ message.collation = object.collation ?? "";
+ message.rowCount = object.rowCount ?? 0;
+ message.dataSize = object.dataSize ?? 0;
+ message.indexSize = object.indexSize ?? 0;
+ message.dataFree = object.dataFree ?? 0;
+ message.createOptions = object.createOptions ?? "";
+ message.comment = object.comment ?? "";
+ message.foreignKeys = object.foreignKeys?.map((e) => ForeignKeyMetadata.fromPartial(e)) || [];
+ return message;
+ },
+};
+
+function createBaseColumnMetadata(): ColumnMetadata {
+ return {
+ name: "",
+ position: 0,
+ default: undefined,
+ nullable: false,
+ type: "",
+ characterSet: "",
+ collation: "",
+ comment: "",
+ };
+}
+
+export const ColumnMetadata = {
+ encode(message: ColumnMetadata, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
+ if (message.name !== "") {
+ writer.uint32(10).string(message.name);
+ }
+ if (message.position !== 0) {
+ writer.uint32(16).int32(message.position);
+ }
+ if (message.default !== undefined) {
+ StringValue.encode({ value: message.default! }, writer.uint32(26).fork()).ldelim();
+ }
+ if (message.nullable === true) {
+ writer.uint32(32).bool(message.nullable);
+ }
+ if (message.type !== "") {
+ writer.uint32(42).string(message.type);
+ }
+ if (message.characterSet !== "") {
+ writer.uint32(50).string(message.characterSet);
+ }
+ if (message.collation !== "") {
+ writer.uint32(58).string(message.collation);
+ }
+ if (message.comment !== "") {
+ writer.uint32(66).string(message.comment);
+ }
+ return writer;
+ },
+
+ decode(input: _m0.Reader | Uint8Array, length?: number): ColumnMetadata {
+ const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
+ let end = length === undefined ? reader.len : reader.pos + length;
+ const message = createBaseColumnMetadata();
+ while (reader.pos < end) {
+ const tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1:
+ message.name = reader.string();
+ break;
+ case 2:
+ message.position = reader.int32();
+ break;
+ case 3:
+ message.default = StringValue.decode(reader, reader.uint32()).value;
+ break;
+ case 4:
+ message.nullable = reader.bool();
+ break;
+ case 5:
+ message.type = reader.string();
+ break;
+ case 6:
+ message.characterSet = reader.string();
+ break;
+ case 7:
+ message.collation = reader.string();
+ break;
+ case 8:
+ message.comment = reader.string();
+ break;
+ default:
+ reader.skipType(tag & 7);
+ break;
+ }
+ }
+ return message;
+ },
+
+ fromJSON(object: any): ColumnMetadata {
+ return {
+ name: isSet(object.name) ? String(object.name) : "",
+ position: isSet(object.position) ? Number(object.position) : 0,
+ default: isSet(object.default) ? String(object.default) : undefined,
+ nullable: isSet(object.nullable) ? Boolean(object.nullable) : false,
+ type: isSet(object.type) ? String(object.type) : "",
+ characterSet: isSet(object.characterSet) ? String(object.characterSet) : "",
+ collation: isSet(object.collation) ? String(object.collation) : "",
+ comment: isSet(object.comment) ? String(object.comment) : "",
+ };
+ },
+
+ toJSON(message: ColumnMetadata): unknown {
+ const obj: any = {};
+ message.name !== undefined && (obj.name = message.name);
+ message.position !== undefined && (obj.position = Math.round(message.position));
+ message.default !== undefined && (obj.default = message.default);
+ message.nullable !== undefined && (obj.nullable = message.nullable);
+ message.type !== undefined && (obj.type = message.type);
+ message.characterSet !== undefined && (obj.characterSet = message.characterSet);
+ message.collation !== undefined && (obj.collation = message.collation);
+ message.comment !== undefined && (obj.comment = message.comment);
+ return obj;
+ },
+
+ fromPartial<I extends Exact<DeepPartial<ColumnMetadata>, I>>(object: I): ColumnMetadata {
+ const message = createBaseColumnMetadata();
+ message.name = object.name ?? "";
+ message.position = object.position ?? 0;
+ message.default = object.default ?? undefined;
+ message.nullable = object.nullable ?? false;
+ message.type = object.type ?? "";
+ message.characterSet = object.characterSet ?? "";
+ message.collation = object.collation ?? "";
+ message.comment = object.comment ?? "";
+ return message;
+ },
+};
+
+function createBaseViewMetadata(): ViewMetadata {
+ return { name: "", definition: "", comment: "" };
+}
+
+export const ViewMetadata = {
+ encode(message: ViewMetadata, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
+ if (message.name !== "") {
+ writer.uint32(10).string(message.name);
+ }
+ if (message.definition !== "") {
+ writer.uint32(18).string(message.definition);
+ }
+ if (message.comment !== "") {
+ writer.uint32(26).string(message.comment);
+ }
+ return writer;
+ },
+
+ decode(input: _m0.Reader | Uint8Array, length?: number): ViewMetadata {
+ const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
+ let end = length === undefined ? reader.len : reader.pos + length;
+ const message = createBaseViewMetadata();
+ while (reader.pos < end) {
+ const tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1:
+ message.name = reader.string();
+ break;
+ case 2:
+ message.definition = reader.string();
+ break;
+ case 3:
+ message.comment = reader.string();
+ break;
+ default:
+ reader.skipType(tag & 7);
+ break;
+ }
+ }
+ return message;
+ },
+
+ fromJSON(object: any): ViewMetadata {
+ return {
+ name: isSet(object.name) ? String(object.name) : "",
+ definition: isSet(object.definition) ? String(object.definition) : "",
+ comment: isSet(object.comment) ? String(object.comment) : "",
+ };
+ },
+
+ toJSON(message: ViewMetadata): unknown {
+ const obj: any = {};
+ message.name !== undefined && (obj.name = message.name);
+ message.definition !== undefined && (obj.definition = message.definition);
+ message.comment !== undefined && (obj.comment = message.comment);
+ return obj;
+ },
+
+ fromPartial<I extends Exact<DeepPartial<ViewMetadata>, I>>(object: I): ViewMetadata {
+ const message = createBaseViewMetadata();
+ message.name = object.name ?? "";
+ message.definition = object.definition ?? "";
+ message.comment = object.comment ?? "";
+ return message;
+ },
+};
+
+function createBaseIndexMetadata(): IndexMetadata {
+ return { name: "", expressions: [], type: "", unique: false, primary: false, visible: false, comment: "" };
+}
+
+export const IndexMetadata = {
+ encode(message: IndexMetadata, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
+ if (message.name !== "") {
+ writer.uint32(10).string(message.name);
+ }
+ for (const v of message.expressions) {
+ writer.uint32(18).string(v!);
+ }
+ if (message.type !== "") {
+ writer.uint32(26).string(message.type);
+ }
+ if (message.unique === true) {
+ writer.uint32(32).bool(message.unique);
+ }
+ if (message.primary === true) {
+ writer.uint32(40).bool(message.primary);
+ }
+ if (message.visible === true) {
+ writer.uint32(48).bool(message.visible);
+ }
+ if (message.comment !== "") {
+ writer.uint32(58).string(message.comment);
+ }
+ return writer;
+ },
+
+ decode(input: _m0.Reader | Uint8Array, length?: number): IndexMetadata {
+ const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
+ let end = length === undefined ? reader.len : reader.pos + length;
+ const message = createBaseIndexMetadata();
+ while (reader.pos < end) {
+ const tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1:
+ message.name = reader.string();
+ break;
+ case 2:
+ message.expressions.push(reader.string());
+ break;
+ case 3:
+ message.type = reader.string();
+ break;
+ case 4:
+ message.unique = reader.bool();
+ break;
+ case 5:
+ message.primary = reader.bool();
+ break;
+ case 6:
+ message.visible = reader.bool();
+ break;
+ case 7:
+ message.comment = reader.string();
+ break;
+ default:
+ reader.skipType(tag & 7);
+ break;
+ }
+ }
+ return message;
+ },
+
+ fromJSON(object: any): IndexMetadata {
+ return {
+ name: isSet(object.name) ? String(object.name) : "",
+ expressions: Array.isArray(object?.expressions) ? object.expressions.map((e: any) => String(e)) : [],
+ type: isSet(object.type) ? String(object.type) : "",
+ unique: isSet(object.unique) ? Boolean(object.unique) : false,
+ primary: isSet(object.primary) ? Boolean(object.primary) : false,
+ visible: isSet(object.visible) ? Boolean(object.visible) : false,
+ comment: isSet(object.comment) ? String(object.comment) : "",
+ };
+ },
+
+ toJSON(message: IndexMetadata): unknown {
+ const obj: any = {};
+ message.name !== undefined && (obj.name = message.name);
+ if (message.expressions) {
+ obj.expressions = message.expressions.map((e) => e);
+ } else {
+ obj.expressions = [];
+ }
+ message.type !== undefined && (obj.type = message.type);
+ message.unique !== undefined && (obj.unique = message.unique);
+ message.primary !== undefined && (obj.primary = message.primary);
+ message.visible !== undefined && (obj.visible = message.visible);
+ message.comment !== undefined && (obj.comment = message.comment);
+ return obj;
+ },
+
+ fromPartial<I extends Exact<DeepPartial<IndexMetadata>, I>>(object: I): IndexMetadata {
+ const message = createBaseIndexMetadata();
+ message.name = object.name ?? "";
+ message.expressions = object.expressions?.map((e) => e) || [];
+ message.type = object.type ?? "";
+ message.unique = object.unique ?? false;
+ message.primary = object.primary ?? false;
+ message.visible = object.visible ?? false;
+ message.comment = object.comment ?? "";
+ return message;
+ },
+};
+
+function createBaseExtensionMetadata(): ExtensionMetadata {
+ return { name: "", schema: "", version: "", description: "" };
+}
+
+export const ExtensionMetadata = {
+ encode(message: ExtensionMetadata, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
+ if (message.name !== "") {
+ writer.uint32(10).string(message.name);
+ }
+ if (message.schema !== "") {
+ writer.uint32(18).string(message.schema);
+ }
+ if (message.version !== "") {
+ writer.uint32(26).string(message.version);
+ }
+ if (message.description !== "") {
+ writer.uint32(34).string(message.description);
+ }
+ return writer;
+ },
+
+ decode(input: _m0.Reader | Uint8Array, length?: number): ExtensionMetadata {
+ const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
+ let end = length === undefined ? reader.len : reader.pos + length;
+ const message = createBaseExtensionMetadata();
+ while (reader.pos < end) {
+ const tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1:
+ message.name = reader.string();
+ break;
+ case 2:
+ message.schema = reader.string();
+ break;
+ case 3:
+ message.version = reader.string();
+ break;
+ case 4:
+ message.description = reader.string();
+ break;
+ default:
+ reader.skipType(tag & 7);
+ break;
+ }
+ }
+ return message;
+ },
+
+ fromJSON(object: any): ExtensionMetadata {
+ return {
+ name: isSet(object.name) ? String(object.name) : "",
+ schema: isSet(object.schema) ? String(object.schema) : "",
+ version: isSet(object.version) ? String(object.version) : "",
+ description: isSet(object.description) ? String(object.description) : "",
+ };
+ },
+
+ toJSON(message: ExtensionMetadata): unknown {
+ const obj: any = {};
+ message.name !== undefined && (obj.name = message.name);
+ message.schema !== undefined && (obj.schema = message.schema);
+ message.version !== undefined && (obj.version = message.version);
+ message.description !== undefined && (obj.description = message.description);
+ return obj;
+ },
+
+ fromPartial<I extends Exact<DeepPartial<ExtensionMetadata>, I>>(object: I): ExtensionMetadata {
+ const message = createBaseExtensionMetadata();
+ message.name = object.name ?? "";
+ message.schema = object.schema ?? "";
+ message.version = object.version ?? "";
+ message.description = object.description ?? "";
+ return message;
+ },
+};
+
+function createBaseForeignKeyMetadata(): ForeignKeyMetadata {
+ return {
+ name: "",
+ columns: [],
+ referencedSchema: "",
+ referencedTable: "",
+ referencedColumns: [],
+ onDelete: "",
+ onUpdate: "",
+ matchType: "",
+ };
+}
+
+export const ForeignKeyMetadata = {
+ encode(message: ForeignKeyMetadata, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
+ if (message.name !== "") {
+ writer.uint32(10).string(message.name);
+ }
+ for (const v of message.columns) {
+ writer.uint32(18).string(v!);
+ }
+ if (message.referencedSchema !== "") {
+ writer.uint32(26).string(message.referencedSchema);
+ }
+ if (message.referencedTable !== "") {
+ writer.uint32(34).string(message.referencedTable);
+ }
+ for (const v of message.referencedColumns) {
+ writer.uint32(42).string(v!);
+ }
+ if (message.onDelete !== "") {
+ writer.uint32(50).string(message.onDelete);
+ }
+ if (message.onUpdate !== "") {
+ writer.uint32(58).string(message.onUpdate);
+ }
+ if (message.matchType !== "") {
+ writer.uint32(66).string(message.matchType);
+ }
+ return writer;
+ },
+
+ decode(input: _m0.Reader | Uint8Array, length?: number): ForeignKeyMetadata {
+ const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
+ let end = length === undefined ? reader.len : reader.pos + length;
+ const message = createBaseForeignKeyMetadata();
+ while (reader.pos < end) {
+ const tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1:
+ message.name = reader.string();
+ break;
+ case 2:
+ message.columns.push(reader.string());
+ break;
+ case 3:
+ message.referencedSchema = reader.string();
+ break;
+ case 4:
+ message.referencedTable = reader.string();
+ break;
+ case 5:
+ message.referencedColumns.push(reader.string());
+ break;
+ case 6:
+ message.onDelete = reader.string();
+ break;
+ case 7:
+ message.onUpdate = reader.string();
+ break;
+ case 8:
+ message.matchType = reader.string();
+ break;
+ default:
+ reader.skipType(tag & 7);
+ break;
+ }
+ }
+ return message;
+ },
+
+ fromJSON(object: any): ForeignKeyMetadata {
+ return {
+ name: isSet(object.name) ? String(object.name) : "",
+ columns: Array.isArray(object?.columns) ? object.columns.map((e: any) => String(e)) : [],
+ referencedSchema: isSet(object.referencedSchema) ? String(object.referencedSchema) : "",
+ referencedTable: isSet(object.referencedTable) ? String(object.referencedTable) : "",
+ referencedColumns: Array.isArray(object?.referencedColumns)
+ ? object.referencedColumns.map((e: any) => String(e))
+ : [],
+ onDelete: isSet(object.onDelete) ? String(object.onDelete) : "",
+ onUpdate: isSet(object.onUpdate) ? String(object.onUpdate) : "",
+ matchType: isSet(object.matchType) ? String(object.matchType) : "",
+ };
+ },
+
+ toJSON(message: ForeignKeyMetadata): unknown {
+ const obj: any = {};
+ message.name !== undefined && (obj.name = message.name);
+ if (message.columns) {
+ obj.columns = message.columns.map((e) => e);
+ } else {
+ obj.columns = [];
+ }
+ message.referencedSchema !== undefined && (obj.referencedSchema = message.referencedSchema);
+ message.referencedTable !== undefined && (obj.referencedTable = message.referencedTable);
+ if (message.referencedColumns) {
+ obj.referencedColumns = message.referencedColumns.map((e) => e);
+ } else {
+ obj.referencedColumns = [];
+ }
+ message.onDelete !== undefined && (obj.onDelete = message.onDelete);
+ message.onUpdate !== undefined && (obj.onUpdate = message.onUpdate);
+ message.matchType !== undefined && (obj.matchType = message.matchType);
+ return obj;
+ },
+
+ fromPartial<I extends Exact<DeepPartial<ForeignKeyMetadata>, I>>(object: I): ForeignKeyMetadata {
+ const message = createBaseForeignKeyMetadata();
+ message.name = object.name ?? "";
+ message.columns = object.columns?.map((e) => e) || [];
+ message.referencedSchema = object.referencedSchema ?? "";
+ message.referencedTable = object.referencedTable ?? "";
+ message.referencedColumns = object.referencedColumns?.map((e) => e) || [];
+ message.onDelete = object.onDelete ?? "";
+ message.onUpdate = object.onUpdate ?? "";
+ message.matchType = object.matchType ?? "";
+ return message;
+ },
+};
+
+function createBaseDatabaseSchema(): DatabaseSchema {
+ return { schema: "" };
+}
+
+export const DatabaseSchema = {
+ encode(message: DatabaseSchema, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
+ if (message.schema !== "") {
+ writer.uint32(10).string(message.schema);
+ }
+ return writer;
+ },
+
+ decode(input: _m0.Reader | Uint8Array, length?: number): DatabaseSchema {
+ const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
+ let end = length === undefined ? reader.len : reader.pos + length;
+ const message = createBaseDatabaseSchema();
+ while (reader.pos < end) {
+ const tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1:
+ message.schema = reader.string();
+ break;
+ default:
+ reader.skipType(tag & 7);
+ break;
+ }
+ }
+ return message;
+ },
+
+ fromJSON(object: any): DatabaseSchema {
+ return { schema: isSet(object.schema) ? String(object.schema) : "" };
+ },
+
+ toJSON(message: DatabaseSchema): unknown {
+ const obj: any = {};
+ message.schema !== undefined && (obj.schema = message.schema);
+ return obj;
+ },
+
+ fromPartial<I extends Exact<DeepPartial<DatabaseSchema>, I>>(object: I): DatabaseSchema {
+ const message = createBaseDatabaseSchema();
+ message.schema = object.schema ?? "";
+ return message;
+ },
+};
+
+export interface DatabaseService {
+ GetDatabase(request: GetDatabaseRequest): Promise<Database>;
+ ListDatabases(request: ListDatabasesRequest): Promise<ListDatabasesResponse>;
+ UpdateDatabase(request: UpdateDatabaseRequest): Promise<Database>;
+ BatchUpdateDatabases(request: BatchUpdateDatabasesRequest): Promise<BatchUpdateDatabasesResponse>;
+ GetDatabaseMetadata(request: GetDatabaseMetadataRequest): Promise<DatabaseMetadata>;
+ GetDatabaseSchema(request: GetDatabaseSchemaRequest): Promise<DatabaseSchema>;
+}
+
+export class DatabaseServiceClientImpl implements DatabaseService {
+ private readonly rpc: Rpc;
+ private readonly service: string;
+ constructor(rpc: Rpc, opts?: { service?: string }) {
+ this.service = opts?.service || "bytebase.v1.DatabaseService";
+ this.rpc = rpc;
+ this.GetDatabase = this.GetDatabase.bind(this);
+ this.ListDatabases = this.ListDatabases.bind(this);
+ this.UpdateDatabase = this.UpdateDatabase.bind(this);
+ this.BatchUpdateDatabases = this.BatchUpdateDatabases.bind(this);
+ this.GetDatabaseMetadata = this.GetDatabaseMetadata.bind(this);
+ this.GetDatabaseSchema = this.GetDatabaseSchema.bind(this);
+ }
+ GetDatabase(request: GetDatabaseRequest): Promise<Database> {
+ const data = GetDatabaseRequest.encode(request).finish();
+ const promise = this.rpc.request(this.service, "GetDatabase", data);
+ return promise.then((data) => Database.decode(new _m0.Reader(data)));
+ }
+
+ ListDatabases(request: ListDatabasesRequest): Promise<ListDatabasesResponse> {
+ const data = ListDatabasesRequest.encode(request).finish();
+ const promise = this.rpc.request(this.service, "ListDatabases", data);
+ return promise.then((data) => ListDatabasesResponse.decode(new _m0.Reader(data)));
+ }
+
+ UpdateDatabase(request: UpdateDatabaseRequest): Promise<Database> {
+ const data = UpdateDatabaseRequest.encode(request).finish();
+ const promise = this.rpc.request(this.service, "UpdateDatabase", data);
+ return promise.then((data) => Database.decode(new _m0.Reader(data)));
+ }
+
+ BatchUpdateDatabases(request: BatchUpdateDatabasesRequest): Promise<BatchUpdateDatabasesResponse> {
+ const data = BatchUpdateDatabasesRequest.encode(request).finish();
+ const promise = this.rpc.request(this.service, "BatchUpdateDatabases", data);
+ return promise.then((data) => BatchUpdateDatabasesResponse.decode(new _m0.Reader(data)));
+ }
+
+ GetDatabaseMetadata(request: GetDatabaseMetadataRequest): Promise<DatabaseMetadata> {
+ const data = GetDatabaseMetadataRequest.encode(request).finish();
+ const promise = this.rpc.request(this.service, "GetDatabaseMetadata", data);
+ return promise.then((data) => DatabaseMetadata.decode(new _m0.Reader(data)));
+ }
+
+ GetDatabaseSchema(request: GetDatabaseSchemaRequest): Promise<DatabaseSchema> {
+ const data = GetDatabaseSchemaRequest.encode(request).finish();
+ const promise = this.rpc.request(this.service, "GetDatabaseSchema", data);
+ return promise.then((data) => DatabaseSchema.decode(new _m0.Reader(data)));
+ }
+}
+
+interface Rpc {
+ request(service: string, method: string, data: Uint8Array): Promise<Uint8Array>;
+}
+
+declare var self: any | undefined;
+declare var window: any | undefined;
+declare var global: any | undefined;
+var globalThis: any = (() => {
+ if (typeof globalThis !== "undefined") {
+ return globalThis;
+ }
+ if (typeof self !== "undefined") {
+ return self;
+ }
+ if (typeof window !== "undefined") {
+ return window;
+ }
+ if (typeof global !== "undefined") {
+ return global;
+ }
+ throw "Unable to locate global object";
+})();
+
+type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
+
+export type DeepPartial<T> = T extends Builtin ? T
+ : T extends Array<infer U> ? Array<DeepPartial<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>>
+ : T extends {} ? { [K in keyof T]?: DeepPartial<T[K]> }
+ : Partial<T>;
+
+type KeysOfUnion<T> = T extends T ? keyof T : never;
+export type Exact<P, I extends P> = P extends Builtin ? P
+ : P & { [K in keyof P]: Exact<P[K], I[K]> } & { [K in Exclude<keyof I, KeysOfUnion<P>>]: never };
+
+function toTimestamp(date: Date): Timestamp {
+ const seconds = 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 * 1_000;
+ millis += t.nanos / 1_000_000;
+ return new Date(millis);
+}
+
+function fromJsonTimestamp(o: any): Date {
+ if (o instanceof Date) {
+ return o;
+ } else if (typeof o === "string") {
+ return new Date(o);
+ } else {
+ return fromTimestamp(Timestamp.fromJSON(o));
+ }
+}
+
+function longToNumber(long: Long): number {
+ if (long.gt(Number.MAX_SAFE_INTEGER)) {
+ throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER");
+ }
+ return long.toNumber();
+}
+
+if (_m0.util.Long !== Long) {
+ _m0.util.Long = Long as any;
+ _m0.configure();
+}
+
+function isObject(value: any): boolean {
+ return typeof value === "object" && value !== null;
+}
+
+function isSet(value: any): boolean {
+ return value !== null && value !== undefined;
+}
diff --git a/frontend/src/types/proto/v1/environment_service.ts b/frontend/src/types/proto/v1/environment_service.ts
index 6bc626cf1a..69e43f1e31 100644
--- a/frontend/src/types/proto/v1/environment_service.ts
+++ b/frontend/src/types/proto/v1/environment_service.ts
@@ -35,7 +35,7 @@ export interface ListEnvironmentsRequest {
}
export interface ListEnvironmentsResponse {
- /** The environments from the specified publisher. */
+ /** The environments from the specified request. */
environments: Environment[];
/**
* A token, which can be sent as `page_token` to retrieve the next page.
diff --git a/frontend/src/types/proto/v1/instance_service.ts b/frontend/src/types/proto/v1/instance_service.ts
index cba98c12ab..115bcb07ea 100644
--- a/frontend/src/types/proto/v1/instance_service.ts
+++ b/frontend/src/types/proto/v1/instance_service.ts
@@ -149,7 +149,7 @@ export interface ListInstancesRequest {
}
export interface ListInstancesResponse {
- /** The instances from the specified publisher. */
+ /** The instances from the specified request. */
instances: Instance[];
/**
* A token, which can be sent as `page_token` to retrieve the next page.
@@ -204,6 +204,44 @@ export interface UndeleteInstanceRequest {
name: string;
}
+export interface AddDataSourceRequest {
+ /**
+ * The name of the instance to add a data source to.
+ * Format: environments/{environment}/instances/{instance}
+ */
+ instance: string;
+ /**
+ * Identified by type.
+ * Only READ_ONLY data source can be added.
+ */
+ dataSources?: DataSource;
+}
+
+export interface RemoveDataSourceRequest {
+ /**
+ * The name of the instance to remove a data source from.
+ * Format: environments/{environment}/instances/{instance}
+ */
+ instance: string;
+ /**
+ * Identified by type.
+ * Only READ_ONLY data source can be removed.
+ */
+ dataSources?: DataSource;
+}
+
+export interface UpdateDataSourceRequest {
+ /**
+ * The name of the instance to update a data source.
+ * Format: environments/{environment}/instances/{instance}
+ */
+ instance: string;
+ /** Identified by type. */
+ dataSources?: DataSource;
+ /** The list of fields to update. */
+ updateMask?: string[];
+}
+
export interface Instance {
/**
* The name of the instance.
@@ -638,6 +676,198 @@ export const UndeleteInstanceRequest = {
},
};
+function createBaseAddDataSourceRequest(): AddDataSourceRequest {
+ return { instance: "", dataSources: undefined };
+}
+
+export const AddDataSourceRequest = {
+ encode(message: AddDataSourceRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
+ if (message.instance !== "") {
+ writer.uint32(10).string(message.instance);
+ }
+ if (message.dataSources !== undefined) {
+ DataSource.encode(message.dataSources, writer.uint32(18).fork()).ldelim();
+ }
+ return writer;
+ },
+
+ decode(input: _m0.Reader | Uint8Array, length?: number): AddDataSourceRequest {
+ const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
+ let end = length === undefined ? reader.len : reader.pos + length;
+ const message = createBaseAddDataSourceRequest();
+ while (reader.pos < end) {
+ const tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1:
+ message.instance = reader.string();
+ break;
+ case 2:
+ message.dataSources = DataSource.decode(reader, reader.uint32());
+ break;
+ default:
+ reader.skipType(tag & 7);
+ break;
+ }
+ }
+ return message;
+ },
+
+ fromJSON(object: any): AddDataSourceRequest {
+ return {
+ instance: isSet(object.instance) ? String(object.instance) : "",
+ dataSources: isSet(object.dataSources) ? DataSource.fromJSON(object.dataSources) : undefined,
+ };
+ },
+
+ toJSON(message: AddDataSourceRequest): unknown {
+ const obj: any = {};
+ message.instance !== undefined && (obj.instance = message.instance);
+ message.dataSources !== undefined &&
+ (obj.dataSources = message.dataSources ? DataSource.toJSON(message.dataSources) : undefined);
+ return obj;
+ },
+
+ fromPartial<I extends Exact<DeepPartial<AddDataSourceRequest>, I>>(object: I): AddDataSourceRequest {
+ const message = createBaseAddDataSourceRequest();
+ message.instance = object.instance ?? "";
+ message.dataSources = (object.dataSources !== undefined && object.dataSources !== null)
+ ? DataSource.fromPartial(object.dataSources)
+ : undefined;
+ return message;
+ },
+};
+
+function createBaseRemoveDataSourceRequest(): RemoveDataSourceRequest {
+ return { instance: "", dataSources: undefined };
+}
+
+export const RemoveDataSourceRequest = {
+ encode(message: RemoveDataSourceRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
+ if (message.instance !== "") {
+ writer.uint32(10).string(message.instance);
+ }
+ if (message.dataSources !== undefined) {
+ DataSource.encode(message.dataSources, writer.uint32(18).fork()).ldelim();
+ }
+ return writer;
+ },
+
+ decode(input: _m0.Reader | Uint8Array, length?: number): RemoveDataSourceRequest {
+ const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
+ let end = length === undefined ? reader.len : reader.pos + length;
+ const message = createBaseRemoveDataSourceRequest();
+ while (reader.pos < end) {
+ const tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1:
+ message.instance = reader.string();
+ break;
+ case 2:
+ message.dataSources = DataSource.decode(reader, reader.uint32());
+ break;
+ default:
+ reader.skipType(tag & 7);
+ break;
+ }
+ }
+ return message;
+ },
+
+ fromJSON(object: any): RemoveDataSourceRequest {
+ return {
+ instance: isSet(object.instance) ? String(object.instance) : "",
+ dataSources: isSet(object.dataSources) ? DataSource.fromJSON(object.dataSources) : undefined,
+ };
+ },
+
+ toJSON(message: RemoveDataSourceRequest): unknown {
+ const obj: any = {};
+ message.instance !== undefined && (obj.instance = message.instance);
+ message.dataSources !== undefined &&
+ (obj.dataSources = message.dataSources ? DataSource.toJSON(message.dataSources) : undefined);
+ return obj;
+ },
+
+ fromPartial<I extends Exact<DeepPartial<RemoveDataSourceRequest>, I>>(object: I): RemoveDataSourceRequest {
+ const message = createBaseRemoveDataSourceRequest();
+ message.instance = object.instance ?? "";
+ message.dataSources = (object.dataSources !== undefined && object.dataSources !== null)
+ ? DataSource.fromPartial(object.dataSources)
+ : undefined;
+ return message;
+ },
+};
+
+function createBaseUpdateDataSourceRequest(): UpdateDataSourceRequest {
+ return { instance: "", dataSources: undefined, updateMask: undefined };
+}
+
+export const UpdateDataSourceRequest = {
+ encode(message: UpdateDataSourceRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
+ if (message.instance !== "") {
+ writer.uint32(10).string(message.instance);
+ }
+ if (message.dataSources !== undefined) {
+ DataSource.encode(message.dataSources, writer.uint32(18).fork()).ldelim();
+ }
+ if (message.updateMask !== undefined) {
+ FieldMask.encode(FieldMask.wrap(message.updateMask), writer.uint32(26).fork()).ldelim();
+ }
+ return writer;
+ },
+
+ decode(input: _m0.Reader | Uint8Array, length?: number): UpdateDataSourceRequest {
+ const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
+ let end = length === undefined ? reader.len : reader.pos + length;
+ const message = createBaseUpdateDataSourceRequest();
+ while (reader.pos < end) {
+ const tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1:
+ message.instance = reader.string();
+ break;
+ case 2:
+ message.dataSources = DataSource.decode(reader, reader.uint32());
+ break;
+ case 3:
+ message.updateMask = FieldMask.unwrap(FieldMask.decode(reader, reader.uint32()));
+ break;
+ default:
+ reader.skipType(tag & 7);
+ break;
+ }
+ }
+ return message;
+ },
+
+ fromJSON(object: any): UpdateDataSourceRequest {
+ return {
+ instance: isSet(object.instance) ? String(object.instance) : "",
+ dataSources: isSet(object.dataSources) ? DataSource.fromJSON(object.dataSources) : undefined,
+ updateMask: isSet(object.updateMask) ? FieldMask.unwrap(FieldMask.fromJSON(object.updateMask)) : undefined,
+ };
+ },
+
+ toJSON(message: UpdateDataSourceRequest): unknown {
+ const obj: any = {};
+ message.instance !== undefined && (obj.instance = message.instance);
+ message.dataSources !== undefined &&
+ (obj.dataSources = message.dataSources ? DataSource.toJSON(message.dataSources) : undefined);
+ message.updateMask !== undefined && (obj.updateMask = FieldMask.toJSON(FieldMask.wrap(message.updateMask)));
+ return obj;
+ },
+
+ fromPartial<I extends Exact<DeepPartial<UpdateDataSourceRequest>, I>>(object: I): UpdateDataSourceRequest {
+ const message = createBaseUpdateDataSourceRequest();
+ message.instance = object.instance ?? "";
+ message.dataSources = (object.dataSources !== undefined && object.dataSources !== null)
+ ? DataSource.fromPartial(object.dataSources)
+ : undefined;
+ message.updateMask = object.updateMask ?? undefined;
+ return message;
+ },
+};
+
function createBaseInstance(): Instance {
return { name: "", state: 0, title: "", engine: 0, externalLink: "", dataSources: [] };
}
@@ -884,6 +1114,9 @@ export interface InstanceService {
UpdateInstance(request: UpdateInstanceRequest): Promise<Instance>;
DeleteInstance(request: DeleteInstanceRequest): Promise<Empty>;
UndeleteInstance(request: UndeleteInstanceRequest): Promise<Instance>;
+ AddDataSource(request: AddDataSourceRequest): Promise<Instance>;
+ RemoveDataSource(request: RemoveDataSourceRequest): Promise<Instance>;
+ UpdateDataSource(request: UpdateDataSourceRequest): Promise<Instance>;
}
export class InstanceServiceClientImpl implements InstanceService {
@@ -898,6 +1131,9 @@ export class InstanceServiceClientImpl implements InstanceService {
this.UpdateInstance = this.UpdateInstance.bind(this);
this.DeleteInstance = this.DeleteInstance.bind(this);
this.UndeleteInstance = this.UndeleteInstance.bind(this);
+ this.AddDataSource = this.AddDataSource.bind(this);
+ this.RemoveDataSource = this.RemoveDataSource.bind(this);
+ this.UpdateDataSource = this.UpdateDataSource.bind(this);
}
GetInstance(request: GetInstanceRequest): Promise<Instance> {
const data = GetInstanceRequest.encode(request).finish();
@@ -934,6 +1170,24 @@ export class InstanceServiceClientImpl implements InstanceService {
const promise = this.rpc.request(this.service, "UndeleteInstance", data);
return promise.then((data) => Instance.decode(new _m0.Reader(data)));
}
+
+ AddDataSource(request: AddDataSourceRequest): Promise<Instance> {
+ const data = AddDataSourceRequest.encode(request).finish();
+ const promise = this.rpc.request(this.service, "AddDataSource", data);
+ return promise.then((data) => Instance.decode(new _m0.Reader(data)));
+ }
+
+ RemoveDataSource(request: RemoveDataSourceRequest): Promise<Instance> {
+ const data = RemoveDataSourceRequest.encode(request).finish();
+ const promise = this.rpc.request(this.service, "RemoveDataSource", data);
+ return promise.then((data) => Instance.decode(new _m0.Reader(data)));
+ }
+
+ UpdateDataSource(request: UpdateDataSourceRequest): Promise<Instance> {
+ const data = UpdateDataSourceRequest.encode(request).finish();
+ const promise = this.rpc.request(this.service, "UpdateDataSource", data);
+ return promise.then((data) => Instance.decode(new _m0.Reader(data)));
+ }
}
interface Rpc {
diff --git a/frontend/src/types/proto/v1/project_service.ts b/frontend/src/types/proto/v1/project_service.ts
index e6f0959bc5..8acb4e06c6 100644
--- a/frontend/src/types/proto/v1/project_service.ts
+++ b/frontend/src/types/proto/v1/project_service.ts
@@ -320,7 +320,7 @@ export interface ListProjectsRequest {
}
export interface ListProjectsResponse {
- /** The projects from the specified publisher. */
+ /** The projects from the specified request. */
projects: Project[];
/**
* A token, which can be sent as `page_token` to retrieve the next page.
diff --git a/proto/generated-go/v1/auth_service.pb.go b/proto/generated-go/v1/auth_service.pb.go
index 4744105d07..08cb3444f4 100644
--- a/proto/generated-go/v1/auth_service.pb.go
+++ b/proto/generated-go/v1/auth_service.pb.go
@@ -254,7 +254,7 @@ type ListUsersResponse struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
- // The users from the specified publisher.
+ // The users from the specified request.
Users []*User `protobuf:"bytes,1,rep,name=users,proto3" json:"users,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.
diff --git a/proto/generated-go/v1/database_service.pb.go b/proto/generated-go/v1/database_service.pb.go
new file mode 100644
index 0000000000..310bcf9b66
--- /dev/null
+++ b/proto/generated-go/v1/database_service.pb.go
@@ -0,0 +1,2015 @@
+// Code generated by protoc-gen-go. DO NOT EDIT.
+// versions:
+// protoc-gen-go v1.28.1
+// protoc (unknown)
+// source: v1/database_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"
+ _ "google.golang.org/protobuf/types/known/emptypb"
+ fieldmaskpb "google.golang.org/protobuf/types/known/fieldmaskpb"
+ timestamppb "google.golang.org/protobuf/types/known/timestamppb"
+ wrapperspb "google.golang.org/protobuf/types/known/wrapperspb"
+ reflect "reflect"
+ sync "sync"
+)
+
+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 GetDatabaseRequest struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // The name of the database to retrieve.
+ // Format: environments/{environment}/instances/{instance}/databases/{database}
+ Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
+}
+
+func (x *GetDatabaseRequest) Reset() {
+ *x = GetDatabaseRequest{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_v1_database_service_proto_msgTypes[0]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *GetDatabaseRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*GetDatabaseRequest) ProtoMessage() {}
+
+func (x *GetDatabaseRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_v1_database_service_proto_msgTypes[0]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use GetDatabaseRequest.ProtoReflect.Descriptor instead.
+func (*GetDatabaseRequest) Descriptor() ([]byte, []int) {
+ return file_v1_database_service_proto_rawDescGZIP(), []int{0}
+}
+
+func (x *GetDatabaseRequest) GetName() string {
+ if x != nil {
+ return x.Name
+ }
+ return ""
+}
+
+type ListDatabasesRequest struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // The parent, which owns this collection of databases.
+ // Format: environments/{environment}/instances/{instance}
+ // Use "environments/-/instances/-" to list all databases from all environments.
+ Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"`
+ // The maximum number of databases to return. The service may return fewer than
+ // this value.
+ // If unspecified, at most 50 databases will be returned.
+ // The maximum value is 1000; values above 1000 will be coerced to 1000.
+ PageSize int32 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"`
+ // A page token, received from a previous `ListDatabases` call.
+ // Provide this to retrieve the subsequent page.
+ //
+ // When paginating, all other parameters provided to `ListDatabases` must match
+ // the call that provided the page token.
+ PageToken string `protobuf:"bytes,3,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"`
+ // Filter is used to filter databases returned in the list.
+ // For example, "project = projects/{project}" can be used to list databases in a project.
+ Filter string `protobuf:"bytes,4,opt,name=filter,proto3" json:"filter,omitempty"`
+}
+
+func (x *ListDatabasesRequest) Reset() {
+ *x = ListDatabasesRequest{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_v1_database_service_proto_msgTypes[1]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *ListDatabasesRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ListDatabasesRequest) ProtoMessage() {}
+
+func (x *ListDatabasesRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_v1_database_service_proto_msgTypes[1]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use ListDatabasesRequest.ProtoReflect.Descriptor instead.
+func (*ListDatabasesRequest) Descriptor() ([]byte, []int) {
+ return file_v1_database_service_proto_rawDescGZIP(), []int{1}
+}
+
+func (x *ListDatabasesRequest) GetParent() string {
+ if x != nil {
+ return x.Parent
+ }
+ return ""
+}
+
+func (x *ListDatabasesRequest) GetPageSize() int32 {
+ if x != nil {
+ return x.PageSize
+ }
+ return 0
+}
+
+func (x *ListDatabasesRequest) GetPageToken() string {
+ if x != nil {
+ return x.PageToken
+ }
+ return ""
+}
+
+func (x *ListDatabasesRequest) GetFilter() string {
+ if x != nil {
+ return x.Filter
+ }
+ return ""
+}
+
+type ListDatabasesResponse struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // The databases from the specified request.
+ Databases []*Database `protobuf:"bytes,1,rep,name=databases,proto3" json:"databases,omitempty"`
+ // A token, which can be sent as `page_token` to retrieve the next page.
+ // If this field is omitted, there are no subsequent pages.
+ NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"`
+}
+
+func (x *ListDatabasesResponse) Reset() {
+ *x = ListDatabasesResponse{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_v1_database_service_proto_msgTypes[2]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *ListDatabasesResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ListDatabasesResponse) ProtoMessage() {}
+
+func (x *ListDatabasesResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_v1_database_service_proto_msgTypes[2]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use ListDatabasesResponse.ProtoReflect.Descriptor instead.
+func (*ListDatabasesResponse) Descriptor() ([]byte, []int) {
+ return file_v1_database_service_proto_rawDescGZIP(), []int{2}
+}
+
+func (x *ListDatabasesResponse) GetDatabases() []*Database {
+ if x != nil {
+ return x.Databases
+ }
+ return nil
+}
+
+func (x *ListDatabasesResponse) GetNextPageToken() string {
+ if x != nil {
+ return x.NextPageToken
+ }
+ return ""
+}
+
+type UpdateDatabaseRequest struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // The database to update.
+ //
+ // The database's `name` field is used to identify the database to update.
+ // Format: environments/{environment}/instances/{instance}/databases/{database}
+ Database *Database `protobuf:"bytes,1,opt,name=database,proto3" json:"database,omitempty"`
+ // The list of fields to update.
+ UpdateMask *fieldmaskpb.FieldMask `protobuf:"bytes,2,opt,name=update_mask,json=updateMask,proto3" json:"update_mask,omitempty"`
+}
+
+func (x *UpdateDatabaseRequest) Reset() {
+ *x = UpdateDatabaseRequest{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_v1_database_service_proto_msgTypes[3]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *UpdateDatabaseRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*UpdateDatabaseRequest) ProtoMessage() {}
+
+func (x *UpdateDatabaseRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_v1_database_service_proto_msgTypes[3]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use UpdateDatabaseRequest.ProtoReflect.Descriptor instead.
+func (*UpdateDatabaseRequest) Descriptor() ([]byte, []int) {
+ return file_v1_database_service_proto_rawDescGZIP(), []int{3}
+}
+
+func (x *UpdateDatabaseRequest) GetDatabase() *Database {
+ if x != nil {
+ return x.Database
+ }
+ return nil
+}
+
+func (x *UpdateDatabaseRequest) GetUpdateMask() *fieldmaskpb.FieldMask {
+ if x != nil {
+ return x.UpdateMask
+ }
+ return nil
+}
+
+type BatchUpdateDatabasesRequest struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // The parent resource shared by all databases being updated.
+ // Format: environments/{environment}/instances/{instance}
+ // If the operation spans parents, a dash (-) may be accepted as a wildcard.
+ // We only support updating the project of databases for now.
+ Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"`
+ // The request message specifying the resources to update.
+ // A maximum of 1000 databases can be modified in a batch.
+ Requests []*UpdateDatabaseRequest `protobuf:"bytes,2,rep,name=requests,proto3" json:"requests,omitempty"`
+}
+
+func (x *BatchUpdateDatabasesRequest) Reset() {
+ *x = BatchUpdateDatabasesRequest{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_v1_database_service_proto_msgTypes[4]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *BatchUpdateDatabasesRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*BatchUpdateDatabasesRequest) ProtoMessage() {}
+
+func (x *BatchUpdateDatabasesRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_v1_database_service_proto_msgTypes[4]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use BatchUpdateDatabasesRequest.ProtoReflect.Descriptor instead.
+func (*BatchUpdateDatabasesRequest) Descriptor() ([]byte, []int) {
+ return file_v1_database_service_proto_rawDescGZIP(), []int{4}
+}
+
+func (x *BatchUpdateDatabasesRequest) GetParent() string {
+ if x != nil {
+ return x.Parent
+ }
+ return ""
+}
+
+func (x *BatchUpdateDatabasesRequest) GetRequests() []*UpdateDatabaseRequest {
+ if x != nil {
+ return x.Requests
+ }
+ return nil
+}
+
+type BatchUpdateDatabasesResponse struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // Databases updated.
+ Databases []*Database `protobuf:"bytes,1,rep,name=databases,proto3" json:"databases,omitempty"`
+}
+
+func (x *BatchUpdateDatabasesResponse) Reset() {
+ *x = BatchUpdateDatabasesResponse{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_v1_database_service_proto_msgTypes[5]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *BatchUpdateDatabasesResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*BatchUpdateDatabasesResponse) ProtoMessage() {}
+
+func (x *BatchUpdateDatabasesResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_v1_database_service_proto_msgTypes[5]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use BatchUpdateDatabasesResponse.ProtoReflect.Descriptor instead.
+func (*BatchUpdateDatabasesResponse) Descriptor() ([]byte, []int) {
+ return file_v1_database_service_proto_rawDescGZIP(), []int{5}
+}
+
+func (x *BatchUpdateDatabasesResponse) GetDatabases() []*Database {
+ if x != nil {
+ return x.Databases
+ }
+ return nil
+}
+
+type GetDatabaseMetadataRequest struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // The name of the database to retrieve metadata.
+ // Format: environments/{environment}/instances/{instance}/databases/{database}
+ Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
+}
+
+func (x *GetDatabaseMetadataRequest) Reset() {
+ *x = GetDatabaseMetadataRequest{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_v1_database_service_proto_msgTypes[6]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *GetDatabaseMetadataRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*GetDatabaseMetadataRequest) ProtoMessage() {}
+
+func (x *GetDatabaseMetadataRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_v1_database_service_proto_msgTypes[6]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use GetDatabaseMetadataRequest.ProtoReflect.Descriptor instead.
+func (*GetDatabaseMetadataRequest) Descriptor() ([]byte, []int) {
+ return file_v1_database_service_proto_rawDescGZIP(), []int{6}
+}
+
+func (x *GetDatabaseMetadataRequest) GetName() string {
+ if x != nil {
+ return x.Name
+ }
+ return ""
+}
+
+type GetDatabaseSchemaRequest struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // The name of the database to retrieve schema.
+ // Format: environments/{environment}/instances/{instance}/databases/{database}
+ Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
+}
+
+func (x *GetDatabaseSchemaRequest) Reset() {
+ *x = GetDatabaseSchemaRequest{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_v1_database_service_proto_msgTypes[7]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *GetDatabaseSchemaRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*GetDatabaseSchemaRequest) ProtoMessage() {}
+
+func (x *GetDatabaseSchemaRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_v1_database_service_proto_msgTypes[7]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use GetDatabaseSchemaRequest.ProtoReflect.Descriptor instead.
+func (*GetDatabaseSchemaRequest) Descriptor() ([]byte, []int) {
+ return file_v1_database_service_proto_rawDescGZIP(), []int{7}
+}
+
+func (x *GetDatabaseSchemaRequest) GetName() string {
+ if x != nil {
+ return x.Name
+ }
+ return ""
+}
+
+type Database struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // The name of the database.
+ // Format: environments/{environment}/instances/{instance}/databases/{database}
+ // {database} is the database name in the instance.
+ Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
+ // The existence of a database on latest sync.
+ SyncState State `protobuf:"varint,2,opt,name=sync_state,json=syncState,proto3,enum=bytebase.v1.State" json:"sync_state,omitempty"`
+ // The latest synchronization time.
+ SuccessfulSyncTime *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=successful_sync_time,json=successfulSyncTime,proto3" json:"successful_sync_time,omitempty"`
+ // The project for a database.
+ // Format: projects/{project}
+ Project string `protobuf:"bytes,4,opt,name=project,proto3" json:"project,omitempty"`
+ CharacterSet string `protobuf:"bytes,5,opt,name=character_set,json=characterSet,proto3" json:"character_set,omitempty"`
+ Collation string `protobuf:"bytes,6,opt,name=collation,proto3" json:"collation,omitempty"`
+ // The version of database schema.
+ SchemaVersion string `protobuf:"bytes,7,opt,name=schema_version,json=schemaVersion,proto3" json:"schema_version,omitempty"`
+ // Labels will be used for deployment and policy control.
+ Labels map[string]string `protobuf:"bytes,8,rep,name=labels,proto3" json:"labels,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
+}
+
+func (x *Database) Reset() {
+ *x = Database{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_v1_database_service_proto_msgTypes[8]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *Database) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*Database) ProtoMessage() {}
+
+func (x *Database) ProtoReflect() protoreflect.Message {
+ mi := &file_v1_database_service_proto_msgTypes[8]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use Database.ProtoReflect.Descriptor instead.
+func (*Database) Descriptor() ([]byte, []int) {
+ return file_v1_database_service_proto_rawDescGZIP(), []int{8}
+}
+
+func (x *Database) GetName() string {
+ if x != nil {
+ return x.Name
+ }
+ return ""
+}
+
+func (x *Database) GetSyncState() State {
+ if x != nil {
+ return x.SyncState
+ }
+ return State_STATE_UNSPECIFIED
+}
+
+func (x *Database) GetSuccessfulSyncTime() *timestamppb.Timestamp {
+ if x != nil {
+ return x.SuccessfulSyncTime
+ }
+ return nil
+}
+
+func (x *Database) GetProject() string {
+ if x != nil {
+ return x.Project
+ }
+ return ""
+}
+
+func (x *Database) GetCharacterSet() string {
+ if x != nil {
+ return x.CharacterSet
+ }
+ return ""
+}
+
+func (x *Database) GetCollation() string {
+ if x != nil {
+ return x.Collation
+ }
+ return ""
+}
+
+func (x *Database) GetSchemaVersion() string {
+ if x != nil {
+ return x.SchemaVersion
+ }
+ return ""
+}
+
+func (x *Database) GetLabels() map[string]string {
+ if x != nil {
+ return x.Labels
+ }
+ return nil
+}
+
+// DatabaseMetadata is the metadata for databases.
+type DatabaseMetadata struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
+ // The schemas is the list of schemas in a database.
+ Schemas []*SchemaMetadata `protobuf:"bytes,2,rep,name=schemas,proto3" json:"schemas,omitempty"`
+ // The character_set is the character set of a database.
+ CharacterSet string `protobuf:"bytes,3,opt,name=character_set,json=characterSet,proto3" json:"character_set,omitempty"`
+ // The collation is the collation of a database.
+ Collation string `protobuf:"bytes,4,opt,name=collation,proto3" json:"collation,omitempty"`
+ // The extensions is the list of extensions in a database.
+ Extensions []*ExtensionMetadata `protobuf:"bytes,5,rep,name=extensions,proto3" json:"extensions,omitempty"`
+}
+
+func (x *DatabaseMetadata) Reset() {
+ *x = DatabaseMetadata{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_v1_database_service_proto_msgTypes[9]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *DatabaseMetadata) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*DatabaseMetadata) ProtoMessage() {}
+
+func (x *DatabaseMetadata) ProtoReflect() protoreflect.Message {
+ mi := &file_v1_database_service_proto_msgTypes[9]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use DatabaseMetadata.ProtoReflect.Descriptor instead.
+func (*DatabaseMetadata) Descriptor() ([]byte, []int) {
+ return file_v1_database_service_proto_rawDescGZIP(), []int{9}
+}
+
+func (x *DatabaseMetadata) GetName() string {
+ if x != nil {
+ return x.Name
+ }
+ return ""
+}
+
+func (x *DatabaseMetadata) GetSchemas() []*SchemaMetadata {
+ if x != nil {
+ return x.Schemas
+ }
+ return nil
+}
+
+func (x *DatabaseMetadata) GetCharacterSet() string {
+ if x != nil {
+ return x.CharacterSet
+ }
+ return ""
+}
+
+func (x *DatabaseMetadata) GetCollation() string {
+ if x != nil {
+ return x.Collation
+ }
+ return ""
+}
+
+func (x *DatabaseMetadata) GetExtensions() []*ExtensionMetadata {
+ if x != nil {
+ return x.Extensions
+ }
+ return nil
+}
+
+// SchemaMetadata is the metadata for schemas.
+// This is the concept of schema in Postgres, but it's a no-op for MySQL.
+type SchemaMetadata struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // The name is the schema name.
+ // It is an empty string for databases without such concept such as MySQL.
+ Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
+ // The tables is the list of tables in a schema.
+ Tables []*TableMetadata `protobuf:"bytes,2,rep,name=tables,proto3" json:"tables,omitempty"`
+ // The views is the list of views in a schema.
+ Views []*ViewMetadata `protobuf:"bytes,3,rep,name=views,proto3" json:"views,omitempty"`
+}
+
+func (x *SchemaMetadata) Reset() {
+ *x = SchemaMetadata{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_v1_database_service_proto_msgTypes[10]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *SchemaMetadata) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*SchemaMetadata) ProtoMessage() {}
+
+func (x *SchemaMetadata) ProtoReflect() protoreflect.Message {
+ mi := &file_v1_database_service_proto_msgTypes[10]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use SchemaMetadata.ProtoReflect.Descriptor instead.
+func (*SchemaMetadata) Descriptor() ([]byte, []int) {
+ return file_v1_database_service_proto_rawDescGZIP(), []int{10}
+}
+
+func (x *SchemaMetadata) GetName() string {
+ if x != nil {
+ return x.Name
+ }
+ return ""
+}
+
+func (x *SchemaMetadata) GetTables() []*TableMetadata {
+ if x != nil {
+ return x.Tables
+ }
+ return nil
+}
+
+func (x *SchemaMetadata) GetViews() []*ViewMetadata {
+ if x != nil {
+ return x.Views
+ }
+ return nil
+}
+
+// TableMetadata is the metadata for tables.
+type TableMetadata struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // The name is the name of a table.
+ Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
+ // The columns is the ordered list of columns in a table.
+ Columns []*ColumnMetadata `protobuf:"bytes,2,rep,name=columns,proto3" json:"columns,omitempty"`
+ // The indexes is the list of indexes in a table.
+ Indexes []*IndexMetadata `protobuf:"bytes,3,rep,name=indexes,proto3" json:"indexes,omitempty"`
+ // The engine is the engine of a table.
+ Engine string `protobuf:"bytes,4,opt,name=engine,proto3" json:"engine,omitempty"`
+ // The collation is the collation of a table.
+ Collation string `protobuf:"bytes,5,opt,name=collation,proto3" json:"collation,omitempty"`
+ // The row_count is the estimated number of rows of a table.
+ RowCount int64 `protobuf:"varint,6,opt,name=row_count,json=rowCount,proto3" json:"row_count,omitempty"`
+ // The data_size is the estimated data size of a table.
+ DataSize int64 `protobuf:"varint,7,opt,name=data_size,json=dataSize,proto3" json:"data_size,omitempty"`
+ // The index_size is the estimated index size of a table.
+ IndexSize int64 `protobuf:"varint,8,opt,name=index_size,json=indexSize,proto3" json:"index_size,omitempty"`
+ // The data_free is the estimated free data size of a table.
+ DataFree int64 `protobuf:"varint,9,opt,name=data_free,json=dataFree,proto3" json:"data_free,omitempty"`
+ // The create_options is the create option of a table.
+ CreateOptions string `protobuf:"bytes,10,opt,name=create_options,json=createOptions,proto3" json:"create_options,omitempty"`
+ // The comment is the comment of a table.
+ Comment string `protobuf:"bytes,11,opt,name=comment,proto3" json:"comment,omitempty"`
+ // The foreign_keys is the list of foreign keys in a table.
+ ForeignKeys []*ForeignKeyMetadata `protobuf:"bytes,12,rep,name=foreign_keys,json=foreignKeys,proto3" json:"foreign_keys,omitempty"`
+}
+
+func (x *TableMetadata) Reset() {
+ *x = TableMetadata{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_v1_database_service_proto_msgTypes[11]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *TableMetadata) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*TableMetadata) ProtoMessage() {}
+
+func (x *TableMetadata) ProtoReflect() protoreflect.Message {
+ mi := &file_v1_database_service_proto_msgTypes[11]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use TableMetadata.ProtoReflect.Descriptor instead.
+func (*TableMetadata) Descriptor() ([]byte, []int) {
+ return file_v1_database_service_proto_rawDescGZIP(), []int{11}
+}
+
+func (x *TableMetadata) GetName() string {
+ if x != nil {
+ return x.Name
+ }
+ return ""
+}
+
+func (x *TableMetadata) GetColumns() []*ColumnMetadata {
+ if x != nil {
+ return x.Columns
+ }
+ return nil
+}
+
+func (x *TableMetadata) GetIndexes() []*IndexMetadata {
+ if x != nil {
+ return x.Indexes
+ }
+ return nil
+}
+
+func (x *TableMetadata) GetEngine() string {
+ if x != nil {
+ return x.Engine
+ }
+ return ""
+}
+
+func (x *TableMetadata) GetCollation() string {
+ if x != nil {
+ return x.Collation
+ }
+ return ""
+}
+
+func (x *TableMetadata) GetRowCount() int64 {
+ if x != nil {
+ return x.RowCount
+ }
+ return 0
+}
+
+func (x *TableMetadata) GetDataSize() int64 {
+ if x != nil {
+ return x.DataSize
+ }
+ return 0
+}
+
+func (x *TableMetadata) GetIndexSize() int64 {
+ if x != nil {
+ return x.IndexSize
+ }
+ return 0
+}
+
+func (x *TableMetadata) GetDataFree() int64 {
+ if x != nil {
+ return x.DataFree
+ }
+ return 0
+}
+
+func (x *TableMetadata) GetCreateOptions() string {
+ if x != nil {
+ return x.CreateOptions
+ }
+ return ""
+}
+
+func (x *TableMetadata) GetComment() string {
+ if x != nil {
+ return x.Comment
+ }
+ return ""
+}
+
+func (x *TableMetadata) GetForeignKeys() []*ForeignKeyMetadata {
+ if x != nil {
+ return x.ForeignKeys
+ }
+ return nil
+}
+
+// ColumnMetadata is the metadata for columns.
+type ColumnMetadata struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // The name is the name of a column.
+ Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
+ // The position is the position in columns.
+ Position int32 `protobuf:"varint,2,opt,name=position,proto3" json:"position,omitempty"`
+ // The default is the default of a column. Use google.protobuf.StringValue to distinguish between an empty string default value or no default.
+ Default *wrapperspb.StringValue `protobuf:"bytes,3,opt,name=default,proto3" json:"default,omitempty"`
+ // The nullable is the nullable of a column.
+ Nullable bool `protobuf:"varint,4,opt,name=nullable,proto3" json:"nullable,omitempty"`
+ // The type is the type of a column.
+ Type string `protobuf:"bytes,5,opt,name=type,proto3" json:"type,omitempty"`
+ // The character_set is the character_set of a column.
+ CharacterSet string `protobuf:"bytes,6,opt,name=character_set,json=characterSet,proto3" json:"character_set,omitempty"`
+ // The collation is the collation of a column.
+ Collation string `protobuf:"bytes,7,opt,name=collation,proto3" json:"collation,omitempty"`
+ // The comment is the comment of a column.
+ Comment string `protobuf:"bytes,8,opt,name=comment,proto3" json:"comment,omitempty"`
+}
+
+func (x *ColumnMetadata) Reset() {
+ *x = ColumnMetadata{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_v1_database_service_proto_msgTypes[12]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *ColumnMetadata) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ColumnMetadata) ProtoMessage() {}
+
+func (x *ColumnMetadata) ProtoReflect() protoreflect.Message {
+ mi := &file_v1_database_service_proto_msgTypes[12]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use ColumnMetadata.ProtoReflect.Descriptor instead.
+func (*ColumnMetadata) Descriptor() ([]byte, []int) {
+ return file_v1_database_service_proto_rawDescGZIP(), []int{12}
+}
+
+func (x *ColumnMetadata) GetName() string {
+ if x != nil {
+ return x.Name
+ }
+ return ""
+}
+
+func (x *ColumnMetadata) GetPosition() int32 {
+ if x != nil {
+ return x.Position
+ }
+ return 0
+}
+
+func (x *ColumnMetadata) GetDefault() *wrapperspb.StringValue {
+ if x != nil {
+ return x.Default
+ }
+ return nil
+}
+
+func (x *ColumnMetadata) GetNullable() bool {
+ if x != nil {
+ return x.Nullable
+ }
+ return false
+}
+
+func (x *ColumnMetadata) GetType() string {
+ if x != nil {
+ return x.Type
+ }
+ return ""
+}
+
+func (x *ColumnMetadata) GetCharacterSet() string {
+ if x != nil {
+ return x.CharacterSet
+ }
+ return ""
+}
+
+func (x *ColumnMetadata) GetCollation() string {
+ if x != nil {
+ return x.Collation
+ }
+ return ""
+}
+
+func (x *ColumnMetadata) GetComment() string {
+ if x != nil {
+ return x.Comment
+ }
+ return ""
+}
+
+// ViewMetadata is the metadata for views.
+type ViewMetadata struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // The name is the name of a view.
+ Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
+ // The definition is the definition of a view.
+ Definition string `protobuf:"bytes,2,opt,name=definition,proto3" json:"definition,omitempty"`
+ // The comment is the comment of a view.
+ Comment string `protobuf:"bytes,3,opt,name=comment,proto3" json:"comment,omitempty"`
+}
+
+func (x *ViewMetadata) Reset() {
+ *x = ViewMetadata{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_v1_database_service_proto_msgTypes[13]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *ViewMetadata) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ViewMetadata) ProtoMessage() {}
+
+func (x *ViewMetadata) ProtoReflect() protoreflect.Message {
+ mi := &file_v1_database_service_proto_msgTypes[13]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use ViewMetadata.ProtoReflect.Descriptor instead.
+func (*ViewMetadata) Descriptor() ([]byte, []int) {
+ return file_v1_database_service_proto_rawDescGZIP(), []int{13}
+}
+
+func (x *ViewMetadata) GetName() string {
+ if x != nil {
+ return x.Name
+ }
+ return ""
+}
+
+func (x *ViewMetadata) GetDefinition() string {
+ if x != nil {
+ return x.Definition
+ }
+ return ""
+}
+
+func (x *ViewMetadata) GetComment() string {
+ if x != nil {
+ return x.Comment
+ }
+ return ""
+}
+
+// IndexMetadata is the metadata for indexes.
+type IndexMetadata struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // The name is the name of an index.
+ Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
+ // The expressions are the ordered columns or expressions of an index.
+ // This could refer to a column or an expression.
+ Expressions []string `protobuf:"bytes,2,rep,name=expressions,proto3" json:"expressions,omitempty"`
+ // The type is the type of an index.
+ Type string `protobuf:"bytes,3,opt,name=type,proto3" json:"type,omitempty"`
+ // The unique is whether the index is unique.
+ Unique bool `protobuf:"varint,4,opt,name=unique,proto3" json:"unique,omitempty"`
+ // The primary is whether the index is a primary key index.
+ Primary bool `protobuf:"varint,5,opt,name=primary,proto3" json:"primary,omitempty"`
+ // The visible is whether the index is visible.
+ Visible bool `protobuf:"varint,6,opt,name=visible,proto3" json:"visible,omitempty"`
+ // The comment is the comment of an index.
+ Comment string `protobuf:"bytes,7,opt,name=comment,proto3" json:"comment,omitempty"`
+}
+
+func (x *IndexMetadata) Reset() {
+ *x = IndexMetadata{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_v1_database_service_proto_msgTypes[14]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *IndexMetadata) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*IndexMetadata) ProtoMessage() {}
+
+func (x *IndexMetadata) ProtoReflect() protoreflect.Message {
+ mi := &file_v1_database_service_proto_msgTypes[14]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use IndexMetadata.ProtoReflect.Descriptor instead.
+func (*IndexMetadata) Descriptor() ([]byte, []int) {
+ return file_v1_database_service_proto_rawDescGZIP(), []int{14}
+}
+
+func (x *IndexMetadata) GetName() string {
+ if x != nil {
+ return x.Name
+ }
+ return ""
+}
+
+func (x *IndexMetadata) GetExpressions() []string {
+ if x != nil {
+ return x.Expressions
+ }
+ return nil
+}
+
+func (x *IndexMetadata) GetType() string {
+ if x != nil {
+ return x.Type
+ }
+ return ""
+}
+
+func (x *IndexMetadata) GetUnique() bool {
+ if x != nil {
+ return x.Unique
+ }
+ return false
+}
+
+func (x *IndexMetadata) GetPrimary() bool {
+ if x != nil {
+ return x.Primary
+ }
+ return false
+}
+
+func (x *IndexMetadata) GetVisible() bool {
+ if x != nil {
+ return x.Visible
+ }
+ return false
+}
+
+func (x *IndexMetadata) GetComment() string {
+ if x != nil {
+ return x.Comment
+ }
+ return ""
+}
+
+// ExtensionMetadata is the metadata for extensions.
+type ExtensionMetadata struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // The name is the name of an extension.
+ Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
+ // The schema is the extension that is installed to. But the extension usage is not limited to the schema.
+ Schema string `protobuf:"bytes,2,opt,name=schema,proto3" json:"schema,omitempty"`
+ // The version is the version of an extension.
+ Version string `protobuf:"bytes,3,opt,name=version,proto3" json:"version,omitempty"`
+ // The description is the description of an extension.
+ Description string `protobuf:"bytes,4,opt,name=description,proto3" json:"description,omitempty"`
+}
+
+func (x *ExtensionMetadata) Reset() {
+ *x = ExtensionMetadata{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_v1_database_service_proto_msgTypes[15]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *ExtensionMetadata) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ExtensionMetadata) ProtoMessage() {}
+
+func (x *ExtensionMetadata) ProtoReflect() protoreflect.Message {
+ mi := &file_v1_database_service_proto_msgTypes[15]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use ExtensionMetadata.ProtoReflect.Descriptor instead.
+func (*ExtensionMetadata) Descriptor() ([]byte, []int) {
+ return file_v1_database_service_proto_rawDescGZIP(), []int{15}
+}
+
+func (x *ExtensionMetadata) GetName() string {
+ if x != nil {
+ return x.Name
+ }
+ return ""
+}
+
+func (x *ExtensionMetadata) GetSchema() string {
+ if x != nil {
+ return x.Schema
+ }
+ return ""
+}
+
+func (x *ExtensionMetadata) GetVersion() string {
+ if x != nil {
+ return x.Version
+ }
+ return ""
+}
+
+func (x *ExtensionMetadata) GetDescription() string {
+ if x != nil {
+ return x.Description
+ }
+ return ""
+}
+
+// ForeignKeyMetadata is the metadata for foreign keys.
+type ForeignKeyMetadata struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // The name is the name of a foreign key.
+ Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
+ // The columns are the ordered referencing columns of a foreign key.
+ Columns []string `protobuf:"bytes,2,rep,name=columns,proto3" json:"columns,omitempty"`
+ // The referenced_schema is the referenced schema name of a foreign key.
+ // It is an empty string for databases without such concept such as MySQL.
+ ReferencedSchema string `protobuf:"bytes,3,opt,name=referenced_schema,json=referencedSchema,proto3" json:"referenced_schema,omitempty"`
+ // The referenced_table is the referenced table name of a foreign key.
+ ReferencedTable string `protobuf:"bytes,4,opt,name=referenced_table,json=referencedTable,proto3" json:"referenced_table,omitempty"`
+ // The referenced_columns are the ordered referenced columns of a foreign key.
+ ReferencedColumns []string `protobuf:"bytes,5,rep,name=referenced_columns,json=referencedColumns,proto3" json:"referenced_columns,omitempty"`
+ // The on_delete is the on delete action of a foreign key.
+ OnDelete string `protobuf:"bytes,6,opt,name=on_delete,json=onDelete,proto3" json:"on_delete,omitempty"`
+ // The on_update is the on update action of a foreign key.
+ OnUpdate string `protobuf:"bytes,7,opt,name=on_update,json=onUpdate,proto3" json:"on_update,omitempty"`
+ // The match_type is the match type of a foreign key.
+ // The match_type is the PostgreSQL specific field.
+ // It's empty string for other databases.
+ MatchType string `protobuf:"bytes,8,opt,name=match_type,json=matchType,proto3" json:"match_type,omitempty"`
+}
+
+func (x *ForeignKeyMetadata) Reset() {
+ *x = ForeignKeyMetadata{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_v1_database_service_proto_msgTypes[16]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *ForeignKeyMetadata) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ForeignKeyMetadata) ProtoMessage() {}
+
+func (x *ForeignKeyMetadata) ProtoReflect() protoreflect.Message {
+ mi := &file_v1_database_service_proto_msgTypes[16]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use ForeignKeyMetadata.ProtoReflect.Descriptor instead.
+func (*ForeignKeyMetadata) Descriptor() ([]byte, []int) {
+ return file_v1_database_service_proto_rawDescGZIP(), []int{16}
+}
+
+func (x *ForeignKeyMetadata) GetName() string {
+ if x != nil {
+ return x.Name
+ }
+ return ""
+}
+
+func (x *ForeignKeyMetadata) GetColumns() []string {
+ if x != nil {
+ return x.Columns
+ }
+ return nil
+}
+
+func (x *ForeignKeyMetadata) GetReferencedSchema() string {
+ if x != nil {
+ return x.ReferencedSchema
+ }
+ return ""
+}
+
+func (x *ForeignKeyMetadata) GetReferencedTable() string {
+ if x != nil {
+ return x.ReferencedTable
+ }
+ return ""
+}
+
+func (x *ForeignKeyMetadata) GetReferencedColumns() []string {
+ if x != nil {
+ return x.ReferencedColumns
+ }
+ return nil
+}
+
+func (x *ForeignKeyMetadata) GetOnDelete() string {
+ if x != nil {
+ return x.OnDelete
+ }
+ return ""
+}
+
+func (x *ForeignKeyMetadata) GetOnUpdate() string {
+ if x != nil {
+ return x.OnUpdate
+ }
+ return ""
+}
+
+func (x *ForeignKeyMetadata) GetMatchType() string {
+ if x != nil {
+ return x.MatchType
+ }
+ return ""
+}
+
+// DatabaseMetadata is the metadata for databases.
+type DatabaseSchema struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // The schema dump from database.
+ Schema string `protobuf:"bytes,1,opt,name=schema,proto3" json:"schema,omitempty"`
+}
+
+func (x *DatabaseSchema) Reset() {
+ *x = DatabaseSchema{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_v1_database_service_proto_msgTypes[17]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *DatabaseSchema) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*DatabaseSchema) ProtoMessage() {}
+
+func (x *DatabaseSchema) ProtoReflect() protoreflect.Message {
+ mi := &file_v1_database_service_proto_msgTypes[17]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use DatabaseSchema.ProtoReflect.Descriptor instead.
+func (*DatabaseSchema) Descriptor() ([]byte, []int) {
+ return file_v1_database_service_proto_rawDescGZIP(), []int{17}
+}
+
+func (x *DatabaseSchema) GetSchema() string {
+ if x != nil {
+ return x.Schema
+ }
+ return ""
+}
+
+var File_v1_database_service_proto protoreflect.FileDescriptor
+
+var file_v1_database_service_proto_rawDesc = []byte{
+ 0x0a, 0x19, 0x76, 0x31, 0x2f, 0x64, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x5f, 0x73, 0x65,
+ 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0b, 0x62, 0x79, 0x74,
+ 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65,
+ 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73,
+ 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61,
+ 0x70, 0x69, 0x2f, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a,
+ 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x66, 0x69, 0x65, 0x6c,
+ 0x64, 0x5f, 0x62, 0x65, 0x68, 0x61, 0x76, 0x69, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
+ 0x1a, 0x1b, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75,
+ 0x66, 0x2f, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x20, 0x67,
+ 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x66,
+ 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a,
+ 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66,
+ 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
+ 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75,
+ 0x66, 0x2f, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
+ 0x1a, 0x0f, 0x76, 0x31, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74,
+ 0x6f, 0x22, 0x2e, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65,
+ 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x18, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18,
+ 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x04, 0xe2, 0x41, 0x01, 0x02, 0x52, 0x04, 0x6e, 0x61, 0x6d,
+ 0x65, 0x22, 0x88, 0x01, 0x0a, 0x14, 0x4c, 0x69, 0x73, 0x74, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61,
+ 0x73, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x06, 0x70, 0x61,
+ 0x72, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x04, 0xe2, 0x41, 0x01, 0x02,
+ 0x52, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65,
+ 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x70, 0x61, 0x67,
+ 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f,
+ 0x6b, 0x65, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x61, 0x67, 0x65, 0x54,
+ 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, 0x04,
+ 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x22, 0x74, 0x0a, 0x15,
+ 0x4c, 0x69, 0x73, 0x74, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x73, 0x52, 0x65, 0x73,
+ 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x33, 0x0a, 0x09, 0x64, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73,
+ 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62,
+ 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x52,
+ 0x09, 0x64, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x73, 0x12, 0x26, 0x0a, 0x0f, 0x6e, 0x65,
+ 0x78, 0x74, 0x5f, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20,
+ 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6e, 0x65, 0x78, 0x74, 0x50, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b,
+ 0x65, 0x6e, 0x22, 0x8d, 0x01, 0x0a, 0x15, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x44, 0x61, 0x74,
+ 0x61, 0x62, 0x61, 0x73, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x37, 0x0a, 0x08,
+ 0x64, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15,
+ 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x61, 0x74,
+ 0x61, 0x62, 0x61, 0x73, 0x65, 0x42, 0x04, 0xe2, 0x41, 0x01, 0x02, 0x52, 0x08, 0x64, 0x61, 0x74,
+ 0x61, 0x62, 0x61, 0x73, 0x65, 0x12, 0x3b, 0x0a, 0x0b, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f,
+ 0x6d, 0x61, 0x73, 0x6b, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f,
+ 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65,
+ 0x6c, 0x64, 0x4d, 0x61, 0x73, 0x6b, 0x52, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4d, 0x61,
+ 0x73, 0x6b, 0x22, 0x7b, 0x0a, 0x1b, 0x42, 0x61, 0x74, 0x63, 0x68, 0x55, 0x70, 0x64, 0x61, 0x74,
+ 0x65, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
+ 0x74, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28,
+ 0x09, 0x52, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x12, 0x44, 0x0a, 0x08, 0x72, 0x65, 0x71,
+ 0x75, 0x65, 0x73, 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x62, 0x79,
+ 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65,
+ 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x42,
+ 0x04, 0xe2, 0x41, 0x01, 0x02, 0x52, 0x08, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x22,
+ 0x53, 0x0a, 0x1c, 0x42, 0x61, 0x74, 0x63, 0x68, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x44, 0x61,
+ 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12,
+ 0x33, 0x0a, 0x09, 0x64, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03,
+ 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31,
+ 0x2e, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x52, 0x09, 0x64, 0x61, 0x74, 0x61, 0x62,
+ 0x61, 0x73, 0x65, 0x73, 0x22, 0x36, 0x0a, 0x1a, 0x47, 0x65, 0x74, 0x44, 0x61, 0x74, 0x61, 0x62,
+ 0x61, 0x73, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x65, 0x71, 0x75, 0x65,
+ 0x73, 0x74, 0x12, 0x18, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,
+ 0x42, 0x04, 0xe2, 0x41, 0x01, 0x02, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x34, 0x0a, 0x18,
+ 0x47, 0x65, 0x74, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x53, 0x63, 0x68, 0x65, 0x6d,
+ 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x18, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65,
+ 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x04, 0xe2, 0x41, 0x01, 0x02, 0x52, 0x04, 0x6e, 0x61,
+ 0x6d, 0x65, 0x22, 0xb7, 0x03, 0x0a, 0x08, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x12,
+ 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e,
+ 0x61, 0x6d, 0x65, 0x12, 0x37, 0x0a, 0x0a, 0x73, 0x79, 0x6e, 0x63, 0x5f, 0x73, 0x74, 0x61, 0x74,
+ 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x12, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61,
+ 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x42, 0x04, 0xe2, 0x41, 0x01,
+ 0x03, 0x52, 0x09, 0x73, 0x79, 0x6e, 0x63, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x52, 0x0a, 0x14,
+ 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x66, 0x75, 0x6c, 0x5f, 0x73, 0x79, 0x6e, 0x63, 0x5f,
+ 0x74, 0x69, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f,
+ 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d,
+ 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x04, 0xe2, 0x41, 0x01, 0x03, 0x52, 0x12, 0x73, 0x75,
+ 0x63, 0x63, 0x65, 0x73, 0x73, 0x66, 0x75, 0x6c, 0x53, 0x79, 0x6e, 0x63, 0x54, 0x69, 0x6d, 0x65,
+ 0x12, 0x18, 0x0a, 0x07, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28,
+ 0x09, 0x52, 0x07, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x29, 0x0a, 0x0d, 0x63, 0x68,
+ 0x61, 0x72, 0x61, 0x63, 0x74, 0x65, 0x72, 0x5f, 0x73, 0x65, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28,
+ 0x09, 0x42, 0x04, 0xe2, 0x41, 0x01, 0x03, 0x52, 0x0c, 0x63, 0x68, 0x61, 0x72, 0x61, 0x63, 0x74,
+ 0x65, 0x72, 0x53, 0x65, 0x74, 0x12, 0x22, 0x0a, 0x09, 0x63, 0x6f, 0x6c, 0x6c, 0x61, 0x74, 0x69,
+ 0x6f, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x42, 0x04, 0xe2, 0x41, 0x01, 0x03, 0x52, 0x09,
+ 0x63, 0x6f, 0x6c, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2b, 0x0a, 0x0e, 0x73, 0x63, 0x68,
+ 0x65, 0x6d, 0x61, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x07, 0x20, 0x01, 0x28,
+ 0x09, 0x42, 0x04, 0xe2, 0x41, 0x01, 0x03, 0x52, 0x0d, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x56,
+ 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x39, 0x0a, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73,
+ 0x18, 0x08, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73,
+ 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x4c, 0x61,
+ 0x62, 0x65, 0x6c, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c,
+ 0x73, 0x1a, 0x39, 0x0a, 0x0b, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79,
+ 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b,
+ 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28,
+ 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0xe0, 0x01, 0x0a,
+ 0x10, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74,
+ 0x61, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52,
+ 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x35, 0x0a, 0x07, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x73,
+ 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73,
+ 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x4d, 0x65, 0x74, 0x61, 0x64,
+ 0x61, 0x74, 0x61, 0x52, 0x07, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x73, 0x12, 0x23, 0x0a, 0x0d,
+ 0x63, 0x68, 0x61, 0x72, 0x61, 0x63, 0x74, 0x65, 0x72, 0x5f, 0x73, 0x65, 0x74, 0x18, 0x03, 0x20,
+ 0x01, 0x28, 0x09, 0x52, 0x0c, 0x63, 0x68, 0x61, 0x72, 0x61, 0x63, 0x74, 0x65, 0x72, 0x53, 0x65,
+ 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x63, 0x6f, 0x6c, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04,
+ 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x63, 0x6f, 0x6c, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12,
+ 0x3e, 0x0a, 0x0a, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x05, 0x20,
+ 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76,
+ 0x31, 0x2e, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x61, 0x64,
+ 0x61, 0x74, 0x61, 0x52, 0x0a, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x22,
+ 0x89, 0x01, 0x0a, 0x0e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61,
+ 0x74, 0x61, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,
+ 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x32, 0x0a, 0x06, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x73,
+ 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73,
+ 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61,
+ 0x74, 0x61, 0x52, 0x06, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x12, 0x2f, 0x0a, 0x05, 0x76, 0x69,
+ 0x65, 0x77, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x62, 0x79, 0x74, 0x65,
+ 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x56, 0x69, 0x65, 0x77, 0x4d, 0x65, 0x74, 0x61,
+ 0x64, 0x61, 0x74, 0x61, 0x52, 0x05, 0x76, 0x69, 0x65, 0x77, 0x73, 0x22, 0xc1, 0x03, 0x0a, 0x0d,
+ 0x54, 0x61, 0x62, 0x6c, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x12, 0x0a,
+ 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d,
+ 0x65, 0x12, 0x35, 0x0a, 0x07, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x03,
+ 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31,
+ 0x2e, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52,
+ 0x07, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x73, 0x12, 0x34, 0x0a, 0x07, 0x69, 0x6e, 0x64, 0x65,
+ 0x78, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x62, 0x79, 0x74, 0x65,
+ 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x4d, 0x65, 0x74,
+ 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x07, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x65, 0x73, 0x12, 0x16,
+ 0x0a, 0x06, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06,
+ 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x63, 0x6f, 0x6c, 0x6c, 0x61, 0x74,
+ 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x63, 0x6f, 0x6c, 0x6c, 0x61,
+ 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1b, 0x0a, 0x09, 0x72, 0x6f, 0x77, 0x5f, 0x63, 0x6f, 0x75, 0x6e,
+ 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x72, 0x6f, 0x77, 0x43, 0x6f, 0x75, 0x6e,
+ 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x07,
+ 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x64, 0x61, 0x74, 0x61, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x1d,
+ 0x0a, 0x0a, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x08, 0x20, 0x01,
+ 0x28, 0x03, 0x52, 0x09, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x1b, 0x0a,
+ 0x09, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x66, 0x72, 0x65, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x03,
+ 0x52, 0x08, 0x64, 0x61, 0x74, 0x61, 0x46, 0x72, 0x65, 0x65, 0x12, 0x25, 0x0a, 0x0e, 0x63, 0x72,
+ 0x65, 0x61, 0x74, 0x65, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x0a, 0x20, 0x01,
+ 0x28, 0x09, 0x52, 0x0d, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e,
+ 0x73, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x0b, 0x20, 0x01,
+ 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x42, 0x0a, 0x0c, 0x66,
+ 0x6f, 0x72, 0x65, 0x69, 0x67, 0x6e, 0x5f, 0x6b, 0x65, 0x79, 0x73, 0x18, 0x0c, 0x20, 0x03, 0x28,
+ 0x0b, 0x32, 0x1f, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e,
+ 0x46, 0x6f, 0x72, 0x65, 0x69, 0x67, 0x6e, 0x4b, 0x65, 0x79, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61,
+ 0x74, 0x61, 0x52, 0x0b, 0x66, 0x6f, 0x72, 0x65, 0x69, 0x67, 0x6e, 0x4b, 0x65, 0x79, 0x73, 0x22,
+ 0x85, 0x02, 0x0a, 0x0e, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61,
+ 0x74, 0x61, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,
+ 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69,
+ 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69,
+ 0x6f, 0x6e, 0x12, 0x36, 0x0a, 0x07, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x18, 0x03, 0x20,
+ 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f,
+ 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75,
+ 0x65, 0x52, 0x07, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x6e, 0x75,
+ 0x6c, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x6e, 0x75,
+ 0x6c, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x05,
+ 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x63, 0x68,
+ 0x61, 0x72, 0x61, 0x63, 0x74, 0x65, 0x72, 0x5f, 0x73, 0x65, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28,
+ 0x09, 0x52, 0x0c, 0x63, 0x68, 0x61, 0x72, 0x61, 0x63, 0x74, 0x65, 0x72, 0x53, 0x65, 0x74, 0x12,
+ 0x1c, 0x0a, 0x09, 0x63, 0x6f, 0x6c, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x07, 0x20, 0x01,
+ 0x28, 0x09, 0x52, 0x09, 0x63, 0x6f, 0x6c, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x18, 0x0a,
+ 0x07, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07,
+ 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x22, 0x5c, 0x0a, 0x0c, 0x56, 0x69, 0x65, 0x77, 0x4d,
+ 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18,
+ 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x64,
+ 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52,
+ 0x0a, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x18, 0x0a, 0x07, 0x63,
+ 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f,
+ 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x22, 0xbf, 0x01, 0x0a, 0x0d, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x4d,
+ 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18,
+ 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x65,
+ 0x78, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09,
+ 0x52, 0x0b, 0x65, 0x78, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x12, 0x0a,
+ 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70,
+ 0x65, 0x12, 0x16, 0x0a, 0x06, 0x75, 0x6e, 0x69, 0x71, 0x75, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28,
+ 0x08, 0x52, 0x06, 0x75, 0x6e, 0x69, 0x71, 0x75, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x70, 0x72, 0x69,
+ 0x6d, 0x61, 0x72, 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x70, 0x72, 0x69, 0x6d,
+ 0x61, 0x72, 0x79, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x69, 0x73, 0x69, 0x62, 0x6c, 0x65, 0x18, 0x06,
+ 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x76, 0x69, 0x73, 0x69, 0x62, 0x6c, 0x65, 0x12, 0x18, 0x0a,
+ 0x07, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07,
+ 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x22, 0x7b, 0x0a, 0x11, 0x45, 0x78, 0x74, 0x65, 0x6e,
+ 0x73, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x12, 0x0a, 0x04,
+ 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65,
+ 0x12, 0x16, 0x0a, 0x06, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09,
+ 0x52, 0x06, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73,
+ 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69,
+ 0x6f, 0x6e, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f,
+ 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70,
+ 0x74, 0x69, 0x6f, 0x6e, 0x22, 0xa2, 0x02, 0x0a, 0x12, 0x46, 0x6f, 0x72, 0x65, 0x69, 0x67, 0x6e,
+ 0x4b, 0x65, 0x79, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x12, 0x0a, 0x04, 0x6e,
+ 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12,
+ 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09,
+ 0x52, 0x07, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x73, 0x12, 0x2b, 0x0a, 0x11, 0x72, 0x65, 0x66,
+ 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x64, 0x5f, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x18, 0x03,
+ 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x64,
+ 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x12, 0x29, 0x0a, 0x10, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65,
+ 0x6e, 0x63, 0x65, 0x64, 0x5f, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09,
+ 0x52, 0x0f, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x64, 0x54, 0x61, 0x62, 0x6c,
+ 0x65, 0x12, 0x2d, 0x0a, 0x12, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x64, 0x5f,
+ 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x09, 0x52, 0x11, 0x72,
+ 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x64, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x73,
+ 0x12, 0x1b, 0x0a, 0x09, 0x6f, 0x6e, 0x5f, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x18, 0x06, 0x20,
+ 0x01, 0x28, 0x09, 0x52, 0x08, 0x6f, 0x6e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x12, 0x1b, 0x0a,
+ 0x09, 0x6f, 0x6e, 0x5f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09,
+ 0x52, 0x08, 0x6f, 0x6e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x6d, 0x61,
+ 0x74, 0x63, 0x68, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09,
+ 0x6d, 0x61, 0x74, 0x63, 0x68, 0x54, 0x79, 0x70, 0x65, 0x22, 0x28, 0x0a, 0x0e, 0x44, 0x61, 0x74,
+ 0x61, 0x62, 0x61, 0x73, 0x65, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x12, 0x16, 0x0a, 0x06, 0x73,
+ 0x63, 0x68, 0x65, 0x6d, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x63, 0x68,
+ 0x65, 0x6d, 0x61, 0x32, 0xdd, 0x07, 0x0a, 0x0f, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65,
+ 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x87, 0x01, 0x0a, 0x0b, 0x47, 0x65, 0x74, 0x44,
+ 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x12, 0x1f, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61,
+ 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73,
+ 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x15, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62,
+ 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x22,
+ 0x40, 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x33, 0x12, 0x31,
+ 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x65, 0x6e, 0x76, 0x69, 0x72, 0x6f,
+ 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63,
+ 0x65, 0x73, 0x2f, 0x2a, 0x2f, 0x64, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x73, 0x2f, 0x2a,
+ 0x7d, 0x12, 0x94, 0x01, 0x0a, 0x0d, 0x4c, 0x69, 0x73, 0x74, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61,
+ 0x73, 0x65, 0x73, 0x12, 0x21, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76,
+ 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x73, 0x52,
+ 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73,
+ 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73,
+ 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x3c, 0xda, 0x41, 0x00, 0x82,
+ 0xd3, 0xe4, 0x93, 0x02, 0x33, 0x12, 0x31, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x70, 0x61, 0x72, 0x65,
+ 0x6e, 0x74, 0x3d, 0x65, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x2f,
+ 0x2a, 0x2f, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x64,
+ 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x73, 0x12, 0xb0, 0x01, 0x0a, 0x0e, 0x55, 0x70, 0x64,
+ 0x61, 0x74, 0x65, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x12, 0x22, 0x2e, 0x62, 0x79,
+ 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65,
+ 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a,
+ 0x15, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x61,
+ 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x22, 0x63, 0xda, 0x41, 0x14, 0x64, 0x61, 0x74, 0x61, 0x62,
+ 0x61, 0x73, 0x65, 0x2c, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x82,
+ 0xd3, 0xe4, 0x93, 0x02, 0x46, 0x3a, 0x08, 0x64, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x32,
+ 0x3a, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x64, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x6e,
+ 0x61, 0x6d, 0x65, 0x3d, 0x65, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x73,
+ 0x2f, 0x2a, 0x2f, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x2f, 0x2a, 0x2f, 0x64,
+ 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x73, 0x2f, 0x2a, 0x7d, 0x12, 0xb5, 0x01, 0x0a, 0x14,
+ 0x42, 0x61, 0x74, 0x63, 0x68, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x44, 0x61, 0x74, 0x61, 0x62,
+ 0x61, 0x73, 0x65, 0x73, 0x12, 0x28, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e,
+ 0x76, 0x31, 0x2e, 0x42, 0x61, 0x74, 0x63, 0x68, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x44, 0x61,
+ 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x29,
+ 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x61, 0x74,
+ 0x63, 0x68, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65,
+ 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x48, 0x82, 0xd3, 0xe4, 0x93, 0x02,
+ 0x42, 0x3a, 0x01, 0x2a, 0x22, 0x3d, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x70, 0x61, 0x72, 0x65, 0x6e,
+ 0x74, 0x3d, 0x65, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x2f, 0x2a,
+ 0x2f, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x64, 0x61,
+ 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x73, 0x3a, 0x62, 0x61, 0x74, 0x63, 0x68, 0x55, 0x70, 0x64,
+ 0x61, 0x74, 0x65, 0x12, 0xa1, 0x01, 0x0a, 0x13, 0x47, 0x65, 0x74, 0x44, 0x61, 0x74, 0x61, 0x62,
+ 0x61, 0x73, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x27, 0x2e, 0x62, 0x79,
+ 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x44, 0x61, 0x74,
+ 0x61, 0x62, 0x61, 0x73, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x65, 0x71,
+ 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e,
+ 0x76, 0x31, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x64,
+ 0x61, 0x74, 0x61, 0x22, 0x42, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x3c, 0x12, 0x3a, 0x2f, 0x76, 0x31,
+ 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x65, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65,
+ 0x6e, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x2f,
+ 0x2a, 0x2f, 0x64, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x73, 0x2f, 0x2a, 0x2f, 0x6d, 0x65,
+ 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x7d, 0x12, 0x99, 0x01, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x44,
+ 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x12, 0x25, 0x2e,
+ 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x44,
+ 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, 0x65, 0x71,
+ 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e,
+ 0x76, 0x31, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x53, 0x63, 0x68, 0x65, 0x6d,
+ 0x61, 0x22, 0x40, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x3a, 0x12, 0x38, 0x2f, 0x76, 0x31, 0x2f, 0x7b,
+ 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x65, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74,
+ 0x73, 0x2f, 0x2a, 0x2f, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x2f, 0x2a, 0x2f,
+ 0x64, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x73, 0x2f, 0x2a, 0x2f, 0x73, 0x63, 0x68, 0x65,
+ 0x6d, 0x61, 0x7d, 0x42, 0x11, 0x5a, 0x0f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64,
+ 0x2d, 0x67, 0x6f, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
+}
+
+var (
+ file_v1_database_service_proto_rawDescOnce sync.Once
+ file_v1_database_service_proto_rawDescData = file_v1_database_service_proto_rawDesc
+)
+
+func file_v1_database_service_proto_rawDescGZIP() []byte {
+ file_v1_database_service_proto_rawDescOnce.Do(func() {
+ file_v1_database_service_proto_rawDescData = protoimpl.X.CompressGZIP(file_v1_database_service_proto_rawDescData)
+ })
+ return file_v1_database_service_proto_rawDescData
+}
+
+var file_v1_database_service_proto_msgTypes = make([]protoimpl.MessageInfo, 19)
+var file_v1_database_service_proto_goTypes = []interface{}{
+ (*GetDatabaseRequest)(nil), // 0: bytebase.v1.GetDatabaseRequest
+ (*ListDatabasesRequest)(nil), // 1: bytebase.v1.ListDatabasesRequest
+ (*ListDatabasesResponse)(nil), // 2: bytebase.v1.ListDatabasesResponse
+ (*UpdateDatabaseRequest)(nil), // 3: bytebase.v1.UpdateDatabaseRequest
+ (*BatchUpdateDatabasesRequest)(nil), // 4: bytebase.v1.BatchUpdateDatabasesRequest
+ (*BatchUpdateDatabasesResponse)(nil), // 5: bytebase.v1.BatchUpdateDatabasesResponse
+ (*GetDatabaseMetadataRequest)(nil), // 6: bytebase.v1.GetDatabaseMetadataRequest
+ (*GetDatabaseSchemaRequest)(nil), // 7: bytebase.v1.GetDatabaseSchemaRequest
+ (*Database)(nil), // 8: bytebase.v1.Database
+ (*DatabaseMetadata)(nil), // 9: bytebase.v1.DatabaseMetadata
+ (*SchemaMetadata)(nil), // 10: bytebase.v1.SchemaMetadata
+ (*TableMetadata)(nil), // 11: bytebase.v1.TableMetadata
+ (*ColumnMetadata)(nil), // 12: bytebase.v1.ColumnMetadata
+ (*ViewMetadata)(nil), // 13: bytebase.v1.ViewMetadata
+ (*IndexMetadata)(nil), // 14: bytebase.v1.IndexMetadata
+ (*ExtensionMetadata)(nil), // 15: bytebase.v1.ExtensionMetadata
+ (*ForeignKeyMetadata)(nil), // 16: bytebase.v1.ForeignKeyMetadata
+ (*DatabaseSchema)(nil), // 17: bytebase.v1.DatabaseSchema
+ nil, // 18: bytebase.v1.Database.LabelsEntry
+ (*fieldmaskpb.FieldMask)(nil), // 19: google.protobuf.FieldMask
+ (State)(0), // 20: bytebase.v1.State
+ (*timestamppb.Timestamp)(nil), // 21: google.protobuf.Timestamp
+ (*wrapperspb.StringValue)(nil), // 22: google.protobuf.StringValue
+}
+var file_v1_database_service_proto_depIdxs = []int32{
+ 8, // 0: bytebase.v1.ListDatabasesResponse.databases:type_name -> bytebase.v1.Database
+ 8, // 1: bytebase.v1.UpdateDatabaseRequest.database:type_name -> bytebase.v1.Database
+ 19, // 2: bytebase.v1.UpdateDatabaseRequest.update_mask:type_name -> google.protobuf.FieldMask
+ 3, // 3: bytebase.v1.BatchUpdateDatabasesRequest.requests:type_name -> bytebase.v1.UpdateDatabaseRequest
+ 8, // 4: bytebase.v1.BatchUpdateDatabasesResponse.databases:type_name -> bytebase.v1.Database
+ 20, // 5: bytebase.v1.Database.sync_state:type_name -> bytebase.v1.State
+ 21, // 6: bytebase.v1.Database.successful_sync_time:type_name -> google.protobuf.Timestamp
+ 18, // 7: bytebase.v1.Database.labels:type_name -> bytebase.v1.Database.LabelsEntry
+ 10, // 8: bytebase.v1.DatabaseMetadata.schemas:type_name -> bytebase.v1.SchemaMetadata
+ 15, // 9: bytebase.v1.DatabaseMetadata.extensions:type_name -> bytebase.v1.ExtensionMetadata
+ 11, // 10: bytebase.v1.SchemaMetadata.tables:type_name -> bytebase.v1.TableMetadata
+ 13, // 11: bytebase.v1.SchemaMetadata.views:type_name -> bytebase.v1.ViewMetadata
+ 12, // 12: bytebase.v1.TableMetadata.columns:type_name -> bytebase.v1.ColumnMetadata
+ 14, // 13: bytebase.v1.TableMetadata.indexes:type_name -> bytebase.v1.IndexMetadata
+ 16, // 14: bytebase.v1.TableMetadata.foreign_keys:type_name -> bytebase.v1.ForeignKeyMetadata
+ 22, // 15: bytebase.v1.ColumnMetadata.default:type_name -> google.protobuf.StringValue
+ 0, // 16: bytebase.v1.DatabaseService.GetDatabase:input_type -> bytebase.v1.GetDatabaseRequest
+ 1, // 17: bytebase.v1.DatabaseService.ListDatabases:input_type -> bytebase.v1.ListDatabasesRequest
+ 3, // 18: bytebase.v1.DatabaseService.UpdateDatabase:input_type -> bytebase.v1.UpdateDatabaseRequest
+ 4, // 19: bytebase.v1.DatabaseService.BatchUpdateDatabases:input_type -> bytebase.v1.BatchUpdateDatabasesRequest
+ 6, // 20: bytebase.v1.DatabaseService.GetDatabaseMetadata:input_type -> bytebase.v1.GetDatabaseMetadataRequest
+ 7, // 21: bytebase.v1.DatabaseService.GetDatabaseSchema:input_type -> bytebase.v1.GetDatabaseSchemaRequest
+ 8, // 22: bytebase.v1.DatabaseService.GetDatabase:output_type -> bytebase.v1.Database
+ 2, // 23: bytebase.v1.DatabaseService.ListDatabases:output_type -> bytebase.v1.ListDatabasesResponse
+ 8, // 24: bytebase.v1.DatabaseService.UpdateDatabase:output_type -> bytebase.v1.Database
+ 5, // 25: bytebase.v1.DatabaseService.BatchUpdateDatabases:output_type -> bytebase.v1.BatchUpdateDatabasesResponse
+ 9, // 26: bytebase.v1.DatabaseService.GetDatabaseMetadata:output_type -> bytebase.v1.DatabaseMetadata
+ 17, // 27: bytebase.v1.DatabaseService.GetDatabaseSchema:output_type -> bytebase.v1.DatabaseSchema
+ 22, // [22:28] is the sub-list for method output_type
+ 16, // [16:22] is the sub-list for method input_type
+ 16, // [16:16] is the sub-list for extension type_name
+ 16, // [16:16] is the sub-list for extension extendee
+ 0, // [0:16] is the sub-list for field type_name
+}
+
+func init() { file_v1_database_service_proto_init() }
+func file_v1_database_service_proto_init() {
+ if File_v1_database_service_proto != nil {
+ return
+ }
+ file_v1_common_proto_init()
+ if !protoimpl.UnsafeEnabled {
+ file_v1_database_service_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*GetDatabaseRequest); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_v1_database_service_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*ListDatabasesRequest); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_v1_database_service_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*ListDatabasesResponse); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_v1_database_service_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*UpdateDatabaseRequest); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_v1_database_service_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*BatchUpdateDatabasesRequest); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_v1_database_service_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*BatchUpdateDatabasesResponse); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_v1_database_service_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*GetDatabaseMetadataRequest); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_v1_database_service_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*GetDatabaseSchemaRequest); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_v1_database_service_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*Database); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_v1_database_service_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*DatabaseMetadata); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_v1_database_service_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*SchemaMetadata); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_v1_database_service_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*TableMetadata); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_v1_database_service_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*ColumnMetadata); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_v1_database_service_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*ViewMetadata); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_v1_database_service_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*IndexMetadata); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_v1_database_service_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*ExtensionMetadata); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_v1_database_service_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*ForeignKeyMetadata); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_v1_database_service_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*DatabaseSchema); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ }
+ type x struct{}
+ out := protoimpl.TypeBuilder{
+ File: protoimpl.DescBuilder{
+ GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
+ RawDescriptor: file_v1_database_service_proto_rawDesc,
+ NumEnums: 0,
+ NumMessages: 19,
+ NumExtensions: 0,
+ NumServices: 1,
+ },
+ GoTypes: file_v1_database_service_proto_goTypes,
+ DependencyIndexes: file_v1_database_service_proto_depIdxs,
+ MessageInfos: file_v1_database_service_proto_msgTypes,
+ }.Build()
+ File_v1_database_service_proto = out.File
+ file_v1_database_service_proto_rawDesc = nil
+ file_v1_database_service_proto_goTypes = nil
+ file_v1_database_service_proto_depIdxs = nil
+}
diff --git a/proto/generated-go/v1/database_service.pb.gw.go b/proto/generated-go/v1/database_service.pb.gw.go
new file mode 100644
index 0000000000..3bbc2e04ff
--- /dev/null
+++ b/proto/generated-go/v1/database_service.pb.gw.go
@@ -0,0 +1,786 @@
+// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT.
+// source: v1/database_service.proto
+
+/*
+Package v1 is a reverse proxy.
+
+It translates gRPC into RESTful JSON APIs.
+*/
+package v1
+
+import (
+ "context"
+ "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
+var _ io.Reader
+var _ status.Status
+var _ = runtime.String
+var _ = utilities.NewDoubleArray
+var _ = metadata.Join
+
+func request_DatabaseService_GetDatabase_0(ctx context.Context, marshaler runtime.Marshaler, client DatabaseServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
+ var protoReq GetDatabaseRequest
+ var metadata runtime.ServerMetadata
+
+ var (
+ val string
+ ok bool
+ err error
+ _ = err
+ )
+
+ 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.GetDatabase(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
+ return msg, metadata, err
+
+}
+
+func local_request_DatabaseService_GetDatabase_0(ctx context.Context, marshaler runtime.Marshaler, server DatabaseServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
+ var protoReq GetDatabaseRequest
+ var metadata runtime.ServerMetadata
+
+ var (
+ val string
+ ok bool
+ err error
+ _ = err
+ )
+
+ 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.GetDatabase(ctx, &protoReq)
+ return msg, metadata, err
+
+}
+
+var (
+ filter_DatabaseService_ListDatabases_0 = &utilities.DoubleArray{Encoding: map[string]int{"parent": 0}, Base: []int{1, 2, 0, 0}, Check: []int{0, 1, 2, 2}}
+)
+
+func request_DatabaseService_ListDatabases_0(ctx context.Context, marshaler runtime.Marshaler, client DatabaseServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
+ var protoReq ListDatabasesRequest
+ var metadata runtime.ServerMetadata
+
+ var (
+ val string
+ ok bool
+ err error
+ _ = err
+ )
+
+ val, ok = pathParams["parent"]
+ if !ok {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "parent")
+ }
+
+ protoReq.Parent, err = runtime.String(val)
+ if err != nil {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "parent", err)
+ }
+
+ if err := req.ParseForm(); err != nil {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
+ }
+ if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_DatabaseService_ListDatabases_0); err != nil {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
+ }
+
+ msg, err := client.ListDatabases(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
+ return msg, metadata, err
+
+}
+
+func local_request_DatabaseService_ListDatabases_0(ctx context.Context, marshaler runtime.Marshaler, server DatabaseServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
+ var protoReq ListDatabasesRequest
+ var metadata runtime.ServerMetadata
+
+ var (
+ val string
+ ok bool
+ err error
+ _ = err
+ )
+
+ val, ok = pathParams["parent"]
+ if !ok {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "parent")
+ }
+
+ protoReq.Parent, err = runtime.String(val)
+ if err != nil {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "parent", err)
+ }
+
+ if err := req.ParseForm(); err != nil {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
+ }
+ if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_DatabaseService_ListDatabases_0); err != nil {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
+ }
+
+ msg, err := server.ListDatabases(ctx, &protoReq)
+ return msg, metadata, err
+
+}
+
+var (
+ filter_DatabaseService_UpdateDatabase_0 = &utilities.DoubleArray{Encoding: map[string]int{"database": 0, "name": 1}, Base: []int{1, 4, 5, 2, 0, 0, 0, 0}, Check: []int{0, 1, 1, 2, 4, 2, 2, 3}}
+)
+
+func request_DatabaseService_UpdateDatabase_0(ctx context.Context, marshaler runtime.Marshaler, client DatabaseServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
+ var protoReq UpdateDatabaseRequest
+ var metadata runtime.ServerMetadata
+
+ newReader, berr := utilities.IOReaderFactory(req.Body)
+ if berr != nil {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr)
+ }
+ if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.Database); err != nil && err != io.EOF {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
+ }
+ if protoReq.UpdateMask == nil || len(protoReq.UpdateMask.GetPaths()) == 0 {
+ if fieldMask, err := runtime.FieldMaskFromRequestBody(newReader(), protoReq.Database); err != nil {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
+ } else {
+ protoReq.UpdateMask = fieldMask
+ }
+ }
+
+ var (
+ val string
+ ok bool
+ err error
+ _ = err
+ )
+
+ val, ok = pathParams["database.name"]
+ if !ok {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "database.name")
+ }
+
+ err = runtime.PopulateFieldFromPath(&protoReq, "database.name", val)
+ if err != nil {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "database.name", 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_UpdateDatabase_0); err != nil {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
+ }
+
+ msg, err := client.UpdateDatabase(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
+ return msg, metadata, err
+
+}
+
+func local_request_DatabaseService_UpdateDatabase_0(ctx context.Context, marshaler runtime.Marshaler, server DatabaseServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
+ var protoReq UpdateDatabaseRequest
+ var metadata runtime.ServerMetadata
+
+ newReader, berr := utilities.IOReaderFactory(req.Body)
+ if berr != nil {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr)
+ }
+ if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.Database); err != nil && err != io.EOF {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
+ }
+ if protoReq.UpdateMask == nil || len(protoReq.UpdateMask.GetPaths()) == 0 {
+ if fieldMask, err := runtime.FieldMaskFromRequestBody(newReader(), protoReq.Database); err != nil {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
+ } else {
+ protoReq.UpdateMask = fieldMask
+ }
+ }
+
+ var (
+ val string
+ ok bool
+ err error
+ _ = err
+ )
+
+ val, ok = pathParams["database.name"]
+ if !ok {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "database.name")
+ }
+
+ err = runtime.PopulateFieldFromPath(&protoReq, "database.name", val)
+ if err != nil {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "database.name", 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_UpdateDatabase_0); err != nil {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
+ }
+
+ msg, err := server.UpdateDatabase(ctx, &protoReq)
+ return msg, metadata, err
+
+}
+
+func request_DatabaseService_BatchUpdateDatabases_0(ctx context.Context, marshaler runtime.Marshaler, client DatabaseServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
+ var protoReq BatchUpdateDatabasesRequest
+ var metadata runtime.ServerMetadata
+
+ newReader, berr := utilities.IOReaderFactory(req.Body)
+ if berr != nil {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr)
+ }
+ if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
+ }
+
+ var (
+ val string
+ ok bool
+ err error
+ _ = err
+ )
+
+ val, ok = pathParams["parent"]
+ if !ok {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "parent")
+ }
+
+ protoReq.Parent, err = runtime.String(val)
+ if err != nil {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "parent", err)
+ }
+
+ msg, err := client.BatchUpdateDatabases(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
+ return msg, metadata, err
+
+}
+
+func local_request_DatabaseService_BatchUpdateDatabases_0(ctx context.Context, marshaler runtime.Marshaler, server DatabaseServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
+ var protoReq BatchUpdateDatabasesRequest
+ var metadata runtime.ServerMetadata
+
+ newReader, berr := utilities.IOReaderFactory(req.Body)
+ if berr != nil {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr)
+ }
+ if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
+ }
+
+ var (
+ val string
+ ok bool
+ err error
+ _ = err
+ )
+
+ val, ok = pathParams["parent"]
+ if !ok {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "parent")
+ }
+
+ protoReq.Parent, err = runtime.String(val)
+ if err != nil {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "parent", err)
+ }
+
+ msg, err := server.BatchUpdateDatabases(ctx, &protoReq)
+ return msg, metadata, err
+
+}
+
+func request_DatabaseService_GetDatabaseMetadata_0(ctx context.Context, marshaler runtime.Marshaler, client DatabaseServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
+ var protoReq GetDatabaseMetadataRequest
+ var metadata runtime.ServerMetadata
+
+ var (
+ val string
+ ok bool
+ err error
+ _ = err
+ )
+
+ 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.GetDatabaseMetadata(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
+ return msg, metadata, err
+
+}
+
+func local_request_DatabaseService_GetDatabaseMetadata_0(ctx context.Context, marshaler runtime.Marshaler, server DatabaseServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
+ var protoReq GetDatabaseMetadataRequest
+ var metadata runtime.ServerMetadata
+
+ var (
+ val string
+ ok bool
+ err error
+ _ = err
+ )
+
+ 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.GetDatabaseMetadata(ctx, &protoReq)
+ return msg, metadata, err
+
+}
+
+func request_DatabaseService_GetDatabaseSchema_0(ctx context.Context, marshaler runtime.Marshaler, client DatabaseServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
+ var protoReq GetDatabaseSchemaRequest
+ var metadata runtime.ServerMetadata
+
+ var (
+ val string
+ ok bool
+ err error
+ _ = err
+ )
+
+ 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.GetDatabaseSchema(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
+ return msg, metadata, err
+
+}
+
+func local_request_DatabaseService_GetDatabaseSchema_0(ctx context.Context, marshaler runtime.Marshaler, server DatabaseServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
+ var protoReq GetDatabaseSchemaRequest
+ var metadata runtime.ServerMetadata
+
+ var (
+ val string
+ ok bool
+ err error
+ _ = err
+ )
+
+ 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.GetDatabaseSchema(ctx, &protoReq)
+ return msg, metadata, err
+
+}
+
+// RegisterDatabaseServiceHandlerServer registers the http handlers for service DatabaseService to "mux".
+// UnaryRPC :call DatabaseServiceServer 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 RegisterDatabaseServiceHandlerFromEndpoint instead.
+func RegisterDatabaseServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server DatabaseServiceServer) error {
+
+ mux.Handle("GET", pattern_DatabaseService_GetDatabase_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
+ ctx, cancel := context.WithCancel(req.Context())
+ defer cancel()
+ var stream runtime.ServerTransportStream
+ ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
+ inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
+ var err error
+ var annotatedContext context.Context
+ annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/bytebase.v1.DatabaseService/GetDatabase", runtime.WithHTTPPathPattern("/v1/{name=environments/*/instances/*/databases/*}"))
+ if err != nil {
+ runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ return
+ }
+ resp, md, err := local_request_DatabaseService_GetDatabase_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_GetDatabase_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+
+ })
+
+ mux.Handle("GET", pattern_DatabaseService_ListDatabases_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
+ ctx, cancel := context.WithCancel(req.Context())
+ defer cancel()
+ var stream runtime.ServerTransportStream
+ ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
+ inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
+ var err error
+ var annotatedContext context.Context
+ annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/bytebase.v1.DatabaseService/ListDatabases", runtime.WithHTTPPathPattern("/v1/{parent=environments/*/instances/*}/databases"))
+ if err != nil {
+ runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ return
+ }
+ resp, md, err := local_request_DatabaseService_ListDatabases_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_ListDatabases_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+
+ })
+
+ mux.Handle("PATCH", pattern_DatabaseService_UpdateDatabase_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
+ ctx, cancel := context.WithCancel(req.Context())
+ defer cancel()
+ var stream runtime.ServerTransportStream
+ ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
+ inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
+ var err error
+ var annotatedContext context.Context
+ annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/bytebase.v1.DatabaseService/UpdateDatabase", runtime.WithHTTPPathPattern("/v1/{database.name=environments/*/instances/*/databases/*}"))
+ if err != nil {
+ runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ return
+ }
+ resp, md, err := local_request_DatabaseService_UpdateDatabase_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_UpdateDatabase_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+
+ })
+
+ mux.Handle("POST", pattern_DatabaseService_BatchUpdateDatabases_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
+ ctx, cancel := context.WithCancel(req.Context())
+ defer cancel()
+ var stream runtime.ServerTransportStream
+ ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
+ inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
+ var err error
+ var annotatedContext context.Context
+ annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/bytebase.v1.DatabaseService/BatchUpdateDatabases", runtime.WithHTTPPathPattern("/v1/{parent=environments/*/instances/*}/databases:batchUpdate"))
+ if err != nil {
+ runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ return
+ }
+ resp, md, err := local_request_DatabaseService_BatchUpdateDatabases_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_BatchUpdateDatabases_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+
+ })
+
+ mux.Handle("GET", pattern_DatabaseService_GetDatabaseMetadata_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
+ ctx, cancel := context.WithCancel(req.Context())
+ defer cancel()
+ var stream runtime.ServerTransportStream
+ ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
+ inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
+ var err error
+ var annotatedContext context.Context
+ annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/bytebase.v1.DatabaseService/GetDatabaseMetadata", runtime.WithHTTPPathPattern("/v1/{name=environments/*/instances/*/databases/*/metadata}"))
+ if err != nil {
+ runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ return
+ }
+ resp, md, err := local_request_DatabaseService_GetDatabaseMetadata_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_GetDatabaseMetadata_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+
+ })
+
+ mux.Handle("GET", pattern_DatabaseService_GetDatabaseSchema_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
+ ctx, cancel := context.WithCancel(req.Context())
+ defer cancel()
+ var stream runtime.ServerTransportStream
+ ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
+ inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
+ var err error
+ var annotatedContext context.Context
+ annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/bytebase.v1.DatabaseService/GetDatabaseSchema", runtime.WithHTTPPathPattern("/v1/{name=environments/*/instances/*/databases/*/schema}"))
+ if err != nil {
+ runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ return
+ }
+ resp, md, err := local_request_DatabaseService_GetDatabaseSchema_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_GetDatabaseSchema_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+
+ })
+
+ return nil
+}
+
+// RegisterDatabaseServiceHandlerFromEndpoint is same as RegisterDatabaseServiceHandler but
+// automatically dials to "endpoint" and closes the connection when "ctx" gets done.
+func RegisterDatabaseServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) {
+ conn, err := grpc.Dial(endpoint, opts...)
+ if err != nil {
+ return err
+ }
+ defer func() {
+ if err != nil {
+ if cerr := conn.Close(); cerr != nil {
+ grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr)
+ }
+ return
+ }
+ go func() {
+ <-ctx.Done()
+ if cerr := conn.Close(); cerr != nil {
+ grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr)
+ }
+ }()
+ }()
+
+ return RegisterDatabaseServiceHandler(ctx, mux, conn)
+}
+
+// RegisterDatabaseServiceHandler registers the http handlers for service DatabaseService to "mux".
+// The handlers forward requests to the grpc endpoint over "conn".
+func RegisterDatabaseServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error {
+ return RegisterDatabaseServiceHandlerClient(ctx, mux, NewDatabaseServiceClient(conn))
+}
+
+// RegisterDatabaseServiceHandlerClient registers the http handlers for service DatabaseService
+// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "DatabaseServiceClient".
+// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "DatabaseServiceClient"
+// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in
+// "DatabaseServiceClient" to call the correct interceptors.
+func RegisterDatabaseServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client DatabaseServiceClient) error {
+
+ mux.Handle("GET", pattern_DatabaseService_GetDatabase_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
+ ctx, cancel := context.WithCancel(req.Context())
+ defer cancel()
+ inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
+ var err error
+ var annotatedContext context.Context
+ annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/bytebase.v1.DatabaseService/GetDatabase", runtime.WithHTTPPathPattern("/v1/{name=environments/*/instances/*/databases/*}"))
+ if err != nil {
+ runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ return
+ }
+ resp, md, err := request_DatabaseService_GetDatabase_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_GetDatabase_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+
+ })
+
+ mux.Handle("GET", pattern_DatabaseService_ListDatabases_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
+ ctx, cancel := context.WithCancel(req.Context())
+ defer cancel()
+ inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
+ var err error
+ var annotatedContext context.Context
+ annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/bytebase.v1.DatabaseService/ListDatabases", runtime.WithHTTPPathPattern("/v1/{parent=environments/*/instances/*}/databases"))
+ if err != nil {
+ runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ return
+ }
+ resp, md, err := request_DatabaseService_ListDatabases_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_ListDatabases_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+
+ })
+
+ mux.Handle("PATCH", pattern_DatabaseService_UpdateDatabase_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
+ ctx, cancel := context.WithCancel(req.Context())
+ defer cancel()
+ inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
+ var err error
+ var annotatedContext context.Context
+ annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/bytebase.v1.DatabaseService/UpdateDatabase", runtime.WithHTTPPathPattern("/v1/{database.name=environments/*/instances/*/databases/*}"))
+ if err != nil {
+ runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ return
+ }
+ resp, md, err := request_DatabaseService_UpdateDatabase_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_UpdateDatabase_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+
+ })
+
+ mux.Handle("POST", pattern_DatabaseService_BatchUpdateDatabases_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
+ ctx, cancel := context.WithCancel(req.Context())
+ defer cancel()
+ inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
+ var err error
+ var annotatedContext context.Context
+ annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/bytebase.v1.DatabaseService/BatchUpdateDatabases", runtime.WithHTTPPathPattern("/v1/{parent=environments/*/instances/*}/databases:batchUpdate"))
+ if err != nil {
+ runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ return
+ }
+ resp, md, err := request_DatabaseService_BatchUpdateDatabases_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_BatchUpdateDatabases_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+
+ })
+
+ mux.Handle("GET", pattern_DatabaseService_GetDatabaseMetadata_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
+ ctx, cancel := context.WithCancel(req.Context())
+ defer cancel()
+ inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
+ var err error
+ var annotatedContext context.Context
+ annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/bytebase.v1.DatabaseService/GetDatabaseMetadata", runtime.WithHTTPPathPattern("/v1/{name=environments/*/instances/*/databases/*/metadata}"))
+ if err != nil {
+ runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ return
+ }
+ resp, md, err := request_DatabaseService_GetDatabaseMetadata_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_GetDatabaseMetadata_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+
+ })
+
+ mux.Handle("GET", pattern_DatabaseService_GetDatabaseSchema_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
+ ctx, cancel := context.WithCancel(req.Context())
+ defer cancel()
+ inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
+ var err error
+ var annotatedContext context.Context
+ annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/bytebase.v1.DatabaseService/GetDatabaseSchema", runtime.WithHTTPPathPattern("/v1/{name=environments/*/instances/*/databases/*/schema}"))
+ if err != nil {
+ runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ return
+ }
+ resp, md, err := request_DatabaseService_GetDatabaseSchema_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_GetDatabaseSchema_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+
+ })
+
+ return nil
+}
+
+var (
+ pattern_DatabaseService_GetDatabase_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", "environments", "instances", "databases", "name"}, ""))
+
+ pattern_DatabaseService_ListDatabases_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", "environments", "instances", "parent", "databases"}, ""))
+
+ pattern_DatabaseService_UpdateDatabase_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", "environments", "instances", "databases", "database.name"}, ""))
+
+ pattern_DatabaseService_BatchUpdateDatabases_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", "environments", "instances", "parent", "databases"}, "batchUpdate"))
+
+ pattern_DatabaseService_GetDatabaseMetadata_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 2, 2, 1, 0, 2, 3, 1, 0, 2, 4, 4, 7, 5, 5}, []string{"v1", "environments", "instances", "databases", "metadata", "name"}, ""))
+
+ pattern_DatabaseService_GetDatabaseSchema_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 2, 2, 1, 0, 2, 3, 1, 0, 2, 4, 4, 7, 5, 5}, []string{"v1", "environments", "instances", "databases", "schema", "name"}, ""))
+)
+
+var (
+ forward_DatabaseService_GetDatabase_0 = runtime.ForwardResponseMessage
+
+ forward_DatabaseService_ListDatabases_0 = runtime.ForwardResponseMessage
+
+ forward_DatabaseService_UpdateDatabase_0 = runtime.ForwardResponseMessage
+
+ forward_DatabaseService_BatchUpdateDatabases_0 = runtime.ForwardResponseMessage
+
+ forward_DatabaseService_GetDatabaseMetadata_0 = runtime.ForwardResponseMessage
+
+ forward_DatabaseService_GetDatabaseSchema_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
new file mode 100644
index 0000000000..9eddbc7122
--- /dev/null
+++ b/proto/generated-go/v1/database_service_grpc.pb.go
@@ -0,0 +1,285 @@
+// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
+// versions:
+// - protoc-gen-go-grpc v1.2.0
+// - protoc (unknown)
+// source: v1/database_service.proto
+
+package v1
+
+import (
+ context "context"
+ grpc "google.golang.org/grpc"
+ codes "google.golang.org/grpc/codes"
+ status "google.golang.org/grpc/status"
+)
+
+// 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.32.0 or later.
+const _ = grpc.SupportPackageIsVersion7
+
+// DatabaseServiceClient is the client API for DatabaseService 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 DatabaseServiceClient interface {
+ GetDatabase(ctx context.Context, in *GetDatabaseRequest, opts ...grpc.CallOption) (*Database, error)
+ ListDatabases(ctx context.Context, in *ListDatabasesRequest, opts ...grpc.CallOption) (*ListDatabasesResponse, error)
+ UpdateDatabase(ctx context.Context, in *UpdateDatabaseRequest, opts ...grpc.CallOption) (*Database, error)
+ BatchUpdateDatabases(ctx context.Context, in *BatchUpdateDatabasesRequest, opts ...grpc.CallOption) (*BatchUpdateDatabasesResponse, error)
+ GetDatabaseMetadata(ctx context.Context, in *GetDatabaseMetadataRequest, opts ...grpc.CallOption) (*DatabaseMetadata, error)
+ GetDatabaseSchema(ctx context.Context, in *GetDatabaseSchemaRequest, opts ...grpc.CallOption) (*DatabaseSchema, error)
+}
+
+type databaseServiceClient struct {
+ cc grpc.ClientConnInterface
+}
+
+func NewDatabaseServiceClient(cc grpc.ClientConnInterface) DatabaseServiceClient {
+ return &databaseServiceClient{cc}
+}
+
+func (c *databaseServiceClient) GetDatabase(ctx context.Context, in *GetDatabaseRequest, opts ...grpc.CallOption) (*Database, error) {
+ out := new(Database)
+ err := c.cc.Invoke(ctx, "/bytebase.v1.DatabaseService/GetDatabase", in, out, opts...)
+ if err != nil {
+ return nil, err
+ }
+ return out, nil
+}
+
+func (c *databaseServiceClient) ListDatabases(ctx context.Context, in *ListDatabasesRequest, opts ...grpc.CallOption) (*ListDatabasesResponse, error) {
+ out := new(ListDatabasesResponse)
+ err := c.cc.Invoke(ctx, "/bytebase.v1.DatabaseService/ListDatabases", in, out, opts...)
+ if err != nil {
+ return nil, err
+ }
+ return out, nil
+}
+
+func (c *databaseServiceClient) UpdateDatabase(ctx context.Context, in *UpdateDatabaseRequest, opts ...grpc.CallOption) (*Database, error) {
+ out := new(Database)
+ err := c.cc.Invoke(ctx, "/bytebase.v1.DatabaseService/UpdateDatabase", in, out, opts...)
+ if err != nil {
+ return nil, err
+ }
+ return out, nil
+}
+
+func (c *databaseServiceClient) BatchUpdateDatabases(ctx context.Context, in *BatchUpdateDatabasesRequest, opts ...grpc.CallOption) (*BatchUpdateDatabasesResponse, error) {
+ out := new(BatchUpdateDatabasesResponse)
+ err := c.cc.Invoke(ctx, "/bytebase.v1.DatabaseService/BatchUpdateDatabases", in, out, opts...)
+ if err != nil {
+ return nil, err
+ }
+ return out, nil
+}
+
+func (c *databaseServiceClient) GetDatabaseMetadata(ctx context.Context, in *GetDatabaseMetadataRequest, opts ...grpc.CallOption) (*DatabaseMetadata, error) {
+ out := new(DatabaseMetadata)
+ err := c.cc.Invoke(ctx, "/bytebase.v1.DatabaseService/GetDatabaseMetadata", in, out, opts...)
+ if err != nil {
+ return nil, err
+ }
+ return out, nil
+}
+
+func (c *databaseServiceClient) GetDatabaseSchema(ctx context.Context, in *GetDatabaseSchemaRequest, opts ...grpc.CallOption) (*DatabaseSchema, error) {
+ out := new(DatabaseSchema)
+ err := c.cc.Invoke(ctx, "/bytebase.v1.DatabaseService/GetDatabaseSchema", in, out, opts...)
+ if err != nil {
+ return nil, err
+ }
+ return out, nil
+}
+
+// DatabaseServiceServer is the server API for DatabaseService service.
+// All implementations must embed UnimplementedDatabaseServiceServer
+// for forward compatibility
+type DatabaseServiceServer interface {
+ GetDatabase(context.Context, *GetDatabaseRequest) (*Database, error)
+ ListDatabases(context.Context, *ListDatabasesRequest) (*ListDatabasesResponse, error)
+ UpdateDatabase(context.Context, *UpdateDatabaseRequest) (*Database, error)
+ BatchUpdateDatabases(context.Context, *BatchUpdateDatabasesRequest) (*BatchUpdateDatabasesResponse, error)
+ GetDatabaseMetadata(context.Context, *GetDatabaseMetadataRequest) (*DatabaseMetadata, error)
+ GetDatabaseSchema(context.Context, *GetDatabaseSchemaRequest) (*DatabaseSchema, error)
+ mustEmbedUnimplementedDatabaseServiceServer()
+}
+
+// UnimplementedDatabaseServiceServer must be embedded to have forward compatible implementations.
+type UnimplementedDatabaseServiceServer struct {
+}
+
+func (UnimplementedDatabaseServiceServer) GetDatabase(context.Context, *GetDatabaseRequest) (*Database, error) {
+ return nil, status.Errorf(codes.Unimplemented, "method GetDatabase not implemented")
+}
+func (UnimplementedDatabaseServiceServer) ListDatabases(context.Context, *ListDatabasesRequest) (*ListDatabasesResponse, error) {
+ return nil, status.Errorf(codes.Unimplemented, "method ListDatabases not implemented")
+}
+func (UnimplementedDatabaseServiceServer) UpdateDatabase(context.Context, *UpdateDatabaseRequest) (*Database, error) {
+ return nil, status.Errorf(codes.Unimplemented, "method UpdateDatabase not implemented")
+}
+func (UnimplementedDatabaseServiceServer) BatchUpdateDatabases(context.Context, *BatchUpdateDatabasesRequest) (*BatchUpdateDatabasesResponse, error) {
+ return nil, status.Errorf(codes.Unimplemented, "method BatchUpdateDatabases not implemented")
+}
+func (UnimplementedDatabaseServiceServer) GetDatabaseMetadata(context.Context, *GetDatabaseMetadataRequest) (*DatabaseMetadata, error) {
+ return nil, status.Errorf(codes.Unimplemented, "method GetDatabaseMetadata not implemented")
+}
+func (UnimplementedDatabaseServiceServer) GetDatabaseSchema(context.Context, *GetDatabaseSchemaRequest) (*DatabaseSchema, error) {
+ return nil, status.Errorf(codes.Unimplemented, "method GetDatabaseSchema not implemented")
+}
+func (UnimplementedDatabaseServiceServer) mustEmbedUnimplementedDatabaseServiceServer() {}
+
+// UnsafeDatabaseServiceServer may be embedded to opt out of forward compatibility for this service.
+// Use of this interface is not recommended, as added methods to DatabaseServiceServer will
+// result in compilation errors.
+type UnsafeDatabaseServiceServer interface {
+ mustEmbedUnimplementedDatabaseServiceServer()
+}
+
+func RegisterDatabaseServiceServer(s grpc.ServiceRegistrar, srv DatabaseServiceServer) {
+ s.RegisterService(&DatabaseService_ServiceDesc, srv)
+}
+
+func _DatabaseService_GetDatabase_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+ in := new(GetDatabaseRequest)
+ if err := dec(in); err != nil {
+ return nil, err
+ }
+ if interceptor == nil {
+ return srv.(DatabaseServiceServer).GetDatabase(ctx, in)
+ }
+ info := &grpc.UnaryServerInfo{
+ Server: srv,
+ FullMethod: "/bytebase.v1.DatabaseService/GetDatabase",
+ }
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+ return srv.(DatabaseServiceServer).GetDatabase(ctx, req.(*GetDatabaseRequest))
+ }
+ return interceptor(ctx, in, info, handler)
+}
+
+func _DatabaseService_ListDatabases_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+ in := new(ListDatabasesRequest)
+ if err := dec(in); err != nil {
+ return nil, err
+ }
+ if interceptor == nil {
+ return srv.(DatabaseServiceServer).ListDatabases(ctx, in)
+ }
+ info := &grpc.UnaryServerInfo{
+ Server: srv,
+ FullMethod: "/bytebase.v1.DatabaseService/ListDatabases",
+ }
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+ return srv.(DatabaseServiceServer).ListDatabases(ctx, req.(*ListDatabasesRequest))
+ }
+ return interceptor(ctx, in, info, handler)
+}
+
+func _DatabaseService_UpdateDatabase_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+ in := new(UpdateDatabaseRequest)
+ if err := dec(in); err != nil {
+ return nil, err
+ }
+ if interceptor == nil {
+ return srv.(DatabaseServiceServer).UpdateDatabase(ctx, in)
+ }
+ info := &grpc.UnaryServerInfo{
+ Server: srv,
+ FullMethod: "/bytebase.v1.DatabaseService/UpdateDatabase",
+ }
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+ return srv.(DatabaseServiceServer).UpdateDatabase(ctx, req.(*UpdateDatabaseRequest))
+ }
+ return interceptor(ctx, in, info, handler)
+}
+
+func _DatabaseService_BatchUpdateDatabases_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+ in := new(BatchUpdateDatabasesRequest)
+ if err := dec(in); err != nil {
+ return nil, err
+ }
+ if interceptor == nil {
+ return srv.(DatabaseServiceServer).BatchUpdateDatabases(ctx, in)
+ }
+ info := &grpc.UnaryServerInfo{
+ Server: srv,
+ FullMethod: "/bytebase.v1.DatabaseService/BatchUpdateDatabases",
+ }
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+ return srv.(DatabaseServiceServer).BatchUpdateDatabases(ctx, req.(*BatchUpdateDatabasesRequest))
+ }
+ return interceptor(ctx, in, info, handler)
+}
+
+func _DatabaseService_GetDatabaseMetadata_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+ in := new(GetDatabaseMetadataRequest)
+ if err := dec(in); err != nil {
+ return nil, err
+ }
+ if interceptor == nil {
+ return srv.(DatabaseServiceServer).GetDatabaseMetadata(ctx, in)
+ }
+ info := &grpc.UnaryServerInfo{
+ Server: srv,
+ FullMethod: "/bytebase.v1.DatabaseService/GetDatabaseMetadata",
+ }
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+ return srv.(DatabaseServiceServer).GetDatabaseMetadata(ctx, req.(*GetDatabaseMetadataRequest))
+ }
+ return interceptor(ctx, in, info, handler)
+}
+
+func _DatabaseService_GetDatabaseSchema_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+ in := new(GetDatabaseSchemaRequest)
+ if err := dec(in); err != nil {
+ return nil, err
+ }
+ if interceptor == nil {
+ return srv.(DatabaseServiceServer).GetDatabaseSchema(ctx, in)
+ }
+ info := &grpc.UnaryServerInfo{
+ Server: srv,
+ FullMethod: "/bytebase.v1.DatabaseService/GetDatabaseSchema",
+ }
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+ return srv.(DatabaseServiceServer).GetDatabaseSchema(ctx, req.(*GetDatabaseSchemaRequest))
+ }
+ return interceptor(ctx, in, info, handler)
+}
+
+// DatabaseService_ServiceDesc is the grpc.ServiceDesc for DatabaseService service.
+// It's only intended for direct use with grpc.RegisterService,
+// and not to be introspected or modified (even as a copy)
+var DatabaseService_ServiceDesc = grpc.ServiceDesc{
+ ServiceName: "bytebase.v1.DatabaseService",
+ HandlerType: (*DatabaseServiceServer)(nil),
+ Methods: []grpc.MethodDesc{
+ {
+ MethodName: "GetDatabase",
+ Handler: _DatabaseService_GetDatabase_Handler,
+ },
+ {
+ MethodName: "ListDatabases",
+ Handler: _DatabaseService_ListDatabases_Handler,
+ },
+ {
+ MethodName: "UpdateDatabase",
+ Handler: _DatabaseService_UpdateDatabase_Handler,
+ },
+ {
+ MethodName: "BatchUpdateDatabases",
+ Handler: _DatabaseService_BatchUpdateDatabases_Handler,
+ },
+ {
+ MethodName: "GetDatabaseMetadata",
+ Handler: _DatabaseService_GetDatabaseMetadata_Handler,
+ },
+ {
+ MethodName: "GetDatabaseSchema",
+ Handler: _DatabaseService_GetDatabaseSchema_Handler,
+ },
+ },
+ Streams: []grpc.StreamDesc{},
+ Metadata: "v1/database_service.proto",
+}
diff --git a/proto/generated-go/v1/environment_service.pb.go b/proto/generated-go/v1/environment_service.pb.go
index 595184d4d8..2f41eb40ec 100644
--- a/proto/generated-go/v1/environment_service.pb.go
+++ b/proto/generated-go/v1/environment_service.pb.go
@@ -150,7 +150,7 @@ type ListEnvironmentsResponse struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
- // The environments from the specified publisher.
+ // The environments from the specified request.
Environments []*Environment `protobuf:"bytes,1,rep,name=environments,proto3" json:"environments,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.
diff --git a/proto/generated-go/v1/instance_service.pb.go b/proto/generated-go/v1/instance_service.pb.go
index 01b890e060..266c978efe 100644
--- a/proto/generated-go/v1/instance_service.pb.go
+++ b/proto/generated-go/v1/instance_service.pb.go
@@ -274,7 +274,7 @@ type ListInstancesResponse struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
- // The instances from the specified publisher.
+ // The instances from the specified request.
Instances []*Instance `protobuf:"bytes,1,rep,name=instances,proto3" json:"instances,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.
@@ -556,6 +556,191 @@ func (x *UndeleteInstanceRequest) GetName() string {
return ""
}
+type AddDataSourceRequest struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // The name of the instance to add a data source to.
+ // Format: environments/{environment}/instances/{instance}
+ Instance string `protobuf:"bytes,1,opt,name=instance,proto3" json:"instance,omitempty"`
+ // Identified by type.
+ // Only READ_ONLY data source can be added.
+ DataSources *DataSource `protobuf:"bytes,2,opt,name=data_sources,json=dataSources,proto3" json:"data_sources,omitempty"`
+}
+
+func (x *AddDataSourceRequest) Reset() {
+ *x = AddDataSourceRequest{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_v1_instance_service_proto_msgTypes[7]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *AddDataSourceRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*AddDataSourceRequest) ProtoMessage() {}
+
+func (x *AddDataSourceRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_v1_instance_service_proto_msgTypes[7]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use AddDataSourceRequest.ProtoReflect.Descriptor instead.
+func (*AddDataSourceRequest) Descriptor() ([]byte, []int) {
+ return file_v1_instance_service_proto_rawDescGZIP(), []int{7}
+}
+
+func (x *AddDataSourceRequest) GetInstance() string {
+ if x != nil {
+ return x.Instance
+ }
+ return ""
+}
+
+func (x *AddDataSourceRequest) GetDataSources() *DataSource {
+ if x != nil {
+ return x.DataSources
+ }
+ return nil
+}
+
+type RemoveDataSourceRequest struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // The name of the instance to remove a data source from.
+ // Format: environments/{environment}/instances/{instance}
+ Instance string `protobuf:"bytes,1,opt,name=instance,proto3" json:"instance,omitempty"`
+ // Identified by type.
+ // Only READ_ONLY data source can be removed.
+ DataSources *DataSource `protobuf:"bytes,2,opt,name=data_sources,json=dataSources,proto3" json:"data_sources,omitempty"`
+}
+
+func (x *RemoveDataSourceRequest) Reset() {
+ *x = RemoveDataSourceRequest{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_v1_instance_service_proto_msgTypes[8]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *RemoveDataSourceRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*RemoveDataSourceRequest) ProtoMessage() {}
+
+func (x *RemoveDataSourceRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_v1_instance_service_proto_msgTypes[8]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use RemoveDataSourceRequest.ProtoReflect.Descriptor instead.
+func (*RemoveDataSourceRequest) Descriptor() ([]byte, []int) {
+ return file_v1_instance_service_proto_rawDescGZIP(), []int{8}
+}
+
+func (x *RemoveDataSourceRequest) GetInstance() string {
+ if x != nil {
+ return x.Instance
+ }
+ return ""
+}
+
+func (x *RemoveDataSourceRequest) GetDataSources() *DataSource {
+ if x != nil {
+ return x.DataSources
+ }
+ return nil
+}
+
+type UpdateDataSourceRequest struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // The name of the instance to update a data source.
+ // Format: environments/{environment}/instances/{instance}
+ Instance string `protobuf:"bytes,1,opt,name=instance,proto3" json:"instance,omitempty"`
+ // Identified by type.
+ DataSources *DataSource `protobuf:"bytes,2,opt,name=data_sources,json=dataSources,proto3" json:"data_sources,omitempty"`
+ // The list of fields to update.
+ UpdateMask *fieldmaskpb.FieldMask `protobuf:"bytes,3,opt,name=update_mask,json=updateMask,proto3" json:"update_mask,omitempty"`
+}
+
+func (x *UpdateDataSourceRequest) Reset() {
+ *x = UpdateDataSourceRequest{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_v1_instance_service_proto_msgTypes[9]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *UpdateDataSourceRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*UpdateDataSourceRequest) ProtoMessage() {}
+
+func (x *UpdateDataSourceRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_v1_instance_service_proto_msgTypes[9]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use UpdateDataSourceRequest.ProtoReflect.Descriptor instead.
+func (*UpdateDataSourceRequest) Descriptor() ([]byte, []int) {
+ return file_v1_instance_service_proto_rawDescGZIP(), []int{9}
+}
+
+func (x *UpdateDataSourceRequest) GetInstance() string {
+ if x != nil {
+ return x.Instance
+ }
+ return ""
+}
+
+func (x *UpdateDataSourceRequest) GetDataSources() *DataSource {
+ if x != nil {
+ return x.DataSources
+ }
+ return nil
+}
+
+func (x *UpdateDataSourceRequest) GetUpdateMask() *fieldmaskpb.FieldMask {
+ if x != nil {
+ return x.UpdateMask
+ }
+ return nil
+}
+
type Instance struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
@@ -574,7 +759,7 @@ type Instance struct {
func (x *Instance) Reset() {
*x = Instance{}
if protoimpl.UnsafeEnabled {
- mi := &file_v1_instance_service_proto_msgTypes[7]
+ mi := &file_v1_instance_service_proto_msgTypes[10]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -587,7 +772,7 @@ func (x *Instance) String() string {
func (*Instance) ProtoMessage() {}
func (x *Instance) ProtoReflect() protoreflect.Message {
- mi := &file_v1_instance_service_proto_msgTypes[7]
+ mi := &file_v1_instance_service_proto_msgTypes[10]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -600,7 +785,7 @@ func (x *Instance) ProtoReflect() protoreflect.Message {
// Deprecated: Use Instance.ProtoReflect.Descriptor instead.
func (*Instance) Descriptor() ([]byte, []int) {
- return file_v1_instance_service_proto_rawDescGZIP(), []int{7}
+ return file_v1_instance_service_proto_rawDescGZIP(), []int{10}
}
func (x *Instance) GetName() string {
@@ -665,7 +850,7 @@ type DataSource struct {
func (x *DataSource) Reset() {
*x = DataSource{}
if protoimpl.UnsafeEnabled {
- mi := &file_v1_instance_service_proto_msgTypes[8]
+ mi := &file_v1_instance_service_proto_msgTypes[11]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -678,7 +863,7 @@ func (x *DataSource) String() string {
func (*DataSource) ProtoMessage() {}
func (x *DataSource) ProtoReflect() protoreflect.Message {
- mi := &file_v1_instance_service_proto_msgTypes[8]
+ mi := &file_v1_instance_service_proto_msgTypes[11]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -691,7 +876,7 @@ func (x *DataSource) ProtoReflect() protoreflect.Message {
// Deprecated: Use DataSource.ProtoReflect.Descriptor instead.
func (*DataSource) Descriptor() ([]byte, []int) {
- return file_v1_instance_service_proto_rawDescGZIP(), []int{8}
+ return file_v1_instance_service_proto_rawDescGZIP(), []int{11}
}
func (x *DataSource) GetTitle() string {
@@ -824,110 +1009,166 @@ var file_v1_instance_service_proto_rawDesc = []byte{
0x65, 0x22, 0x33, 0x0a, 0x17, 0x55, 0x6e, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x49, 0x6e, 0x73,
0x74, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x18, 0x0a, 0x04,
0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x04, 0xe2, 0x41, 0x01, 0x02,
- 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0xec, 0x01, 0x0a, 0x08, 0x49, 0x6e, 0x73, 0x74, 0x61,
- 0x6e, 0x63, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28,
- 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x28, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65,
- 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x12, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73,
- 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74,
- 0x65, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09,
- 0x52, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x12, 0x2b, 0x0a, 0x06, 0x65, 0x6e, 0x67, 0x69, 0x6e,
- 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x13, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61,
- 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x52, 0x06, 0x65, 0x6e,
- 0x67, 0x69, 0x6e, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c,
- 0x5f, 0x6c, 0x69, 0x6e, 0x6b, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x65, 0x78, 0x74,
- 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x4c, 0x69, 0x6e, 0x6b, 0x12, 0x3a, 0x0a, 0x0c, 0x64, 0x61, 0x74,
- 0x61, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32,
- 0x17, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x61,
- 0x74, 0x61, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x0b, 0x64, 0x61, 0x74, 0x61, 0x53, 0x6f,
- 0x75, 0x72, 0x63, 0x65, 0x73, 0x22, 0xb2, 0x02, 0x0a, 0x0a, 0x44, 0x61, 0x74, 0x61, 0x53, 0x6f,
- 0x75, 0x72, 0x63, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x18, 0x01, 0x20,
- 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x12, 0x2f, 0x0a, 0x04, 0x74, 0x79,
- 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1b, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62,
- 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x53, 0x6f, 0x75, 0x72, 0x63,
- 0x65, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x75,
- 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x75,
- 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77,
- 0x6f, 0x72, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x42, 0x04, 0xe2, 0x41, 0x01, 0x04, 0x52,
- 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x12, 0x1b, 0x0a, 0x06, 0x73, 0x73, 0x6c,
- 0x5f, 0x63, 0x61, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x42, 0x04, 0xe2, 0x41, 0x01, 0x04, 0x52,
- 0x05, 0x73, 0x73, 0x6c, 0x43, 0x61, 0x12, 0x1f, 0x0a, 0x08, 0x73, 0x73, 0x6c, 0x5f, 0x63, 0x65,
- 0x72, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x42, 0x04, 0xe2, 0x41, 0x01, 0x04, 0x52, 0x07,
- 0x73, 0x73, 0x6c, 0x43, 0x65, 0x72, 0x74, 0x12, 0x1d, 0x0a, 0x07, 0x73, 0x73, 0x6c, 0x5f, 0x6b,
- 0x65, 0x79, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x42, 0x04, 0xe2, 0x41, 0x01, 0x04, 0x52, 0x06,
- 0x73, 0x73, 0x6c, 0x4b, 0x65, 0x79, 0x12, 0x12, 0x0a, 0x04, 0x68, 0x6f, 0x73, 0x74, 0x18, 0x08,
- 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x68, 0x6f, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x6f,
- 0x72, 0x74, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, 0x6f, 0x72, 0x74, 0x12, 0x1a,
- 0x0a, 0x08, 0x64, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09,
- 0x52, 0x08, 0x64, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x2a, 0x7b, 0x0a, 0x06, 0x45, 0x6e,
- 0x67, 0x69, 0x6e, 0x65, 0x12, 0x16, 0x0a, 0x12, 0x45, 0x4e, 0x47, 0x49, 0x4e, 0x45, 0x5f, 0x55,
- 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0e, 0x0a, 0x0a,
- 0x43, 0x4c, 0x49, 0x43, 0x4b, 0x48, 0x4f, 0x55, 0x53, 0x45, 0x10, 0x01, 0x12, 0x09, 0x0a, 0x05,
- 0x4d, 0x59, 0x53, 0x51, 0x4c, 0x10, 0x02, 0x12, 0x0c, 0x0a, 0x08, 0x50, 0x4f, 0x53, 0x54, 0x47,
- 0x52, 0x45, 0x53, 0x10, 0x03, 0x12, 0x0d, 0x0a, 0x09, 0x53, 0x4e, 0x4f, 0x57, 0x46, 0x4c, 0x41,
- 0x4b, 0x45, 0x10, 0x04, 0x12, 0x0a, 0x0a, 0x06, 0x53, 0x51, 0x4c, 0x49, 0x54, 0x45, 0x10, 0x05,
- 0x12, 0x08, 0x0a, 0x04, 0x54, 0x49, 0x44, 0x42, 0x10, 0x06, 0x12, 0x0b, 0x0a, 0x07, 0x4d, 0x4f,
- 0x4e, 0x47, 0x4f, 0x44, 0x42, 0x10, 0x07, 0x2a, 0x47, 0x0a, 0x0e, 0x44, 0x61, 0x74, 0x61, 0x53,
- 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1b, 0x0a, 0x17, 0x44, 0x41, 0x54,
- 0x41, 0x5f, 0x53, 0x4f, 0x55, 0x52, 0x43, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49,
- 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x41, 0x44, 0x4d, 0x49, 0x4e, 0x10,
- 0x01, 0x12, 0x0d, 0x0a, 0x09, 0x52, 0x45, 0x41, 0x44, 0x5f, 0x4f, 0x4e, 0x4c, 0x59, 0x10, 0x02,
- 0x32, 0xf1, 0x06, 0x0a, 0x0f, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x53, 0x65, 0x72,
- 0x76, 0x69, 0x63, 0x65, 0x12, 0x7b, 0x0a, 0x0b, 0x47, 0x65, 0x74, 0x49, 0x6e, 0x73, 0x74, 0x61,
- 0x6e, 0x63, 0x65, 0x12, 0x1f, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76,
- 0x31, 0x2e, 0x47, 0x65, 0x74, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x71,
- 0x75, 0x65, 0x73, 0x74, 0x1a, 0x15, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e,
- 0x76, 0x31, 0x2e, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x22, 0x34, 0xda, 0x41, 0x04,
- 0x6e, 0x61, 0x6d, 0x65, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x27, 0x12, 0x25, 0x2f, 0x76, 0x31, 0x2f,
- 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x65, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e,
- 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x2f, 0x2a,
- 0x7d, 0x12, 0x8e, 0x01, 0x0a, 0x0d, 0x4c, 0x69, 0x73, 0x74, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e,
- 0x63, 0x65, 0x73, 0x12, 0x21, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76,
- 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x52,
- 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73,
- 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63,
- 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x36, 0xda, 0x41, 0x06, 0x70,
- 0x61, 0x72, 0x65, 0x6e, 0x74, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x27, 0x12, 0x25, 0x2f, 0x76, 0x31,
- 0x2f, 0x7b, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x3d, 0x65, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e,
- 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63,
- 0x65, 0x73, 0x12, 0x96, 0x01, 0x0a, 0x0e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x49, 0x6e, 0x73,
- 0x74, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x22, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65,
- 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e,
- 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x15, 0x2e, 0x62, 0x79, 0x74, 0x65,
- 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65,
- 0x22, 0x49, 0xda, 0x41, 0x0f, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x2c, 0x69, 0x6e, 0x73, 0x74,
- 0x61, 0x6e, 0x63, 0x65, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x31, 0x3a, 0x08, 0x69, 0x6e, 0x73, 0x74,
- 0x61, 0x6e, 0x63, 0x65, 0x22, 0x25, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x70, 0x61, 0x72, 0x65, 0x6e,
- 0x74, 0x3d, 0x65, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x2f, 0x2a,
- 0x7d, 0x2f, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x12, 0xa4, 0x01, 0x0a, 0x0e,
- 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x22,
- 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64,
- 0x61, 0x74, 0x65, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65,
- 0x73, 0x74, 0x1a, 0x15, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31,
- 0x2e, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x22, 0x57, 0xda, 0x41, 0x14, 0x69, 0x6e,
- 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x2c, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x6d, 0x61,
- 0x73, 0x6b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x3a, 0x3a, 0x08, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e,
- 0x63, 0x65, 0x32, 0x2e, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63,
- 0x65, 0x2e, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x65, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65,
- 0x6e, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x2f,
- 0x2a, 0x7d, 0x12, 0x82, 0x01, 0x0a, 0x0e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x49, 0x6e, 0x73,
- 0x74, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x22, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65,
- 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e,
- 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67,
- 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74,
- 0x79, 0x22, 0x34, 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x27,
- 0x2a, 0x25, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x65, 0x6e, 0x76, 0x69,
- 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x69, 0x6e, 0x73, 0x74, 0x61,
- 0x6e, 0x63, 0x65, 0x73, 0x2f, 0x2a, 0x7d, 0x12, 0x8a, 0x01, 0x0a, 0x10, 0x55, 0x6e, 0x64, 0x65,
- 0x6c, 0x65, 0x74, 0x65, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x24, 0x2e, 0x62,
- 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x6e, 0x64, 0x65, 0x6c,
- 0x65, 0x74, 0x65, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65,
- 0x73, 0x74, 0x1a, 0x15, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31,
- 0x2e, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x22, 0x39, 0x82, 0xd3, 0xe4, 0x93, 0x02,
- 0x33, 0x3a, 0x01, 0x2a, 0x22, 0x2e, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d,
- 0x65, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x69,
- 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x2f, 0x2a, 0x7d, 0x3a, 0x75, 0x6e, 0x64, 0x65,
- 0x6c, 0x65, 0x74, 0x65, 0x42, 0x11, 0x5a, 0x0f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65,
- 0x64, 0x2d, 0x67, 0x6f, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
+ 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x7a, 0x0a, 0x14, 0x41, 0x64, 0x64, 0x44, 0x61, 0x74,
+ 0x61, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x20,
+ 0x0a, 0x08, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,
+ 0x42, 0x04, 0xe2, 0x41, 0x01, 0x02, 0x52, 0x08, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65,
+ 0x12, 0x40, 0x0a, 0x0c, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73,
+ 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73,
+ 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x42,
+ 0x04, 0xe2, 0x41, 0x01, 0x02, 0x52, 0x0b, 0x64, 0x61, 0x74, 0x61, 0x53, 0x6f, 0x75, 0x72, 0x63,
+ 0x65, 0x73, 0x22, 0x7d, 0x0a, 0x17, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x44, 0x61, 0x74, 0x61,
+ 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x20, 0x0a,
+ 0x08, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42,
+ 0x04, 0xe2, 0x41, 0x01, 0x02, 0x52, 0x08, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x12,
+ 0x40, 0x0a, 0x0c, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x18,
+ 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65,
+ 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x42, 0x04,
+ 0xe2, 0x41, 0x01, 0x02, 0x52, 0x0b, 0x64, 0x61, 0x74, 0x61, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65,
+ 0x73, 0x22, 0xba, 0x01, 0x0a, 0x17, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x44, 0x61, 0x74, 0x61,
+ 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x20, 0x0a,
+ 0x08, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42,
+ 0x04, 0xe2, 0x41, 0x01, 0x02, 0x52, 0x08, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x12,
+ 0x40, 0x0a, 0x0c, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x18,
+ 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65,
+ 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x42, 0x04,
+ 0xe2, 0x41, 0x01, 0x02, 0x52, 0x0b, 0x64, 0x61, 0x74, 0x61, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65,
+ 0x73, 0x12, 0x3b, 0x0a, 0x0b, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x6d, 0x61, 0x73, 0x6b,
+ 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e,
+ 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4d, 0x61,
+ 0x73, 0x6b, 0x52, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4d, 0x61, 0x73, 0x6b, 0x22, 0xec,
+ 0x01, 0x0a, 0x08, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e,
+ 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12,
+ 0x28, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x12,
+ 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x61,
+ 0x74, 0x65, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x69, 0x74,
+ 0x6c, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x12,
+ 0x2b, 0x0a, 0x06, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32,
+ 0x13, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x6e,
+ 0x67, 0x69, 0x6e, 0x65, 0x52, 0x06, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x12, 0x23, 0x0a, 0x0d,
+ 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x5f, 0x6c, 0x69, 0x6e, 0x6b, 0x18, 0x05, 0x20,
+ 0x01, 0x28, 0x09, 0x52, 0x0c, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x4c, 0x69, 0x6e,
+ 0x6b, 0x12, 0x3a, 0x0a, 0x0c, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65,
+ 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61,
+ 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65,
+ 0x52, 0x0b, 0x64, 0x61, 0x74, 0x61, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x22, 0xb2, 0x02,
+ 0x0a, 0x0a, 0x44, 0x61, 0x74, 0x61, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x14, 0x0a, 0x05,
+ 0x74, 0x69, 0x74, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x69, 0x74,
+ 0x6c, 0x65, 0x12, 0x2f, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e,
+ 0x32, 0x1b, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x44,
+ 0x61, 0x74, 0x61, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74,
+ 0x79, 0x70, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x18,
+ 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x12,
+ 0x20, 0x0a, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28,
+ 0x09, 0x42, 0x04, 0xe2, 0x41, 0x01, 0x04, 0x52, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72,
+ 0x64, 0x12, 0x1b, 0x0a, 0x06, 0x73, 0x73, 0x6c, 0x5f, 0x63, 0x61, 0x18, 0x05, 0x20, 0x01, 0x28,
+ 0x09, 0x42, 0x04, 0xe2, 0x41, 0x01, 0x04, 0x52, 0x05, 0x73, 0x73, 0x6c, 0x43, 0x61, 0x12, 0x1f,
+ 0x0a, 0x08, 0x73, 0x73, 0x6c, 0x5f, 0x63, 0x65, 0x72, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09,
+ 0x42, 0x04, 0xe2, 0x41, 0x01, 0x04, 0x52, 0x07, 0x73, 0x73, 0x6c, 0x43, 0x65, 0x72, 0x74, 0x12,
+ 0x1d, 0x0a, 0x07, 0x73, 0x73, 0x6c, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09,
+ 0x42, 0x04, 0xe2, 0x41, 0x01, 0x04, 0x52, 0x06, 0x73, 0x73, 0x6c, 0x4b, 0x65, 0x79, 0x12, 0x12,
+ 0x0a, 0x04, 0x68, 0x6f, 0x73, 0x74, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x68, 0x6f,
+ 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09,
+ 0x52, 0x04, 0x70, 0x6f, 0x72, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x64, 0x61, 0x74, 0x61, 0x62, 0x61,
+ 0x73, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x64, 0x61, 0x74, 0x61, 0x62, 0x61,
+ 0x73, 0x65, 0x2a, 0x7b, 0x0a, 0x06, 0x45, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x12, 0x16, 0x0a, 0x12,
+ 0x45, 0x4e, 0x47, 0x49, 0x4e, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49,
+ 0x45, 0x44, 0x10, 0x00, 0x12, 0x0e, 0x0a, 0x0a, 0x43, 0x4c, 0x49, 0x43, 0x4b, 0x48, 0x4f, 0x55,
+ 0x53, 0x45, 0x10, 0x01, 0x12, 0x09, 0x0a, 0x05, 0x4d, 0x59, 0x53, 0x51, 0x4c, 0x10, 0x02, 0x12,
+ 0x0c, 0x0a, 0x08, 0x50, 0x4f, 0x53, 0x54, 0x47, 0x52, 0x45, 0x53, 0x10, 0x03, 0x12, 0x0d, 0x0a,
+ 0x09, 0x53, 0x4e, 0x4f, 0x57, 0x46, 0x4c, 0x41, 0x4b, 0x45, 0x10, 0x04, 0x12, 0x0a, 0x0a, 0x06,
+ 0x53, 0x51, 0x4c, 0x49, 0x54, 0x45, 0x10, 0x05, 0x12, 0x08, 0x0a, 0x04, 0x54, 0x49, 0x44, 0x42,
+ 0x10, 0x06, 0x12, 0x0b, 0x0a, 0x07, 0x4d, 0x4f, 0x4e, 0x47, 0x4f, 0x44, 0x42, 0x10, 0x07, 0x2a,
+ 0x47, 0x0a, 0x0e, 0x44, 0x61, 0x74, 0x61, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, 0x79, 0x70,
+ 0x65, 0x12, 0x1b, 0x0a, 0x17, 0x44, 0x41, 0x54, 0x41, 0x5f, 0x53, 0x4f, 0x55, 0x52, 0x43, 0x45,
+ 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x09,
+ 0x0a, 0x05, 0x41, 0x44, 0x4d, 0x49, 0x4e, 0x10, 0x01, 0x12, 0x0d, 0x0a, 0x09, 0x52, 0x45, 0x41,
+ 0x44, 0x5f, 0x4f, 0x4e, 0x4c, 0x59, 0x10, 0x02, 0x32, 0xb3, 0x0a, 0x0a, 0x0f, 0x49, 0x6e, 0x73,
+ 0x74, 0x61, 0x6e, 0x63, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x7b, 0x0a, 0x0b,
+ 0x47, 0x65, 0x74, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x1f, 0x2e, 0x62, 0x79,
+ 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x49, 0x6e, 0x73,
+ 0x74, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x15, 0x2e, 0x62,
+ 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x6e, 0x73, 0x74, 0x61,
+ 0x6e, 0x63, 0x65, 0x22, 0x34, 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x82, 0xd3, 0xe4, 0x93,
+ 0x02, 0x27, 0x12, 0x25, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x65, 0x6e,
+ 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x69, 0x6e, 0x73,
+ 0x74, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x2f, 0x2a, 0x7d, 0x12, 0x8e, 0x01, 0x0a, 0x0d, 0x4c, 0x69,
+ 0x73, 0x74, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x12, 0x21, 0x2e, 0x62, 0x79,
+ 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x49, 0x6e,
+ 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22,
+ 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73,
+ 0x74, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
+ 0x73, 0x65, 0x22, 0x36, 0xda, 0x41, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x82, 0xd3, 0xe4,
+ 0x93, 0x02, 0x27, 0x12, 0x25, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74,
+ 0x3d, 0x65, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x2f, 0x2a, 0x7d,
+ 0x2f, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x12, 0x96, 0x01, 0x0a, 0x0e, 0x43,
+ 0x72, 0x65, 0x61, 0x74, 0x65, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x22, 0x2e,
+ 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61,
+ 0x74, 0x65, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
+ 0x74, 0x1a, 0x15, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e,
+ 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x22, 0x49, 0xda, 0x41, 0x0f, 0x70, 0x61, 0x72,
+ 0x65, 0x6e, 0x74, 0x2c, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x82, 0xd3, 0xe4, 0x93,
+ 0x02, 0x31, 0x3a, 0x08, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x22, 0x25, 0x2f, 0x76,
+ 0x31, 0x2f, 0x7b, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x3d, 0x65, 0x6e, 0x76, 0x69, 0x72, 0x6f,
+ 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e,
+ 0x63, 0x65, 0x73, 0x12, 0xa4, 0x01, 0x0a, 0x0e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x49, 0x6e,
+ 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x22, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73,
+ 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x49, 0x6e, 0x73, 0x74, 0x61,
+ 0x6e, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x15, 0x2e, 0x62, 0x79, 0x74,
+ 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63,
+ 0x65, 0x22, 0x57, 0xda, 0x41, 0x14, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x2c, 0x75,
+ 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x3a,
+ 0x3a, 0x08, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x32, 0x2e, 0x2f, 0x76, 0x31, 0x2f,
+ 0x7b, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x2e, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x65,
+ 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x69, 0x6e,
+ 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x2f, 0x2a, 0x7d, 0x12, 0x82, 0x01, 0x0a, 0x0e, 0x44,
+ 0x65, 0x6c, 0x65, 0x74, 0x65, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x22, 0x2e,
+ 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65,
+ 0x74, 0x65, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
+ 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
+ 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x34, 0xda, 0x41, 0x04, 0x6e, 0x61,
+ 0x6d, 0x65, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x27, 0x2a, 0x25, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x6e,
+ 0x61, 0x6d, 0x65, 0x3d, 0x65, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x73,
+ 0x2f, 0x2a, 0x2f, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x2f, 0x2a, 0x7d, 0x12,
+ 0x8a, 0x01, 0x0a, 0x10, 0x55, 0x6e, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x49, 0x6e, 0x73, 0x74,
+ 0x61, 0x6e, 0x63, 0x65, 0x12, 0x24, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e,
+ 0x76, 0x31, 0x2e, 0x55, 0x6e, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x49, 0x6e, 0x73, 0x74, 0x61,
+ 0x6e, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x15, 0x2e, 0x62, 0x79, 0x74,
+ 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63,
+ 0x65, 0x22, 0x39, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x33, 0x3a, 0x01, 0x2a, 0x22, 0x2e, 0x2f, 0x76,
+ 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x65, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d,
+ 0x65, 0x6e, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x73,
+ 0x2f, 0x2a, 0x7d, 0x3a, 0x75, 0x6e, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x12, 0x8d, 0x01, 0x0a,
+ 0x0d, 0x41, 0x64, 0x64, 0x44, 0x61, 0x74, 0x61, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x21,
+ 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x64, 0x64,
+ 0x44, 0x61, 0x74, 0x61, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
+ 0x74, 0x1a, 0x15, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e,
+ 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x22, 0x42, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x3c,
+ 0x3a, 0x01, 0x2a, 0x22, 0x37, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e,
+ 0x63, 0x65, 0x3d, 0x65, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x2f,
+ 0x2a, 0x2f, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x2f, 0x2a, 0x7d, 0x3a, 0x61,
+ 0x64, 0x64, 0x44, 0x61, 0x74, 0x61, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x96, 0x01, 0x0a,
+ 0x10, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x44, 0x61, 0x74, 0x61, 0x53, 0x6f, 0x75, 0x72, 0x63,
+ 0x65, 0x12, 0x24, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e,
+ 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x44, 0x61, 0x74, 0x61, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65,
+ 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x15, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61,
+ 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x22, 0x45,
+ 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x3f, 0x3a, 0x01, 0x2a, 0x22, 0x3a, 0x2f, 0x76, 0x31, 0x2f, 0x7b,
+ 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x3d, 0x65, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e,
+ 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65,
+ 0x73, 0x2f, 0x2a, 0x7d, 0x3a, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x44, 0x61, 0x74, 0x61, 0x53,
+ 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x96, 0x01, 0x0a, 0x10, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65,
+ 0x44, 0x61, 0x74, 0x61, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x24, 0x2e, 0x62, 0x79, 0x74,
+ 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x44,
+ 0x61, 0x74, 0x61, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
+ 0x1a, 0x15, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x49,
+ 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x22, 0x45, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x3f, 0x3a,
+ 0x01, 0x2a, 0x22, 0x3a, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63,
+ 0x65, 0x3d, 0x65, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x2f, 0x2a,
+ 0x2f, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x2f, 0x2a, 0x7d, 0x3a, 0x75, 0x70,
+ 0x64, 0x61, 0x74, 0x65, 0x44, 0x61, 0x74, 0x61, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x42, 0x11,
+ 0x5a, 0x0f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2d, 0x67, 0x6f, 0x2f, 0x76,
+ 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
@@ -943,7 +1184,7 @@ func file_v1_instance_service_proto_rawDescGZIP() []byte {
}
var file_v1_instance_service_proto_enumTypes = make([]protoimpl.EnumInfo, 2)
-var file_v1_instance_service_proto_msgTypes = make([]protoimpl.MessageInfo, 9)
+var file_v1_instance_service_proto_msgTypes = make([]protoimpl.MessageInfo, 12)
var file_v1_instance_service_proto_goTypes = []interface{}{
(Engine)(0), // 0: bytebase.v1.Engine
(DataSourceType)(0), // 1: bytebase.v1.DataSourceType
@@ -954,38 +1195,51 @@ var file_v1_instance_service_proto_goTypes = []interface{}{
(*UpdateInstanceRequest)(nil), // 6: bytebase.v1.UpdateInstanceRequest
(*DeleteInstanceRequest)(nil), // 7: bytebase.v1.DeleteInstanceRequest
(*UndeleteInstanceRequest)(nil), // 8: bytebase.v1.UndeleteInstanceRequest
- (*Instance)(nil), // 9: bytebase.v1.Instance
- (*DataSource)(nil), // 10: bytebase.v1.DataSource
- (*fieldmaskpb.FieldMask)(nil), // 11: google.protobuf.FieldMask
- (State)(0), // 12: bytebase.v1.State
- (*emptypb.Empty)(nil), // 13: google.protobuf.Empty
+ (*AddDataSourceRequest)(nil), // 9: bytebase.v1.AddDataSourceRequest
+ (*RemoveDataSourceRequest)(nil), // 10: bytebase.v1.RemoveDataSourceRequest
+ (*UpdateDataSourceRequest)(nil), // 11: bytebase.v1.UpdateDataSourceRequest
+ (*Instance)(nil), // 12: bytebase.v1.Instance
+ (*DataSource)(nil), // 13: bytebase.v1.DataSource
+ (*fieldmaskpb.FieldMask)(nil), // 14: google.protobuf.FieldMask
+ (State)(0), // 15: bytebase.v1.State
+ (*emptypb.Empty)(nil), // 16: google.protobuf.Empty
}
var file_v1_instance_service_proto_depIdxs = []int32{
- 9, // 0: bytebase.v1.ListInstancesResponse.instances:type_name -> bytebase.v1.Instance
- 9, // 1: bytebase.v1.CreateInstanceRequest.instance:type_name -> bytebase.v1.Instance
- 9, // 2: bytebase.v1.UpdateInstanceRequest.instance:type_name -> bytebase.v1.Instance
- 11, // 3: bytebase.v1.UpdateInstanceRequest.update_mask:type_name -> google.protobuf.FieldMask
- 12, // 4: bytebase.v1.Instance.state:type_name -> bytebase.v1.State
- 0, // 5: bytebase.v1.Instance.engine:type_name -> bytebase.v1.Engine
- 10, // 6: bytebase.v1.Instance.data_sources:type_name -> bytebase.v1.DataSource
- 1, // 7: bytebase.v1.DataSource.type:type_name -> bytebase.v1.DataSourceType
- 2, // 8: bytebase.v1.InstanceService.GetInstance:input_type -> bytebase.v1.GetInstanceRequest
- 3, // 9: bytebase.v1.InstanceService.ListInstances:input_type -> bytebase.v1.ListInstancesRequest
- 5, // 10: bytebase.v1.InstanceService.CreateInstance:input_type -> bytebase.v1.CreateInstanceRequest
- 6, // 11: bytebase.v1.InstanceService.UpdateInstance:input_type -> bytebase.v1.UpdateInstanceRequest
- 7, // 12: bytebase.v1.InstanceService.DeleteInstance:input_type -> bytebase.v1.DeleteInstanceRequest
- 8, // 13: bytebase.v1.InstanceService.UndeleteInstance:input_type -> bytebase.v1.UndeleteInstanceRequest
- 9, // 14: bytebase.v1.InstanceService.GetInstance:output_type -> bytebase.v1.Instance
- 4, // 15: bytebase.v1.InstanceService.ListInstances:output_type -> bytebase.v1.ListInstancesResponse
- 9, // 16: bytebase.v1.InstanceService.CreateInstance:output_type -> bytebase.v1.Instance
- 9, // 17: bytebase.v1.InstanceService.UpdateInstance:output_type -> bytebase.v1.Instance
- 13, // 18: bytebase.v1.InstanceService.DeleteInstance:output_type -> google.protobuf.Empty
- 9, // 19: bytebase.v1.InstanceService.UndeleteInstance:output_type -> bytebase.v1.Instance
- 14, // [14:20] is the sub-list for method output_type
- 8, // [8:14] is the sub-list for method input_type
- 8, // [8:8] is the sub-list for extension type_name
- 8, // [8:8] is the sub-list for extension extendee
- 0, // [0:8] is the sub-list for field type_name
+ 12, // 0: bytebase.v1.ListInstancesResponse.instances:type_name -> bytebase.v1.Instance
+ 12, // 1: bytebase.v1.CreateInstanceRequest.instance:type_name -> bytebase.v1.Instance
+ 12, // 2: bytebase.v1.UpdateInstanceRequest.instance:type_name -> bytebase.v1.Instance
+ 14, // 3: bytebase.v1.UpdateInstanceRequest.update_mask:type_name -> google.protobuf.FieldMask
+ 13, // 4: bytebase.v1.AddDataSourceRequest.data_sources:type_name -> bytebase.v1.DataSource
+ 13, // 5: bytebase.v1.RemoveDataSourceRequest.data_sources:type_name -> bytebase.v1.DataSource
+ 13, // 6: bytebase.v1.UpdateDataSourceRequest.data_sources:type_name -> bytebase.v1.DataSource
+ 14, // 7: bytebase.v1.UpdateDataSourceRequest.update_mask:type_name -> google.protobuf.FieldMask
+ 15, // 8: bytebase.v1.Instance.state:type_name -> bytebase.v1.State
+ 0, // 9: bytebase.v1.Instance.engine:type_name -> bytebase.v1.Engine
+ 13, // 10: bytebase.v1.Instance.data_sources:type_name -> bytebase.v1.DataSource
+ 1, // 11: bytebase.v1.DataSource.type:type_name -> bytebase.v1.DataSourceType
+ 2, // 12: bytebase.v1.InstanceService.GetInstance:input_type -> bytebase.v1.GetInstanceRequest
+ 3, // 13: bytebase.v1.InstanceService.ListInstances:input_type -> bytebase.v1.ListInstancesRequest
+ 5, // 14: bytebase.v1.InstanceService.CreateInstance:input_type -> bytebase.v1.CreateInstanceRequest
+ 6, // 15: bytebase.v1.InstanceService.UpdateInstance:input_type -> bytebase.v1.UpdateInstanceRequest
+ 7, // 16: bytebase.v1.InstanceService.DeleteInstance:input_type -> bytebase.v1.DeleteInstanceRequest
+ 8, // 17: bytebase.v1.InstanceService.UndeleteInstance:input_type -> bytebase.v1.UndeleteInstanceRequest
+ 9, // 18: bytebase.v1.InstanceService.AddDataSource:input_type -> bytebase.v1.AddDataSourceRequest
+ 10, // 19: bytebase.v1.InstanceService.RemoveDataSource:input_type -> bytebase.v1.RemoveDataSourceRequest
+ 11, // 20: bytebase.v1.InstanceService.UpdateDataSource:input_type -> bytebase.v1.UpdateDataSourceRequest
+ 12, // 21: bytebase.v1.InstanceService.GetInstance:output_type -> bytebase.v1.Instance
+ 4, // 22: bytebase.v1.InstanceService.ListInstances:output_type -> bytebase.v1.ListInstancesResponse
+ 12, // 23: bytebase.v1.InstanceService.CreateInstance:output_type -> bytebase.v1.Instance
+ 12, // 24: bytebase.v1.InstanceService.UpdateInstance:output_type -> bytebase.v1.Instance
+ 16, // 25: bytebase.v1.InstanceService.DeleteInstance:output_type -> google.protobuf.Empty
+ 12, // 26: bytebase.v1.InstanceService.UndeleteInstance:output_type -> bytebase.v1.Instance
+ 12, // 27: bytebase.v1.InstanceService.AddDataSource:output_type -> bytebase.v1.Instance
+ 12, // 28: bytebase.v1.InstanceService.RemoveDataSource:output_type -> bytebase.v1.Instance
+ 12, // 29: bytebase.v1.InstanceService.UpdateDataSource:output_type -> bytebase.v1.Instance
+ 21, // [21:30] is the sub-list for method output_type
+ 12, // [12:21] is the sub-list for method input_type
+ 12, // [12:12] is the sub-list for extension type_name
+ 12, // [12:12] is the sub-list for extension extendee
+ 0, // [0:12] is the sub-list for field type_name
}
func init() { file_v1_instance_service_proto_init() }
@@ -1080,7 +1334,7 @@ func file_v1_instance_service_proto_init() {
}
}
file_v1_instance_service_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*Instance); i {
+ switch v := v.(*AddDataSourceRequest); i {
case 0:
return &v.state
case 1:
@@ -1092,6 +1346,42 @@ func file_v1_instance_service_proto_init() {
}
}
file_v1_instance_service_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*RemoveDataSourceRequest); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_v1_instance_service_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*UpdateDataSourceRequest); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_v1_instance_service_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*Instance); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_v1_instance_service_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*DataSource); i {
case 0:
return &v.state
@@ -1110,7 +1400,7 @@ func file_v1_instance_service_proto_init() {
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_v1_instance_service_proto_rawDesc,
NumEnums: 2,
- NumMessages: 9,
+ NumMessages: 12,
NumExtensions: 0,
NumServices: 1,
},
diff --git a/proto/generated-go/v1/instance_service.pb.gw.go b/proto/generated-go/v1/instance_service.pb.gw.go
index 24e9a9a703..c355ac1481 100644
--- a/proto/generated-go/v1/instance_service.pb.gw.go
+++ b/proto/generated-go/v1/instance_service.pb.gw.go
@@ -459,6 +459,210 @@ func local_request_InstanceService_UndeleteInstance_0(ctx context.Context, marsh
}
+func request_InstanceService_AddDataSource_0(ctx context.Context, marshaler runtime.Marshaler, client InstanceServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
+ var protoReq AddDataSourceRequest
+ var metadata runtime.ServerMetadata
+
+ newReader, berr := utilities.IOReaderFactory(req.Body)
+ if berr != nil {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr)
+ }
+ if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
+ }
+
+ var (
+ val string
+ ok bool
+ err error
+ _ = err
+ )
+
+ val, ok = pathParams["instance"]
+ if !ok {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "instance")
+ }
+
+ protoReq.Instance, err = runtime.String(val)
+ if err != nil {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "instance", err)
+ }
+
+ msg, err := client.AddDataSource(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
+ return msg, metadata, err
+
+}
+
+func local_request_InstanceService_AddDataSource_0(ctx context.Context, marshaler runtime.Marshaler, server InstanceServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
+ var protoReq AddDataSourceRequest
+ var metadata runtime.ServerMetadata
+
+ newReader, berr := utilities.IOReaderFactory(req.Body)
+ if berr != nil {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr)
+ }
+ if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
+ }
+
+ var (
+ val string
+ ok bool
+ err error
+ _ = err
+ )
+
+ val, ok = pathParams["instance"]
+ if !ok {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "instance")
+ }
+
+ protoReq.Instance, err = runtime.String(val)
+ if err != nil {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "instance", err)
+ }
+
+ msg, err := server.AddDataSource(ctx, &protoReq)
+ return msg, metadata, err
+
+}
+
+func request_InstanceService_RemoveDataSource_0(ctx context.Context, marshaler runtime.Marshaler, client InstanceServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
+ var protoReq RemoveDataSourceRequest
+ var metadata runtime.ServerMetadata
+
+ newReader, berr := utilities.IOReaderFactory(req.Body)
+ if berr != nil {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr)
+ }
+ if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
+ }
+
+ var (
+ val string
+ ok bool
+ err error
+ _ = err
+ )
+
+ val, ok = pathParams["instance"]
+ if !ok {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "instance")
+ }
+
+ protoReq.Instance, err = runtime.String(val)
+ if err != nil {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "instance", err)
+ }
+
+ msg, err := client.RemoveDataSource(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
+ return msg, metadata, err
+
+}
+
+func local_request_InstanceService_RemoveDataSource_0(ctx context.Context, marshaler runtime.Marshaler, server InstanceServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
+ var protoReq RemoveDataSourceRequest
+ var metadata runtime.ServerMetadata
+
+ newReader, berr := utilities.IOReaderFactory(req.Body)
+ if berr != nil {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr)
+ }
+ if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
+ }
+
+ var (
+ val string
+ ok bool
+ err error
+ _ = err
+ )
+
+ val, ok = pathParams["instance"]
+ if !ok {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "instance")
+ }
+
+ protoReq.Instance, err = runtime.String(val)
+ if err != nil {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "instance", err)
+ }
+
+ msg, err := server.RemoveDataSource(ctx, &protoReq)
+ return msg, metadata, err
+
+}
+
+func request_InstanceService_UpdateDataSource_0(ctx context.Context, marshaler runtime.Marshaler, client InstanceServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
+ var protoReq UpdateDataSourceRequest
+ var metadata runtime.ServerMetadata
+
+ newReader, berr := utilities.IOReaderFactory(req.Body)
+ if berr != nil {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr)
+ }
+ if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
+ }
+
+ var (
+ val string
+ ok bool
+ err error
+ _ = err
+ )
+
+ val, ok = pathParams["instance"]
+ if !ok {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "instance")
+ }
+
+ protoReq.Instance, err = runtime.String(val)
+ if err != nil {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "instance", err)
+ }
+
+ msg, err := client.UpdateDataSource(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
+ return msg, metadata, err
+
+}
+
+func local_request_InstanceService_UpdateDataSource_0(ctx context.Context, marshaler runtime.Marshaler, server InstanceServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
+ var protoReq UpdateDataSourceRequest
+ var metadata runtime.ServerMetadata
+
+ newReader, berr := utilities.IOReaderFactory(req.Body)
+ if berr != nil {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr)
+ }
+ if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
+ }
+
+ var (
+ val string
+ ok bool
+ err error
+ _ = err
+ )
+
+ val, ok = pathParams["instance"]
+ if !ok {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "instance")
+ }
+
+ protoReq.Instance, err = runtime.String(val)
+ if err != nil {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "instance", err)
+ }
+
+ msg, err := server.UpdateDataSource(ctx, &protoReq)
+ return msg, metadata, err
+
+}
+
// RegisterInstanceServiceHandlerServer registers the http handlers for service InstanceService to "mux".
// UnaryRPC :call InstanceServiceServer directly.
// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906.
@@ -615,6 +819,81 @@ func RegisterInstanceServiceHandlerServer(ctx context.Context, mux *runtime.Serv
})
+ mux.Handle("POST", pattern_InstanceService_AddDataSource_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
+ ctx, cancel := context.WithCancel(req.Context())
+ defer cancel()
+ var stream runtime.ServerTransportStream
+ ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
+ inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
+ var err error
+ var annotatedContext context.Context
+ annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/bytebase.v1.InstanceService/AddDataSource", runtime.WithHTTPPathPattern("/v1/{instance=environments/*/instances/*}:addDataSource"))
+ if err != nil {
+ runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ return
+ }
+ resp, md, err := local_request_InstanceService_AddDataSource_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_InstanceService_AddDataSource_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+
+ })
+
+ mux.Handle("POST", pattern_InstanceService_RemoveDataSource_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
+ ctx, cancel := context.WithCancel(req.Context())
+ defer cancel()
+ var stream runtime.ServerTransportStream
+ ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
+ inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
+ var err error
+ var annotatedContext context.Context
+ annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/bytebase.v1.InstanceService/RemoveDataSource", runtime.WithHTTPPathPattern("/v1/{instance=environments/*/instances/*}:removeDataSource"))
+ if err != nil {
+ runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ return
+ }
+ resp, md, err := local_request_InstanceService_RemoveDataSource_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_InstanceService_RemoveDataSource_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+
+ })
+
+ mux.Handle("POST", pattern_InstanceService_UpdateDataSource_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
+ ctx, cancel := context.WithCancel(req.Context())
+ defer cancel()
+ var stream runtime.ServerTransportStream
+ ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
+ inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
+ var err error
+ var annotatedContext context.Context
+ annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/bytebase.v1.InstanceService/UpdateDataSource", runtime.WithHTTPPathPattern("/v1/{instance=environments/*/instances/*}:updateDataSource"))
+ if err != nil {
+ runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ return
+ }
+ resp, md, err := local_request_InstanceService_UpdateDataSource_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_InstanceService_UpdateDataSource_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+
+ })
+
return nil
}
@@ -788,6 +1067,72 @@ func RegisterInstanceServiceHandlerClient(ctx context.Context, mux *runtime.Serv
})
+ mux.Handle("POST", pattern_InstanceService_AddDataSource_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
+ ctx, cancel := context.WithCancel(req.Context())
+ defer cancel()
+ inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
+ var err error
+ var annotatedContext context.Context
+ annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/bytebase.v1.InstanceService/AddDataSource", runtime.WithHTTPPathPattern("/v1/{instance=environments/*/instances/*}:addDataSource"))
+ if err != nil {
+ runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ return
+ }
+ resp, md, err := request_InstanceService_AddDataSource_0(annotatedContext, inboundMarshaler, client, req, pathParams)
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
+ if err != nil {
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
+ return
+ }
+
+ forward_InstanceService_AddDataSource_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+
+ })
+
+ mux.Handle("POST", pattern_InstanceService_RemoveDataSource_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
+ ctx, cancel := context.WithCancel(req.Context())
+ defer cancel()
+ inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
+ var err error
+ var annotatedContext context.Context
+ annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/bytebase.v1.InstanceService/RemoveDataSource", runtime.WithHTTPPathPattern("/v1/{instance=environments/*/instances/*}:removeDataSource"))
+ if err != nil {
+ runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ return
+ }
+ resp, md, err := request_InstanceService_RemoveDataSource_0(annotatedContext, inboundMarshaler, client, req, pathParams)
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
+ if err != nil {
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
+ return
+ }
+
+ forward_InstanceService_RemoveDataSource_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+
+ })
+
+ mux.Handle("POST", pattern_InstanceService_UpdateDataSource_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
+ ctx, cancel := context.WithCancel(req.Context())
+ defer cancel()
+ inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
+ var err error
+ var annotatedContext context.Context
+ annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/bytebase.v1.InstanceService/UpdateDataSource", runtime.WithHTTPPathPattern("/v1/{instance=environments/*/instances/*}:updateDataSource"))
+ if err != nil {
+ runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ return
+ }
+ resp, md, err := request_InstanceService_UpdateDataSource_0(annotatedContext, inboundMarshaler, client, req, pathParams)
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
+ if err != nil {
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
+ return
+ }
+
+ forward_InstanceService_UpdateDataSource_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+
+ })
+
return nil
}
@@ -803,6 +1148,12 @@ var (
pattern_InstanceService_DeleteInstance_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 2, 2, 1, 0, 4, 4, 5, 3}, []string{"v1", "environments", "instances", "name"}, ""))
pattern_InstanceService_UndeleteInstance_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 2, 2, 1, 0, 4, 4, 5, 3}, []string{"v1", "environments", "instances", "name"}, "undelete"))
+
+ pattern_InstanceService_AddDataSource_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 2, 2, 1, 0, 4, 4, 5, 3}, []string{"v1", "environments", "instances", "instance"}, "addDataSource"))
+
+ pattern_InstanceService_RemoveDataSource_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 2, 2, 1, 0, 4, 4, 5, 3}, []string{"v1", "environments", "instances", "instance"}, "removeDataSource"))
+
+ pattern_InstanceService_UpdateDataSource_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 2, 2, 1, 0, 4, 4, 5, 3}, []string{"v1", "environments", "instances", "instance"}, "updateDataSource"))
)
var (
@@ -817,4 +1168,10 @@ var (
forward_InstanceService_DeleteInstance_0 = runtime.ForwardResponseMessage
forward_InstanceService_UndeleteInstance_0 = runtime.ForwardResponseMessage
+
+ forward_InstanceService_AddDataSource_0 = runtime.ForwardResponseMessage
+
+ forward_InstanceService_RemoveDataSource_0 = runtime.ForwardResponseMessage
+
+ forward_InstanceService_UpdateDataSource_0 = runtime.ForwardResponseMessage
)
diff --git a/proto/generated-go/v1/instance_service_grpc.pb.go b/proto/generated-go/v1/instance_service_grpc.pb.go
index 41cb5d22ef..0d309b5490 100644
--- a/proto/generated-go/v1/instance_service_grpc.pb.go
+++ b/proto/generated-go/v1/instance_service_grpc.pb.go
@@ -29,6 +29,9 @@ type InstanceServiceClient interface {
UpdateInstance(ctx context.Context, in *UpdateInstanceRequest, opts ...grpc.CallOption) (*Instance, error)
DeleteInstance(ctx context.Context, in *DeleteInstanceRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
UndeleteInstance(ctx context.Context, in *UndeleteInstanceRequest, opts ...grpc.CallOption) (*Instance, error)
+ AddDataSource(ctx context.Context, in *AddDataSourceRequest, opts ...grpc.CallOption) (*Instance, error)
+ RemoveDataSource(ctx context.Context, in *RemoveDataSourceRequest, opts ...grpc.CallOption) (*Instance, error)
+ UpdateDataSource(ctx context.Context, in *UpdateDataSourceRequest, opts ...grpc.CallOption) (*Instance, error)
}
type instanceServiceClient struct {
@@ -93,6 +96,33 @@ func (c *instanceServiceClient) UndeleteInstance(ctx context.Context, in *Undele
return out, nil
}
+func (c *instanceServiceClient) AddDataSource(ctx context.Context, in *AddDataSourceRequest, opts ...grpc.CallOption) (*Instance, error) {
+ out := new(Instance)
+ err := c.cc.Invoke(ctx, "/bytebase.v1.InstanceService/AddDataSource", in, out, opts...)
+ if err != nil {
+ return nil, err
+ }
+ return out, nil
+}
+
+func (c *instanceServiceClient) RemoveDataSource(ctx context.Context, in *RemoveDataSourceRequest, opts ...grpc.CallOption) (*Instance, error) {
+ out := new(Instance)
+ err := c.cc.Invoke(ctx, "/bytebase.v1.InstanceService/RemoveDataSource", in, out, opts...)
+ if err != nil {
+ return nil, err
+ }
+ return out, nil
+}
+
+func (c *instanceServiceClient) UpdateDataSource(ctx context.Context, in *UpdateDataSourceRequest, opts ...grpc.CallOption) (*Instance, error) {
+ out := new(Instance)
+ err := c.cc.Invoke(ctx, "/bytebase.v1.InstanceService/UpdateDataSource", in, out, opts...)
+ if err != nil {
+ return nil, err
+ }
+ return out, nil
+}
+
// InstanceServiceServer is the server API for InstanceService service.
// All implementations must embed UnimplementedInstanceServiceServer
// for forward compatibility
@@ -103,6 +133,9 @@ type InstanceServiceServer interface {
UpdateInstance(context.Context, *UpdateInstanceRequest) (*Instance, error)
DeleteInstance(context.Context, *DeleteInstanceRequest) (*emptypb.Empty, error)
UndeleteInstance(context.Context, *UndeleteInstanceRequest) (*Instance, error)
+ AddDataSource(context.Context, *AddDataSourceRequest) (*Instance, error)
+ RemoveDataSource(context.Context, *RemoveDataSourceRequest) (*Instance, error)
+ UpdateDataSource(context.Context, *UpdateDataSourceRequest) (*Instance, error)
mustEmbedUnimplementedInstanceServiceServer()
}
@@ -128,6 +161,15 @@ func (UnimplementedInstanceServiceServer) DeleteInstance(context.Context, *Delet
func (UnimplementedInstanceServiceServer) UndeleteInstance(context.Context, *UndeleteInstanceRequest) (*Instance, error) {
return nil, status.Errorf(codes.Unimplemented, "method UndeleteInstance not implemented")
}
+func (UnimplementedInstanceServiceServer) AddDataSource(context.Context, *AddDataSourceRequest) (*Instance, error) {
+ return nil, status.Errorf(codes.Unimplemented, "method AddDataSource not implemented")
+}
+func (UnimplementedInstanceServiceServer) RemoveDataSource(context.Context, *RemoveDataSourceRequest) (*Instance, error) {
+ return nil, status.Errorf(codes.Unimplemented, "method RemoveDataSource not implemented")
+}
+func (UnimplementedInstanceServiceServer) UpdateDataSource(context.Context, *UpdateDataSourceRequest) (*Instance, error) {
+ return nil, status.Errorf(codes.Unimplemented, "method UpdateDataSource not implemented")
+}
func (UnimplementedInstanceServiceServer) mustEmbedUnimplementedInstanceServiceServer() {}
// UnsafeInstanceServiceServer may be embedded to opt out of forward compatibility for this service.
@@ -249,6 +291,60 @@ func _InstanceService_UndeleteInstance_Handler(srv interface{}, ctx context.Cont
return interceptor(ctx, in, info, handler)
}
+func _InstanceService_AddDataSource_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+ in := new(AddDataSourceRequest)
+ if err := dec(in); err != nil {
+ return nil, err
+ }
+ if interceptor == nil {
+ return srv.(InstanceServiceServer).AddDataSource(ctx, in)
+ }
+ info := &grpc.UnaryServerInfo{
+ Server: srv,
+ FullMethod: "/bytebase.v1.InstanceService/AddDataSource",
+ }
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+ return srv.(InstanceServiceServer).AddDataSource(ctx, req.(*AddDataSourceRequest))
+ }
+ return interceptor(ctx, in, info, handler)
+}
+
+func _InstanceService_RemoveDataSource_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+ in := new(RemoveDataSourceRequest)
+ if err := dec(in); err != nil {
+ return nil, err
+ }
+ if interceptor == nil {
+ return srv.(InstanceServiceServer).RemoveDataSource(ctx, in)
+ }
+ info := &grpc.UnaryServerInfo{
+ Server: srv,
+ FullMethod: "/bytebase.v1.InstanceService/RemoveDataSource",
+ }
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+ return srv.(InstanceServiceServer).RemoveDataSource(ctx, req.(*RemoveDataSourceRequest))
+ }
+ return interceptor(ctx, in, info, handler)
+}
+
+func _InstanceService_UpdateDataSource_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+ in := new(UpdateDataSourceRequest)
+ if err := dec(in); err != nil {
+ return nil, err
+ }
+ if interceptor == nil {
+ return srv.(InstanceServiceServer).UpdateDataSource(ctx, in)
+ }
+ info := &grpc.UnaryServerInfo{
+ Server: srv,
+ FullMethod: "/bytebase.v1.InstanceService/UpdateDataSource",
+ }
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+ return srv.(InstanceServiceServer).UpdateDataSource(ctx, req.(*UpdateDataSourceRequest))
+ }
+ return interceptor(ctx, in, info, handler)
+}
+
// InstanceService_ServiceDesc is the grpc.ServiceDesc for InstanceService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
@@ -280,6 +376,18 @@ var InstanceService_ServiceDesc = grpc.ServiceDesc{
MethodName: "UndeleteInstance",
Handler: _InstanceService_UndeleteInstance_Handler,
},
+ {
+ MethodName: "AddDataSource",
+ Handler: _InstanceService_AddDataSource_Handler,
+ },
+ {
+ MethodName: "RemoveDataSource",
+ Handler: _InstanceService_RemoveDataSource_Handler,
+ },
+ {
+ MethodName: "UpdateDataSource",
+ Handler: _InstanceService_UpdateDataSource_Handler,
+ },
},
Streams: []grpc.StreamDesc{},
Metadata: "v1/instance_service.proto",
diff --git a/proto/generated-go/v1/project_service.pb.go b/proto/generated-go/v1/project_service.pb.go
index 93b86e5eab..5c696eb609 100644
--- a/proto/generated-go/v1/project_service.pb.go
+++ b/proto/generated-go/v1/project_service.pb.go
@@ -499,7 +499,7 @@ type ListProjectsResponse struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
- // The projects from the specified publisher.
+ // The projects from the specified request.
Projects []*Project `protobuf:"bytes,1,rep,name=projects,proto3" json:"projects,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.
diff --git a/proto/v1/auth_service.proto b/proto/v1/auth_service.proto
index 0372063c0f..07e7f184d0 100644
--- a/proto/v1/auth_service.proto
+++ b/proto/v1/auth_service.proto
@@ -72,7 +72,6 @@ service AuthService {
}
}
-
message GetUserRequest {
// The name of the user to retrieve.
// Format: users/{user}
@@ -98,7 +97,7 @@ message ListUsersRequest {
}
message ListUsersResponse {
- // The users from the specified publisher.
+ // The users from the specified request.
repeated User users = 1;
// A token, which can be sent as `page_token` to retrieve the next page.
diff --git a/proto/v1/database_service.proto b/proto/v1/database_service.proto
new file mode 100644
index 0000000000..e5c7da21fc
--- /dev/null
+++ b/proto/v1/database_service.proto
@@ -0,0 +1,351 @@
+syntax = "proto3";
+
+package bytebase.v1;
+
+import "google/api/annotations.proto";
+import "google/api/client.proto";
+import "google/api/field_behavior.proto";
+import "google/protobuf/empty.proto";
+import "google/protobuf/field_mask.proto";
+import "google/protobuf/timestamp.proto";
+import "google/protobuf/wrappers.proto";
+
+import "v1/common.proto";
+
+option go_package = "generated-go/v1";
+
+service DatabaseService {
+ rpc GetDatabase(GetDatabaseRequest) returns (Database) {
+ option (google.api.http) = {
+ get: "/v1/{name=environments/*/instances/*/databases/*}"
+ };
+ option (google.api.method_signature) = "name";
+ }
+
+ rpc ListDatabases(ListDatabasesRequest) returns (ListDatabasesResponse) {
+ option (google.api.http) = {
+ get: "/v1/{parent=environments/*/instances/*}/databases"
+ };
+ option (google.api.method_signature) = "";
+ }
+
+ rpc UpdateDatabase(UpdateDatabaseRequest) returns (Database) {
+ option (google.api.http) = {
+ patch: "/v1/{database.name=environments/*/instances/*/databases/*}"
+ body: "database"
+ };
+ option (google.api.method_signature) = "database,update_mask";
+ }
+
+ rpc BatchUpdateDatabases(BatchUpdateDatabasesRequest) returns (BatchUpdateDatabasesResponse) {
+ option (google.api.http) = {
+ post: "/v1/{parent=environments/*/instances/*}/databases:batchUpdate"
+ body: "*"
+ };
+ }
+
+ rpc GetDatabaseMetadata(GetDatabaseMetadataRequest) returns (DatabaseMetadata) {
+ option (google.api.http) = {
+ get: "/v1/{name=environments/*/instances/*/databases/*/metadata}"
+ };
+ }
+
+ rpc GetDatabaseSchema(GetDatabaseSchemaRequest) returns (DatabaseSchema) {
+ option (google.api.http) = {
+ get: "/v1/{name=environments/*/instances/*/databases/*/schema}"
+ };
+ }
+}
+
+message GetDatabaseRequest {
+ // The name of the database to retrieve.
+ // Format: environments/{environment}/instances/{instance}/databases/{database}
+ string name = 1 [(google.api.field_behavior) = REQUIRED];
+}
+
+message ListDatabasesRequest {
+ // The parent, which owns this collection of databases.
+ // Format: environments/{environment}/instances/{instance}
+ // Use "environments/-/instances/-" to list all databases from all environments.
+ string parent = 1 [(google.api.field_behavior) = REQUIRED];
+
+ // The maximum number of databases to return. The service may return fewer than
+ // this value.
+ // If unspecified, at most 50 databases will be returned.
+ // The maximum value is 1000; values above 1000 will be coerced to 1000.
+ int32 page_size = 2;
+
+ // A page token, received from a previous `ListDatabases` call.
+ // Provide this to retrieve the subsequent page.
+ //
+ // When paginating, all other parameters provided to `ListDatabases` must match
+ // the call that provided the page token.
+ string page_token = 3;
+
+ // Filter is used to filter databases returned in the list.
+ // For example, "project = projects/{project}" can be used to list databases in a project.
+ string filter = 4;
+}
+
+message ListDatabasesResponse {
+ // The databases from the specified request.
+ repeated Database databases = 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 UpdateDatabaseRequest {
+ // The database to update.
+ //
+ // The database's `name` field is used to identify the database to update.
+ // Format: environments/{environment}/instances/{instance}/databases/{database}
+ Database database = 1 [(google.api.field_behavior) = REQUIRED];
+
+ // The list of fields to update.
+ google.protobuf.FieldMask update_mask = 2;
+}
+
+message BatchUpdateDatabasesRequest {
+ // The parent resource shared by all databases being updated.
+ // Format: environments/{environment}/instances/{instance}
+ // If the operation spans parents, a dash (-) may be accepted as a wildcard.
+ // We only support updating the project of databases for now.
+ string parent = 1;
+
+ // The request message specifying the resources to update.
+ // A maximum of 1000 databases can be modified in a batch.
+ repeated UpdateDatabaseRequest requests = 2
+ [(google.api.field_behavior) = REQUIRED];
+}
+
+message BatchUpdateDatabasesResponse {
+ // Databases updated.
+ repeated Database databases = 1;
+}
+
+message GetDatabaseMetadataRequest {
+ // The name of the database to retrieve metadata.
+ // Format: environments/{environment}/instances/{instance}/databases/{database}
+ string name = 1 [(google.api.field_behavior) = REQUIRED];
+}
+
+message GetDatabaseSchemaRequest {
+ // The name of the database to retrieve schema.
+ // Format: environments/{environment}/instances/{instance}/databases/{database}
+ string name = 1 [(google.api.field_behavior) = REQUIRED];
+}
+
+message Database {
+ // The name of the database.
+ // Format: environments/{environment}/instances/{instance}/databases/{database}
+ // {database} is the database name in the instance.
+ string name = 1;
+
+ // The existence of a database on latest sync.
+ State sync_state = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
+
+ // The latest synchronization time.
+ google.protobuf.Timestamp successful_sync_time = 3 [(google.api.field_behavior) = OUTPUT_ONLY];
+
+ // The project for a database.
+ // Format: projects/{project}
+ string project = 4;
+
+ string character_set = 5 [(google.api.field_behavior) = OUTPUT_ONLY];
+
+ string collation = 6 [(google.api.field_behavior) = OUTPUT_ONLY];
+
+ // The version of database schema.
+ string schema_version = 7 [(google.api.field_behavior) = OUTPUT_ONLY];
+
+ // Labels will be used for deployment and policy control.
+ map<string, string> labels = 8;
+}
+
+// DatabaseMetadata is the metadata for databases.
+message DatabaseMetadata {
+ string name = 1;
+
+ // The schemas is the list of schemas in a database.
+ repeated SchemaMetadata schemas = 2;
+
+ // The character_set is the character set of a database.
+ string character_set = 3;
+
+ // The collation is the collation of a database.
+ string collation = 4;
+
+ // The extensions is the list of extensions in a database.
+ repeated ExtensionMetadata extensions = 5;
+}
+
+// SchemaMetadata is the metadata for schemas.
+// This is the concept of schema in Postgres, but it's a no-op for MySQL.
+message SchemaMetadata {
+ // The name is the schema name.
+ // It is an empty string for databases without such concept such as MySQL.
+ string name = 1;
+
+ // The tables is the list of tables in a schema.
+ repeated TableMetadata tables = 2;
+
+ // The views is the list of views in a schema.
+ repeated ViewMetadata views = 3;
+}
+
+// TableMetadata is the metadata for tables.
+message TableMetadata {
+ // The name is the name of a table.
+ string name = 1;
+
+ // The columns is the ordered list of columns in a table.
+ repeated ColumnMetadata columns = 2;
+
+ // The indexes is the list of indexes in a table.
+ repeated IndexMetadata indexes = 3;
+
+ // The engine is the engine of a table.
+ string engine = 4;
+
+ // The collation is the collation of a table.
+ string collation = 5;
+
+ // The row_count is the estimated number of rows of a table.
+ int64 row_count = 6;
+
+ // The data_size is the estimated data size of a table.
+ int64 data_size = 7;
+
+ // The index_size is the estimated index size of a table.
+ int64 index_size = 8;
+
+ // The data_free is the estimated free data size of a table.
+ int64 data_free = 9;
+
+ // The create_options is the create option of a table.
+ string create_options = 10;
+
+ // The comment is the comment of a table.
+ string comment = 11;
+
+ // The foreign_keys is the list of foreign keys in a table.
+ repeated ForeignKeyMetadata foreign_keys = 12;
+}
+
+// ColumnMetadata is the metadata for columns.
+message ColumnMetadata {
+ // The name is the name of a column.
+ string name = 1;
+
+ // The position is the position in columns.
+ int32 position = 2;
+
+ // The default is the default of a column. Use google.protobuf.StringValue to distinguish between an empty string default value or no default.
+ google.protobuf.StringValue default = 3;
+
+ // The nullable is the nullable of a column.
+ bool nullable = 4;
+
+ // The type is the type of a column.
+ string type = 5;
+
+ // The character_set is the character_set of a column.
+ string character_set = 6;
+
+ // The collation is the collation of a column.
+ string collation = 7;
+
+ // The comment is the comment of a column.
+ string comment = 8;
+}
+
+// ViewMetadata is the metadata for views.
+message ViewMetadata {
+ // The name is the name of a view.
+ string name = 1;
+
+ // The definition is the definition of a view.
+ string definition = 2;
+
+ // The comment is the comment of a view.
+ string comment = 3;
+}
+
+// IndexMetadata is the metadata for indexes.
+message IndexMetadata {
+ // The name is the name of an index.
+ string name = 1;
+
+ // The expressions are the ordered columns or expressions of an index.
+ // This could refer to a column or an expression.
+ repeated string expressions = 2;
+
+ // The type is the type of an index.
+ string type = 3;
+
+ // The unique is whether the index is unique.
+ bool unique = 4;
+
+ // The primary is whether the index is a primary key index.
+ bool primary = 5;
+
+ // The visible is whether the index is visible.
+ bool visible = 6;
+
+ // The comment is the comment of an index.
+ string comment = 7;
+}
+
+
+// ExtensionMetadata is the metadata for extensions.
+message ExtensionMetadata {
+ // The name is the name of an extension.
+ string name = 1;
+
+ // The schema is the extension that is installed to. But the extension usage is not limited to the schema.
+ string schema = 2;
+
+ // The version is the version of an extension.
+ string version = 3;
+
+ // The description is the description of an extension.
+ string description = 4;
+}
+
+// ForeignKeyMetadata is the metadata for foreign keys.
+message ForeignKeyMetadata {
+ // The name is the name of a foreign key.
+ string name = 1;
+
+ // The columns are the ordered referencing columns of a foreign key.
+ repeated string columns = 2;
+
+ // The referenced_schema is the referenced schema name of a foreign key.
+ // It is an empty string for databases without such concept such as MySQL.
+ string referenced_schema = 3;
+
+ // The referenced_table is the referenced table name of a foreign key.
+ string referenced_table = 4;
+
+ // The referenced_columns are the ordered referenced columns of a foreign key.
+ repeated string referenced_columns = 5;
+
+ // The on_delete is the on delete action of a foreign key.
+ string on_delete = 6;
+
+ // The on_update is the on update action of a foreign key.
+ string on_update = 7;
+
+ // The match_type is the match type of a foreign key.
+ // The match_type is the PostgreSQL specific field.
+ // It's empty string for other databases.
+ string match_type = 8;
+}
+
+// DatabaseMetadata is the metadata for databases.
+message DatabaseSchema {
+ // The schema dump from database.
+ string schema = 1;
+}
\ No newline at end of file
diff --git a/proto/v1/environment_service.proto b/proto/v1/environment_service.proto
index 75bfeffcd3..beda259eda 100644
--- a/proto/v1/environment_service.proto
+++ b/proto/v1/environment_service.proto
@@ -83,7 +83,7 @@ message ListEnvironmentsRequest {
}
message ListEnvironmentsResponse {
- // The environments from the specified publisher.
+ // The environments from the specified request.
repeated Environment environments = 1;
// A token, which can be sent as `page_token` to retrieve the next page.
diff --git a/proto/v1/instance_service.proto b/proto/v1/instance_service.proto
index 6f05bd7c88..3b1394e918 100644
--- a/proto/v1/instance_service.proto
+++ b/proto/v1/instance_service.proto
@@ -56,6 +56,27 @@ service InstanceService {
body: "*"
};
}
+
+ rpc AddDataSource(AddDataSourceRequest) returns (Instance) {
+ option (google.api.http) = {
+ post: "/v1/{instance=environments/*/instances/*}:addDataSource"
+ body: "*"
+ };
+ }
+
+ rpc RemoveDataSource(RemoveDataSourceRequest) returns (Instance) {
+ option (google.api.http) = {
+ post: "/v1/{instance=environments/*/instances/*}:removeDataSource"
+ body: "*"
+ };
+ }
+
+ rpc UpdateDataSource(UpdateDataSourceRequest) returns (Instance) {
+ option (google.api.http) = {
+ post: "/v1/{instance=environments/*/instances/*}:updateDataSource"
+ body: "*"
+ };
+ }
}
message GetInstanceRequest {
@@ -88,7 +109,7 @@ message ListInstancesRequest {
}
message ListInstancesResponse {
- // The instances from the specified publisher.
+ // The instances from the specified request.
repeated Instance instances = 1;
// A token, which can be sent as `page_token` to retrieve the next page.
@@ -135,6 +156,38 @@ message UndeleteInstanceRequest {
string name = 1 [(google.api.field_behavior) = REQUIRED];
}
+message AddDataSourceRequest {
+ // The name of the instance to add a data source to.
+ // Format: environments/{environment}/instances/{instance}
+ string instance = 1 [(google.api.field_behavior) = REQUIRED];
+
+ // Identified by type.
+ // Only READ_ONLY data source can be added.
+ DataSource data_sources = 2 [(google.api.field_behavior) = REQUIRED];
+}
+
+message RemoveDataSourceRequest {
+ // The name of the instance to remove a data source from.
+ // Format: environments/{environment}/instances/{instance}
+ string instance = 1 [(google.api.field_behavior) = REQUIRED];
+
+ // Identified by type.
+ // Only READ_ONLY data source can be removed.
+ DataSource data_sources = 2 [(google.api.field_behavior) = REQUIRED];
+}
+
+message UpdateDataSourceRequest {
+ // The name of the instance to update a data source.
+ // Format: environments/{environment}/instances/{instance}
+ string instance = 1 [(google.api.field_behavior) = REQUIRED];
+
+ // Identified by type.
+ DataSource data_sources = 2 [(google.api.field_behavior) = REQUIRED];
+
+ // The list of fields to update.
+ google.protobuf.FieldMask update_mask = 3;
+}
+
message Instance {
// The name of the instance.
// Format: environments/{environment}/instances/{instance}
diff --git a/proto/v1/project_service.proto b/proto/v1/project_service.proto
index 5535bab2ea..706f127485 100644
--- a/proto/v1/project_service.proto
+++ b/proto/v1/project_service.proto
@@ -83,7 +83,7 @@ message ListProjectsRequest {
}
message ListProjectsResponse {
- // The projects from the specified publisher.
+ // The projects from the specified request.
repeated Project projects = 1;
// A token, which can be sent as `page_token` to retrieve the next page.
diff --git a/server/api/v1/database_service.go b/server/api/v1/database_service.go
new file mode 100644
index 0000000000..1ce1803ada
--- /dev/null
+++ b/server/api/v1/database_service.go
@@ -0,0 +1,54 @@
+package v1
+
+import (
+ "context"
+
+ "google.golang.org/grpc/codes"
+ "google.golang.org/grpc/status"
+
+ v1pb "github.com/bytebase/bytebase/proto/generated-go/v1"
+ "github.com/bytebase/bytebase/store"
+)
+
+// DatabaseService implements the database service.
+type DatabaseService struct {
+ v1pb.UnimplementedDatabaseServiceServer
+ store *store.Store
+}
+
+// NewDatabaseService creates a new DatabaseService.
+func NewDatabaseService(store *store.Store) *DatabaseService {
+ return &DatabaseService{
+ store: store,
+ }
+}
+
+// GetDatabase gets a database.
+func (*DatabaseService) GetDatabase(_ context.Context, _ *v1pb.GetDatabaseRequest) (*v1pb.Database, error) {
+ return nil, status.Errorf(codes.Unimplemented, "method GetDatabase not implemented")
+}
+
+// ListDatabases lists all databases.
+func (*DatabaseService) ListDatabases(_ context.Context, _ *v1pb.ListDatabasesRequest) (*v1pb.ListDatabasesResponse, error) {
+ return nil, status.Errorf(codes.Unimplemented, "method ListDatabases not implemented")
+}
+
+// UpdateDatabase updates a database.
+func (*DatabaseService) UpdateDatabase(_ context.Context, _ *v1pb.UpdateDatabaseRequest) (*v1pb.Database, error) {
+ return nil, status.Errorf(codes.Unimplemented, "method UpdateDatabase not implemented")
+}
+
+// BatchUpdateDatabases updates a database in batch.
+func (*DatabaseService) BatchUpdateDatabases(_ context.Context, _ *v1pb.BatchUpdateDatabasesRequest) (*v1pb.BatchUpdateDatabasesResponse, error) {
+ return nil, status.Errorf(codes.Unimplemented, "method BatchUpdateDatabases not implemented")
+}
+
+// GetDatabaseMetadata gets the metadata of a database.
+func (*DatabaseService) GetDatabaseMetadata(_ context.Context, _ *v1pb.GetDatabaseMetadataRequest) (*v1pb.DatabaseMetadata, error) {
+ return nil, status.Errorf(codes.Unimplemented, "method GetDatabaseMetadata not implemented")
+}
+
+// GetDatabaseSchema gets the schema of a database.
+func (*DatabaseService) GetDatabaseSchema(_ context.Context, _ *v1pb.GetDatabaseSchemaRequest) (*v1pb.DatabaseSchema, error) {
+ return nil, status.Errorf(codes.Unimplemented, "method GetDatabaseSchema not implemented")
+}
diff --git a/server/api/v1/instance_service.go b/server/api/v1/instance_service.go
index c311d3a47f..21c7b84b5e 100644
--- a/server/api/v1/instance_service.go
+++ b/server/api/v1/instance_service.go
@@ -237,6 +237,21 @@ func (s *InstanceService) UndeleteInstance(ctx context.Context, request *v1pb.Un
return convertToInstance(ins), nil
}
+// AddDataSource adds a data source to an instance.
+func (*InstanceService) AddDataSource(_ context.Context, _ *v1pb.AddDataSourceRequest) (*v1pb.Instance, error) {
+ return nil, status.Errorf(codes.Unimplemented, "method AddDataSource not implemented")
+}
+
+// RemoveDataSource removes a data source to an instance.
+func (*InstanceService) RemoveDataSource(_ context.Context, _ *v1pb.RemoveDataSourceRequest) (*v1pb.Instance, error) {
+ return nil, status.Errorf(codes.Unimplemented, "method RemoveDataSource not implemented")
+}
+
+// UpdateDataSource updates a data source of an instance.
+func (*InstanceService) UpdateDataSource(_ context.Context, _ *v1pb.UpdateDataSourceRequest) (*v1pb.Instance, error) {
+ return nil, status.Errorf(codes.Unimplemented, "method UpdateDataSource not implemented")
+}
+
func getEnvironmentAndInstanceID(name string) (string, string, error) {
// the instance request should be environments/{environment-id}/instances/{instance-id}
if !strings.HasPrefix(name, environmentNamePrefix) {
diff --git a/server/server.go b/server/server.go
index 4c698d47c9..f0c02af6be 100644
--- a/server/server.go
+++ b/server/server.go
@@ -446,6 +446,7 @@ func NewServer(ctx context.Context, profile config.Profile) (*Server, error) {
v1pb.RegisterEnvironmentServiceServer(s.grpcServer, v1.NewEnvironmentService(s.store, s.licenseService))
v1pb.RegisterInstanceServiceServer(s.grpcServer, v1.NewInstanceService(s.store, s.licenseService))
v1pb.RegisterProjectServiceServer(s.grpcServer, v1.NewProjectService(s.store))
+ v1pb.RegisterDatabaseServiceServer(s.grpcServer, v1.NewDatabaseService(s.store))
opts := []grpc.DialOption{grpc.WithTransportCredentials(insecure.NewCredentials())}
grpcEndpoint := fmt.Sprintf(":%d", profile.GrpcPort)
if err := v1pb.RegisterAuthServiceHandlerFromEndpoint(ctx, mux, grpcEndpoint, opts); err != nil {
@@ -460,6 +461,9 @@ func NewServer(ctx context.Context, profile config.Profile) (*Server, error) {
if err := v1pb.RegisterProjectServiceHandlerFromEndpoint(ctx, mux, grpcEndpoint, opts); err != nil {
return nil, err
}
+ if err := v1pb.RegisterDatabaseServiceHandlerFromEndpoint(ctx, mux, grpcEndpoint, opts); err != nil {
+ return nil, err
+ }
e.Any("/v1/*", echo.WrapHandler(mux))
// Register open API routes