Skip to content

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

chore: export logs API (#8149)

Danny Xuf7656ba03b28
diff --git a/backend/api/v1/sql_service.go b/backend/api/v1/sql_service.go
index 777e970fae..5741d2eeab 100644
--- a/backend/api/v1/sql_service.go
+++ b/backend/api/v1/sql_service.go
@@ -371,15 +371,15 @@ func (s *SQLService) doExport(ctx context.Context, request *v1pb.ExportRequest,
var content []byte
switch request.Format {
- case v1pb.ExportRequest_CSV:
+ case v1pb.ExportFormat_CSV:
if content, err = s.exportCSV(result[0]); err != nil {
return nil, durationNs, err
}
- case v1pb.ExportRequest_JSON:
+ case v1pb.ExportFormat_JSON:
if content, err = s.exportJSON(result[0]); err != nil {
return nil, durationNs, err
}
- case v1pb.ExportRequest_SQL:
+ case v1pb.ExportFormat_SQL:
resourceList, err := s.extractResourceList(ctx, convertToParserEngine(instance.Engine), request.ConnectionDatabase, request.Statement, instance)
if err != nil {
return nil, 0, status.Errorf(codes.InvalidArgument, "failed to extract resource list: %v", err)
@@ -391,7 +391,7 @@ func (s *SQLService) doExport(ctx context.Context, request *v1pb.ExportRequest,
if content, err = exportSQL(instance.Engine, statementPrefix, result[0]); err != nil {
return nil, durationNs, err
}
- case v1pb.ExportRequest_XLSX:
+ case v1pb.ExportFormat_XLSX:
if content, err = s.exportXLSX(result[0]); err != nil {
return nil, durationNs, err
}
diff --git a/backend/tests/sql_export_test.go b/backend/tests/sql_export_test.go
index 2b5cbd3961..4075d752dd 100644
--- a/backend/tests/sql_export_test.go
+++ b/backend/tests/sql_export_test.go
@@ -168,7 +168,7 @@ func TestSQLExport(t *testing.T) {
export, err := ctl.sqlServiceClient.Export(ctx, &v1pb.ExportRequest{
Admin: true,
ConnectionDatabase: databaseNameQuery,
- Format: v1pb.ExportRequest_SQL,
+ Format: v1pb.ExportFormat_SQL,
Limit: 1,
Name: instance.Name,
Statement: tt.export,
diff --git a/backend/tests/sql_review_test.go b/backend/tests/sql_review_test.go
index ad63733a35..4746816a0c 100644
--- a/backend/tests/sql_review_test.go
+++ b/backend/tests/sql_review_test.go
@@ -12,6 +12,7 @@ import (
"path/filepath"
"strconv"
"testing"
+ "time"
// Import pg driver.
// init() in pgx will register it's pgx driver.
@@ -480,6 +481,7 @@ func createIssueAndReturnSQLReviewResult(ctx context.Context, a *require.Asserti
},
})
a.NoError(err)
+ time.Sleep(time.Second)
err = ctl.waitRollout(ctx, issue.Name, rollout.Name)
a.NoError(err)
}
diff --git a/frontend/src/store/modules/v1/sql.ts b/frontend/src/store/modules/v1/sql.ts
index 395299e4cb..4a06bc5622 100644
--- a/frontend/src/store/modules/v1/sql.ts
+++ b/frontend/src/store/modules/v1/sql.ts
@@ -2,11 +2,8 @@ import { ClientError, Status } from "nice-grpc-common";
import { defineStore } from "pinia";
import { sqlServiceClient } from "@/grpcweb";
import { SQLResultSetV1 } from "@/types";
-import {
- ExportRequest,
- ExportRequest_Format,
- QueryRequest,
-} from "@/types/proto/v1/sql_service";
+import { ExportFormat } from "@/types/proto/v1/common";
+import { ExportRequest, QueryRequest } from "@/types/proto/v1/sql_service";
import { extractGrpcErrorMessage } from "@/utils/grpcweb";
export const useSQLStore = defineStore("sql", () => {
@@ -53,18 +50,18 @@ export const useSQLStore = defineStore("sql", () => {
export const getExportRequestFormat = (
format: "CSV" | "JSON" | "SQL" | "XLSX"
-): ExportRequest_Format => {
+): ExportFormat => {
switch (format) {
case "CSV":
- return ExportRequest_Format.CSV;
+ return ExportFormat.CSV;
case "JSON":
- return ExportRequest_Format.JSON;
+ return ExportFormat.JSON;
case "SQL":
- return ExportRequest_Format.SQL;
+ return ExportFormat.SQL;
case "XLSX":
- return ExportRequest_Format.XLSX;
+ return ExportFormat.XLSX;
default:
- return ExportRequest_Format.FORMAT_UNSPECIFIED;
+ return ExportFormat.FORMAT_UNSPECIFIED;
}
};
diff --git a/frontend/src/types/proto/v1/common.ts b/frontend/src/types/proto/v1/common.ts
index 7cc8ab02c6..2b67875866 100644
--- a/frontend/src/types/proto/v1/common.ts
+++ b/frontend/src/types/proto/v1/common.ts
@@ -208,3 +208,54 @@ export function maskingLevelToJSON(object: MaskingLevel): string {
return "UNRECOGNIZED";
}
}
+
+export enum ExportFormat {
+ FORMAT_UNSPECIFIED = 0,
+ CSV = 1,
+ JSON = 2,
+ SQL = 3,
+ XLSX = 4,
+ UNRECOGNIZED = -1,
+}
+
+export function exportFormatFromJSON(object: any): ExportFormat {
+ switch (object) {
+ case 0:
+ case "FORMAT_UNSPECIFIED":
+ return ExportFormat.FORMAT_UNSPECIFIED;
+ case 1:
+ case "CSV":
+ return ExportFormat.CSV;
+ case 2:
+ case "JSON":
+ return ExportFormat.JSON;
+ case 3:
+ case "SQL":
+ return ExportFormat.SQL;
+ case 4:
+ case "XLSX":
+ return ExportFormat.XLSX;
+ case -1:
+ case "UNRECOGNIZED":
+ default:
+ return ExportFormat.UNRECOGNIZED;
+ }
+}
+
+export function exportFormatToJSON(object: ExportFormat): string {
+ switch (object) {
+ case ExportFormat.FORMAT_UNSPECIFIED:
+ return "FORMAT_UNSPECIFIED";
+ case ExportFormat.CSV:
+ return "CSV";
+ case ExportFormat.JSON:
+ return "JSON";
+ case ExportFormat.SQL:
+ return "SQL";
+ case ExportFormat.XLSX:
+ return "XLSX";
+ case ExportFormat.UNRECOGNIZED:
+ default:
+ return "UNRECOGNIZED";
+ }
+}
diff --git a/frontend/src/types/proto/v1/logging_service.ts b/frontend/src/types/proto/v1/logging_service.ts
index 6889c02185..cda05003d6 100644
--- a/frontend/src/types/proto/v1/logging_service.ts
+++ b/frontend/src/types/proto/v1/logging_service.ts
@@ -2,6 +2,7 @@
import type { CallContext, CallOptions } from "nice-grpc-common";
import * as _m0 from "protobufjs/minimal";
import { Timestamp } from "../google/protobuf/timestamp";
+import { ExportFormat, exportFormatFromJSON, exportFormatToJSON } from "./common";
export const protobufPackage = "bytebase.v1";
@@ -67,6 +68,15 @@ export interface GetLogRequest {
name: string;
}
+export interface ExportLogsRequest {
+ /** The export format. */
+ format: ExportFormat;
+}
+
+export interface ExportLogsResponse {
+ content: Uint8Array;
+}
+
export interface LogEntity {
/**
* The name of the log.
@@ -578,6 +588,119 @@ export const GetLogRequest = {
},
};
+function createBaseExportLogsRequest(): ExportLogsRequest {
+ return { format: 0 };
+}
+
+export const ExportLogsRequest = {
+ encode(message: ExportLogsRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
+ if (message.format !== 0) {
+ writer.uint32(40).int32(message.format);
+ }
+ return writer;
+ },
+
+ decode(input: _m0.Reader | Uint8Array, length?: number): ExportLogsRequest {
+ const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
+ let end = length === undefined ? reader.len : reader.pos + length;
+ const message = createBaseExportLogsRequest();
+ while (reader.pos < end) {
+ const tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 5:
+ if (tag !== 40) {
+ break;
+ }
+
+ message.format = reader.int32() as any;
+ continue;
+ }
+ if ((tag & 7) === 4 || tag === 0) {
+ break;
+ }
+ reader.skipType(tag & 7);
+ }
+ return message;
+ },
+
+ fromJSON(object: any): ExportLogsRequest {
+ return { format: isSet(object.format) ? exportFormatFromJSON(object.format) : 0 };
+ },
+
+ toJSON(message: ExportLogsRequest): unknown {
+ const obj: any = {};
+ message.format !== undefined && (obj.format = exportFormatToJSON(message.format));
+ return obj;
+ },
+
+ create(base?: DeepPartial<ExportLogsRequest>): ExportLogsRequest {
+ return ExportLogsRequest.fromPartial(base ?? {});
+ },
+
+ fromPartial(object: DeepPartial<ExportLogsRequest>): ExportLogsRequest {
+ const message = createBaseExportLogsRequest();
+ message.format = object.format ?? 0;
+ return message;
+ },
+};
+
+function createBaseExportLogsResponse(): ExportLogsResponse {
+ return { content: new Uint8Array(0) };
+}
+
+export const ExportLogsResponse = {
+ encode(message: ExportLogsResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
+ if (message.content.length !== 0) {
+ writer.uint32(10).bytes(message.content);
+ }
+ return writer;
+ },
+
+ decode(input: _m0.Reader | Uint8Array, length?: number): ExportLogsResponse {
+ const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
+ let end = length === undefined ? reader.len : reader.pos + length;
+ const message = createBaseExportLogsResponse();
+ while (reader.pos < end) {
+ const tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1:
+ if (tag !== 10) {
+ break;
+ }
+
+ message.content = reader.bytes();
+ continue;
+ }
+ if ((tag & 7) === 4 || tag === 0) {
+ break;
+ }
+ reader.skipType(tag & 7);
+ }
+ return message;
+ },
+
+ fromJSON(object: any): ExportLogsResponse {
+ return { content: isSet(object.content) ? bytesFromBase64(object.content) : new Uint8Array(0) };
+ },
+
+ toJSON(message: ExportLogsResponse): unknown {
+ const obj: any = {};
+ message.content !== undefined &&
+ (obj.content = base64FromBytes(message.content !== undefined ? message.content : new Uint8Array(0)));
+ return obj;
+ },
+
+ create(base?: DeepPartial<ExportLogsResponse>): ExportLogsResponse {
+ return ExportLogsResponse.fromPartial(base ?? {});
+ },
+
+ fromPartial(object: DeepPartial<ExportLogsResponse>): ExportLogsResponse {
+ const message = createBaseExportLogsResponse();
+ message.content = object.content ?? new Uint8Array(0);
+ return message;
+ },
+};
+
function createBaseLogEntity(): LogEntity {
return {
name: "",
@@ -784,17 +907,105 @@ export const LoggingServiceDefinition = {
},
},
},
+ exportLogs: {
+ name: "ExportLogs",
+ requestType: ExportLogsRequest,
+ requestStream: false,
+ responseType: ExportLogsResponse,
+ responseStream: false,
+ options: {
+ _unknownFields: {
+ 578365826: [
+ new Uint8Array([
+ 20,
+ 58,
+ 1,
+ 42,
+ 34,
+ 15,
+ 47,
+ 118,
+ 49,
+ 47,
+ 108,
+ 111,
+ 103,
+ 115,
+ 58,
+ 101,
+ 120,
+ 112,
+ 111,
+ 114,
+ 116,
+ ]),
+ ],
+ },
+ },
+ },
},
} as const;
export interface LoggingServiceImplementation<CallContextExt = {}> {
listLogs(request: ListLogsRequest, context: CallContext & CallContextExt): Promise<DeepPartial<ListLogsResponse>>;
getLog(request: GetLogRequest, context: CallContext & CallContextExt): Promise<DeepPartial<LogEntity>>;
+ exportLogs(
+ request: ExportLogsRequest,
+ context: CallContext & CallContextExt,
+ ): Promise<DeepPartial<ExportLogsResponse>>;
}
export interface LoggingServiceClient<CallOptionsExt = {}> {
listLogs(request: DeepPartial<ListLogsRequest>, options?: CallOptions & CallOptionsExt): Promise<ListLogsResponse>;
getLog(request: DeepPartial<GetLogRequest>, options?: CallOptions & CallOptionsExt): Promise<LogEntity>;
+ exportLogs(
+ request: DeepPartial<ExportLogsRequest>,
+ options?: CallOptions & CallOptionsExt,
+ ): Promise<ExportLogsResponse>;
+}
+
+declare const self: any | undefined;
+declare const window: any | undefined;
+declare const global: any | undefined;
+const tsProtoGlobalThis: 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";
+})();
+
+function bytesFromBase64(b64: string): Uint8Array {
+ if (tsProtoGlobalThis.Buffer) {
+ return Uint8Array.from(tsProtoGlobalThis.Buffer.from(b64, "base64"));
+ } else {
+ const bin = tsProtoGlobalThis.atob(b64);
+ const arr = new Uint8Array(bin.length);
+ for (let i = 0; i < bin.length; ++i) {
+ arr[i] = bin.charCodeAt(i);
+ }
+ return arr;
+ }
+}
+
+function base64FromBytes(arr: Uint8Array): string {
+ if (tsProtoGlobalThis.Buffer) {
+ return tsProtoGlobalThis.Buffer.from(arr).toString("base64");
+ } else {
+ const bin: string[] = [];
+ arr.forEach((byte) => {
+ bin.push(String.fromCharCode(byte));
+ });
+ return tsProtoGlobalThis.btoa(bin.join(""));
+ }
}
type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
diff --git a/frontend/src/types/proto/v1/sql_service.ts b/frontend/src/types/proto/v1/sql_service.ts
index a4a97abed9..6dd045d608 100644
--- a/frontend/src/types/proto/v1/sql_service.ts
+++ b/frontend/src/types/proto/v1/sql_service.ts
@@ -4,7 +4,7 @@ import type { CallContext, CallOptions } from "nice-grpc-common";
import * as _m0 from "protobufjs/minimal";
import { Duration } from "../google/protobuf/duration";
import { NullValue, nullValueFromJSON, nullValueToJSON, Value } from "../google/protobuf/struct";
-import { Engine, engineFromJSON, engineToJSON } from "./common";
+import { Engine, engineFromJSON, engineToJSON, ExportFormat, exportFormatFromJSON, exportFormatToJSON } from "./common";
import { DatabaseMetadata } from "./database_service";
export const protobufPackage = "bytebase.v1";
@@ -61,7 +61,7 @@ export interface ExportRequest {
/** The maximum number of rows to return. */
limit: number;
/** The export format. */
- format: ExportRequest_Format;
+ format: ExportFormat;
/**
* The admin is used for workspace owner and DBA for exporting data from SQL Editor Admin mode.
* The exported data is not masked.
@@ -69,57 +69,6 @@ export interface ExportRequest {
admin: boolean;
}
-export enum ExportRequest_Format {
- FORMAT_UNSPECIFIED = 0,
- CSV = 1,
- JSON = 2,
- SQL = 3,
- XLSX = 4,
- UNRECOGNIZED = -1,
-}
-
-export function exportRequest_FormatFromJSON(object: any): ExportRequest_Format {
- switch (object) {
- case 0:
- case "FORMAT_UNSPECIFIED":
- return ExportRequest_Format.FORMAT_UNSPECIFIED;
- case 1:
- case "CSV":
- return ExportRequest_Format.CSV;
- case 2:
- case "JSON":
- return ExportRequest_Format.JSON;
- case 3:
- case "SQL":
- return ExportRequest_Format.SQL;
- case 4:
- case "XLSX":
- return ExportRequest_Format.XLSX;
- case -1:
- case "UNRECOGNIZED":
- default:
- return ExportRequest_Format.UNRECOGNIZED;
- }
-}
-
-export function exportRequest_FormatToJSON(object: ExportRequest_Format): string {
- switch (object) {
- case ExportRequest_Format.FORMAT_UNSPECIFIED:
- return "FORMAT_UNSPECIFIED";
- case ExportRequest_Format.CSV:
- return "CSV";
- case ExportRequest_Format.JSON:
- return "JSON";
- case ExportRequest_Format.SQL:
- return "SQL";
- case ExportRequest_Format.XLSX:
- return "XLSX";
- case ExportRequest_Format.UNRECOGNIZED:
- default:
- return "UNRECOGNIZED";
- }
-}
-
export interface ExportResponse {
/** The export file content. */
content: Uint8Array;
@@ -685,7 +634,7 @@ export const ExportRequest = {
connectionDatabase: isSet(object.connectionDatabase) ? String(object.connectionDatabase) : "",
statement: isSet(object.statement) ? String(object.statement) : "",
limit: isSet(object.limit) ? Number(object.limit) : 0,
- format: isSet(object.format) ? exportRequest_FormatFromJSON(object.format) : 0,
+ format: isSet(object.format) ? exportFormatFromJSON(object.format) : 0,
admin: isSet(object.admin) ? Boolean(object.admin) : false,
};
},
@@ -696,7 +645,7 @@ export const ExportRequest = {
message.connectionDatabase !== undefined && (obj.connectionDatabase = message.connectionDatabase);
message.statement !== undefined && (obj.statement = message.statement);
message.limit !== undefined && (obj.limit = Math.round(message.limit));
- message.format !== undefined && (obj.format = exportRequest_FormatToJSON(message.format));
+ message.format !== undefined && (obj.format = exportFormatToJSON(message.format));
message.admin !== undefined && (obj.admin = message.admin);
return obj;
},
diff --git a/proto/gen/grpc-doc/v1/README.md b/proto/gen/grpc-doc/v1/README.md
index 47914a5b01..099e45ba14 100644
--- a/proto/gen/grpc-doc/v1/README.md
+++ b/proto/gen/grpc-doc/v1/README.md
@@ -16,6 +16,7 @@
- [v1/common.proto](#v1_common-proto)
- [Engine](#bytebase-v1-Engine)
+ - [ExportFormat](#bytebase-v1-ExportFormat)
- [MaskingLevel](#bytebase-v1-MaskingLevel)
- [State](#bytebase-v1-State)
@@ -264,6 +265,8 @@
- [IdentityProviderService](#bytebase-v1-IdentityProviderService)
- [v1/logging_service.proto](#v1_logging_service-proto)
+ - [ExportLogsRequest](#bytebase-v1-ExportLogsRequest)
+ - [ExportLogsResponse](#bytebase-v1-ExportLogsResponse)
- [GetLogRequest](#bytebase-v1-GetLogRequest)
- [ListLogsRequest](#bytebase-v1-ListLogsRequest)
- [ListLogsResponse](#bytebase-v1-ListLogsResponse)
@@ -602,7 +605,6 @@
- [RowValue](#bytebase-v1-RowValue)
- [Advice.Status](#bytebase-v1-Advice-Status)
- - [ExportRequest.Format](#bytebase-v1-ExportRequest-Format)
- [SQLService](#bytebase-v1-SQLService)
@@ -795,6 +797,21 @@ When paginating, all other parameters provided to `ListDebugLog` must match the
+<a name="bytebase-v1-ExportFormat"></a>
+
+### ExportFormat
+
+
+| Name | Number | Description |
+| ---- | ------ | ----------- |
+| FORMAT_UNSPECIFIED | 0 | |
+| CSV | 1 | |
+| JSON | 2 | |
+| SQL | 3 | |
+| XLSX | 4 | |
+
+
+
<a name="bytebase-v1-MaskingLevel"></a>
### MaskingLevel
@@ -4501,6 +4518,36 @@ The identity provider&#39;s `name` field is used to identify the identity provid
+<a name="bytebase-v1-ExportLogsRequest"></a>
+
+### ExportLogsRequest
+
+
+
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| format | [ExportFormat](#bytebase-v1-ExportFormat) | | The export format. |
+
+
+
+
+
+
+<a name="bytebase-v1-ExportLogsResponse"></a>
+
+### ExportLogsResponse
+
+
+
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| content | [bytes](#bytes) | | |
+
+
+
+
+
+
<a name="bytebase-v1-GetLogRequest"></a>
### GetLogRequest
@@ -4643,6 +4690,7 @@ ACTION_DATABASE_SQL_EDITOR_QUERY is the type for SQL editor query. |
| ----------- | ------------ | ------------- | ------------|
| ListLogs | [ListLogsRequest](#bytebase-v1-ListLogsRequest) | [ListLogsResponse](#bytebase-v1-ListLogsResponse) | |
| GetLog | [GetLogRequest](#bytebase-v1-GetLogRequest) | [LogEntity](#bytebase-v1-LogEntity) | |
+| ExportLogs | [ExportLogsRequest](#bytebase-v1-ExportLogsRequest) | [ExportLogsResponse](#bytebase-v1-ExportLogsResponse) | |
@@ -9415,7 +9463,7 @@ The sheet&#39;s `name` field is used to identify the sheet to update. Format: pr
| connection_database | [string](#string) | | The connection database name to execute the query against. For PostgreSQL, it&#39;s required. For other database engines, it&#39;s optional. Use empty string to execute against without specifying a database. |
| statement | [string](#string) | | The SQL statement to execute. |
| limit | [int32](#int32) | | The maximum number of rows to return. |
-| format | [ExportRequest.Format](#bytebase-v1-ExportRequest-Format) | | The export format. |
+| format | [ExportFormat](#bytebase-v1-ExportFormat) | | The export format. |
| admin | [bool](#bool) | | The admin is used for workspace owner and DBA for exporting data from SQL Editor Admin mode. The exported data is not masked. |
@@ -9584,21 +9632,6 @@ The sheet&#39;s `name` field is used to identify the sheet to update. Format: pr
| ERROR | 3 | |
-
-<a name="bytebase-v1-ExportRequest-Format"></a>
-
-### ExportRequest.Format
-
-
-| Name | Number | Description |
-| ---- | ------ | ----------- |
-| FORMAT_UNSPECIFIED | 0 | |
-| CSV | 1 | |
-| JSON | 2 | |
-| SQL | 3 | |
-| XLSX | 4 | |
-
-
diff --git a/proto/generated-go/v1/common.pb.go b/proto/generated-go/v1/common.pb.go
index cb30a107f5..10de0a3d52 100644
--- a/proto/generated-go/v1/common.pb.go
+++ b/proto/generated-go/v1/common.pb.go
@@ -212,6 +212,61 @@ func (MaskingLevel) EnumDescriptor() ([]byte, []int) {
return file_v1_common_proto_rawDescGZIP(), []int{2}
}
+type ExportFormat int32
+
+const (
+ ExportFormat_FORMAT_UNSPECIFIED ExportFormat = 0
+ ExportFormat_CSV ExportFormat = 1
+ ExportFormat_JSON ExportFormat = 2
+ ExportFormat_SQL ExportFormat = 3
+ ExportFormat_XLSX ExportFormat = 4
+)
+
+// Enum value maps for ExportFormat.
+var (
+ ExportFormat_name = map[int32]string{
+ 0: "FORMAT_UNSPECIFIED",
+ 1: "CSV",
+ 2: "JSON",
+ 3: "SQL",
+ 4: "XLSX",
+ }
+ ExportFormat_value = map[string]int32{
+ "FORMAT_UNSPECIFIED": 0,
+ "CSV": 1,
+ "JSON": 2,
+ "SQL": 3,
+ "XLSX": 4,
+ }
+)
+
+func (x ExportFormat) Enum() *ExportFormat {
+ p := new(ExportFormat)
+ *p = x
+ return p
+}
+
+func (x ExportFormat) String() string {
+ return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
+}
+
+func (ExportFormat) Descriptor() protoreflect.EnumDescriptor {
+ return file_v1_common_proto_enumTypes[3].Descriptor()
+}
+
+func (ExportFormat) Type() protoreflect.EnumType {
+ return &file_v1_common_proto_enumTypes[3]
+}
+
+func (x ExportFormat) Number() protoreflect.EnumNumber {
+ return protoreflect.EnumNumber(x)
+}
+
+// Deprecated: Use ExportFormat.Descriptor instead.
+func (ExportFormat) EnumDescriptor() ([]byte, []int) {
+ return file_v1_common_proto_rawDescGZIP(), []int{3}
+}
+
var File_v1_common_proto protoreflect.FileDescriptor
var file_v1_common_proto_rawDesc = []byte{
@@ -240,9 +295,13 @@ var file_v1_common_proto_rawDesc = []byte{
0x47, 0x5f, 0x4c, 0x45, 0x56, 0x45, 0x4c, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46,
0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, 0x4e, 0x4f, 0x4e, 0x45, 0x10, 0x01, 0x12,
0x0b, 0x0a, 0x07, 0x50, 0x41, 0x52, 0x54, 0x49, 0x41, 0x4c, 0x10, 0x02, 0x12, 0x08, 0x0a, 0x04,
- 0x46, 0x55, 0x4c, 0x4c, 0x10, 0x03, 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,
+ 0x46, 0x55, 0x4c, 0x4c, 0x10, 0x03, 0x2a, 0x4c, 0x0a, 0x0c, 0x45, 0x78, 0x70, 0x6f, 0x72, 0x74,
+ 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x12, 0x16, 0x0a, 0x12, 0x46, 0x4f, 0x52, 0x4d, 0x41, 0x54,
+ 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x07,
+ 0x0a, 0x03, 0x43, 0x53, 0x56, 0x10, 0x01, 0x12, 0x08, 0x0a, 0x04, 0x4a, 0x53, 0x4f, 0x4e, 0x10,
+ 0x02, 0x12, 0x07, 0x0a, 0x03, 0x53, 0x51, 0x4c, 0x10, 0x03, 0x12, 0x08, 0x0a, 0x04, 0x58, 0x4c,
+ 0x53, 0x58, 0x10, 0x04, 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 (
@@ -257,11 +316,12 @@ func file_v1_common_proto_rawDescGZIP() []byte {
return file_v1_common_proto_rawDescData
}
-var file_v1_common_proto_enumTypes = make([]protoimpl.EnumInfo, 3)
+var file_v1_common_proto_enumTypes = make([]protoimpl.EnumInfo, 4)
var file_v1_common_proto_goTypes = []interface{}{
(State)(0), // 0: bytebase.v1.State
(Engine)(0), // 1: bytebase.v1.Engine
(MaskingLevel)(0), // 2: bytebase.v1.MaskingLevel
+ (ExportFormat)(0), // 3: bytebase.v1.ExportFormat
}
var file_v1_common_proto_depIdxs = []int32{
0, // [0:0] is the sub-list for method output_type
@@ -281,7 +341,7 @@ func file_v1_common_proto_init() {
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_v1_common_proto_rawDesc,
- NumEnums: 3,
+ NumEnums: 4,
NumMessages: 0,
NumExtensions: 0,
NumServices: 0,
diff --git a/proto/generated-go/v1/logging_service.pb.go b/proto/generated-go/v1/logging_service.pb.go
index a86b91d3c9..b6e1247c7a 100644
--- a/proto/generated-go/v1/logging_service.pb.go
+++ b/proto/generated-go/v1/logging_service.pb.go
@@ -162,7 +162,7 @@ func (x LogEntity_Action) Number() protoreflect.EnumNumber {
// Deprecated: Use LogEntity_Action.Descriptor instead.
func (LogEntity_Action) EnumDescriptor() ([]byte, []int) {
- return file_v1_logging_service_proto_rawDescGZIP(), []int{3, 0}
+ return file_v1_logging_service_proto_rawDescGZIP(), []int{5, 0}
}
type LogEntity_Level int32
@@ -217,7 +217,7 @@ func (x LogEntity_Level) Number() protoreflect.EnumNumber {
// Deprecated: Use LogEntity_Level.Descriptor instead.
func (LogEntity_Level) EnumDescriptor() ([]byte, []int) {
- return file_v1_logging_service_proto_rawDescGZIP(), []int{3, 1}
+ return file_v1_logging_service_proto_rawDescGZIP(), []int{5, 1}
}
type ListLogsRequest struct {
@@ -432,6 +432,101 @@ func (x *GetLogRequest) GetName() string {
return ""
}
+type ExportLogsRequest struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // The export format.
+ Format ExportFormat `protobuf:"varint,5,opt,name=format,proto3,enum=bytebase.v1.ExportFormat" json:"format,omitempty"`
+}
+
+func (x *ExportLogsRequest) Reset() {
+ *x = ExportLogsRequest{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_v1_logging_service_proto_msgTypes[3]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *ExportLogsRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ExportLogsRequest) ProtoMessage() {}
+
+func (x *ExportLogsRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_v1_logging_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 ExportLogsRequest.ProtoReflect.Descriptor instead.
+func (*ExportLogsRequest) Descriptor() ([]byte, []int) {
+ return file_v1_logging_service_proto_rawDescGZIP(), []int{3}
+}
+
+func (x *ExportLogsRequest) GetFormat() ExportFormat {
+ if x != nil {
+ return x.Format
+ }
+ return ExportFormat_FORMAT_UNSPECIFIED
+}
+
+type ExportLogsResponse struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Content []byte `protobuf:"bytes,1,opt,name=content,proto3" json:"content,omitempty"`
+}
+
+func (x *ExportLogsResponse) Reset() {
+ *x = ExportLogsResponse{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_v1_logging_service_proto_msgTypes[4]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *ExportLogsResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ExportLogsResponse) ProtoMessage() {}
+
+func (x *ExportLogsResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_v1_logging_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 ExportLogsResponse.ProtoReflect.Descriptor instead.
+func (*ExportLogsResponse) Descriptor() ([]byte, []int) {
+ return file_v1_logging_service_proto_rawDescGZIP(), []int{4}
+}
+
+func (x *ExportLogsResponse) GetContent() []byte {
+ if x != nil {
+ return x.Content
+ }
+ return nil
+}
+
type LogEntity struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
@@ -464,7 +559,7 @@ type LogEntity struct {
func (x *LogEntity) Reset() {
*x = LogEntity{}
if protoimpl.UnsafeEnabled {
- mi := &file_v1_logging_service_proto_msgTypes[3]
+ mi := &file_v1_logging_service_proto_msgTypes[5]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -477,7 +572,7 @@ func (x *LogEntity) String() string {
func (*LogEntity) ProtoMessage() {}
func (x *LogEntity) ProtoReflect() protoreflect.Message {
- mi := &file_v1_logging_service_proto_msgTypes[3]
+ mi := &file_v1_logging_service_proto_msgTypes[5]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -490,7 +585,7 @@ func (x *LogEntity) ProtoReflect() protoreflect.Message {
// Deprecated: Use LogEntity.ProtoReflect.Descriptor instead.
func (*LogEntity) Descriptor() ([]byte, []int) {
- return file_v1_logging_service_proto_rawDescGZIP(), []int{3}
+ return file_v1_logging_service_proto_rawDescGZIP(), []int{5}
}
func (x *LogEntity) GetName() string {
@@ -569,122 +664,138 @@ var file_v1_logging_service_proto_rawDesc = []byte{
0x5f, 0x62, 0x65, 0x68, 0x61, 0x76, 0x69, 0x6f, 0x72, 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,
- 0x22, 0x80, 0x01, 0x0a, 0x0f, 0x4c, 0x69, 0x73, 0x74, 0x4c, 0x6f, 0x67, 0x73, 0x52, 0x65, 0x71,
- 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, 0x01,
- 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x19, 0x0a, 0x08,
- 0x6f, 0x72, 0x64, 0x65, 0x72, 0x5f, 0x62, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07,
- 0x6f, 0x72, 0x64, 0x65, 0x72, 0x42, 0x79, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f,
- 0x73, 0x69, 0x7a, 0x65, 0x18, 0x03, 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, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x61, 0x67, 0x65, 0x54, 0x6f,
- 0x6b, 0x65, 0x6e, 0x22, 0x7a, 0x0a, 0x10, 0x4c, 0x69, 0x73, 0x74, 0x4c, 0x6f, 0x67, 0x73, 0x52,
- 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3e, 0x0a, 0x0c, 0x6c, 0x6f, 0x67, 0x5f, 0x65,
- 0x6e, 0x74, 0x69, 0x74, 0x69, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e,
- 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x6f, 0x67, 0x45,
- 0x6e, 0x74, 0x69, 0x74, 0x79, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x0b, 0x6c, 0x6f, 0x67, 0x45,
- 0x6e, 0x74, 0x69, 0x74, 0x69, 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,
- 0x28, 0x0a, 0x0d, 0x47, 0x65, 0x74, 0x4c, 0x6f, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
- 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03,
- 0xe0, 0x41, 0x02, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0xa2, 0x0a, 0x0a, 0x09, 0x4c, 0x6f,
- 0x67, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18,
- 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65,
- 0x12, 0x1d, 0x0a, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28,
- 0x09, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x12,
- 0x40, 0x0a, 0x0b, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 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, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d,
- 0x65, 0x12, 0x40, 0x0a, 0x0b, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65,
- 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e,
- 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61,
- 0x6d, 0x70, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x54,
- 0x69, 0x6d, 0x65, 0x12, 0x3a, 0x0a, 0x06, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20,
- 0x01, 0x28, 0x0e, 0x32, 0x1d, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76,
- 0x31, 0x2e, 0x4c, 0x6f, 0x67, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x2e, 0x41, 0x63, 0x74, 0x69,
- 0x6f, 0x6e, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x06, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12,
- 0x37, 0x0a, 0x05, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1c,
+ 0x1a, 0x0f, 0x76, 0x31, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74,
+ 0x6f, 0x22, 0x80, 0x01, 0x0a, 0x0f, 0x4c, 0x69, 0x73, 0x74, 0x4c, 0x6f, 0x67, 0x73, 0x52, 0x65,
+ 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18,
+ 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x19, 0x0a,
+ 0x08, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x5f, 0x62, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52,
+ 0x07, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x42, 0x79, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65,
+ 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x03, 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, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x61, 0x67, 0x65, 0x54,
+ 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x7a, 0x0a, 0x10, 0x4c, 0x69, 0x73, 0x74, 0x4c, 0x6f, 0x67, 0x73,
+ 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3e, 0x0a, 0x0c, 0x6c, 0x6f, 0x67, 0x5f,
+ 0x65, 0x6e, 0x74, 0x69, 0x74, 0x69, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16,
0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x6f, 0x67,
- 0x45, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x2e, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x42, 0x03, 0xe0, 0x41,
- 0x02, 0x52, 0x05, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x12, 0x1f, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x6f,
- 0x75, 0x72, 0x63, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52,
- 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x1d, 0x0a, 0x07, 0x70, 0x61, 0x79,
- 0x6c, 0x6f, 0x61, 0x64, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52,
- 0x07, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6d, 0x6d,
- 0x65, 0x6e, 0x74, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x6d, 0x6d, 0x65,
- 0x6e, 0x74, 0x22, 0xb5, 0x06, 0x0a, 0x06, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x16, 0x0a,
- 0x12, 0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46,
- 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x18, 0x0a, 0x14, 0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f,
- 0x4d, 0x45, 0x4d, 0x42, 0x45, 0x52, 0x5f, 0x43, 0x52, 0x45, 0x41, 0x54, 0x45, 0x10, 0x01, 0x12,
- 0x1d, 0x0a, 0x19, 0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x4d, 0x45, 0x4d, 0x42, 0x45, 0x52,
- 0x5f, 0x52, 0x4f, 0x4c, 0x45, 0x5f, 0x55, 0x50, 0x44, 0x41, 0x54, 0x45, 0x10, 0x02, 0x12, 0x1a,
- 0x0a, 0x16, 0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x4d, 0x45, 0x4d, 0x42, 0x45, 0x52, 0x5f,
- 0x41, 0x43, 0x54, 0x49, 0x56, 0x41, 0x54, 0x45, 0x10, 0x03, 0x12, 0x1a, 0x0a, 0x16, 0x41, 0x43,
- 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x4d, 0x45, 0x4d, 0x42, 0x45, 0x52, 0x5f, 0x44, 0x45, 0x41, 0x43,
- 0x54, 0x49, 0x56, 0x45, 0x10, 0x04, 0x12, 0x17, 0x0a, 0x13, 0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e,
- 0x5f, 0x49, 0x53, 0x53, 0x55, 0x45, 0x5f, 0x43, 0x52, 0x45, 0x41, 0x54, 0x45, 0x10, 0x15, 0x12,
- 0x1f, 0x0a, 0x1b, 0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x49, 0x53, 0x53, 0x55, 0x45, 0x5f,
- 0x43, 0x4f, 0x4d, 0x4d, 0x45, 0x4e, 0x54, 0x5f, 0x43, 0x52, 0x45, 0x41, 0x54, 0x45, 0x10, 0x16,
- 0x12, 0x1d, 0x0a, 0x19, 0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x49, 0x53, 0x53, 0x55, 0x45,
- 0x5f, 0x46, 0x49, 0x45, 0x4c, 0x44, 0x5f, 0x55, 0x50, 0x44, 0x41, 0x54, 0x45, 0x10, 0x17, 0x12,
- 0x1e, 0x0a, 0x1a, 0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x49, 0x53, 0x53, 0x55, 0x45, 0x5f,
- 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x55, 0x50, 0x44, 0x41, 0x54, 0x45, 0x10, 0x18, 0x12,
- 0x20, 0x0a, 0x1c, 0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x49, 0x53, 0x53, 0x55, 0x45, 0x5f,
- 0x41, 0x50, 0x50, 0x52, 0x4f, 0x56, 0x41, 0x4c, 0x5f, 0x4e, 0x4f, 0x54, 0x49, 0x46, 0x59, 0x10,
- 0x19, 0x12, 0x27, 0x0a, 0x23, 0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x50, 0x49, 0x50, 0x45,
- 0x4c, 0x49, 0x4e, 0x45, 0x5f, 0x53, 0x54, 0x41, 0x47, 0x45, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55,
- 0x53, 0x5f, 0x55, 0x50, 0x44, 0x41, 0x54, 0x45, 0x10, 0x1f, 0x12, 0x26, 0x0a, 0x22, 0x41, 0x43,
- 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x50, 0x49, 0x50, 0x45, 0x4c, 0x49, 0x4e, 0x45, 0x5f, 0x54, 0x41,
- 0x53, 0x4b, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x55, 0x50, 0x44, 0x41, 0x54, 0x45,
- 0x10, 0x20, 0x12, 0x24, 0x0a, 0x20, 0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x50, 0x49, 0x50,
- 0x45, 0x4c, 0x49, 0x4e, 0x45, 0x5f, 0x54, 0x41, 0x53, 0x4b, 0x5f, 0x46, 0x49, 0x4c, 0x45, 0x5f,
- 0x43, 0x4f, 0x4d, 0x4d, 0x49, 0x54, 0x10, 0x21, 0x12, 0x29, 0x0a, 0x25, 0x41, 0x43, 0x54, 0x49,
- 0x4f, 0x4e, 0x5f, 0x50, 0x49, 0x50, 0x45, 0x4c, 0x49, 0x4e, 0x45, 0x5f, 0x54, 0x41, 0x53, 0x4b,
- 0x5f, 0x53, 0x54, 0x41, 0x54, 0x45, 0x4d, 0x45, 0x4e, 0x54, 0x5f, 0x55, 0x50, 0x44, 0x41, 0x54,
- 0x45, 0x10, 0x22, 0x12, 0x35, 0x0a, 0x31, 0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x50, 0x49,
- 0x50, 0x45, 0x4c, 0x49, 0x4e, 0x45, 0x5f, 0x54, 0x41, 0x53, 0x4b, 0x5f, 0x45, 0x41, 0x52, 0x4c,
- 0x49, 0x45, 0x53, 0x54, 0x5f, 0x41, 0x4c, 0x4c, 0x4f, 0x57, 0x45, 0x44, 0x5f, 0x54, 0x49, 0x4d,
- 0x45, 0x5f, 0x55, 0x50, 0x44, 0x41, 0x54, 0x45, 0x10, 0x23, 0x12, 0x2a, 0x0a, 0x26, 0x41, 0x43,
- 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x50, 0x49, 0x50, 0x45, 0x4c, 0x49, 0x4e, 0x45, 0x5f, 0x54, 0x41,
- 0x53, 0x4b, 0x5f, 0x52, 0x55, 0x4e, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x55, 0x50,
- 0x44, 0x41, 0x54, 0x45, 0x10, 0x24, 0x12, 0x22, 0x0a, 0x1e, 0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e,
- 0x5f, 0x50, 0x52, 0x4f, 0x4a, 0x45, 0x43, 0x54, 0x5f, 0x52, 0x45, 0x50, 0x4f, 0x53, 0x49, 0x54,
- 0x4f, 0x52, 0x59, 0x5f, 0x50, 0x55, 0x53, 0x48, 0x10, 0x29, 0x12, 0x20, 0x0a, 0x1c, 0x41, 0x43,
- 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x50, 0x52, 0x4f, 0x4a, 0x45, 0x43, 0x54, 0x5f, 0x4d, 0x45, 0x4d,
- 0x42, 0x45, 0x52, 0x5f, 0x43, 0x52, 0x45, 0x41, 0x54, 0x45, 0x10, 0x2a, 0x12, 0x20, 0x0a, 0x1c,
- 0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x50, 0x52, 0x4f, 0x4a, 0x45, 0x43, 0x54, 0x5f, 0x4d,
- 0x45, 0x4d, 0x42, 0x45, 0x52, 0x5f, 0x44, 0x45, 0x4c, 0x45, 0x54, 0x45, 0x10, 0x2b, 0x12, 0x2e,
- 0x0a, 0x2a, 0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x50, 0x52, 0x4f, 0x4a, 0x45, 0x43, 0x54,
- 0x5f, 0x44, 0x41, 0x54, 0x41, 0x42, 0x41, 0x53, 0x45, 0x5f, 0x52, 0x45, 0x43, 0x4f, 0x56, 0x45,
- 0x52, 0x59, 0x5f, 0x50, 0x49, 0x54, 0x52, 0x5f, 0x44, 0x4f, 0x4e, 0x45, 0x10, 0x2c, 0x12, 0x24,
- 0x0a, 0x20, 0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x50, 0x52, 0x4f, 0x4a, 0x45, 0x43, 0x54,
- 0x5f, 0x44, 0x41, 0x54, 0x41, 0x42, 0x41, 0x53, 0x45, 0x5f, 0x54, 0x52, 0x41, 0x4e, 0x53, 0x46,
- 0x45, 0x52, 0x10, 0x2d, 0x12, 0x24, 0x0a, 0x20, 0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x44,
- 0x41, 0x54, 0x41, 0x42, 0x41, 0x53, 0x45, 0x5f, 0x53, 0x51, 0x4c, 0x5f, 0x45, 0x44, 0x49, 0x54,
- 0x4f, 0x52, 0x5f, 0x51, 0x55, 0x45, 0x52, 0x59, 0x10, 0x3d, 0x12, 0x1e, 0x0a, 0x1a, 0x41, 0x43,
- 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x44, 0x41, 0x54, 0x41, 0x42, 0x41, 0x53, 0x45, 0x5f, 0x53, 0x51,
- 0x4c, 0x5f, 0x45, 0x58, 0x50, 0x4f, 0x52, 0x54, 0x10, 0x3e, 0x22, 0x52, 0x0a, 0x05, 0x4c, 0x65,
- 0x76, 0x65, 0x6c, 0x12, 0x15, 0x0a, 0x11, 0x4c, 0x45, 0x56, 0x45, 0x4c, 0x5f, 0x55, 0x4e, 0x53,
- 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0e, 0x0a, 0x0a, 0x4c, 0x45,
- 0x56, 0x45, 0x4c, 0x5f, 0x49, 0x4e, 0x46, 0x4f, 0x10, 0x01, 0x12, 0x11, 0x0a, 0x0d, 0x4c, 0x45,
- 0x56, 0x45, 0x4c, 0x5f, 0x57, 0x41, 0x52, 0x4e, 0x49, 0x4e, 0x47, 0x10, 0x02, 0x12, 0x0f, 0x0a,
- 0x0b, 0x4c, 0x45, 0x56, 0x45, 0x4c, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, 0x03, 0x32, 0xd2,
- 0x01, 0x0a, 0x0e, 0x4c, 0x6f, 0x67, 0x67, 0x69, 0x6e, 0x67, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63,
- 0x65, 0x12, 0x60, 0x0a, 0x08, 0x4c, 0x69, 0x73, 0x74, 0x4c, 0x6f, 0x67, 0x73, 0x12, 0x1c, 0x2e,
- 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74,
- 0x4c, 0x6f, 0x67, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x62, 0x79,
- 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4c, 0x6f,
- 0x67, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x17, 0x82, 0xd3, 0xe4, 0x93,
- 0x02, 0x11, 0x12, 0x0f, 0x2f, 0x76, 0x31, 0x2f, 0x6c, 0x6f, 0x67, 0x73, 0x3a, 0x73, 0x65, 0x61,
- 0x72, 0x63, 0x68, 0x12, 0x5e, 0x0a, 0x06, 0x47, 0x65, 0x74, 0x4c, 0x6f, 0x67, 0x12, 0x1a, 0x2e,
- 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x4c,
- 0x6f, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x62, 0x79, 0x74, 0x65,
- 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x6f, 0x67, 0x45, 0x6e, 0x74, 0x69, 0x74,
- 0x79, 0x22, 0x20, 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x13,
- 0x12, 0x11, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x6c, 0x6f, 0x67, 0x73,
- 0x2f, 0x2a, 0x7d, 0x42, 0x11, 0x5a, 0x0f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64,
- 0x2d, 0x67, 0x6f, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
+ 0x45, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x0b, 0x6c, 0x6f, 0x67,
+ 0x45, 0x6e, 0x74, 0x69, 0x74, 0x69, 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, 0x28, 0x0a, 0x0d, 0x47, 0x65, 0x74, 0x4c, 0x6f, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
+ 0x74, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42,
+ 0x03, 0xe0, 0x41, 0x02, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x46, 0x0a, 0x11, 0x45, 0x78,
+ 0x70, 0x6f, 0x72, 0x74, 0x4c, 0x6f, 0x67, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12,
+ 0x31, 0x0a, 0x06, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, 0x32,
+ 0x19, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x78,
+ 0x70, 0x6f, 0x72, 0x74, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x52, 0x06, 0x66, 0x6f, 0x72, 0x6d,
+ 0x61, 0x74, 0x22, 0x2e, 0x0a, 0x12, 0x45, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x4c, 0x6f, 0x67, 0x73,
+ 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74,
+ 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65,
+ 0x6e, 0x74, 0x22, 0xa2, 0x0a, 0x0a, 0x09, 0x4c, 0x6f, 0x67, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x79,
+ 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03,
+ 0xe0, 0x41, 0x03, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1d, 0x0a, 0x07, 0x63, 0x72, 0x65,
+ 0x61, 0x74, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52,
+ 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x40, 0x0a, 0x0b, 0x63, 0x72, 0x65, 0x61,
+ 0x74, 0x65, 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, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x0a,
+ 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x40, 0x0a, 0x0b, 0x75, 0x70,
+ 0x64, 0x61, 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32,
+ 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75,
+ 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x03, 0xe0, 0x41, 0x03,
+ 0x52, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x3a, 0x0a, 0x06,
+ 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1d, 0x2e, 0x62,
+ 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x6f, 0x67, 0x45, 0x6e,
+ 0x74, 0x69, 0x74, 0x79, 0x2e, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x03, 0xe0, 0x41, 0x02,
+ 0x52, 0x06, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x37, 0x0a, 0x05, 0x6c, 0x65, 0x76, 0x65,
+ 0x6c, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1c, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61,
+ 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x6f, 0x67, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x2e,
+ 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x05, 0x6c, 0x65, 0x76, 0x65,
+ 0x6c, 0x12, 0x1f, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x07, 0x20,
+ 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72,
+ 0x63, 0x65, 0x12, 0x1d, 0x0a, 0x07, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x18, 0x08, 0x20,
+ 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x07, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61,
+ 0x64, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x09, 0x20, 0x01,
+ 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x22, 0xb5, 0x06, 0x0a, 0x06,
+ 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x16, 0x0a, 0x12, 0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e,
+ 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x18,
+ 0x0a, 0x14, 0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x4d, 0x45, 0x4d, 0x42, 0x45, 0x52, 0x5f,
+ 0x43, 0x52, 0x45, 0x41, 0x54, 0x45, 0x10, 0x01, 0x12, 0x1d, 0x0a, 0x19, 0x41, 0x43, 0x54, 0x49,
+ 0x4f, 0x4e, 0x5f, 0x4d, 0x45, 0x4d, 0x42, 0x45, 0x52, 0x5f, 0x52, 0x4f, 0x4c, 0x45, 0x5f, 0x55,
+ 0x50, 0x44, 0x41, 0x54, 0x45, 0x10, 0x02, 0x12, 0x1a, 0x0a, 0x16, 0x41, 0x43, 0x54, 0x49, 0x4f,
+ 0x4e, 0x5f, 0x4d, 0x45, 0x4d, 0x42, 0x45, 0x52, 0x5f, 0x41, 0x43, 0x54, 0x49, 0x56, 0x41, 0x54,
+ 0x45, 0x10, 0x03, 0x12, 0x1a, 0x0a, 0x16, 0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x4d, 0x45,
+ 0x4d, 0x42, 0x45, 0x52, 0x5f, 0x44, 0x45, 0x41, 0x43, 0x54, 0x49, 0x56, 0x45, 0x10, 0x04, 0x12,
+ 0x17, 0x0a, 0x13, 0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x49, 0x53, 0x53, 0x55, 0x45, 0x5f,
+ 0x43, 0x52, 0x45, 0x41, 0x54, 0x45, 0x10, 0x15, 0x12, 0x1f, 0x0a, 0x1b, 0x41, 0x43, 0x54, 0x49,
+ 0x4f, 0x4e, 0x5f, 0x49, 0x53, 0x53, 0x55, 0x45, 0x5f, 0x43, 0x4f, 0x4d, 0x4d, 0x45, 0x4e, 0x54,
+ 0x5f, 0x43, 0x52, 0x45, 0x41, 0x54, 0x45, 0x10, 0x16, 0x12, 0x1d, 0x0a, 0x19, 0x41, 0x43, 0x54,
+ 0x49, 0x4f, 0x4e, 0x5f, 0x49, 0x53, 0x53, 0x55, 0x45, 0x5f, 0x46, 0x49, 0x45, 0x4c, 0x44, 0x5f,
+ 0x55, 0x50, 0x44, 0x41, 0x54, 0x45, 0x10, 0x17, 0x12, 0x1e, 0x0a, 0x1a, 0x41, 0x43, 0x54, 0x49,
+ 0x4f, 0x4e, 0x5f, 0x49, 0x53, 0x53, 0x55, 0x45, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f,
+ 0x55, 0x50, 0x44, 0x41, 0x54, 0x45, 0x10, 0x18, 0x12, 0x20, 0x0a, 0x1c, 0x41, 0x43, 0x54, 0x49,
+ 0x4f, 0x4e, 0x5f, 0x49, 0x53, 0x53, 0x55, 0x45, 0x5f, 0x41, 0x50, 0x50, 0x52, 0x4f, 0x56, 0x41,
+ 0x4c, 0x5f, 0x4e, 0x4f, 0x54, 0x49, 0x46, 0x59, 0x10, 0x19, 0x12, 0x27, 0x0a, 0x23, 0x41, 0x43,
+ 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x50, 0x49, 0x50, 0x45, 0x4c, 0x49, 0x4e, 0x45, 0x5f, 0x53, 0x54,
+ 0x41, 0x47, 0x45, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x55, 0x50, 0x44, 0x41, 0x54,
+ 0x45, 0x10, 0x1f, 0x12, 0x26, 0x0a, 0x22, 0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x50, 0x49,
+ 0x50, 0x45, 0x4c, 0x49, 0x4e, 0x45, 0x5f, 0x54, 0x41, 0x53, 0x4b, 0x5f, 0x53, 0x54, 0x41, 0x54,
+ 0x55, 0x53, 0x5f, 0x55, 0x50, 0x44, 0x41, 0x54, 0x45, 0x10, 0x20, 0x12, 0x24, 0x0a, 0x20, 0x41,
+ 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x50, 0x49, 0x50, 0x45, 0x4c, 0x49, 0x4e, 0x45, 0x5f, 0x54,
+ 0x41, 0x53, 0x4b, 0x5f, 0x46, 0x49, 0x4c, 0x45, 0x5f, 0x43, 0x4f, 0x4d, 0x4d, 0x49, 0x54, 0x10,
+ 0x21, 0x12, 0x29, 0x0a, 0x25, 0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x50, 0x49, 0x50, 0x45,
+ 0x4c, 0x49, 0x4e, 0x45, 0x5f, 0x54, 0x41, 0x53, 0x4b, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x45, 0x4d,
+ 0x45, 0x4e, 0x54, 0x5f, 0x55, 0x50, 0x44, 0x41, 0x54, 0x45, 0x10, 0x22, 0x12, 0x35, 0x0a, 0x31,
+ 0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x50, 0x49, 0x50, 0x45, 0x4c, 0x49, 0x4e, 0x45, 0x5f,
+ 0x54, 0x41, 0x53, 0x4b, 0x5f, 0x45, 0x41, 0x52, 0x4c, 0x49, 0x45, 0x53, 0x54, 0x5f, 0x41, 0x4c,
+ 0x4c, 0x4f, 0x57, 0x45, 0x44, 0x5f, 0x54, 0x49, 0x4d, 0x45, 0x5f, 0x55, 0x50, 0x44, 0x41, 0x54,
+ 0x45, 0x10, 0x23, 0x12, 0x2a, 0x0a, 0x26, 0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x50, 0x49,
+ 0x50, 0x45, 0x4c, 0x49, 0x4e, 0x45, 0x5f, 0x54, 0x41, 0x53, 0x4b, 0x5f, 0x52, 0x55, 0x4e, 0x5f,
+ 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x55, 0x50, 0x44, 0x41, 0x54, 0x45, 0x10, 0x24, 0x12,
+ 0x22, 0x0a, 0x1e, 0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x50, 0x52, 0x4f, 0x4a, 0x45, 0x43,
+ 0x54, 0x5f, 0x52, 0x45, 0x50, 0x4f, 0x53, 0x49, 0x54, 0x4f, 0x52, 0x59, 0x5f, 0x50, 0x55, 0x53,
+ 0x48, 0x10, 0x29, 0x12, 0x20, 0x0a, 0x1c, 0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x50, 0x52,
+ 0x4f, 0x4a, 0x45, 0x43, 0x54, 0x5f, 0x4d, 0x45, 0x4d, 0x42, 0x45, 0x52, 0x5f, 0x43, 0x52, 0x45,
+ 0x41, 0x54, 0x45, 0x10, 0x2a, 0x12, 0x20, 0x0a, 0x1c, 0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f,
+ 0x50, 0x52, 0x4f, 0x4a, 0x45, 0x43, 0x54, 0x5f, 0x4d, 0x45, 0x4d, 0x42, 0x45, 0x52, 0x5f, 0x44,
+ 0x45, 0x4c, 0x45, 0x54, 0x45, 0x10, 0x2b, 0x12, 0x2e, 0x0a, 0x2a, 0x41, 0x43, 0x54, 0x49, 0x4f,
+ 0x4e, 0x5f, 0x50, 0x52, 0x4f, 0x4a, 0x45, 0x43, 0x54, 0x5f, 0x44, 0x41, 0x54, 0x41, 0x42, 0x41,
+ 0x53, 0x45, 0x5f, 0x52, 0x45, 0x43, 0x4f, 0x56, 0x45, 0x52, 0x59, 0x5f, 0x50, 0x49, 0x54, 0x52,
+ 0x5f, 0x44, 0x4f, 0x4e, 0x45, 0x10, 0x2c, 0x12, 0x24, 0x0a, 0x20, 0x41, 0x43, 0x54, 0x49, 0x4f,
+ 0x4e, 0x5f, 0x50, 0x52, 0x4f, 0x4a, 0x45, 0x43, 0x54, 0x5f, 0x44, 0x41, 0x54, 0x41, 0x42, 0x41,
+ 0x53, 0x45, 0x5f, 0x54, 0x52, 0x41, 0x4e, 0x53, 0x46, 0x45, 0x52, 0x10, 0x2d, 0x12, 0x24, 0x0a,
+ 0x20, 0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x44, 0x41, 0x54, 0x41, 0x42, 0x41, 0x53, 0x45,
+ 0x5f, 0x53, 0x51, 0x4c, 0x5f, 0x45, 0x44, 0x49, 0x54, 0x4f, 0x52, 0x5f, 0x51, 0x55, 0x45, 0x52,
+ 0x59, 0x10, 0x3d, 0x12, 0x1e, 0x0a, 0x1a, 0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x44, 0x41,
+ 0x54, 0x41, 0x42, 0x41, 0x53, 0x45, 0x5f, 0x53, 0x51, 0x4c, 0x5f, 0x45, 0x58, 0x50, 0x4f, 0x52,
+ 0x54, 0x10, 0x3e, 0x22, 0x52, 0x0a, 0x05, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x12, 0x15, 0x0a, 0x11,
+ 0x4c, 0x45, 0x56, 0x45, 0x4c, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45,
+ 0x44, 0x10, 0x00, 0x12, 0x0e, 0x0a, 0x0a, 0x4c, 0x45, 0x56, 0x45, 0x4c, 0x5f, 0x49, 0x4e, 0x46,
+ 0x4f, 0x10, 0x01, 0x12, 0x11, 0x0a, 0x0d, 0x4c, 0x45, 0x56, 0x45, 0x4c, 0x5f, 0x57, 0x41, 0x52,
+ 0x4e, 0x49, 0x4e, 0x47, 0x10, 0x02, 0x12, 0x0f, 0x0a, 0x0b, 0x4c, 0x45, 0x56, 0x45, 0x4c, 0x5f,
+ 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, 0x03, 0x32, 0xbd, 0x02, 0x0a, 0x0e, 0x4c, 0x6f, 0x67, 0x67,
+ 0x69, 0x6e, 0x67, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x60, 0x0a, 0x08, 0x4c, 0x69,
+ 0x73, 0x74, 0x4c, 0x6f, 0x67, 0x73, 0x12, 0x1c, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73,
+ 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4c, 0x6f, 0x67, 0x73, 0x52, 0x65, 0x71,
+ 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e,
+ 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4c, 0x6f, 0x67, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f,
+ 0x6e, 0x73, 0x65, 0x22, 0x17, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x11, 0x12, 0x0f, 0x2f, 0x76, 0x31,
+ 0x2f, 0x6c, 0x6f, 0x67, 0x73, 0x3a, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x12, 0x5e, 0x0a, 0x06,
+ 0x47, 0x65, 0x74, 0x4c, 0x6f, 0x67, 0x12, 0x1a, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73,
+ 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x4c, 0x6f, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65,
+ 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31,
+ 0x2e, 0x4c, 0x6f, 0x67, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x22, 0x20, 0xda, 0x41, 0x04, 0x6e,
+ 0x61, 0x6d, 0x65, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x13, 0x12, 0x11, 0x2f, 0x76, 0x31, 0x2f, 0x7b,
+ 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x6c, 0x6f, 0x67, 0x73, 0x2f, 0x2a, 0x7d, 0x12, 0x69, 0x0a, 0x0a,
+ 0x45, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x4c, 0x6f, 0x67, 0x73, 0x12, 0x1e, 0x2e, 0x62, 0x79, 0x74,
+ 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x4c,
+ 0x6f, 0x67, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x62, 0x79, 0x74,
+ 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x4c,
+ 0x6f, 0x67, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1a, 0x82, 0xd3, 0xe4,
+ 0x93, 0x02, 0x14, 0x3a, 0x01, 0x2a, 0x22, 0x0f, 0x2f, 0x76, 0x31, 0x2f, 0x6c, 0x6f, 0x67, 0x73,
+ 0x3a, 0x65, 0x78, 0x70, 0x6f, 0x72, 0x74, 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 (
@@ -700,31 +811,37 @@ func file_v1_logging_service_proto_rawDescGZIP() []byte {
}
var file_v1_logging_service_proto_enumTypes = make([]protoimpl.EnumInfo, 2)
-var file_v1_logging_service_proto_msgTypes = make([]protoimpl.MessageInfo, 4)
+var file_v1_logging_service_proto_msgTypes = make([]protoimpl.MessageInfo, 6)
var file_v1_logging_service_proto_goTypes = []interface{}{
(LogEntity_Action)(0), // 0: bytebase.v1.LogEntity.Action
(LogEntity_Level)(0), // 1: bytebase.v1.LogEntity.Level
(*ListLogsRequest)(nil), // 2: bytebase.v1.ListLogsRequest
(*ListLogsResponse)(nil), // 3: bytebase.v1.ListLogsResponse
(*GetLogRequest)(nil), // 4: bytebase.v1.GetLogRequest
- (*LogEntity)(nil), // 5: bytebase.v1.LogEntity
- (*timestamppb.Timestamp)(nil), // 6: google.protobuf.Timestamp
+ (*ExportLogsRequest)(nil), // 5: bytebase.v1.ExportLogsRequest
+ (*ExportLogsResponse)(nil), // 6: bytebase.v1.ExportLogsResponse
+ (*LogEntity)(nil), // 7: bytebase.v1.LogEntity
+ (ExportFormat)(0), // 8: bytebase.v1.ExportFormat
+ (*timestamppb.Timestamp)(nil), // 9: google.protobuf.Timestamp
}
var file_v1_logging_service_proto_depIdxs = []int32{
- 5, // 0: bytebase.v1.ListLogsResponse.log_entities:type_name -> bytebase.v1.LogEntity
- 6, // 1: bytebase.v1.LogEntity.create_time:type_name -> google.protobuf.Timestamp
- 6, // 2: bytebase.v1.LogEntity.update_time:type_name -> google.protobuf.Timestamp
- 0, // 3: bytebase.v1.LogEntity.action:type_name -> bytebase.v1.LogEntity.Action
- 1, // 4: bytebase.v1.LogEntity.level:type_name -> bytebase.v1.LogEntity.Level
- 2, // 5: bytebase.v1.LoggingService.ListLogs:input_type -> bytebase.v1.ListLogsRequest
- 4, // 6: bytebase.v1.LoggingService.GetLog:input_type -> bytebase.v1.GetLogRequest
- 3, // 7: bytebase.v1.LoggingService.ListLogs:output_type -> bytebase.v1.ListLogsResponse
- 5, // 8: bytebase.v1.LoggingService.GetLog:output_type -> bytebase.v1.LogEntity
- 7, // [7:9] is the sub-list for method output_type
- 5, // [5:7] is the sub-list for method input_type
- 5, // [5:5] is the sub-list for extension type_name
- 5, // [5:5] is the sub-list for extension extendee
- 0, // [0:5] is the sub-list for field type_name
+ 7, // 0: bytebase.v1.ListLogsResponse.log_entities:type_name -> bytebase.v1.LogEntity
+ 8, // 1: bytebase.v1.ExportLogsRequest.format:type_name -> bytebase.v1.ExportFormat
+ 9, // 2: bytebase.v1.LogEntity.create_time:type_name -> google.protobuf.Timestamp
+ 9, // 3: bytebase.v1.LogEntity.update_time:type_name -> google.protobuf.Timestamp
+ 0, // 4: bytebase.v1.LogEntity.action:type_name -> bytebase.v1.LogEntity.Action
+ 1, // 5: bytebase.v1.LogEntity.level:type_name -> bytebase.v1.LogEntity.Level
+ 2, // 6: bytebase.v1.LoggingService.ListLogs:input_type -> bytebase.v1.ListLogsRequest
+ 4, // 7: bytebase.v1.LoggingService.GetLog:input_type -> bytebase.v1.GetLogRequest
+ 5, // 8: bytebase.v1.LoggingService.ExportLogs:input_type -> bytebase.v1.ExportLogsRequest
+ 3, // 9: bytebase.v1.LoggingService.ListLogs:output_type -> bytebase.v1.ListLogsResponse
+ 7, // 10: bytebase.v1.LoggingService.GetLog:output_type -> bytebase.v1.LogEntity
+ 6, // 11: bytebase.v1.LoggingService.ExportLogs:output_type -> bytebase.v1.ExportLogsResponse
+ 9, // [9:12] is the sub-list for method output_type
+ 6, // [6:9] is the sub-list for method input_type
+ 6, // [6:6] is the sub-list for extension type_name
+ 6, // [6:6] is the sub-list for extension extendee
+ 0, // [0:6] is the sub-list for field type_name
}
func init() { file_v1_logging_service_proto_init() }
@@ -732,6 +849,7 @@ func file_v1_logging_service_proto_init() {
if File_v1_logging_service_proto != nil {
return
}
+ file_v1_common_proto_init()
if !protoimpl.UnsafeEnabled {
file_v1_logging_service_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ListLogsRequest); i {
@@ -770,6 +888,30 @@ func file_v1_logging_service_proto_init() {
}
}
file_v1_logging_service_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*ExportLogsRequest); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_v1_logging_service_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*ExportLogsResponse); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_v1_logging_service_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*LogEntity); i {
case 0:
return &v.state
@@ -788,7 +930,7 @@ func file_v1_logging_service_proto_init() {
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_v1_logging_service_proto_rawDesc,
NumEnums: 2,
- NumMessages: 4,
+ NumMessages: 6,
NumExtensions: 0,
NumServices: 1,
},
diff --git a/proto/generated-go/v1/logging_service.pb.gw.go b/proto/generated-go/v1/logging_service.pb.gw.go
index 038b2b9887..0b6eff90a1 100644
--- a/proto/generated-go/v1/logging_service.pb.gw.go
+++ b/proto/generated-go/v1/logging_service.pb.gw.go
@@ -119,6 +119,40 @@ func local_request_LoggingService_GetLog_0(ctx context.Context, marshaler runtim
}
+func request_LoggingService_ExportLogs_0(ctx context.Context, marshaler runtime.Marshaler, client LoggingServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
+ var protoReq ExportLogsRequest
+ 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)
+ }
+
+ msg, err := client.ExportLogs(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
+ return msg, metadata, err
+
+}
+
+func local_request_LoggingService_ExportLogs_0(ctx context.Context, marshaler runtime.Marshaler, server LoggingServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
+ var protoReq ExportLogsRequest
+ 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)
+ }
+
+ msg, err := server.ExportLogs(ctx, &protoReq)
+ return msg, metadata, err
+
+}
+
// RegisterLoggingServiceHandlerServer registers the http handlers for service LoggingService to "mux".
// UnaryRPC :call LoggingServiceServer directly.
// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906.
@@ -175,6 +209,31 @@ func RegisterLoggingServiceHandlerServer(ctx context.Context, mux *runtime.Serve
})
+ mux.Handle("POST", pattern_LoggingService_ExportLogs_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.LoggingService/ExportLogs", runtime.WithHTTPPathPattern("/v1/logs:export"))
+ if err != nil {
+ runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ return
+ }
+ resp, md, err := local_request_LoggingService_ExportLogs_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_LoggingService_ExportLogs_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+
+ })
+
return nil
}
@@ -260,6 +319,28 @@ func RegisterLoggingServiceHandlerClient(ctx context.Context, mux *runtime.Serve
})
+ mux.Handle("POST", pattern_LoggingService_ExportLogs_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.LoggingService/ExportLogs", runtime.WithHTTPPathPattern("/v1/logs:export"))
+ if err != nil {
+ runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ return
+ }
+ resp, md, err := request_LoggingService_ExportLogs_0(annotatedContext, inboundMarshaler, client, req, pathParams)
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
+ if err != nil {
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
+ return
+ }
+
+ forward_LoggingService_ExportLogs_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+
+ })
+
return nil
}
@@ -267,10 +348,14 @@ var (
pattern_LoggingService_ListLogs_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "logs"}, "search"))
pattern_LoggingService_GetLog_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 2, 5, 2}, []string{"v1", "logs", "name"}, ""))
+
+ pattern_LoggingService_ExportLogs_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "logs"}, "export"))
)
var (
forward_LoggingService_ListLogs_0 = runtime.ForwardResponseMessage
forward_LoggingService_GetLog_0 = runtime.ForwardResponseMessage
+
+ forward_LoggingService_ExportLogs_0 = runtime.ForwardResponseMessage
)
diff --git a/proto/generated-go/v1/logging_service_grpc.pb.go b/proto/generated-go/v1/logging_service_grpc.pb.go
index 11a3c20a30..66ac2deccf 100644
--- a/proto/generated-go/v1/logging_service_grpc.pb.go
+++ b/proto/generated-go/v1/logging_service_grpc.pb.go
@@ -19,8 +19,9 @@ import (
const _ = grpc.SupportPackageIsVersion7
const (
- LoggingService_ListLogs_FullMethodName = "/bytebase.v1.LoggingService/ListLogs"
- LoggingService_GetLog_FullMethodName = "/bytebase.v1.LoggingService/GetLog"
+ LoggingService_ListLogs_FullMethodName = "/bytebase.v1.LoggingService/ListLogs"
+ LoggingService_GetLog_FullMethodName = "/bytebase.v1.LoggingService/GetLog"
+ LoggingService_ExportLogs_FullMethodName = "/bytebase.v1.LoggingService/ExportLogs"
)
// LoggingServiceClient is the client API for LoggingService service.
@@ -29,6 +30,7 @@ const (
type LoggingServiceClient interface {
ListLogs(ctx context.Context, in *ListLogsRequest, opts ...grpc.CallOption) (*ListLogsResponse, error)
GetLog(ctx context.Context, in *GetLogRequest, opts ...grpc.CallOption) (*LogEntity, error)
+ ExportLogs(ctx context.Context, in *ExportLogsRequest, opts ...grpc.CallOption) (*ExportLogsResponse, error)
}
type loggingServiceClient struct {
@@ -57,12 +59,22 @@ func (c *loggingServiceClient) GetLog(ctx context.Context, in *GetLogRequest, op
return out, nil
}
+func (c *loggingServiceClient) ExportLogs(ctx context.Context, in *ExportLogsRequest, opts ...grpc.CallOption) (*ExportLogsResponse, error) {
+ out := new(ExportLogsResponse)
+ err := c.cc.Invoke(ctx, LoggingService_ExportLogs_FullMethodName, in, out, opts...)
+ if err != nil {
+ return nil, err
+ }
+ return out, nil
+}
+
// LoggingServiceServer is the server API for LoggingService service.
// All implementations must embed UnimplementedLoggingServiceServer
// for forward compatibility
type LoggingServiceServer interface {
ListLogs(context.Context, *ListLogsRequest) (*ListLogsResponse, error)
GetLog(context.Context, *GetLogRequest) (*LogEntity, error)
+ ExportLogs(context.Context, *ExportLogsRequest) (*ExportLogsResponse, error)
mustEmbedUnimplementedLoggingServiceServer()
}
@@ -76,6 +88,9 @@ func (UnimplementedLoggingServiceServer) ListLogs(context.Context, *ListLogsRequ
func (UnimplementedLoggingServiceServer) GetLog(context.Context, *GetLogRequest) (*LogEntity, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetLog not implemented")
}
+func (UnimplementedLoggingServiceServer) ExportLogs(context.Context, *ExportLogsRequest) (*ExportLogsResponse, error) {
+ return nil, status.Errorf(codes.Unimplemented, "method ExportLogs not implemented")
+}
func (UnimplementedLoggingServiceServer) mustEmbedUnimplementedLoggingServiceServer() {}
// UnsafeLoggingServiceServer may be embedded to opt out of forward compatibility for this service.
@@ -125,6 +140,24 @@ func _LoggingService_GetLog_Handler(srv interface{}, ctx context.Context, dec fu
return interceptor(ctx, in, info, handler)
}
+func _LoggingService_ExportLogs_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+ in := new(ExportLogsRequest)
+ if err := dec(in); err != nil {
+ return nil, err
+ }
+ if interceptor == nil {
+ return srv.(LoggingServiceServer).ExportLogs(ctx, in)
+ }
+ info := &grpc.UnaryServerInfo{
+ Server: srv,
+ FullMethod: LoggingService_ExportLogs_FullMethodName,
+ }
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+ return srv.(LoggingServiceServer).ExportLogs(ctx, req.(*ExportLogsRequest))
+ }
+ return interceptor(ctx, in, info, handler)
+}
+
// LoggingService_ServiceDesc is the grpc.ServiceDesc for LoggingService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
@@ -140,6 +173,10 @@ var LoggingService_ServiceDesc = grpc.ServiceDesc{
MethodName: "GetLog",
Handler: _LoggingService_GetLog_Handler,
},
+ {
+ MethodName: "ExportLogs",
+ Handler: _LoggingService_ExportLogs_Handler,
+ },
},
Streams: []grpc.StreamDesc{},
Metadata: "v1/logging_service.proto",
diff --git a/proto/generated-go/v1/sql_service.pb.go b/proto/generated-go/v1/sql_service.pb.go
index 47960139ec..c0b6d80c76 100644
--- a/proto/generated-go/v1/sql_service.pb.go
+++ b/proto/generated-go/v1/sql_service.pb.go
@@ -23,61 +23,6 @@ const (
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
-type ExportRequest_Format int32
-
-const (
- ExportRequest_FORMAT_UNSPECIFIED ExportRequest_Format = 0
- ExportRequest_CSV ExportRequest_Format = 1
- ExportRequest_JSON ExportRequest_Format = 2
- ExportRequest_SQL ExportRequest_Format = 3
- ExportRequest_XLSX ExportRequest_Format = 4
-)
-
-// Enum value maps for ExportRequest_Format.
-var (
- ExportRequest_Format_name = map[int32]string{
- 0: "FORMAT_UNSPECIFIED",
- 1: "CSV",
- 2: "JSON",
- 3: "SQL",
- 4: "XLSX",
- }
- ExportRequest_Format_value = map[string]int32{
- "FORMAT_UNSPECIFIED": 0,
- "CSV": 1,
- "JSON": 2,
- "SQL": 3,
- "XLSX": 4,
- }
-)
-
-func (x ExportRequest_Format) Enum() *ExportRequest_Format {
- p := new(ExportRequest_Format)
- *p = x
- return p
-}
-
-func (x ExportRequest_Format) String() string {
- return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
-}
-
-func (ExportRequest_Format) Descriptor() protoreflect.EnumDescriptor {
- return file_v1_sql_service_proto_enumTypes[0].Descriptor()
-}
-
-func (ExportRequest_Format) Type() protoreflect.EnumType {
- return &file_v1_sql_service_proto_enumTypes[0]
-}
-
-func (x ExportRequest_Format) Number() protoreflect.EnumNumber {
- return protoreflect.EnumNumber(x)
-}
-
-// Deprecated: Use ExportRequest_Format.Descriptor instead.
-func (ExportRequest_Format) EnumDescriptor() ([]byte, []int) {
- return file_v1_sql_service_proto_rawDescGZIP(), []int{4, 0}
-}
-
type Advice_Status int32
const (
@@ -115,11 +60,11 @@ func (x Advice_Status) String() string {
}
func (Advice_Status) Descriptor() protoreflect.EnumDescriptor {
- return file_v1_sql_service_proto_enumTypes[1].Descriptor()
+ return file_v1_sql_service_proto_enumTypes[0].Descriptor()
}
func (Advice_Status) Type() protoreflect.EnumType {
- return &file_v1_sql_service_proto_enumTypes[1]
+ return &file_v1_sql_service_proto_enumTypes[0]
}
func (x Advice_Status) Number() protoreflect.EnumNumber {
@@ -393,7 +338,7 @@ type ExportRequest struct {
// The maximum number of rows to return.
Limit int32 `protobuf:"varint,4,opt,name=limit,proto3" json:"limit,omitempty"`
// The export format.
- Format ExportRequest_Format `protobuf:"varint,5,opt,name=format,proto3,enum=bytebase.v1.ExportRequest_Format" json:"format,omitempty"`
+ Format ExportFormat `protobuf:"varint,5,opt,name=format,proto3,enum=bytebase.v1.ExportFormat" json:"format,omitempty"`
// The admin is used for workspace owner and DBA for exporting data from SQL Editor Admin mode.
// The exported data is not masked.
Admin bool `protobuf:"varint,6,opt,name=admin,proto3" json:"admin,omitempty"`
@@ -459,11 +404,11 @@ func (x *ExportRequest) GetLimit() int32 {
return 0
}
-func (x *ExportRequest) GetFormat() ExportRequest_Format {
+func (x *ExportRequest) GetFormat() ExportFormat {
if x != nil {
return x.Format
}
- return ExportRequest_FORMAT_UNSPECIFIED
+ return ExportFormat_FORMAT_UNSPECIFIED
}
func (x *ExportRequest) GetAdmin() bool {
@@ -1304,7 +1249,7 @@ var file_v1_sql_service_proto_rawDesc = []byte{
0x73, 0x65, 0x12, 0x32, 0x0a, 0x07, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x18, 0x01, 0x20,
0x03, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76,
0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x07, 0x72,
- 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x22, 0xa6, 0x02, 0x0a, 0x0d, 0x45, 0x78, 0x70, 0x6f, 0x72,
+ 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x22, 0xd6, 0x01, 0x0a, 0x0d, 0x45, 0x78, 0x70, 0x6f, 0x72,
0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65,
0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x04, 0x6e, 0x61, 0x6d,
0x65, 0x12, 0x2f, 0x0a, 0x13, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f,
@@ -1313,16 +1258,11 @@ var file_v1_sql_service_proto_rawDesc = []byte{
0x73, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x74, 0x61, 0x74, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18,
0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x74, 0x61, 0x74, 0x65, 0x6d, 0x65, 0x6e, 0x74,
0x12, 0x14, 0x0a, 0x05, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52,
- 0x05, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x39, 0x0a, 0x06, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74,
- 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x21, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73,
- 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65,
- 0x73, 0x74, 0x2e, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x52, 0x06, 0x66, 0x6f, 0x72, 0x6d, 0x61,
- 0x74, 0x12, 0x14, 0x0a, 0x05, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08,
- 0x52, 0x05, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x22, 0x46, 0x0a, 0x06, 0x46, 0x6f, 0x72, 0x6d, 0x61,
- 0x74, 0x12, 0x16, 0x0a, 0x12, 0x46, 0x4f, 0x52, 0x4d, 0x41, 0x54, 0x5f, 0x55, 0x4e, 0x53, 0x50,
- 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x07, 0x0a, 0x03, 0x43, 0x53, 0x56,
- 0x10, 0x01, 0x12, 0x08, 0x0a, 0x04, 0x4a, 0x53, 0x4f, 0x4e, 0x10, 0x02, 0x12, 0x07, 0x0a, 0x03,
- 0x53, 0x51, 0x4c, 0x10, 0x03, 0x12, 0x08, 0x0a, 0x04, 0x58, 0x4c, 0x53, 0x58, 0x10, 0x04, 0x22,
+ 0x05, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x31, 0x0a, 0x06, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74,
+ 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x19, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73,
+ 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x46, 0x6f, 0x72, 0x6d, 0x61,
+ 0x74, 0x52, 0x06, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x61, 0x64, 0x6d,
+ 0x69, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x22,
0x2a, 0x0a, 0x0e, 0x45, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
0x65, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01,
0x28, 0x0c, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x22, 0xc1, 0x01, 0x0a, 0x0c,
@@ -1480,57 +1420,57 @@ func file_v1_sql_service_proto_rawDescGZIP() []byte {
return file_v1_sql_service_proto_rawDescData
}
-var file_v1_sql_service_proto_enumTypes = make([]protoimpl.EnumInfo, 2)
+var file_v1_sql_service_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
var file_v1_sql_service_proto_msgTypes = make([]protoimpl.MessageInfo, 14)
var file_v1_sql_service_proto_goTypes = []interface{}{
- (ExportRequest_Format)(0), // 0: bytebase.v1.ExportRequest.Format
- (Advice_Status)(0), // 1: bytebase.v1.Advice.Status
- (*DifferPreviewRequest)(nil), // 2: bytebase.v1.DifferPreviewRequest
- (*DifferPreviewResponse)(nil), // 3: bytebase.v1.DifferPreviewResponse
- (*AdminExecuteRequest)(nil), // 4: bytebase.v1.AdminExecuteRequest
- (*AdminExecuteResponse)(nil), // 5: bytebase.v1.AdminExecuteResponse
- (*ExportRequest)(nil), // 6: bytebase.v1.ExportRequest
- (*ExportResponse)(nil), // 7: bytebase.v1.ExportResponse
- (*QueryRequest)(nil), // 8: bytebase.v1.QueryRequest
- (*QueryResponse)(nil), // 9: bytebase.v1.QueryResponse
- (*QueryResult)(nil), // 10: bytebase.v1.QueryResult
- (*QueryRow)(nil), // 11: bytebase.v1.QueryRow
- (*RowValue)(nil), // 12: bytebase.v1.RowValue
- (*Advice)(nil), // 13: bytebase.v1.Advice
- (*PrettyRequest)(nil), // 14: bytebase.v1.PrettyRequest
- (*PrettyResponse)(nil), // 15: bytebase.v1.PrettyResponse
- (Engine)(0), // 16: bytebase.v1.Engine
- (*DatabaseMetadata)(nil), // 17: bytebase.v1.DatabaseMetadata
- (*durationpb.Duration)(nil), // 18: google.protobuf.Duration
+ (Advice_Status)(0), // 0: bytebase.v1.Advice.Status
+ (*DifferPreviewRequest)(nil), // 1: bytebase.v1.DifferPreviewRequest
+ (*DifferPreviewResponse)(nil), // 2: bytebase.v1.DifferPreviewResponse
+ (*AdminExecuteRequest)(nil), // 3: bytebase.v1.AdminExecuteRequest
+ (*AdminExecuteResponse)(nil), // 4: bytebase.v1.AdminExecuteResponse
+ (*ExportRequest)(nil), // 5: bytebase.v1.ExportRequest
+ (*ExportResponse)(nil), // 6: bytebase.v1.ExportResponse
+ (*QueryRequest)(nil), // 7: bytebase.v1.QueryRequest
+ (*QueryResponse)(nil), // 8: bytebase.v1.QueryResponse
+ (*QueryResult)(nil), // 9: bytebase.v1.QueryResult
+ (*QueryRow)(nil), // 10: bytebase.v1.QueryRow
+ (*RowValue)(nil), // 11: bytebase.v1.RowValue
+ (*Advice)(nil), // 12: bytebase.v1.Advice
+ (*PrettyRequest)(nil), // 13: bytebase.v1.PrettyRequest
+ (*PrettyResponse)(nil), // 14: bytebase.v1.PrettyResponse
+ (Engine)(0), // 15: bytebase.v1.Engine
+ (*DatabaseMetadata)(nil), // 16: bytebase.v1.DatabaseMetadata
+ (*durationpb.Duration)(nil), // 17: google.protobuf.Duration
+ (ExportFormat)(0), // 18: bytebase.v1.ExportFormat
(structpb.NullValue)(0), // 19: google.protobuf.NullValue
(*structpb.Value)(nil), // 20: google.protobuf.Value
}
var file_v1_sql_service_proto_depIdxs = []int32{
- 16, // 0: bytebase.v1.DifferPreviewRequest.engine:type_name -> bytebase.v1.Engine
- 17, // 1: bytebase.v1.DifferPreviewRequest.new_metadata:type_name -> bytebase.v1.DatabaseMetadata
- 18, // 2: bytebase.v1.AdminExecuteRequest.timeout:type_name -> google.protobuf.Duration
- 10, // 3: bytebase.v1.AdminExecuteResponse.results:type_name -> bytebase.v1.QueryResult
- 0, // 4: bytebase.v1.ExportRequest.format:type_name -> bytebase.v1.ExportRequest.Format
- 18, // 5: bytebase.v1.QueryRequest.timeout:type_name -> google.protobuf.Duration
- 10, // 6: bytebase.v1.QueryResponse.results:type_name -> bytebase.v1.QueryResult
- 13, // 7: bytebase.v1.QueryResponse.advices:type_name -> bytebase.v1.Advice
- 11, // 8: bytebase.v1.QueryResult.rows:type_name -> bytebase.v1.QueryRow
- 18, // 9: bytebase.v1.QueryResult.latency:type_name -> google.protobuf.Duration
- 12, // 10: bytebase.v1.QueryRow.values:type_name -> bytebase.v1.RowValue
+ 15, // 0: bytebase.v1.DifferPreviewRequest.engine:type_name -> bytebase.v1.Engine
+ 16, // 1: bytebase.v1.DifferPreviewRequest.new_metadata:type_name -> bytebase.v1.DatabaseMetadata
+ 17, // 2: bytebase.v1.AdminExecuteRequest.timeout:type_name -> google.protobuf.Duration
+ 9, // 3: bytebase.v1.AdminExecuteResponse.results:type_name -> bytebase.v1.QueryResult
+ 18, // 4: bytebase.v1.ExportRequest.format:type_name -> bytebase.v1.ExportFormat
+ 17, // 5: bytebase.v1.QueryRequest.timeout:type_name -> google.protobuf.Duration
+ 9, // 6: bytebase.v1.QueryResponse.results:type_name -> bytebase.v1.QueryResult
+ 12, // 7: bytebase.v1.QueryResponse.advices:type_name -> bytebase.v1.Advice
+ 10, // 8: bytebase.v1.QueryResult.rows:type_name -> bytebase.v1.QueryRow
+ 17, // 9: bytebase.v1.QueryResult.latency:type_name -> google.protobuf.Duration
+ 11, // 10: bytebase.v1.QueryRow.values:type_name -> bytebase.v1.RowValue
19, // 11: bytebase.v1.RowValue.null_value:type_name -> google.protobuf.NullValue
20, // 12: bytebase.v1.RowValue.value_value:type_name -> google.protobuf.Value
- 1, // 13: bytebase.v1.Advice.status:type_name -> bytebase.v1.Advice.Status
- 16, // 14: bytebase.v1.PrettyRequest.engine:type_name -> bytebase.v1.Engine
- 14, // 15: bytebase.v1.SQLService.Pretty:input_type -> bytebase.v1.PrettyRequest
- 8, // 16: bytebase.v1.SQLService.Query:input_type -> bytebase.v1.QueryRequest
- 6, // 17: bytebase.v1.SQLService.Export:input_type -> bytebase.v1.ExportRequest
- 4, // 18: bytebase.v1.SQLService.AdminExecute:input_type -> bytebase.v1.AdminExecuteRequest
- 2, // 19: bytebase.v1.SQLService.DifferPreview:input_type -> bytebase.v1.DifferPreviewRequest
- 15, // 20: bytebase.v1.SQLService.Pretty:output_type -> bytebase.v1.PrettyResponse
- 9, // 21: bytebase.v1.SQLService.Query:output_type -> bytebase.v1.QueryResponse
- 7, // 22: bytebase.v1.SQLService.Export:output_type -> bytebase.v1.ExportResponse
- 5, // 23: bytebase.v1.SQLService.AdminExecute:output_type -> bytebase.v1.AdminExecuteResponse
- 3, // 24: bytebase.v1.SQLService.DifferPreview:output_type -> bytebase.v1.DifferPreviewResponse
+ 0, // 13: bytebase.v1.Advice.status:type_name -> bytebase.v1.Advice.Status
+ 15, // 14: bytebase.v1.PrettyRequest.engine:type_name -> bytebase.v1.Engine
+ 13, // 15: bytebase.v1.SQLService.Pretty:input_type -> bytebase.v1.PrettyRequest
+ 7, // 16: bytebase.v1.SQLService.Query:input_type -> bytebase.v1.QueryRequest
+ 5, // 17: bytebase.v1.SQLService.Export:input_type -> bytebase.v1.ExportRequest
+ 3, // 18: bytebase.v1.SQLService.AdminExecute:input_type -> bytebase.v1.AdminExecuteRequest
+ 1, // 19: bytebase.v1.SQLService.DifferPreview:input_type -> bytebase.v1.DifferPreviewRequest
+ 14, // 20: bytebase.v1.SQLService.Pretty:output_type -> bytebase.v1.PrettyResponse
+ 8, // 21: bytebase.v1.SQLService.Query:output_type -> bytebase.v1.QueryResponse
+ 6, // 22: bytebase.v1.SQLService.Export:output_type -> bytebase.v1.ExportResponse
+ 4, // 23: bytebase.v1.SQLService.AdminExecute:output_type -> bytebase.v1.AdminExecuteResponse
+ 2, // 24: bytebase.v1.SQLService.DifferPreview:output_type -> bytebase.v1.DifferPreviewResponse
20, // [20:25] is the sub-list for method output_type
15, // [15:20] is the sub-list for method input_type
15, // [15:15] is the sub-list for extension type_name
@@ -1733,7 +1673,7 @@ func file_v1_sql_service_proto_init() {
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_v1_sql_service_proto_rawDesc,
- NumEnums: 2,
+ NumEnums: 1,
NumMessages: 14,
NumExtensions: 0,
NumServices: 1,
diff --git a/proto/v1/common.proto b/proto/v1/common.proto
index 2fa26ec167..2072b9a668 100644
--- a/proto/v1/common.proto
+++ b/proto/v1/common.proto
@@ -36,3 +36,11 @@ enum MaskingLevel {
PARTIAL = 2;
FULL = 3;
}
+
+enum ExportFormat {
+ FORMAT_UNSPECIFIED = 0;
+ CSV = 1;
+ JSON = 2;
+ SQL = 3;
+ XLSX = 4;
+}
diff --git a/proto/v1/logging_service.proto b/proto/v1/logging_service.proto
index a01821bcbf..43f6857b01 100644
--- a/proto/v1/logging_service.proto
+++ b/proto/v1/logging_service.proto
@@ -6,6 +6,7 @@ import "google/api/annotations.proto";
import "google/api/client.proto";
import "google/api/field_behavior.proto";
import "google/protobuf/timestamp.proto";
+import "v1/common.proto";
option go_package = "generated-go/v1";
@@ -18,6 +19,13 @@ service LoggingService {
option (google.api.http) = {get: "/v1/{name=logs/*}"};
option (google.api.method_signature) = "name";
}
+
+ rpc ExportLogs(ExportLogsRequest) returns (ExportLogsResponse) {
+ option (google.api.http) = {
+ post: "/v1/logs:export"
+ body: "*"
+ };
+ }
}
message ListLogsRequest {
@@ -74,6 +82,15 @@ message GetLogRequest {
string name = 1 [(google.api.field_behavior) = REQUIRED];
}
+message ExportLogsRequest {
+ // The export format.
+ ExportFormat format = 5;
+}
+
+message ExportLogsResponse {
+ bytes content = 1;
+}
+
message LogEntity {
// The name of the log.
// Format: logs/{uid}
diff --git a/proto/v1/sql_service.proto b/proto/v1/sql_service.proto
index 33e0cb66ec..3286304eb9 100644
--- a/proto/v1/sql_service.proto
+++ b/proto/v1/sql_service.proto
@@ -79,13 +79,6 @@ message AdminExecuteResponse {
}
message ExportRequest {
- enum Format {
- FORMAT_UNSPECIFIED = 0;
- CSV = 1;
- JSON = 2;
- SQL = 3;
- XLSX = 4;
- }
// The name is the instance name to execute the query against.
// Format: instances/{instance}
string name = 1 [(google.api.field_behavior) = REQUIRED];
@@ -102,7 +95,7 @@ message ExportRequest {
int32 limit = 4;
// The export format.
- Format format = 5;
+ ExportFormat format = 5;
// The admin is used for workspace owner and DBA for exporting data from SQL Editor Admin mode.
// The exported data is not masked.