Skip to content

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

feat: the proto definition of logging service (#5044)

h3n4l0a63b5aaf913
diff --git a/frontend/src/types/proto/google/protobuf/descriptor.ts b/frontend/src/types/proto/google/protobuf/descriptor.ts
index 89cc93b414..d3fee42ef9 100644
--- a/frontend/src/types/proto/google/protobuf/descriptor.ts
+++ b/frontend/src/types/proto/google/protobuf/descriptor.ts
@@ -42,9 +42,13 @@ export interface FileDescriptorProto {
sourceCodeInfo?: SourceCodeInfo;
/**
* The syntax of the proto file.
- * The supported values are "proto2" and "proto3".
+ * The supported values are "proto2", "proto3", and "editions".
+ *
+ * If `edition` is present, this value must be "editions".
*/
syntax: string;
+ /** The edition of the proto file, which is an opaque string. */
+ edition: string;
}
/** Describes a message type. */
@@ -619,6 +623,10 @@ export interface MessageOptions {
*/
deprecated: boolean;
/**
+ * NOTE: Do not set the option in .proto files. Always use the maps syntax
+ * instead. The option should only be implicitly set by the proto compiler
+ * parser.
+ *
* Whether the message is an automatically generated map entry type for the
* maps field.
*
@@ -636,12 +644,23 @@ export interface MessageOptions {
* use a native map in the target language to hold the keys and values.
* The reflection APIs in such implementations still need to work as
* if the field is a repeated message field.
- *
- * NOTE: Do not set the option in .proto files. Always use the maps syntax
- * instead. The option should only be implicitly set by the proto compiler
- * parser.
*/
mapEntry: boolean;
+ /**
+ * Enable the legacy handling of JSON field name conflicts. This lowercases
+ * and strips underscored from the fields before comparison in proto3 only.
+ * The new behavior takes `json_name` into account and applies to proto2 as
+ * well.
+ *
+ * This should only be used as a temporary measure against broken builds due
+ * to the change in behavior for JSON field name conflicts.
+ *
+ * TODO(b/261750190) This is legacy behavior we plan to remove once downstream
+ * teams have had time to migrate.
+ *
+ * @deprecated
+ */
+ deprecatedLegacyJsonFieldConflicts: boolean;
/** The parser stores options it doesn't recognize here. See above. */
uninterpretedOption: UninterpretedOption[];
}
@@ -705,11 +724,8 @@ export interface FieldOptions {
* check its required fields, regardless of whether or not the message has
* been parsed.
*
- * As of 2021, lazy does no correctness checks on the byte stream during
- * parsing. This may lead to crashes if and when an invalid byte stream is
- * finally parsed upon access.
- *
- * TODO(b/211906113): Enable validation on lazy fields.
+ * As of May 2022, lazy verifies the contents of the byte stream during
+ * parsing. An invalid byte stream will cause the overall parsing to fail.
*/
lazy: boolean;
/**
@@ -727,6 +743,13 @@ export interface FieldOptions {
deprecated: boolean;
/** For Google-internal migration only. Do not use. */
weak: boolean;
+ /**
+ * Indicate that the field value should not be printed out when using debug
+ * formats, e.g. when the field contains sensitive credentials.
+ */
+ debugRedact: boolean;
+ retention: FieldOptions_OptionRetention;
+ target: FieldOptions_OptionTargetType;
/** The parser stores options it doesn't recognize here. See above. */
uninterpretedOption: UninterpretedOption[];
}
@@ -813,6 +836,137 @@ export function fieldOptions_JSTypeToJSON(object: FieldOptions_JSType): string {
}
}
+/**
+ * If set to RETENTION_SOURCE, the option will be omitted from the binary.
+ * Note: as of January 2023, support for this is in progress and does not yet
+ * have an effect (b/264593489).
+ */
+export enum FieldOptions_OptionRetention {
+ RETENTION_UNKNOWN = 0,
+ RETENTION_RUNTIME = 1,
+ RETENTION_SOURCE = 2,
+ UNRECOGNIZED = -1,
+}
+
+export function fieldOptions_OptionRetentionFromJSON(object: any): FieldOptions_OptionRetention {
+ switch (object) {
+ case 0:
+ case "RETENTION_UNKNOWN":
+ return FieldOptions_OptionRetention.RETENTION_UNKNOWN;
+ case 1:
+ case "RETENTION_RUNTIME":
+ return FieldOptions_OptionRetention.RETENTION_RUNTIME;
+ case 2:
+ case "RETENTION_SOURCE":
+ return FieldOptions_OptionRetention.RETENTION_SOURCE;
+ case -1:
+ case "UNRECOGNIZED":
+ default:
+ return FieldOptions_OptionRetention.UNRECOGNIZED;
+ }
+}
+
+export function fieldOptions_OptionRetentionToJSON(object: FieldOptions_OptionRetention): string {
+ switch (object) {
+ case FieldOptions_OptionRetention.RETENTION_UNKNOWN:
+ return "RETENTION_UNKNOWN";
+ case FieldOptions_OptionRetention.RETENTION_RUNTIME:
+ return "RETENTION_RUNTIME";
+ case FieldOptions_OptionRetention.RETENTION_SOURCE:
+ return "RETENTION_SOURCE";
+ case FieldOptions_OptionRetention.UNRECOGNIZED:
+ default:
+ return "UNRECOGNIZED";
+ }
+}
+
+/**
+ * This indicates the types of entities that the field may apply to when used
+ * as an option. If it is unset, then the field may be freely used as an
+ * option on any kind of entity. Note: as of January 2023, support for this is
+ * in progress and does not yet have an effect (b/264593489).
+ */
+export enum FieldOptions_OptionTargetType {
+ TARGET_TYPE_UNKNOWN = 0,
+ TARGET_TYPE_FILE = 1,
+ TARGET_TYPE_EXTENSION_RANGE = 2,
+ TARGET_TYPE_MESSAGE = 3,
+ TARGET_TYPE_FIELD = 4,
+ TARGET_TYPE_ONEOF = 5,
+ TARGET_TYPE_ENUM = 6,
+ TARGET_TYPE_ENUM_ENTRY = 7,
+ TARGET_TYPE_SERVICE = 8,
+ TARGET_TYPE_METHOD = 9,
+ UNRECOGNIZED = -1,
+}
+
+export function fieldOptions_OptionTargetTypeFromJSON(object: any): FieldOptions_OptionTargetType {
+ switch (object) {
+ case 0:
+ case "TARGET_TYPE_UNKNOWN":
+ return FieldOptions_OptionTargetType.TARGET_TYPE_UNKNOWN;
+ case 1:
+ case "TARGET_TYPE_FILE":
+ return FieldOptions_OptionTargetType.TARGET_TYPE_FILE;
+ case 2:
+ case "TARGET_TYPE_EXTENSION_RANGE":
+ return FieldOptions_OptionTargetType.TARGET_TYPE_EXTENSION_RANGE;
+ case 3:
+ case "TARGET_TYPE_MESSAGE":
+ return FieldOptions_OptionTargetType.TARGET_TYPE_MESSAGE;
+ case 4:
+ case "TARGET_TYPE_FIELD":
+ return FieldOptions_OptionTargetType.TARGET_TYPE_FIELD;
+ case 5:
+ case "TARGET_TYPE_ONEOF":
+ return FieldOptions_OptionTargetType.TARGET_TYPE_ONEOF;
+ case 6:
+ case "TARGET_TYPE_ENUM":
+ return FieldOptions_OptionTargetType.TARGET_TYPE_ENUM;
+ case 7:
+ case "TARGET_TYPE_ENUM_ENTRY":
+ return FieldOptions_OptionTargetType.TARGET_TYPE_ENUM_ENTRY;
+ case 8:
+ case "TARGET_TYPE_SERVICE":
+ return FieldOptions_OptionTargetType.TARGET_TYPE_SERVICE;
+ case 9:
+ case "TARGET_TYPE_METHOD":
+ return FieldOptions_OptionTargetType.TARGET_TYPE_METHOD;
+ case -1:
+ case "UNRECOGNIZED":
+ default:
+ return FieldOptions_OptionTargetType.UNRECOGNIZED;
+ }
+}
+
+export function fieldOptions_OptionTargetTypeToJSON(object: FieldOptions_OptionTargetType): string {
+ switch (object) {
+ case FieldOptions_OptionTargetType.TARGET_TYPE_UNKNOWN:
+ return "TARGET_TYPE_UNKNOWN";
+ case FieldOptions_OptionTargetType.TARGET_TYPE_FILE:
+ return "TARGET_TYPE_FILE";
+ case FieldOptions_OptionTargetType.TARGET_TYPE_EXTENSION_RANGE:
+ return "TARGET_TYPE_EXTENSION_RANGE";
+ case FieldOptions_OptionTargetType.TARGET_TYPE_MESSAGE:
+ return "TARGET_TYPE_MESSAGE";
+ case FieldOptions_OptionTargetType.TARGET_TYPE_FIELD:
+ return "TARGET_TYPE_FIELD";
+ case FieldOptions_OptionTargetType.TARGET_TYPE_ONEOF:
+ return "TARGET_TYPE_ONEOF";
+ case FieldOptions_OptionTargetType.TARGET_TYPE_ENUM:
+ return "TARGET_TYPE_ENUM";
+ case FieldOptions_OptionTargetType.TARGET_TYPE_ENUM_ENTRY:
+ return "TARGET_TYPE_ENUM_ENTRY";
+ case FieldOptions_OptionTargetType.TARGET_TYPE_SERVICE:
+ return "TARGET_TYPE_SERVICE";
+ case FieldOptions_OptionTargetType.TARGET_TYPE_METHOD:
+ return "TARGET_TYPE_METHOD";
+ case FieldOptions_OptionTargetType.UNRECOGNIZED:
+ default:
+ return "UNRECOGNIZED";
+ }
+}
+
export interface OneofOptions {
/** The parser stores options it doesn't recognize here. See above. */
uninterpretedOption: UninterpretedOption[];
@@ -831,6 +985,17 @@ export interface EnumOptions {
* is a formalization for deprecating enums.
*/
deprecated: boolean;
+ /**
+ * Enable the legacy handling of JSON field name conflicts. This lowercases
+ * and strips underscored from the fields before comparison in proto3 only.
+ * The new behavior takes `json_name` into account and applies to proto2 as
+ * well.
+ * TODO(b/261750190) Remove this legacy behavior once downstream teams have
+ * had time to migrate.
+ *
+ * @deprecated
+ */
+ deprecatedLegacyJsonFieldConflicts: boolean;
/** The parser stores options it doesn't recognize here. See above. */
uninterpretedOption: UninterpretedOption[];
}
@@ -1122,10 +1287,57 @@ export interface GeneratedCodeInfo_Annotation {
begin: number;
/**
* Identifies the ending offset in bytes in the generated code that
- * relates to the identified offset. The end offset should be one past
+ * relates to the identified object. The end offset should be one past
* the last relevant byte (so the length of the text = end - begin).
*/
end: number;
+ semantic: GeneratedCodeInfo_Annotation_Semantic;
+}
+
+/**
+ * Represents the identified object's effect on the element in the original
+ * .proto file.
+ */
+export enum GeneratedCodeInfo_Annotation_Semantic {
+ /** NONE - There is no effect or the effect is indescribable. */
+ NONE = 0,
+ /** SET - The element is set or otherwise mutated. */
+ SET = 1,
+ /** ALIAS - An alias to the element is returned. */
+ ALIAS = 2,
+ UNRECOGNIZED = -1,
+}
+
+export function generatedCodeInfo_Annotation_SemanticFromJSON(object: any): GeneratedCodeInfo_Annotation_Semantic {
+ switch (object) {
+ case 0:
+ case "NONE":
+ return GeneratedCodeInfo_Annotation_Semantic.NONE;
+ case 1:
+ case "SET":
+ return GeneratedCodeInfo_Annotation_Semantic.SET;
+ case 2:
+ case "ALIAS":
+ return GeneratedCodeInfo_Annotation_Semantic.ALIAS;
+ case -1:
+ case "UNRECOGNIZED":
+ default:
+ return GeneratedCodeInfo_Annotation_Semantic.UNRECOGNIZED;
+ }
+}
+
+export function generatedCodeInfo_Annotation_SemanticToJSON(object: GeneratedCodeInfo_Annotation_Semantic): string {
+ switch (object) {
+ case GeneratedCodeInfo_Annotation_Semantic.NONE:
+ return "NONE";
+ case GeneratedCodeInfo_Annotation_Semantic.SET:
+ return "SET";
+ case GeneratedCodeInfo_Annotation_Semantic.ALIAS:
+ return "ALIAS";
+ case GeneratedCodeInfo_Annotation_Semantic.UNRECOGNIZED:
+ default:
+ return "UNRECOGNIZED";
+ }
}
function createBaseFileDescriptorSet(): FileDescriptorSet {
@@ -1193,6 +1405,7 @@ function createBaseFileDescriptorProto(): FileDescriptorProto {
options: undefined,
sourceCodeInfo: undefined,
syntax: "",
+ edition: "",
};
}
@@ -1238,6 +1451,9 @@ export const FileDescriptorProto = {
if (message.syntax !== "") {
writer.uint32(98).string(message.syntax);
}
+ if (message.edition !== "") {
+ writer.uint32(106).string(message.edition);
+ }
return writer;
},
@@ -1298,6 +1514,9 @@ export const FileDescriptorProto = {
case 12:
message.syntax = reader.string();
break;
+ case 13:
+ message.edition = reader.string();
+ break;
default:
reader.skipType(tag & 7);
break;
@@ -1326,6 +1545,7 @@ export const FileDescriptorProto = {
options: isSet(object.options) ? FileOptions.fromJSON(object.options) : undefined,
sourceCodeInfo: isSet(object.sourceCodeInfo) ? SourceCodeInfo.fromJSON(object.sourceCodeInfo) : undefined,
syntax: isSet(object.syntax) ? String(object.syntax) : "",
+ edition: isSet(object.edition) ? String(object.edition) : "",
};
},
@@ -1372,6 +1592,7 @@ export const FileDescriptorProto = {
message.sourceCodeInfo !== undefined &&
(obj.sourceCodeInfo = message.sourceCodeInfo ? SourceCodeInfo.toJSON(message.sourceCodeInfo) : undefined);
message.syntax !== undefined && (obj.syntax = message.syntax);
+ message.edition !== undefined && (obj.edition = message.edition);
return obj;
},
@@ -1393,6 +1614,7 @@ export const FileDescriptorProto = {
? SourceCodeInfo.fromPartial(object.sourceCodeInfo)
: undefined;
message.syntax = object.syntax ?? "";
+ message.edition = object.edition ?? "";
return message;
},
};
@@ -2649,6 +2871,7 @@ function createBaseMessageOptions(): MessageOptions {
noStandardDescriptorAccessor: false,
deprecated: false,
mapEntry: false,
+ deprecatedLegacyJsonFieldConflicts: false,
uninterpretedOption: [],
};
}
@@ -2667,6 +2890,9 @@ export const MessageOptions = {
if (message.mapEntry === true) {
writer.uint32(56).bool(message.mapEntry);
}
+ if (message.deprecatedLegacyJsonFieldConflicts === true) {
+ writer.uint32(88).bool(message.deprecatedLegacyJsonFieldConflicts);
+ }
for (const v of message.uninterpretedOption) {
UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim();
}
@@ -2692,6 +2918,9 @@ export const MessageOptions = {
case 7:
message.mapEntry = reader.bool();
break;
+ case 11:
+ message.deprecatedLegacyJsonFieldConflicts = reader.bool();
+ break;
case 999:
message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32()));
break;
@@ -2711,6 +2940,9 @@ export const MessageOptions = {
: false,
deprecated: isSet(object.deprecated) ? Boolean(object.deprecated) : false,
mapEntry: isSet(object.mapEntry) ? Boolean(object.mapEntry) : false,
+ deprecatedLegacyJsonFieldConflicts: isSet(object.deprecatedLegacyJsonFieldConflicts)
+ ? Boolean(object.deprecatedLegacyJsonFieldConflicts)
+ : false,
uninterpretedOption: Array.isArray(object?.uninterpretedOption)
? object.uninterpretedOption.map((e: any) => UninterpretedOption.fromJSON(e))
: [],
@@ -2724,6 +2956,8 @@ export const MessageOptions = {
(obj.noStandardDescriptorAccessor = message.noStandardDescriptorAccessor);
message.deprecated !== undefined && (obj.deprecated = message.deprecated);
message.mapEntry !== undefined && (obj.mapEntry = message.mapEntry);
+ message.deprecatedLegacyJsonFieldConflicts !== undefined &&
+ (obj.deprecatedLegacyJsonFieldConflicts = message.deprecatedLegacyJsonFieldConflicts);
if (message.uninterpretedOption) {
obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? UninterpretedOption.toJSON(e) : undefined);
} else {
@@ -2738,6 +2972,7 @@ export const MessageOptions = {
message.noStandardDescriptorAccessor = object.noStandardDescriptorAccessor ?? false;
message.deprecated = object.deprecated ?? false;
message.mapEntry = object.mapEntry ?? false;
+ message.deprecatedLegacyJsonFieldConflicts = object.deprecatedLegacyJsonFieldConflicts ?? false;
message.uninterpretedOption = object.uninterpretedOption?.map((e) => UninterpretedOption.fromPartial(e)) || [];
return message;
},
@@ -2752,6 +2987,9 @@ function createBaseFieldOptions(): FieldOptions {
unverifiedLazy: false,
deprecated: false,
weak: false,
+ debugRedact: false,
+ retention: 0,
+ target: 0,
uninterpretedOption: [],
};
}
@@ -2779,6 +3017,15 @@ export const FieldOptions = {
if (message.weak === true) {
writer.uint32(80).bool(message.weak);
}
+ if (message.debugRedact === true) {
+ writer.uint32(128).bool(message.debugRedact);
+ }
+ if (message.retention !== 0) {
+ writer.uint32(136).int32(message.retention);
+ }
+ if (message.target !== 0) {
+ writer.uint32(144).int32(message.target);
+ }
for (const v of message.uninterpretedOption) {
UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim();
}
@@ -2813,6 +3060,15 @@ export const FieldOptions = {
case 10:
message.weak = reader.bool();
break;
+ case 16:
+ message.debugRedact = reader.bool();
+ break;
+ case 17:
+ message.retention = reader.int32() as any;
+ break;
+ case 18:
+ message.target = reader.int32() as any;
+ break;
case 999:
message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32()));
break;
@@ -2833,6 +3089,9 @@ export const FieldOptions = {
unverifiedLazy: isSet(object.unverifiedLazy) ? Boolean(object.unverifiedLazy) : false,
deprecated: isSet(object.deprecated) ? Boolean(object.deprecated) : false,
weak: isSet(object.weak) ? Boolean(object.weak) : false,
+ debugRedact: isSet(object.debugRedact) ? Boolean(object.debugRedact) : false,
+ retention: isSet(object.retention) ? fieldOptions_OptionRetentionFromJSON(object.retention) : 0,
+ target: isSet(object.target) ? fieldOptions_OptionTargetTypeFromJSON(object.target) : 0,
uninterpretedOption: Array.isArray(object?.uninterpretedOption)
? object.uninterpretedOption.map((e: any) => UninterpretedOption.fromJSON(e))
: [],
@@ -2848,6 +3107,9 @@ export const FieldOptions = {
message.unverifiedLazy !== undefined && (obj.unverifiedLazy = message.unverifiedLazy);
message.deprecated !== undefined && (obj.deprecated = message.deprecated);
message.weak !== undefined && (obj.weak = message.weak);
+ message.debugRedact !== undefined && (obj.debugRedact = message.debugRedact);
+ message.retention !== undefined && (obj.retention = fieldOptions_OptionRetentionToJSON(message.retention));
+ message.target !== undefined && (obj.target = fieldOptions_OptionTargetTypeToJSON(message.target));
if (message.uninterpretedOption) {
obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? UninterpretedOption.toJSON(e) : undefined);
} else {
@@ -2865,6 +3127,9 @@ export const FieldOptions = {
message.unverifiedLazy = object.unverifiedLazy ?? false;
message.deprecated = object.deprecated ?? false;
message.weak = object.weak ?? false;
+ message.debugRedact = object.debugRedact ?? false;
+ message.retention = object.retention ?? 0;
+ message.target = object.target ?? 0;
message.uninterpretedOption = object.uninterpretedOption?.map((e) => UninterpretedOption.fromPartial(e)) || [];
return message;
},
@@ -2926,7 +3191,7 @@ export const OneofOptions = {
};
function createBaseEnumOptions(): EnumOptions {
- return { allowAlias: false, deprecated: false, uninterpretedOption: [] };
+ return { allowAlias: false, deprecated: false, deprecatedLegacyJsonFieldConflicts: false, uninterpretedOption: [] };
}
export const EnumOptions = {
@@ -2937,6 +3202,9 @@ export const EnumOptions = {
if (message.deprecated === true) {
writer.uint32(24).bool(message.deprecated);
}
+ if (message.deprecatedLegacyJsonFieldConflicts === true) {
+ writer.uint32(48).bool(message.deprecatedLegacyJsonFieldConflicts);
+ }
for (const v of message.uninterpretedOption) {
UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim();
}
@@ -2956,6 +3224,9 @@ export const EnumOptions = {
case 3:
message.deprecated = reader.bool();
break;
+ case 6:
+ message.deprecatedLegacyJsonFieldConflicts = reader.bool();
+ break;
case 999:
message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32()));
break;
@@ -2971,6 +3242,9 @@ export const EnumOptions = {
return {
allowAlias: isSet(object.allowAlias) ? Boolean(object.allowAlias) : false,
deprecated: isSet(object.deprecated) ? Boolean(object.deprecated) : false,
+ deprecatedLegacyJsonFieldConflicts: isSet(object.deprecatedLegacyJsonFieldConflicts)
+ ? Boolean(object.deprecatedLegacyJsonFieldConflicts)
+ : false,
uninterpretedOption: Array.isArray(object?.uninterpretedOption)
? object.uninterpretedOption.map((e: any) => UninterpretedOption.fromJSON(e))
: [],
@@ -2981,6 +3255,8 @@ export const EnumOptions = {
const obj: any = {};
message.allowAlias !== undefined && (obj.allowAlias = message.allowAlias);
message.deprecated !== undefined && (obj.deprecated = message.deprecated);
+ message.deprecatedLegacyJsonFieldConflicts !== undefined &&
+ (obj.deprecatedLegacyJsonFieldConflicts = message.deprecatedLegacyJsonFieldConflicts);
if (message.uninterpretedOption) {
obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? UninterpretedOption.toJSON(e) : undefined);
} else {
@@ -2993,6 +3269,7 @@ export const EnumOptions = {
const message = createBaseEnumOptions();
message.allowAlias = object.allowAlias ?? false;
message.deprecated = object.deprecated ?? false;
+ message.deprecatedLegacyJsonFieldConflicts = object.deprecatedLegacyJsonFieldConflicts ?? false;
message.uninterpretedOption = object.uninterpretedOption?.map((e) => UninterpretedOption.fromPartial(e)) || [];
return message;
},
@@ -3604,7 +3881,7 @@ export const GeneratedCodeInfo = {
};
function createBaseGeneratedCodeInfo_Annotation(): GeneratedCodeInfo_Annotation {
- return { path: [], sourceFile: "", begin: 0, end: 0 };
+ return { path: [], sourceFile: "", begin: 0, end: 0, semantic: 0 };
}
export const GeneratedCodeInfo_Annotation = {
@@ -3623,6 +3900,9 @@ export const GeneratedCodeInfo_Annotation = {
if (message.end !== 0) {
writer.uint32(32).int32(message.end);
}
+ if (message.semantic !== 0) {
+ writer.uint32(40).int32(message.semantic);
+ }
return writer;
},
@@ -3652,6 +3932,9 @@ export const GeneratedCodeInfo_Annotation = {
case 4:
message.end = reader.int32();
break;
+ case 5:
+ message.semantic = reader.int32() as any;
+ break;
default:
reader.skipType(tag & 7);
break;
@@ -3666,6 +3949,7 @@ export const GeneratedCodeInfo_Annotation = {
sourceFile: isSet(object.sourceFile) ? String(object.sourceFile) : "",
begin: isSet(object.begin) ? Number(object.begin) : 0,
end: isSet(object.end) ? Number(object.end) : 0,
+ semantic: isSet(object.semantic) ? generatedCodeInfo_Annotation_SemanticFromJSON(object.semantic) : 0,
};
},
@@ -3679,6 +3963,7 @@ export const GeneratedCodeInfo_Annotation = {
message.sourceFile !== undefined && (obj.sourceFile = message.sourceFile);
message.begin !== undefined && (obj.begin = Math.round(message.begin));
message.end !== undefined && (obj.end = Math.round(message.end));
+ message.semantic !== undefined && (obj.semantic = generatedCodeInfo_Annotation_SemanticToJSON(message.semantic));
return obj;
},
@@ -3688,6 +3973,7 @@ export const GeneratedCodeInfo_Annotation = {
message.sourceFile = object.sourceFile ?? "";
message.begin = object.begin ?? 0;
message.end = object.end ?? 0;
+ message.semantic = object.semantic ?? 0;
return message;
},
};
diff --git a/frontend/src/types/proto/google/protobuf/struct.ts b/frontend/src/types/proto/google/protobuf/struct.ts
new file mode 100644
index 0000000000..e5f726d07c
--- /dev/null
+++ b/frontend/src/types/proto/google/protobuf/struct.ts
@@ -0,0 +1,460 @@
+/* eslint-disable */
+import * as _m0 from "protobufjs/minimal";
+
+export const protobufPackage = "google.protobuf";
+
+/**
+ * `NullValue` is a singleton enumeration to represent the null value for the
+ * `Value` type union.
+ *
+ * The JSON representation for `NullValue` is JSON `null`.
+ */
+export enum NullValue {
+ /** NULL_VALUE - Null value. */
+ NULL_VALUE = 0,
+ UNRECOGNIZED = -1,
+}
+
+export function nullValueFromJSON(object: any): NullValue {
+ switch (object) {
+ case 0:
+ case "NULL_VALUE":
+ return NullValue.NULL_VALUE;
+ case -1:
+ case "UNRECOGNIZED":
+ default:
+ return NullValue.UNRECOGNIZED;
+ }
+}
+
+export function nullValueToJSON(object: NullValue): string {
+ switch (object) {
+ case NullValue.NULL_VALUE:
+ return "NULL_VALUE";
+ case NullValue.UNRECOGNIZED:
+ default:
+ return "UNRECOGNIZED";
+ }
+}
+
+/**
+ * `Struct` represents a structured data value, consisting of fields
+ * which map to dynamically typed values. In some languages, `Struct`
+ * might be supported by a native representation. For example, in
+ * scripting languages like JS a struct is represented as an
+ * object. The details of that representation are described together
+ * with the proto support for the language.
+ *
+ * The JSON representation for `Struct` is JSON object.
+ */
+export interface Struct {
+ /** Unordered map of dynamically typed values. */
+ fields: { [key: string]: any };
+}
+
+export interface Struct_FieldsEntry {
+ key: string;
+ value?: any;
+}
+
+/**
+ * `Value` represents a dynamically typed value which can be either
+ * null, a number, a string, a boolean, a recursive struct value, or a
+ * list of values. A producer of value is expected to set one of these
+ * variants. Absence of any variant indicates an error.
+ *
+ * The JSON representation for `Value` is JSON value.
+ */
+export interface Value {
+ /** Represents a null value. */
+ nullValue?:
+ | NullValue
+ | undefined;
+ /** Represents a double value. */
+ numberValue?:
+ | number
+ | undefined;
+ /** Represents a string value. */
+ stringValue?:
+ | string
+ | undefined;
+ /** Represents a boolean value. */
+ boolValue?:
+ | boolean
+ | undefined;
+ /** Represents a structured value. */
+ structValue?: { [key: string]: any };
+ /** Represents a repeated `Value`. */
+ listValue?: Array<any>;
+}
+
+/**
+ * `ListValue` is a wrapper around a repeated field of values.
+ *
+ * The JSON representation for `ListValue` is JSON array.
+ */
+export interface ListValue {
+ /** Repeated field of dynamically typed values. */
+ values: any[];
+}
+
+function createBaseStruct(): Struct {
+ return { fields: {} };
+}
+
+export const Struct = {
+ encode(message: Struct, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
+ Object.entries(message.fields).forEach(([key, value]) => {
+ if (value !== undefined) {
+ Struct_FieldsEntry.encode({ key: key as any, value }, writer.uint32(10).fork()).ldelim();
+ }
+ });
+ return writer;
+ },
+
+ decode(input: _m0.Reader | Uint8Array, length?: number): Struct {
+ const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
+ let end = length === undefined ? reader.len : reader.pos + length;
+ const message = createBaseStruct();
+ while (reader.pos < end) {
+ const tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1:
+ const entry1 = Struct_FieldsEntry.decode(reader, reader.uint32());
+ if (entry1.value !== undefined) {
+ message.fields[entry1.key] = entry1.value;
+ }
+ break;
+ default:
+ reader.skipType(tag & 7);
+ break;
+ }
+ }
+ return message;
+ },
+
+ fromJSON(object: any): Struct {
+ return {
+ fields: isObject(object.fields)
+ ? Object.entries(object.fields).reduce<{ [key: string]: any }>((acc, [key, value]) => {
+ acc[key] = value as any;
+ return acc;
+ }, {})
+ : {},
+ };
+ },
+
+ toJSON(message: Struct): unknown {
+ const obj: any = {};
+ obj.fields = {};
+ if (message.fields) {
+ Object.entries(message.fields).forEach(([k, v]) => {
+ obj.fields[k] = v;
+ });
+ }
+ return obj;
+ },
+
+ fromPartial(object: DeepPartial<Struct>): Struct {
+ const message = createBaseStruct();
+ message.fields = Object.entries(object.fields ?? {}).reduce<{ [key: string]: any }>((acc, [key, value]) => {
+ if (value !== undefined) {
+ acc[key] = value;
+ }
+ return acc;
+ }, {});
+ return message;
+ },
+
+ wrap(object: { [key: string]: any } | undefined): Struct {
+ const struct = createBaseStruct();
+ if (object !== undefined) {
+ Object.keys(object).forEach((key) => {
+ struct.fields[key] = object[key];
+ });
+ }
+ return struct;
+ },
+
+ unwrap(message: Struct): { [key: string]: any } {
+ const object: { [key: string]: any } = {};
+ Object.keys(message.fields).forEach((key) => {
+ object[key] = message.fields[key];
+ });
+ return object;
+ },
+};
+
+function createBaseStruct_FieldsEntry(): Struct_FieldsEntry {
+ return { key: "", value: undefined };
+}
+
+export const Struct_FieldsEntry = {
+ encode(message: Struct_FieldsEntry, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
+ if (message.key !== "") {
+ writer.uint32(10).string(message.key);
+ }
+ if (message.value !== undefined) {
+ Value.encode(Value.wrap(message.value), writer.uint32(18).fork()).ldelim();
+ }
+ return writer;
+ },
+
+ decode(input: _m0.Reader | Uint8Array, length?: number): Struct_FieldsEntry {
+ const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
+ let end = length === undefined ? reader.len : reader.pos + length;
+ const message = createBaseStruct_FieldsEntry();
+ while (reader.pos < end) {
+ const tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1:
+ message.key = reader.string();
+ break;
+ case 2:
+ message.value = Value.unwrap(Value.decode(reader, reader.uint32()));
+ break;
+ default:
+ reader.skipType(tag & 7);
+ break;
+ }
+ }
+ return message;
+ },
+
+ fromJSON(object: any): Struct_FieldsEntry {
+ return { key: isSet(object.key) ? String(object.key) : "", value: isSet(object?.value) ? object.value : undefined };
+ },
+
+ toJSON(message: Struct_FieldsEntry): unknown {
+ const obj: any = {};
+ message.key !== undefined && (obj.key = message.key);
+ message.value !== undefined && (obj.value = message.value);
+ return obj;
+ },
+
+ fromPartial(object: DeepPartial<Struct_FieldsEntry>): Struct_FieldsEntry {
+ const message = createBaseStruct_FieldsEntry();
+ message.key = object.key ?? "";
+ message.value = object.value ?? undefined;
+ return message;
+ },
+};
+
+function createBaseValue(): Value {
+ return {
+ nullValue: undefined,
+ numberValue: undefined,
+ stringValue: undefined,
+ boolValue: undefined,
+ structValue: undefined,
+ listValue: undefined,
+ };
+}
+
+export const Value = {
+ encode(message: Value, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
+ if (message.nullValue !== undefined) {
+ writer.uint32(8).int32(message.nullValue);
+ }
+ if (message.numberValue !== undefined) {
+ writer.uint32(17).double(message.numberValue);
+ }
+ if (message.stringValue !== undefined) {
+ writer.uint32(26).string(message.stringValue);
+ }
+ if (message.boolValue !== undefined) {
+ writer.uint32(32).bool(message.boolValue);
+ }
+ if (message.structValue !== undefined) {
+ Struct.encode(Struct.wrap(message.structValue), writer.uint32(42).fork()).ldelim();
+ }
+ if (message.listValue !== undefined) {
+ ListValue.encode(ListValue.wrap(message.listValue), writer.uint32(50).fork()).ldelim();
+ }
+ return writer;
+ },
+
+ decode(input: _m0.Reader | Uint8Array, length?: number): Value {
+ const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
+ let end = length === undefined ? reader.len : reader.pos + length;
+ const message = createBaseValue();
+ while (reader.pos < end) {
+ const tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1:
+ message.nullValue = reader.int32() as any;
+ break;
+ case 2:
+ message.numberValue = reader.double();
+ break;
+ case 3:
+ message.stringValue = reader.string();
+ break;
+ case 4:
+ message.boolValue = reader.bool();
+ break;
+ case 5:
+ message.structValue = Struct.unwrap(Struct.decode(reader, reader.uint32()));
+ break;
+ case 6:
+ message.listValue = ListValue.unwrap(ListValue.decode(reader, reader.uint32()));
+ break;
+ default:
+ reader.skipType(tag & 7);
+ break;
+ }
+ }
+ return message;
+ },
+
+ fromJSON(object: any): Value {
+ return {
+ nullValue: isSet(object.nullValue) ? nullValueFromJSON(object.nullValue) : undefined,
+ numberValue: isSet(object.numberValue) ? Number(object.numberValue) : undefined,
+ stringValue: isSet(object.stringValue) ? String(object.stringValue) : undefined,
+ boolValue: isSet(object.boolValue) ? Boolean(object.boolValue) : undefined,
+ structValue: isObject(object.structValue) ? object.structValue : undefined,
+ listValue: Array.isArray(object.listValue) ? [...object.listValue] : undefined,
+ };
+ },
+
+ toJSON(message: Value): unknown {
+ const obj: any = {};
+ message.nullValue !== undefined &&
+ (obj.nullValue = message.nullValue !== undefined ? nullValueToJSON(message.nullValue) : undefined);
+ message.numberValue !== undefined && (obj.numberValue = message.numberValue);
+ message.stringValue !== undefined && (obj.stringValue = message.stringValue);
+ message.boolValue !== undefined && (obj.boolValue = message.boolValue);
+ message.structValue !== undefined && (obj.structValue = message.structValue);
+ message.listValue !== undefined && (obj.listValue = message.listValue);
+ return obj;
+ },
+
+ fromPartial(object: DeepPartial<Value>): Value {
+ const message = createBaseValue();
+ message.nullValue = object.nullValue ?? undefined;
+ message.numberValue = object.numberValue ?? undefined;
+ message.stringValue = object.stringValue ?? undefined;
+ message.boolValue = object.boolValue ?? undefined;
+ message.structValue = object.structValue ?? undefined;
+ message.listValue = object.listValue ?? undefined;
+ return message;
+ },
+
+ wrap(value: any): Value {
+ const result = createBaseValue();
+
+ if (value === null) {
+ result.nullValue = NullValue.NULL_VALUE;
+ } else if (typeof value === "boolean") {
+ result.boolValue = value;
+ } else if (typeof value === "number") {
+ result.numberValue = value;
+ } else if (typeof value === "string") {
+ result.stringValue = value;
+ } else if (Array.isArray(value)) {
+ result.listValue = value;
+ } else if (typeof value === "object") {
+ result.structValue = value;
+ } else if (typeof value !== "undefined") {
+ throw new Error("Unsupported any value type: " + typeof value);
+ }
+
+ return result;
+ },
+
+ unwrap(message: Value): string | number | boolean | Object | null | Array<any> | undefined {
+ if (message?.stringValue !== undefined) {
+ return message.stringValue;
+ } else if (message?.numberValue !== undefined) {
+ return message.numberValue;
+ } else if (message?.boolValue !== undefined) {
+ return message.boolValue;
+ } else if (message?.structValue !== undefined) {
+ return message.structValue;
+ } else if (message?.listValue !== undefined) {
+ return message.listValue;
+ } else if (message?.nullValue !== undefined) {
+ return null;
+ }
+ return undefined;
+ },
+};
+
+function createBaseListValue(): ListValue {
+ return { values: [] };
+}
+
+export const ListValue = {
+ encode(message: ListValue, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
+ for (const v of message.values) {
+ Value.encode(Value.wrap(v!), writer.uint32(10).fork()).ldelim();
+ }
+ return writer;
+ },
+
+ decode(input: _m0.Reader | Uint8Array, length?: number): ListValue {
+ const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
+ let end = length === undefined ? reader.len : reader.pos + length;
+ const message = createBaseListValue();
+ while (reader.pos < end) {
+ const tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1:
+ message.values.push(Value.unwrap(Value.decode(reader, reader.uint32())));
+ break;
+ default:
+ reader.skipType(tag & 7);
+ break;
+ }
+ }
+ return message;
+ },
+
+ fromJSON(object: any): ListValue {
+ return { values: Array.isArray(object?.values) ? [...object.values] : [] };
+ },
+
+ toJSON(message: ListValue): unknown {
+ const obj: any = {};
+ if (message.values) {
+ obj.values = message.values.map((e) => e);
+ } else {
+ obj.values = [];
+ }
+ return obj;
+ },
+
+ fromPartial(object: DeepPartial<ListValue>): ListValue {
+ const message = createBaseListValue();
+ message.values = object.values?.map((e) => e) || [];
+ return message;
+ },
+
+ wrap(value: Array<any> | undefined): ListValue {
+ const result = createBaseListValue();
+
+ result.values = value ?? [];
+
+ return result;
+ },
+
+ unwrap(message: ListValue): Array<any> {
+ return message.values;
+ },
+};
+
+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>;
+
+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/logging_service.ts b/frontend/src/types/proto/v1/logging_service.ts
new file mode 100644
index 0000000000..ae7d4eb83a
--- /dev/null
+++ b/frontend/src/types/proto/v1/logging_service.ts
@@ -0,0 +1,617 @@
+/* eslint-disable */
+import type { CallContext, CallOptions } from "nice-grpc-common";
+import * as _m0 from "protobufjs/minimal";
+import { Struct } from "../google/protobuf/struct";
+import { Timestamp } from "../google/protobuf/timestamp";
+
+export const protobufPackage = "bytebase.v1";
+
+export interface ListLogsRequest {
+ /**
+ * The parent resource name.
+ * Format:
+ * projects/{project}
+ * workspaces/{workspace}
+ */
+ parent: string;
+ /**
+ * filter is the filter to apply on the list logs request,
+ * follow the [ebnf](https://en.wikipedia.org/wiki/Extended_Backus%E2%80%93Naur_form) syntax.
+ * The field only support in filter:
+ * - creator
+ * - container
+ * - level
+ * - action
+ * For example:
+ * List the logs of type 'ACTION_ISSUE_COMMENT_CREATE' in issue/123: 'action="ACTION_ISSUE_COMMENT_CREATE", container="issue/123"'
+ */
+ filter: string;
+ /**
+ * Not used. The maximum number of logs to return.
+ * The service may return fewer than this value.
+ * If unspecified, at most 100 log entries will be returned.
+ * The maximum value is 1000; values above 1000 will be coerced to 1000.
+ */
+ pageSize: number;
+ /**
+ * Not used. A page token, received from a previous `ListLogs` call.
+ * Provide this to retrieve the subsequent page.
+ */
+ pageToken: string;
+}
+
+export interface ListLogsResponse {
+ /** The list of log entries. */
+ logEntries: LogEntry[];
+ /**
+ * A token to retrieve next page of log entries.
+ * Pass this value in the page_token field in the subsequent call to `ListLogs` method
+ * to retrieve the next page of log entries.
+ */
+ nextPageToken: string;
+}
+
+export interface LogEntry {
+ /**
+ * The creator of the log entry.
+ * Format: user:{emailid}
+ */
+ creator: string;
+ /** The timestamp when the backup resource was created initally. */
+ createTime?: Date;
+ /** The timestamp when the backup resource was updated. */
+ updateTime?: Date;
+ action: LogEntry_Action;
+ level: LogEntry_Level;
+ /**
+ * The name of the resource associated with this log entry. For example, the resource user associated with log entry type of "ACTION_MEMBER_CREATE".
+ * Format:
+ * For ACTION_MEMBER_*: user:emailid
+ * For ACTION_ISSUE_*: issues/{issue}
+ * For ACTION_PIPELINE_*: pipelines/{pipeline}
+ * For ACTION_PROJECT_*: projects/{project}
+ * For ACTION_SQL_EDITOR_QUERY: workspaces/{workspace} OR projects/{project}
+ */
+ resourceName: string;
+ /** The payload of the log entry. */
+ jsonPayload?: { [key: string]: any };
+}
+
+export enum LogEntry_Action {
+ ACTION_UNSPECIFIED = 0,
+ /**
+ * ACTION_MEMBER_CREATE - In worksapce resource only.
+ *
+ * ACTION_MEMBER_CREATE is the type for creating a new member.
+ */
+ ACTION_MEMBER_CREATE = 1,
+ /** ACTION_MEMBER_ROLE_UPDATE - ACTION_MEMBER_ROLE_UPDATE is the type for updating a member's role. */
+ ACTION_MEMBER_ROLE_UPDATE = 2,
+ /** ACTION_MEMBER_ACTIVATE - ACTION_MEMBER_ACTIVATE_UPDATE is the type for activating members. */
+ ACTION_MEMBER_ACTIVATE = 3,
+ /** ACTION_MEMBER_DEACTIVE - ACTION_MEMBER_DEACTIVE is the type for deactiving members. */
+ ACTION_MEMBER_DEACTIVE = 4,
+ /**
+ * ACTION_ISSUE_CREATE - In project resource only.
+ *
+ * ACTION_ISSUE_CREATE is the type for creating a new issue.
+ */
+ ACTION_ISSUE_CREATE = 5,
+ /** ACTION_ISSUE_COMMENT_CREATE - ACTION_ISSUE_COMMENT_CREATE is the type for creating a new comment on an issue. */
+ ACTION_ISSUE_COMMENT_CREATE = 6,
+ /** ACTION_ISSUE_FIELD_UPDATE - ACTION_ISSUE_FIELD_UPDATE is the type for updating an issue's field. */
+ ACTION_ISSUE_FIELD_UPDATE = 7,
+ /** ACTION_ISSUE_STATUS_UPDATE - ACTION_ISSUE_STATUS_UPDATE is the type for updating an issue's status. */
+ ACTION_ISSUE_STATUS_UPDATE = 8,
+ /** ACTION_PIPELINE_STAGE_STATUS_UPDATE - ACTION_PIPELINE_STAGE_STATUS_UPDATE is the type for stage begins or ends. */
+ ACTION_PIPELINE_STAGE_STATUS_UPDATE = 9,
+ /** ACTION_PIPELINE_TASK_STATUS_UPDATE - ACTION_PIPELINE_TASK_STATUS_UPDATE is the type for updating pipeline task status. */
+ ACTION_PIPELINE_TASK_STATUS_UPDATE = 10,
+ /** ACTION_PIPELINE_TASK_FILE_COMMIT - ACTION_PIPELINE_TASK_FILE_COMMIT is the type for committing pipeline task files. */
+ ACTION_PIPELINE_TASK_FILE_COMMIT = 11,
+ /** ACTION_PIPELINE_TASK_STATEMENT_UPDATE - ACTION_PIPELINE_TASK_STATEMENT_UPDATE is the type for updating pipeline task SQL statement. */
+ ACTION_PIPELINE_TASK_STATEMENT_UPDATE = 12,
+ /** ACITON_PIPELINE_TASK_EARLIEST_ALLOWED_DATE_UPDATE - ACTION_PIPELINE_TASK_EARLIEST_ALLOWED_DATE_UPDATE is the type for updating pipeline task the earliest allowed time. */
+ ACITON_PIPELINE_TASK_EARLIEST_ALLOWED_DATE_UPDATE = 13,
+ /** ACTION_PROJECT_MEMBER_CREATE - ACTION_PROJECT_MEMBER_CREATE is the type for creating a new project member. */
+ ACTION_PROJECT_MEMBER_CREATE = 14,
+ /** ACTION_PROJECT_MEMBER_ROLE_UPDATE - ACTION_PROJECT_MEMBER_ROLE_UPDATE is the type for updating a project member's role. */
+ ACTION_PROJECT_MEMBER_ROLE_UPDATE = 15,
+ /** ACTION_PROJECT_MEMBER_DELETE - ACTION_PROJECT_MEMBER_DELETE is the type for deleting a project member. */
+ ACTION_PROJECT_MEMBER_DELETE = 16,
+ /** ACTION_PROJECT_REPOSITORY_PUSH - ACTION_PROJECT_REPOSITORY_PUSH is the type for pushing to a project repository. */
+ ACTION_PROJECT_REPOSITORY_PUSH = 17,
+ /** ACTION_PROJECT_DTABASE_TRANSFER - ACTION_PROJECT_DATABASE_TRANSFER is the type for transferring a database to a project. */
+ ACTION_PROJECT_DTABASE_TRANSFER = 18,
+ /** ACTION_PROJECT_DATABASE_RECOVERY_PITR_DONE - ACTION_PROJECT_DATABASE_RECOVERY_PITR_DONE is the type for database PITR recovery done. */
+ ACTION_PROJECT_DATABASE_RECOVERY_PITR_DONE = 19,
+ /**
+ * ACTION_SQL_EDITOR_QUERY - Both in workspace and project resource.
+ *
+ * ACTION_SQL_EDITOR_QUERY is the type for SQL editor query.
+ * If user runs SQL in Read-only mode, this action will belong to project resource.
+ * If user runs SQL in Read-write mode, this action will belong to workspace resource.
+ */
+ ACTION_SQL_EDITOR_QUERY = 20,
+ UNRECOGNIZED = -1,
+}
+
+export function logEntry_ActionFromJSON(object: any): LogEntry_Action {
+ switch (object) {
+ case 0:
+ case "ACTION_UNSPECIFIED":
+ return LogEntry_Action.ACTION_UNSPECIFIED;
+ case 1:
+ case "ACTION_MEMBER_CREATE":
+ return LogEntry_Action.ACTION_MEMBER_CREATE;
+ case 2:
+ case "ACTION_MEMBER_ROLE_UPDATE":
+ return LogEntry_Action.ACTION_MEMBER_ROLE_UPDATE;
+ case 3:
+ case "ACTION_MEMBER_ACTIVATE":
+ return LogEntry_Action.ACTION_MEMBER_ACTIVATE;
+ case 4:
+ case "ACTION_MEMBER_DEACTIVE":
+ return LogEntry_Action.ACTION_MEMBER_DEACTIVE;
+ case 5:
+ case "ACTION_ISSUE_CREATE":
+ return LogEntry_Action.ACTION_ISSUE_CREATE;
+ case 6:
+ case "ACTION_ISSUE_COMMENT_CREATE":
+ return LogEntry_Action.ACTION_ISSUE_COMMENT_CREATE;
+ case 7:
+ case "ACTION_ISSUE_FIELD_UPDATE":
+ return LogEntry_Action.ACTION_ISSUE_FIELD_UPDATE;
+ case 8:
+ case "ACTION_ISSUE_STATUS_UPDATE":
+ return LogEntry_Action.ACTION_ISSUE_STATUS_UPDATE;
+ case 9:
+ case "ACTION_PIPELINE_STAGE_STATUS_UPDATE":
+ return LogEntry_Action.ACTION_PIPELINE_STAGE_STATUS_UPDATE;
+ case 10:
+ case "ACTION_PIPELINE_TASK_STATUS_UPDATE":
+ return LogEntry_Action.ACTION_PIPELINE_TASK_STATUS_UPDATE;
+ case 11:
+ case "ACTION_PIPELINE_TASK_FILE_COMMIT":
+ return LogEntry_Action.ACTION_PIPELINE_TASK_FILE_COMMIT;
+ case 12:
+ case "ACTION_PIPELINE_TASK_STATEMENT_UPDATE":
+ return LogEntry_Action.ACTION_PIPELINE_TASK_STATEMENT_UPDATE;
+ case 13:
+ case "ACITON_PIPELINE_TASK_EARLIEST_ALLOWED_DATE_UPDATE":
+ return LogEntry_Action.ACITON_PIPELINE_TASK_EARLIEST_ALLOWED_DATE_UPDATE;
+ case 14:
+ case "ACTION_PROJECT_MEMBER_CREATE":
+ return LogEntry_Action.ACTION_PROJECT_MEMBER_CREATE;
+ case 15:
+ case "ACTION_PROJECT_MEMBER_ROLE_UPDATE":
+ return LogEntry_Action.ACTION_PROJECT_MEMBER_ROLE_UPDATE;
+ case 16:
+ case "ACTION_PROJECT_MEMBER_DELETE":
+ return LogEntry_Action.ACTION_PROJECT_MEMBER_DELETE;
+ case 17:
+ case "ACTION_PROJECT_REPOSITORY_PUSH":
+ return LogEntry_Action.ACTION_PROJECT_REPOSITORY_PUSH;
+ case 18:
+ case "ACTION_PROJECT_DTABASE_TRANSFER":
+ return LogEntry_Action.ACTION_PROJECT_DTABASE_TRANSFER;
+ case 19:
+ case "ACTION_PROJECT_DATABASE_RECOVERY_PITR_DONE":
+ return LogEntry_Action.ACTION_PROJECT_DATABASE_RECOVERY_PITR_DONE;
+ case 20:
+ case "ACTION_SQL_EDITOR_QUERY":
+ return LogEntry_Action.ACTION_SQL_EDITOR_QUERY;
+ case -1:
+ case "UNRECOGNIZED":
+ default:
+ return LogEntry_Action.UNRECOGNIZED;
+ }
+}
+
+export function logEntry_ActionToJSON(object: LogEntry_Action): string {
+ switch (object) {
+ case LogEntry_Action.ACTION_UNSPECIFIED:
+ return "ACTION_UNSPECIFIED";
+ case LogEntry_Action.ACTION_MEMBER_CREATE:
+ return "ACTION_MEMBER_CREATE";
+ case LogEntry_Action.ACTION_MEMBER_ROLE_UPDATE:
+ return "ACTION_MEMBER_ROLE_UPDATE";
+ case LogEntry_Action.ACTION_MEMBER_ACTIVATE:
+ return "ACTION_MEMBER_ACTIVATE";
+ case LogEntry_Action.ACTION_MEMBER_DEACTIVE:
+ return "ACTION_MEMBER_DEACTIVE";
+ case LogEntry_Action.ACTION_ISSUE_CREATE:
+ return "ACTION_ISSUE_CREATE";
+ case LogEntry_Action.ACTION_ISSUE_COMMENT_CREATE:
+ return "ACTION_ISSUE_COMMENT_CREATE";
+ case LogEntry_Action.ACTION_ISSUE_FIELD_UPDATE:
+ return "ACTION_ISSUE_FIELD_UPDATE";
+ case LogEntry_Action.ACTION_ISSUE_STATUS_UPDATE:
+ return "ACTION_ISSUE_STATUS_UPDATE";
+ case LogEntry_Action.ACTION_PIPELINE_STAGE_STATUS_UPDATE:
+ return "ACTION_PIPELINE_STAGE_STATUS_UPDATE";
+ case LogEntry_Action.ACTION_PIPELINE_TASK_STATUS_UPDATE:
+ return "ACTION_PIPELINE_TASK_STATUS_UPDATE";
+ case LogEntry_Action.ACTION_PIPELINE_TASK_FILE_COMMIT:
+ return "ACTION_PIPELINE_TASK_FILE_COMMIT";
+ case LogEntry_Action.ACTION_PIPELINE_TASK_STATEMENT_UPDATE:
+ return "ACTION_PIPELINE_TASK_STATEMENT_UPDATE";
+ case LogEntry_Action.ACITON_PIPELINE_TASK_EARLIEST_ALLOWED_DATE_UPDATE:
+ return "ACITON_PIPELINE_TASK_EARLIEST_ALLOWED_DATE_UPDATE";
+ case LogEntry_Action.ACTION_PROJECT_MEMBER_CREATE:
+ return "ACTION_PROJECT_MEMBER_CREATE";
+ case LogEntry_Action.ACTION_PROJECT_MEMBER_ROLE_UPDATE:
+ return "ACTION_PROJECT_MEMBER_ROLE_UPDATE";
+ case LogEntry_Action.ACTION_PROJECT_MEMBER_DELETE:
+ return "ACTION_PROJECT_MEMBER_DELETE";
+ case LogEntry_Action.ACTION_PROJECT_REPOSITORY_PUSH:
+ return "ACTION_PROJECT_REPOSITORY_PUSH";
+ case LogEntry_Action.ACTION_PROJECT_DTABASE_TRANSFER:
+ return "ACTION_PROJECT_DTABASE_TRANSFER";
+ case LogEntry_Action.ACTION_PROJECT_DATABASE_RECOVERY_PITR_DONE:
+ return "ACTION_PROJECT_DATABASE_RECOVERY_PITR_DONE";
+ case LogEntry_Action.ACTION_SQL_EDITOR_QUERY:
+ return "ACTION_SQL_EDITOR_QUERY";
+ case LogEntry_Action.UNRECOGNIZED:
+ default:
+ return "UNRECOGNIZED";
+ }
+}
+
+export enum LogEntry_Level {
+ LEVEL_UNSPECIFIED = 0,
+ /** LEVEL_INFO - LEVEL_INFO is the type for information. */
+ LEVEL_INFO = 1,
+ /** LEVEL_WARNING - LEVEL_WARNING is the type for warning. */
+ LEVEL_WARNING = 2,
+ /** LEVEL_ERROR - LEVEL_ERROR is the type for error. */
+ LEVEL_ERROR = 3,
+ UNRECOGNIZED = -1,
+}
+
+export function logEntry_LevelFromJSON(object: any): LogEntry_Level {
+ switch (object) {
+ case 0:
+ case "LEVEL_UNSPECIFIED":
+ return LogEntry_Level.LEVEL_UNSPECIFIED;
+ case 1:
+ case "LEVEL_INFO":
+ return LogEntry_Level.LEVEL_INFO;
+ case 2:
+ case "LEVEL_WARNING":
+ return LogEntry_Level.LEVEL_WARNING;
+ case 3:
+ case "LEVEL_ERROR":
+ return LogEntry_Level.LEVEL_ERROR;
+ case -1:
+ case "UNRECOGNIZED":
+ default:
+ return LogEntry_Level.UNRECOGNIZED;
+ }
+}
+
+export function logEntry_LevelToJSON(object: LogEntry_Level): string {
+ switch (object) {
+ case LogEntry_Level.LEVEL_UNSPECIFIED:
+ return "LEVEL_UNSPECIFIED";
+ case LogEntry_Level.LEVEL_INFO:
+ return "LEVEL_INFO";
+ case LogEntry_Level.LEVEL_WARNING:
+ return "LEVEL_WARNING";
+ case LogEntry_Level.LEVEL_ERROR:
+ return "LEVEL_ERROR";
+ case LogEntry_Level.UNRECOGNIZED:
+ default:
+ return "UNRECOGNIZED";
+ }
+}
+
+function createBaseListLogsRequest(): ListLogsRequest {
+ return { parent: "", filter: "", pageSize: 0, pageToken: "" };
+}
+
+export const ListLogsRequest = {
+ encode(message: ListLogsRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
+ if (message.parent !== "") {
+ writer.uint32(10).string(message.parent);
+ }
+ if (message.filter !== "") {
+ writer.uint32(18).string(message.filter);
+ }
+ if (message.pageSize !== 0) {
+ writer.uint32(24).int32(message.pageSize);
+ }
+ if (message.pageToken !== "") {
+ writer.uint32(34).string(message.pageToken);
+ }
+ return writer;
+ },
+
+ decode(input: _m0.Reader | Uint8Array, length?: number): ListLogsRequest {
+ const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
+ let end = length === undefined ? reader.len : reader.pos + length;
+ const message = createBaseListLogsRequest();
+ while (reader.pos < end) {
+ const tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1:
+ message.parent = reader.string();
+ break;
+ case 2:
+ message.filter = reader.string();
+ break;
+ case 3:
+ message.pageSize = reader.int32();
+ break;
+ case 4:
+ message.pageToken = reader.string();
+ break;
+ default:
+ reader.skipType(tag & 7);
+ break;
+ }
+ }
+ return message;
+ },
+
+ fromJSON(object: any): ListLogsRequest {
+ return {
+ parent: isSet(object.parent) ? String(object.parent) : "",
+ filter: isSet(object.filter) ? String(object.filter) : "",
+ pageSize: isSet(object.pageSize) ? Number(object.pageSize) : 0,
+ pageToken: isSet(object.pageToken) ? String(object.pageToken) : "",
+ };
+ },
+
+ toJSON(message: ListLogsRequest): unknown {
+ const obj: any = {};
+ message.parent !== undefined && (obj.parent = message.parent);
+ message.filter !== undefined && (obj.filter = message.filter);
+ message.pageSize !== undefined && (obj.pageSize = Math.round(message.pageSize));
+ message.pageToken !== undefined && (obj.pageToken = message.pageToken);
+ return obj;
+ },
+
+ fromPartial(object: DeepPartial<ListLogsRequest>): ListLogsRequest {
+ const message = createBaseListLogsRequest();
+ message.parent = object.parent ?? "";
+ message.filter = object.filter ?? "";
+ message.pageSize = object.pageSize ?? 0;
+ message.pageToken = object.pageToken ?? "";
+ return message;
+ },
+};
+
+function createBaseListLogsResponse(): ListLogsResponse {
+ return { logEntries: [], nextPageToken: "" };
+}
+
+export const ListLogsResponse = {
+ encode(message: ListLogsResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
+ for (const v of message.logEntries) {
+ LogEntry.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): ListLogsResponse {
+ const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
+ let end = length === undefined ? reader.len : reader.pos + length;
+ const message = createBaseListLogsResponse();
+ while (reader.pos < end) {
+ const tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1:
+ message.logEntries.push(LogEntry.decode(reader, reader.uint32()));
+ break;
+ case 2:
+ message.nextPageToken = reader.string();
+ break;
+ default:
+ reader.skipType(tag & 7);
+ break;
+ }
+ }
+ return message;
+ },
+
+ fromJSON(object: any): ListLogsResponse {
+ return {
+ logEntries: Array.isArray(object?.logEntries) ? object.logEntries.map((e: any) => LogEntry.fromJSON(e)) : [],
+ nextPageToken: isSet(object.nextPageToken) ? String(object.nextPageToken) : "",
+ };
+ },
+
+ toJSON(message: ListLogsResponse): unknown {
+ const obj: any = {};
+ if (message.logEntries) {
+ obj.logEntries = message.logEntries.map((e) => e ? LogEntry.toJSON(e) : undefined);
+ } else {
+ obj.logEntries = [];
+ }
+ message.nextPageToken !== undefined && (obj.nextPageToken = message.nextPageToken);
+ return obj;
+ },
+
+ fromPartial(object: DeepPartial<ListLogsResponse>): ListLogsResponse {
+ const message = createBaseListLogsResponse();
+ message.logEntries = object.logEntries?.map((e) => LogEntry.fromPartial(e)) || [];
+ message.nextPageToken = object.nextPageToken ?? "";
+ return message;
+ },
+};
+
+function createBaseLogEntry(): LogEntry {
+ return {
+ creator: "",
+ createTime: undefined,
+ updateTime: undefined,
+ action: 0,
+ level: 0,
+ resourceName: "",
+ jsonPayload: undefined,
+ };
+}
+
+export const LogEntry = {
+ encode(message: LogEntry, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
+ if (message.creator !== "") {
+ writer.uint32(10).string(message.creator);
+ }
+ if (message.createTime !== undefined) {
+ Timestamp.encode(toTimestamp(message.createTime), writer.uint32(18).fork()).ldelim();
+ }
+ if (message.updateTime !== undefined) {
+ Timestamp.encode(toTimestamp(message.updateTime), writer.uint32(26).fork()).ldelim();
+ }
+ if (message.action !== 0) {
+ writer.uint32(32).int32(message.action);
+ }
+ if (message.level !== 0) {
+ writer.uint32(40).int32(message.level);
+ }
+ if (message.resourceName !== "") {
+ writer.uint32(50).string(message.resourceName);
+ }
+ if (message.jsonPayload !== undefined) {
+ Struct.encode(Struct.wrap(message.jsonPayload), writer.uint32(58).fork()).ldelim();
+ }
+ return writer;
+ },
+
+ decode(input: _m0.Reader | Uint8Array, length?: number): LogEntry {
+ const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
+ let end = length === undefined ? reader.len : reader.pos + length;
+ const message = createBaseLogEntry();
+ while (reader.pos < end) {
+ const tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1:
+ message.creator = reader.string();
+ break;
+ case 2:
+ message.createTime = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
+ break;
+ case 3:
+ message.updateTime = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
+ break;
+ case 4:
+ message.action = reader.int32() as any;
+ break;
+ case 5:
+ message.level = reader.int32() as any;
+ break;
+ case 6:
+ message.resourceName = reader.string();
+ break;
+ case 7:
+ message.jsonPayload = Struct.unwrap(Struct.decode(reader, reader.uint32()));
+ break;
+ default:
+ reader.skipType(tag & 7);
+ break;
+ }
+ }
+ return message;
+ },
+
+ fromJSON(object: any): LogEntry {
+ return {
+ creator: isSet(object.creator) ? String(object.creator) : "",
+ createTime: isSet(object.createTime) ? fromJsonTimestamp(object.createTime) : undefined,
+ updateTime: isSet(object.updateTime) ? fromJsonTimestamp(object.updateTime) : undefined,
+ action: isSet(object.action) ? logEntry_ActionFromJSON(object.action) : 0,
+ level: isSet(object.level) ? logEntry_LevelFromJSON(object.level) : 0,
+ resourceName: isSet(object.resourceName) ? String(object.resourceName) : "",
+ jsonPayload: isObject(object.jsonPayload) ? object.jsonPayload : undefined,
+ };
+ },
+
+ toJSON(message: LogEntry): unknown {
+ const obj: any = {};
+ message.creator !== undefined && (obj.creator = message.creator);
+ message.createTime !== undefined && (obj.createTime = message.createTime.toISOString());
+ message.updateTime !== undefined && (obj.updateTime = message.updateTime.toISOString());
+ message.action !== undefined && (obj.action = logEntry_ActionToJSON(message.action));
+ message.level !== undefined && (obj.level = logEntry_LevelToJSON(message.level));
+ message.resourceName !== undefined && (obj.resourceName = message.resourceName);
+ message.jsonPayload !== undefined && (obj.jsonPayload = message.jsonPayload);
+ return obj;
+ },
+
+ fromPartial(object: DeepPartial<LogEntry>): LogEntry {
+ const message = createBaseLogEntry();
+ message.creator = object.creator ?? "";
+ message.createTime = object.createTime ?? undefined;
+ message.updateTime = object.updateTime ?? undefined;
+ message.action = object.action ?? 0;
+ message.level = object.level ?? 0;
+ message.resourceName = object.resourceName ?? "";
+ message.jsonPayload = object.jsonPayload ?? undefined;
+ return message;
+ },
+};
+
+export type LoggingServiceDefinition = typeof LoggingServiceDefinition;
+export const LoggingServiceDefinition = {
+ name: "LoggingService",
+ fullName: "bytebase.v1.LoggingService",
+ methods: {
+ listLogs: {
+ name: "ListLogs",
+ requestType: ListLogsRequest,
+ requestStream: false,
+ responseType: ListLogsResponse,
+ responseStream: false,
+ options: {},
+ },
+ },
+} as const;
+
+export interface LoggingServiceImplementation<CallContextExt = {}> {
+ listLogs(request: ListLogsRequest, context: CallContext & CallContextExt): Promise<DeepPartial<ListLogsResponse>>;
+}
+
+export interface LoggingServiceClient<CallOptionsExt = {}> {
+ listLogs(request: DeepPartial<ListLogsRequest>, options?: CallOptions & CallOptionsExt): Promise<ListLogsResponse>;
+}
+
+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>;
+
+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 isObject(value: any): boolean {
+ return typeof value === "object" && value !== null;
+}
+
+function isSet(value: any): boolean {
+ return value !== null && value !== undefined;
+}
diff --git a/proto/gen/grpc-doc/v1/README.md b/proto/gen/grpc-doc/v1/README.md
index b469b1034d..35b5e009dd 100644
--- a/proto/gen/grpc-doc/v1/README.md
+++ b/proto/gen/grpc-doc/v1/README.md
@@ -179,6 +179,16 @@
- [InstanceService](#bytebase-v1-InstanceService)
+- [v1/logging_service.proto](#v1_logging_service-proto)
+ - [ListLogsRequest](#bytebase-v1-ListLogsRequest)
+ - [ListLogsResponse](#bytebase-v1-ListLogsResponse)
+ - [LogEntry](#bytebase-v1-LogEntry)
+
+ - [LogEntry.Action](#bytebase-v1-LogEntry-Action)
+ - [LogEntry.Level](#bytebase-v1-LogEntry-Level)
+
+ - [LoggingService](#bytebase-v1-LoggingService)
+
- [v1/org_policy_service.proto](#v1_org_policy_service-proto)
- [AccessControlPolicy](#bytebase-v1-AccessControlPolicy)
- [AccessControlRule](#bytebase-v1-AccessControlRule)
@@ -2742,6 +2752,138 @@ The instance&#39;s `name` field is used to identify the instance to update. Form
+<a name="v1_logging_service-proto"></a>
+<p align="right"><a href="#top">Top</a></p>
+
+## v1/logging_service.proto
+
+
+
+<a name="bytebase-v1-ListLogsRequest"></a>
+
+### ListLogsRequest
+
+
+
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| parent | [string](#string) | | The parent resource name. Format: projects/{project} workspaces/{workspace} |
+| filter | [string](#string) | | filter is the filter to apply on the list logs request, follow the [ebnf](https://en.wikipedia.org/wiki/Extended_Backus%E2%80%93Naur_form) syntax. The field only support in filter: - creator - container - level - action For example: List the logs of type &#39;ACTION_ISSUE_COMMENT_CREATE&#39; in issue/123: &#39;action=&#34;ACTION_ISSUE_COMMENT_CREATE&#34;, container=&#34;issue/123&#34;&#39; |
+| page_size | [int32](#int32) | | Not used. The maximum number of logs to return. The service may return fewer than this value. If unspecified, at most 100 log entries will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000. |
+| page_token | [string](#string) | | Not used. A page token, received from a previous `ListLogs` call. Provide this to retrieve the subsequent page. |
+
+
+
+
+
+
+<a name="bytebase-v1-ListLogsResponse"></a>
+
+### ListLogsResponse
+
+
+
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| log_entries | [LogEntry](#bytebase-v1-LogEntry) | repeated | The list of log entries. |
+| next_page_token | [string](#string) | | A token to retrieve next page of log entries. Pass this value in the page_token field in the subsequent call to `ListLogs` method to retrieve the next page of log entries. |
+
+
+
+
+
+
+<a name="bytebase-v1-LogEntry"></a>
+
+### LogEntry
+
+
+
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| creator | [string](#string) | | The creator of the log entry. Format: user:{emailid} |
+| create_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | The timestamp when the backup resource was created initally. |
+| update_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | The timestamp when the backup resource was updated. |
+| action | [LogEntry.Action](#bytebase-v1-LogEntry-Action) | | |
+| level | [LogEntry.Level](#bytebase-v1-LogEntry-Level) | | |
+| resource_name | [string](#string) | | The name of the resource associated with this log entry. For example, the resource user associated with log entry type of &#34;ACTION_MEMBER_CREATE&#34;. Format: For ACTION_MEMBER_*: user:emailid For ACTION_ISSUE_*: issues/{issue} For ACTION_PIPELINE_*: pipelines/{pipeline} For ACTION_PROJECT_*: projects/{project} For ACTION_SQL_EDITOR_QUERY: workspaces/{workspace} OR projects/{project} |
+| json_payload | [google.protobuf.Struct](#google-protobuf-Struct) | | The payload of the log entry. |
+
+
+
+
+
+
+
+
+<a name="bytebase-v1-LogEntry-Action"></a>
+
+### LogEntry.Action
+
+
+| Name | Number | Description |
+| ---- | ------ | ----------- |
+| ACTION_UNSPECIFIED | 0 | |
+| ACTION_MEMBER_CREATE | 1 | In worksapce resource only.
+
+ACTION_MEMBER_CREATE is the type for creating a new member. |
+| ACTION_MEMBER_ROLE_UPDATE | 2 | ACTION_MEMBER_ROLE_UPDATE is the type for updating a member&#39;s role. |
+| ACTION_MEMBER_ACTIVATE | 3 | ACTION_MEMBER_ACTIVATE_UPDATE is the type for activating members. |
+| ACTION_MEMBER_DEACTIVE | 4 | ACTION_MEMBER_DEACTIVE is the type for deactiving members. |
+| ACTION_ISSUE_CREATE | 5 | In project resource only.
+
+ACTION_ISSUE_CREATE is the type for creating a new issue. |
+| ACTION_ISSUE_COMMENT_CREATE | 6 | ACTION_ISSUE_COMMENT_CREATE is the type for creating a new comment on an issue. |
+| ACTION_ISSUE_FIELD_UPDATE | 7 | ACTION_ISSUE_FIELD_UPDATE is the type for updating an issue&#39;s field. |
+| ACTION_ISSUE_STATUS_UPDATE | 8 | ACTION_ISSUE_STATUS_UPDATE is the type for updating an issue&#39;s status. |
+| ACTION_PIPELINE_STAGE_STATUS_UPDATE | 9 | ACTION_PIPELINE_STAGE_STATUS_UPDATE is the type for stage begins or ends. |
+| ACTION_PIPELINE_TASK_STATUS_UPDATE | 10 | ACTION_PIPELINE_TASK_STATUS_UPDATE is the type for updating pipeline task status. |
+| ACTION_PIPELINE_TASK_FILE_COMMIT | 11 | ACTION_PIPELINE_TASK_FILE_COMMIT is the type for committing pipeline task files. |
+| ACTION_PIPELINE_TASK_STATEMENT_UPDATE | 12 | ACTION_PIPELINE_TASK_STATEMENT_UPDATE is the type for updating pipeline task SQL statement. |
+| ACITON_PIPELINE_TASK_EARLIEST_ALLOWED_DATE_UPDATE | 13 | ACTION_PIPELINE_TASK_EARLIEST_ALLOWED_DATE_UPDATE is the type for updating pipeline task the earliest allowed time. |
+| ACTION_PROJECT_MEMBER_CREATE | 14 | ACTION_PROJECT_MEMBER_CREATE is the type for creating a new project member. |
+| ACTION_PROJECT_MEMBER_ROLE_UPDATE | 15 | ACTION_PROJECT_MEMBER_ROLE_UPDATE is the type for updating a project member&#39;s role. |
+| ACTION_PROJECT_MEMBER_DELETE | 16 | ACTION_PROJECT_MEMBER_DELETE is the type for deleting a project member. |
+| ACTION_PROJECT_REPOSITORY_PUSH | 17 | ACTION_PROJECT_REPOSITORY_PUSH is the type for pushing to a project repository. |
+| ACTION_PROJECT_DTABASE_TRANSFER | 18 | ACTION_PROJECT_DATABASE_TRANSFER is the type for transferring a database to a project. |
+| ACTION_PROJECT_DATABASE_RECOVERY_PITR_DONE | 19 | ACTION_PROJECT_DATABASE_RECOVERY_PITR_DONE is the type for database PITR recovery done. |
+| ACTION_SQL_EDITOR_QUERY | 20 | Both in workspace and project resource.
+
+ACTION_SQL_EDITOR_QUERY is the type for SQL editor query. If user runs SQL in Read-only mode, this action will belong to project resource. If user runs SQL in Read-write mode, this action will belong to workspace resource. |
+
+
+
+<a name="bytebase-v1-LogEntry-Level"></a>
+
+### LogEntry.Level
+
+
+| Name | Number | Description |
+| ---- | ------ | ----------- |
+| LEVEL_UNSPECIFIED | 0 | |
+| LEVEL_INFO | 1 | LEVEL_INFO is the type for information. |
+| LEVEL_WARNING | 2 | LEVEL_WARNING is the type for warning. |
+| LEVEL_ERROR | 3 | LEVEL_ERROR is the type for error. |
+
+
+
+
+
+
+
+<a name="bytebase-v1-LoggingService"></a>
+
+### LoggingService
+
+
+| Method Name | Request Type | Response Type | Description |
+| ----------- | ------------ | ------------- | ------------|
+| ListLogs | [ListLogsRequest](#bytebase-v1-ListLogsRequest) | [ListLogsResponse](#bytebase-v1-ListLogsResponse) | |
+
+
+
+
+
<a name="v1_org_policy_service-proto"></a>
<p align="right"><a href="#top">Top</a></p>
diff --git a/proto/generated-go/v1/logging_service.pb.go b/proto/generated-go/v1/logging_service.pb.go
new file mode 100644
index 0000000000..a8de0f3ee2
--- /dev/null
+++ b/proto/generated-go/v1/logging_service.pb.go
@@ -0,0 +1,702 @@
+// Code generated by protoc-gen-go. DO NOT EDIT.
+// versions:
+// protoc-gen-go v1.29.0
+// protoc (unknown)
+// source: v1/logging_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"
+ _ "google.golang.org/protobuf/types/known/fieldmaskpb"
+ structpb "google.golang.org/protobuf/types/known/structpb"
+ timestamppb "google.golang.org/protobuf/types/known/timestamppb"
+ _ "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 LogEntry_Action int32
+
+const (
+ LogEntry_ACTION_UNSPECIFIED LogEntry_Action = 0
+ // In worksapce resource only.
+ //
+ // ACTION_MEMBER_CREATE is the type for creating a new member.
+ LogEntry_ACTION_MEMBER_CREATE LogEntry_Action = 1
+ // ACTION_MEMBER_ROLE_UPDATE is the type for updating a member's role.
+ LogEntry_ACTION_MEMBER_ROLE_UPDATE LogEntry_Action = 2
+ // ACTION_MEMBER_ACTIVATE_UPDATE is the type for activating members.
+ LogEntry_ACTION_MEMBER_ACTIVATE LogEntry_Action = 3
+ // ACTION_MEMBER_DEACTIVE is the type for deactiving members.
+ LogEntry_ACTION_MEMBER_DEACTIVE LogEntry_Action = 4
+ // In project resource only.
+ //
+ // ACTION_ISSUE_CREATE is the type for creating a new issue.
+ LogEntry_ACTION_ISSUE_CREATE LogEntry_Action = 5
+ // ACTION_ISSUE_COMMENT_CREATE is the type for creating a new comment on an issue.
+ LogEntry_ACTION_ISSUE_COMMENT_CREATE LogEntry_Action = 6
+ // ACTION_ISSUE_FIELD_UPDATE is the type for updating an issue's field.
+ LogEntry_ACTION_ISSUE_FIELD_UPDATE LogEntry_Action = 7
+ // ACTION_ISSUE_STATUS_UPDATE is the type for updating an issue's status.
+ LogEntry_ACTION_ISSUE_STATUS_UPDATE LogEntry_Action = 8
+ // ACTION_PIPELINE_STAGE_STATUS_UPDATE is the type for stage begins or ends.
+ LogEntry_ACTION_PIPELINE_STAGE_STATUS_UPDATE LogEntry_Action = 9
+ // ACTION_PIPELINE_TASK_STATUS_UPDATE is the type for updating pipeline task status.
+ LogEntry_ACTION_PIPELINE_TASK_STATUS_UPDATE LogEntry_Action = 10
+ // ACTION_PIPELINE_TASK_FILE_COMMIT is the type for committing pipeline task files.
+ LogEntry_ACTION_PIPELINE_TASK_FILE_COMMIT LogEntry_Action = 11
+ // ACTION_PIPELINE_TASK_STATEMENT_UPDATE is the type for updating pipeline task SQL statement.
+ LogEntry_ACTION_PIPELINE_TASK_STATEMENT_UPDATE LogEntry_Action = 12
+ // ACTION_PIPELINE_TASK_EARLIEST_ALLOWED_DATE_UPDATE is the type for updating pipeline task the earliest allowed time.
+ LogEntry_ACITON_PIPELINE_TASK_EARLIEST_ALLOWED_DATE_UPDATE LogEntry_Action = 13
+ // ACTION_PROJECT_MEMBER_CREATE is the type for creating a new project member.
+ LogEntry_ACTION_PROJECT_MEMBER_CREATE LogEntry_Action = 14
+ // ACTION_PROJECT_MEMBER_ROLE_UPDATE is the type for updating a project member's role.
+ LogEntry_ACTION_PROJECT_MEMBER_ROLE_UPDATE LogEntry_Action = 15
+ // ACTION_PROJECT_MEMBER_DELETE is the type for deleting a project member.
+ LogEntry_ACTION_PROJECT_MEMBER_DELETE LogEntry_Action = 16
+ // ACTION_PROJECT_REPOSITORY_PUSH is the type for pushing to a project repository.
+ LogEntry_ACTION_PROJECT_REPOSITORY_PUSH LogEntry_Action = 17
+ // ACTION_PROJECT_DATABASE_TRANSFER is the type for transferring a database to a project.
+ LogEntry_ACTION_PROJECT_DTABASE_TRANSFER LogEntry_Action = 18
+ // ACTION_PROJECT_DATABASE_RECOVERY_PITR_DONE is the type for database PITR recovery done.
+ LogEntry_ACTION_PROJECT_DATABASE_RECOVERY_PITR_DONE LogEntry_Action = 19
+ // Both in workspace and project resource.
+ //
+ // ACTION_SQL_EDITOR_QUERY is the type for SQL editor query.
+ // If user runs SQL in Read-only mode, this action will belong to project resource.
+ // If user runs SQL in Read-write mode, this action will belong to workspace resource.
+ LogEntry_ACTION_SQL_EDITOR_QUERY LogEntry_Action = 20
+)
+
+// Enum value maps for LogEntry_Action.
+var (
+ LogEntry_Action_name = map[int32]string{
+ 0: "ACTION_UNSPECIFIED",
+ 1: "ACTION_MEMBER_CREATE",
+ 2: "ACTION_MEMBER_ROLE_UPDATE",
+ 3: "ACTION_MEMBER_ACTIVATE",
+ 4: "ACTION_MEMBER_DEACTIVE",
+ 5: "ACTION_ISSUE_CREATE",
+ 6: "ACTION_ISSUE_COMMENT_CREATE",
+ 7: "ACTION_ISSUE_FIELD_UPDATE",
+ 8: "ACTION_ISSUE_STATUS_UPDATE",
+ 9: "ACTION_PIPELINE_STAGE_STATUS_UPDATE",
+ 10: "ACTION_PIPELINE_TASK_STATUS_UPDATE",
+ 11: "ACTION_PIPELINE_TASK_FILE_COMMIT",
+ 12: "ACTION_PIPELINE_TASK_STATEMENT_UPDATE",
+ 13: "ACITON_PIPELINE_TASK_EARLIEST_ALLOWED_DATE_UPDATE",
+ 14: "ACTION_PROJECT_MEMBER_CREATE",
+ 15: "ACTION_PROJECT_MEMBER_ROLE_UPDATE",
+ 16: "ACTION_PROJECT_MEMBER_DELETE",
+ 17: "ACTION_PROJECT_REPOSITORY_PUSH",
+ 18: "ACTION_PROJECT_DTABASE_TRANSFER",
+ 19: "ACTION_PROJECT_DATABASE_RECOVERY_PITR_DONE",
+ 20: "ACTION_SQL_EDITOR_QUERY",
+ }
+ LogEntry_Action_value = map[string]int32{
+ "ACTION_UNSPECIFIED": 0,
+ "ACTION_MEMBER_CREATE": 1,
+ "ACTION_MEMBER_ROLE_UPDATE": 2,
+ "ACTION_MEMBER_ACTIVATE": 3,
+ "ACTION_MEMBER_DEACTIVE": 4,
+ "ACTION_ISSUE_CREATE": 5,
+ "ACTION_ISSUE_COMMENT_CREATE": 6,
+ "ACTION_ISSUE_FIELD_UPDATE": 7,
+ "ACTION_ISSUE_STATUS_UPDATE": 8,
+ "ACTION_PIPELINE_STAGE_STATUS_UPDATE": 9,
+ "ACTION_PIPELINE_TASK_STATUS_UPDATE": 10,
+ "ACTION_PIPELINE_TASK_FILE_COMMIT": 11,
+ "ACTION_PIPELINE_TASK_STATEMENT_UPDATE": 12,
+ "ACITON_PIPELINE_TASK_EARLIEST_ALLOWED_DATE_UPDATE": 13,
+ "ACTION_PROJECT_MEMBER_CREATE": 14,
+ "ACTION_PROJECT_MEMBER_ROLE_UPDATE": 15,
+ "ACTION_PROJECT_MEMBER_DELETE": 16,
+ "ACTION_PROJECT_REPOSITORY_PUSH": 17,
+ "ACTION_PROJECT_DTABASE_TRANSFER": 18,
+ "ACTION_PROJECT_DATABASE_RECOVERY_PITR_DONE": 19,
+ "ACTION_SQL_EDITOR_QUERY": 20,
+ }
+)
+
+func (x LogEntry_Action) Enum() *LogEntry_Action {
+ p := new(LogEntry_Action)
+ *p = x
+ return p
+}
+
+func (x LogEntry_Action) String() string {
+ return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
+}
+
+func (LogEntry_Action) Descriptor() protoreflect.EnumDescriptor {
+ return file_v1_logging_service_proto_enumTypes[0].Descriptor()
+}
+
+func (LogEntry_Action) Type() protoreflect.EnumType {
+ return &file_v1_logging_service_proto_enumTypes[0]
+}
+
+func (x LogEntry_Action) Number() protoreflect.EnumNumber {
+ return protoreflect.EnumNumber(x)
+}
+
+// Deprecated: Use LogEntry_Action.Descriptor instead.
+func (LogEntry_Action) EnumDescriptor() ([]byte, []int) {
+ return file_v1_logging_service_proto_rawDescGZIP(), []int{2, 0}
+}
+
+type LogEntry_Level int32
+
+const (
+ LogEntry_LEVEL_UNSPECIFIED LogEntry_Level = 0
+ // LEVEL_INFO is the type for information.
+ LogEntry_LEVEL_INFO LogEntry_Level = 1
+ // LEVEL_WARNING is the type for warning.
+ LogEntry_LEVEL_WARNING LogEntry_Level = 2
+ // LEVEL_ERROR is the type for error.
+ LogEntry_LEVEL_ERROR LogEntry_Level = 3
+)
+
+// Enum value maps for LogEntry_Level.
+var (
+ LogEntry_Level_name = map[int32]string{
+ 0: "LEVEL_UNSPECIFIED",
+ 1: "LEVEL_INFO",
+ 2: "LEVEL_WARNING",
+ 3: "LEVEL_ERROR",
+ }
+ LogEntry_Level_value = map[string]int32{
+ "LEVEL_UNSPECIFIED": 0,
+ "LEVEL_INFO": 1,
+ "LEVEL_WARNING": 2,
+ "LEVEL_ERROR": 3,
+ }
+)
+
+func (x LogEntry_Level) Enum() *LogEntry_Level {
+ p := new(LogEntry_Level)
+ *p = x
+ return p
+}
+
+func (x LogEntry_Level) String() string {
+ return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
+}
+
+func (LogEntry_Level) Descriptor() protoreflect.EnumDescriptor {
+ return file_v1_logging_service_proto_enumTypes[1].Descriptor()
+}
+
+func (LogEntry_Level) Type() protoreflect.EnumType {
+ return &file_v1_logging_service_proto_enumTypes[1]
+}
+
+func (x LogEntry_Level) Number() protoreflect.EnumNumber {
+ return protoreflect.EnumNumber(x)
+}
+
+// Deprecated: Use LogEntry_Level.Descriptor instead.
+func (LogEntry_Level) EnumDescriptor() ([]byte, []int) {
+ return file_v1_logging_service_proto_rawDescGZIP(), []int{2, 1}
+}
+
+type ListLogsRequest struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // The parent resource name.
+ // Format:
+ // projects/{project}
+ // workspaces/{workspace}
+ Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"`
+ // filter is the filter to apply on the list logs request,
+ // follow the [ebnf](https://en.wikipedia.org/wiki/Extended_Backus%E2%80%93Naur_form) syntax.
+ // The field only support in filter:
+ // - creator
+ // - container
+ // - level
+ // - action
+ // For example:
+ // List the logs of type 'ACTION_ISSUE_COMMENT_CREATE' in issue/123: 'action="ACTION_ISSUE_COMMENT_CREATE", container="issue/123"'
+ Filter string `protobuf:"bytes,2,opt,name=filter,proto3" json:"filter,omitempty"`
+ // Not used. The maximum number of logs to return.
+ // The service may return fewer than this value.
+ // If unspecified, at most 100 log entries will be returned.
+ // The maximum value is 1000; values above 1000 will be coerced to 1000.
+ PageSize int32 `protobuf:"varint,3,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"`
+ // Not used. A page token, received from a previous `ListLogs` call.
+ // Provide this to retrieve the subsequent page.
+ PageToken string `protobuf:"bytes,4,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"`
+}
+
+func (x *ListLogsRequest) Reset() {
+ *x = ListLogsRequest{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_v1_logging_service_proto_msgTypes[0]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *ListLogsRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ListLogsRequest) ProtoMessage() {}
+
+func (x *ListLogsRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_v1_logging_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 ListLogsRequest.ProtoReflect.Descriptor instead.
+func (*ListLogsRequest) Descriptor() ([]byte, []int) {
+ return file_v1_logging_service_proto_rawDescGZIP(), []int{0}
+}
+
+func (x *ListLogsRequest) GetParent() string {
+ if x != nil {
+ return x.Parent
+ }
+ return ""
+}
+
+func (x *ListLogsRequest) GetFilter() string {
+ if x != nil {
+ return x.Filter
+ }
+ return ""
+}
+
+func (x *ListLogsRequest) GetPageSize() int32 {
+ if x != nil {
+ return x.PageSize
+ }
+ return 0
+}
+
+func (x *ListLogsRequest) GetPageToken() string {
+ if x != nil {
+ return x.PageToken
+ }
+ return ""
+}
+
+type ListLogsResponse struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // The list of log entries.
+ LogEntries []*LogEntry `protobuf:"bytes,1,rep,name=log_entries,json=logEntries,proto3" json:"log_entries,omitempty"`
+ // A token to retrieve next page of log entries.
+ // Pass this value in the page_token field in the subsequent call to `ListLogs` method
+ // to retrieve the next page of log entries.
+ NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"`
+}
+
+func (x *ListLogsResponse) Reset() {
+ *x = ListLogsResponse{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_v1_logging_service_proto_msgTypes[1]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *ListLogsResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ListLogsResponse) ProtoMessage() {}
+
+func (x *ListLogsResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_v1_logging_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 ListLogsResponse.ProtoReflect.Descriptor instead.
+func (*ListLogsResponse) Descriptor() ([]byte, []int) {
+ return file_v1_logging_service_proto_rawDescGZIP(), []int{1}
+}
+
+func (x *ListLogsResponse) GetLogEntries() []*LogEntry {
+ if x != nil {
+ return x.LogEntries
+ }
+ return nil
+}
+
+func (x *ListLogsResponse) GetNextPageToken() string {
+ if x != nil {
+ return x.NextPageToken
+ }
+ return ""
+}
+
+type LogEntry struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // The creator of the log entry.
+ // Format: user:{emailid}
+ Creator string `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"`
+ // The timestamp when the backup resource was created initally.
+ CreateTime *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=create_time,json=createTime,proto3" json:"create_time,omitempty"`
+ // The timestamp when the backup resource was updated.
+ UpdateTime *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=update_time,json=updateTime,proto3" json:"update_time,omitempty"`
+ Action LogEntry_Action `protobuf:"varint,4,opt,name=action,proto3,enum=bytebase.v1.LogEntry_Action" json:"action,omitempty"`
+ Level LogEntry_Level `protobuf:"varint,5,opt,name=level,proto3,enum=bytebase.v1.LogEntry_Level" json:"level,omitempty"`
+ // The name of the resource associated with this log entry. For example, the resource user associated with log entry type of "ACTION_MEMBER_CREATE".
+ // Format:
+ // For ACTION_MEMBER_*: user:emailid
+ // For ACTION_ISSUE_*: issues/{issue}
+ // For ACTION_PIPELINE_*: pipelines/{pipeline}
+ // For ACTION_PROJECT_*: projects/{project}
+ // For ACTION_SQL_EDITOR_QUERY: workspaces/{workspace} OR projects/{project}
+ ResourceName string `protobuf:"bytes,6,opt,name=resource_name,json=resourceName,proto3" json:"resource_name,omitempty"`
+ // The payload of the log entry.
+ JsonPayload *structpb.Struct `protobuf:"bytes,7,opt,name=json_payload,json=jsonPayload,proto3" json:"json_payload,omitempty"`
+}
+
+func (x *LogEntry) Reset() {
+ *x = LogEntry{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_v1_logging_service_proto_msgTypes[2]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *LogEntry) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*LogEntry) ProtoMessage() {}
+
+func (x *LogEntry) ProtoReflect() protoreflect.Message {
+ mi := &file_v1_logging_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 LogEntry.ProtoReflect.Descriptor instead.
+func (*LogEntry) Descriptor() ([]byte, []int) {
+ return file_v1_logging_service_proto_rawDescGZIP(), []int{2}
+}
+
+func (x *LogEntry) GetCreator() string {
+ if x != nil {
+ return x.Creator
+ }
+ return ""
+}
+
+func (x *LogEntry) GetCreateTime() *timestamppb.Timestamp {
+ if x != nil {
+ return x.CreateTime
+ }
+ return nil
+}
+
+func (x *LogEntry) GetUpdateTime() *timestamppb.Timestamp {
+ if x != nil {
+ return x.UpdateTime
+ }
+ return nil
+}
+
+func (x *LogEntry) GetAction() LogEntry_Action {
+ if x != nil {
+ return x.Action
+ }
+ return LogEntry_ACTION_UNSPECIFIED
+}
+
+func (x *LogEntry) GetLevel() LogEntry_Level {
+ if x != nil {
+ return x.Level
+ }
+ return LogEntry_LEVEL_UNSPECIFIED
+}
+
+func (x *LogEntry) GetResourceName() string {
+ if x != nil {
+ return x.ResourceName
+ }
+ return ""
+}
+
+func (x *LogEntry) GetJsonPayload() *structpb.Struct {
+ if x != nil {
+ return x.JsonPayload
+ }
+ return nil
+}
+
+var File_v1_logging_service_proto protoreflect.FileDescriptor
+
+var file_v1_logging_service_proto_rawDesc = []byte{
+ 0x0a, 0x18, 0x76, 0x31, 0x2f, 0x6c, 0x6f, 0x67, 0x67, 0x69, 0x6e, 0x67, 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, 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, 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,
+ 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66,
+ 0x2f, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x0f, 0x76,
+ 0x31, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x82,
+ 0x01, 0x0a, 0x0f, 0x4c, 0x69, 0x73, 0x74, 0x4c, 0x6f, 0x67, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65,
+ 0x73, 0x74, 0x12, 0x1b, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01,
+ 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x12,
+ 0x16, 0x0a, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52,
+ 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 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, 0x77, 0x0a, 0x10, 0x4c, 0x69, 0x73, 0x74, 0x4c, 0x6f, 0x67, 0x73, 0x52,
+ 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3b, 0x0a, 0x0b, 0x6c, 0x6f, 0x67, 0x5f, 0x65,
+ 0x6e, 0x74, 0x72, 0x69, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x62,
+ 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x6f, 0x67, 0x45, 0x6e,
+ 0x74, 0x72, 0x79, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x0a, 0x6c, 0x6f, 0x67, 0x45, 0x6e, 0x74,
+ 0x72, 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, 0xc1, 0x09, 0x0a,
+ 0x08, 0x4c, 0x6f, 0x67, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x1d, 0x0a, 0x07, 0x63, 0x72, 0x65,
+ 0x61, 0x74, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x02, 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, 0x02, 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, 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, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x39, 0x0a, 0x06,
+ 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 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, 0x72, 0x79, 0x2e, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52,
+ 0x06, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x36, 0x0a, 0x05, 0x6c, 0x65, 0x76, 0x65, 0x6c,
+ 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1b, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73,
+ 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x6f, 0x67, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x2e, 0x4c, 0x65,
+ 0x76, 0x65, 0x6c, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x05, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x12,
+ 0x28, 0x0a, 0x0d, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65,
+ 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x0c, 0x72, 0x65, 0x73,
+ 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x3a, 0x0a, 0x0c, 0x6a, 0x73, 0x6f,
+ 0x6e, 0x5f, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32,
+ 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75,
+ 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x52, 0x0b, 0x6a, 0x73, 0x6f, 0x6e, 0x50, 0x61,
+ 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x22, 0xe4, 0x05, 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, 0x05, 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, 0x06, 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, 0x07, 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, 0x08, 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, 0x09, 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, 0x0a, 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, 0x0b, 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, 0x0c, 0x12, 0x35, 0x0a, 0x31, 0x41, 0x43, 0x49, 0x54, 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, 0x44, 0x41,
+ 0x54, 0x45, 0x5f, 0x55, 0x50, 0x44, 0x41, 0x54, 0x45, 0x10, 0x0d, 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, 0x0e, 0x12, 0x25, 0x0a,
+ 0x21, 0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x50, 0x52, 0x4f, 0x4a, 0x45, 0x43, 0x54, 0x5f,
+ 0x4d, 0x45, 0x4d, 0x42, 0x45, 0x52, 0x5f, 0x52, 0x4f, 0x4c, 0x45, 0x5f, 0x55, 0x50, 0x44, 0x41,
+ 0x54, 0x45, 0x10, 0x0f, 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, 0x10, 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, 0x11, 0x12, 0x23, 0x0a, 0x1f, 0x41, 0x43,
+ 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x50, 0x52, 0x4f, 0x4a, 0x45, 0x43, 0x54, 0x5f, 0x44, 0x54, 0x41,
+ 0x42, 0x41, 0x53, 0x45, 0x5f, 0x54, 0x52, 0x41, 0x4e, 0x53, 0x46, 0x45, 0x52, 0x10, 0x12, 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, 0x13, 0x12,
+ 0x1b, 0x0a, 0x17, 0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x53, 0x51, 0x4c, 0x5f, 0x45, 0x44,
+ 0x49, 0x54, 0x4f, 0x52, 0x5f, 0x51, 0x55, 0x45, 0x52, 0x59, 0x10, 0x14, 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, 0xab, 0x01, 0x0a, 0x0e, 0x4c, 0x6f, 0x67, 0x67, 0x69, 0x6e, 0x67, 0x53, 0x65, 0x72, 0x76,
+ 0x69, 0x63, 0x65, 0x12, 0x98, 0x01, 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, 0x4f, 0xda,
+ 0x41, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x40, 0x5a, 0x20,
+ 0x22, 0x1e, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x3d, 0x77, 0x6f,
+ 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x6c, 0x6f, 0x67, 0x73,
+ 0x22, 0x1c, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x3d, 0x70, 0x72,
+ 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x6c, 0x6f, 0x67, 0x73, 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_logging_service_proto_rawDescOnce sync.Once
+ file_v1_logging_service_proto_rawDescData = file_v1_logging_service_proto_rawDesc
+)
+
+func file_v1_logging_service_proto_rawDescGZIP() []byte {
+ file_v1_logging_service_proto_rawDescOnce.Do(func() {
+ file_v1_logging_service_proto_rawDescData = protoimpl.X.CompressGZIP(file_v1_logging_service_proto_rawDescData)
+ })
+ return file_v1_logging_service_proto_rawDescData
+}
+
+var file_v1_logging_service_proto_enumTypes = make([]protoimpl.EnumInfo, 2)
+var file_v1_logging_service_proto_msgTypes = make([]protoimpl.MessageInfo, 3)
+var file_v1_logging_service_proto_goTypes = []interface{}{
+ (LogEntry_Action)(0), // 0: bytebase.v1.LogEntry.Action
+ (LogEntry_Level)(0), // 1: bytebase.v1.LogEntry.Level
+ (*ListLogsRequest)(nil), // 2: bytebase.v1.ListLogsRequest
+ (*ListLogsResponse)(nil), // 3: bytebase.v1.ListLogsResponse
+ (*LogEntry)(nil), // 4: bytebase.v1.LogEntry
+ (*timestamppb.Timestamp)(nil), // 5: google.protobuf.Timestamp
+ (*structpb.Struct)(nil), // 6: google.protobuf.Struct
+}
+var file_v1_logging_service_proto_depIdxs = []int32{
+ 4, // 0: bytebase.v1.ListLogsResponse.log_entries:type_name -> bytebase.v1.LogEntry
+ 5, // 1: bytebase.v1.LogEntry.create_time:type_name -> google.protobuf.Timestamp
+ 5, // 2: bytebase.v1.LogEntry.update_time:type_name -> google.protobuf.Timestamp
+ 0, // 3: bytebase.v1.LogEntry.action:type_name -> bytebase.v1.LogEntry.Action
+ 1, // 4: bytebase.v1.LogEntry.level:type_name -> bytebase.v1.LogEntry.Level
+ 6, // 5: bytebase.v1.LogEntry.json_payload:type_name -> google.protobuf.Struct
+ 2, // 6: bytebase.v1.LoggingService.ListLogs:input_type -> bytebase.v1.ListLogsRequest
+ 3, // 7: bytebase.v1.LoggingService.ListLogs:output_type -> bytebase.v1.ListLogsResponse
+ 7, // [7:8] is the sub-list for method output_type
+ 6, // [6:7] 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() }
+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 {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_v1_logging_service_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*ListLogsResponse); 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[2].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*LogEntry); 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_logging_service_proto_rawDesc,
+ NumEnums: 2,
+ NumMessages: 3,
+ NumExtensions: 0,
+ NumServices: 1,
+ },
+ GoTypes: file_v1_logging_service_proto_goTypes,
+ DependencyIndexes: file_v1_logging_service_proto_depIdxs,
+ EnumInfos: file_v1_logging_service_proto_enumTypes,
+ MessageInfos: file_v1_logging_service_proto_msgTypes,
+ }.Build()
+ File_v1_logging_service_proto = out.File
+ file_v1_logging_service_proto_rawDesc = nil
+ file_v1_logging_service_proto_goTypes = nil
+ file_v1_logging_service_proto_depIdxs = nil
+}
diff --git a/proto/generated-go/v1/logging_service.pb.gw.go b/proto/generated-go/v1/logging_service.pb.gw.go
new file mode 100644
index 0000000000..3cb3d89570
--- /dev/null
+++ b/proto/generated-go/v1/logging_service.pb.gw.go
@@ -0,0 +1,328 @@
+// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT.
+// source: v1/logging_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
+
+var (
+ filter_LoggingService_ListLogs_0 = &utilities.DoubleArray{Encoding: map[string]int{"parent": 0}, Base: []int{1, 2, 0, 0}, Check: []int{0, 1, 2, 2}}
+)
+
+func request_LoggingService_ListLogs_0(ctx context.Context, marshaler runtime.Marshaler, client LoggingServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
+ var protoReq ListLogsRequest
+ 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_LoggingService_ListLogs_0); err != nil {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
+ }
+
+ msg, err := client.ListLogs(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
+ return msg, metadata, err
+
+}
+
+func local_request_LoggingService_ListLogs_0(ctx context.Context, marshaler runtime.Marshaler, server LoggingServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
+ var protoReq ListLogsRequest
+ 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_LoggingService_ListLogs_0); err != nil {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
+ }
+
+ msg, err := server.ListLogs(ctx, &protoReq)
+ return msg, metadata, err
+
+}
+
+var (
+ filter_LoggingService_ListLogs_1 = &utilities.DoubleArray{Encoding: map[string]int{"parent": 0}, Base: []int{1, 2, 0, 0}, Check: []int{0, 1, 2, 2}}
+)
+
+func request_LoggingService_ListLogs_1(ctx context.Context, marshaler runtime.Marshaler, client LoggingServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
+ var protoReq ListLogsRequest
+ 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_LoggingService_ListLogs_1); err != nil {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
+ }
+
+ msg, err := client.ListLogs(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
+ return msg, metadata, err
+
+}
+
+func local_request_LoggingService_ListLogs_1(ctx context.Context, marshaler runtime.Marshaler, server LoggingServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
+ var protoReq ListLogsRequest
+ 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_LoggingService_ListLogs_1); err != nil {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
+ }
+
+ msg, err := server.ListLogs(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.
+// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterLoggingServiceHandlerFromEndpoint instead.
+func RegisterLoggingServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server LoggingServiceServer) error {
+
+ mux.Handle("POST", pattern_LoggingService_ListLogs_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/ListLogs", runtime.WithHTTPPathPattern("/v1/{parent=projects/*}/logs"))
+ if err != nil {
+ runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ return
+ }
+ resp, md, err := local_request_LoggingService_ListLogs_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_ListLogs_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+
+ })
+
+ mux.Handle("POST", pattern_LoggingService_ListLogs_1, 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/ListLogs", runtime.WithHTTPPathPattern("/v1/{parent=workspaces/*}/logs"))
+ if err != nil {
+ runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ return
+ }
+ resp, md, err := local_request_LoggingService_ListLogs_1(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_ListLogs_1(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+
+ })
+
+ return nil
+}
+
+// RegisterLoggingServiceHandlerFromEndpoint is same as RegisterLoggingServiceHandler but
+// automatically dials to "endpoint" and closes the connection when "ctx" gets done.
+func RegisterLoggingServiceHandlerFromEndpoint(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 RegisterLoggingServiceHandler(ctx, mux, conn)
+}
+
+// RegisterLoggingServiceHandler registers the http handlers for service LoggingService to "mux".
+// The handlers forward requests to the grpc endpoint over "conn".
+func RegisterLoggingServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error {
+ return RegisterLoggingServiceHandlerClient(ctx, mux, NewLoggingServiceClient(conn))
+}
+
+// RegisterLoggingServiceHandlerClient registers the http handlers for service LoggingService
+// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "LoggingServiceClient".
+// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "LoggingServiceClient"
+// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in
+// "LoggingServiceClient" to call the correct interceptors.
+func RegisterLoggingServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client LoggingServiceClient) error {
+
+ mux.Handle("POST", pattern_LoggingService_ListLogs_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/ListLogs", runtime.WithHTTPPathPattern("/v1/{parent=projects/*}/logs"))
+ if err != nil {
+ runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ return
+ }
+ resp, md, err := request_LoggingService_ListLogs_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_ListLogs_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+
+ })
+
+ mux.Handle("POST", pattern_LoggingService_ListLogs_1, 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/ListLogs", runtime.WithHTTPPathPattern("/v1/{parent=workspaces/*}/logs"))
+ if err != nil {
+ runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ return
+ }
+ resp, md, err := request_LoggingService_ListLogs_1(annotatedContext, inboundMarshaler, client, req, pathParams)
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
+ if err != nil {
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
+ return
+ }
+
+ forward_LoggingService_ListLogs_1(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+
+ })
+
+ return nil
+}
+
+var (
+ pattern_LoggingService_ListLogs_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 2, 5, 2, 2, 3}, []string{"v1", "projects", "parent", "logs"}, ""))
+
+ pattern_LoggingService_ListLogs_1 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 2, 5, 2, 2, 3}, []string{"v1", "workspaces", "parent", "logs"}, ""))
+)
+
+var (
+ forward_LoggingService_ListLogs_0 = runtime.ForwardResponseMessage
+
+ forward_LoggingService_ListLogs_1 = runtime.ForwardResponseMessage
+)
diff --git a/proto/generated-go/v1/logging_service_grpc.pb.go b/proto/generated-go/v1/logging_service_grpc.pb.go
new file mode 100644
index 0000000000..d170320fbf
--- /dev/null
+++ b/proto/generated-go/v1/logging_service_grpc.pb.go
@@ -0,0 +1,109 @@
+// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
+// versions:
+// - protoc-gen-go-grpc v1.3.0
+// - protoc (unknown)
+// source: v1/logging_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
+
+const (
+ LoggingService_ListLogs_FullMethodName = "/bytebase.v1.LoggingService/ListLogs"
+)
+
+// LoggingServiceClient is the client API for LoggingService 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 LoggingServiceClient interface {
+ ListLogs(ctx context.Context, in *ListLogsRequest, opts ...grpc.CallOption) (*ListLogsResponse, error)
+}
+
+type loggingServiceClient struct {
+ cc grpc.ClientConnInterface
+}
+
+func NewLoggingServiceClient(cc grpc.ClientConnInterface) LoggingServiceClient {
+ return &loggingServiceClient{cc}
+}
+
+func (c *loggingServiceClient) ListLogs(ctx context.Context, in *ListLogsRequest, opts ...grpc.CallOption) (*ListLogsResponse, error) {
+ out := new(ListLogsResponse)
+ err := c.cc.Invoke(ctx, LoggingService_ListLogs_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)
+ mustEmbedUnimplementedLoggingServiceServer()
+}
+
+// UnimplementedLoggingServiceServer must be embedded to have forward compatible implementations.
+type UnimplementedLoggingServiceServer struct {
+}
+
+func (UnimplementedLoggingServiceServer) ListLogs(context.Context, *ListLogsRequest) (*ListLogsResponse, error) {
+ return nil, status.Errorf(codes.Unimplemented, "method ListLogs not implemented")
+}
+func (UnimplementedLoggingServiceServer) mustEmbedUnimplementedLoggingServiceServer() {}
+
+// UnsafeLoggingServiceServer may be embedded to opt out of forward compatibility for this service.
+// Use of this interface is not recommended, as added methods to LoggingServiceServer will
+// result in compilation errors.
+type UnsafeLoggingServiceServer interface {
+ mustEmbedUnimplementedLoggingServiceServer()
+}
+
+func RegisterLoggingServiceServer(s grpc.ServiceRegistrar, srv LoggingServiceServer) {
+ s.RegisterService(&LoggingService_ServiceDesc, srv)
+}
+
+func _LoggingService_ListLogs_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+ in := new(ListLogsRequest)
+ if err := dec(in); err != nil {
+ return nil, err
+ }
+ if interceptor == nil {
+ return srv.(LoggingServiceServer).ListLogs(ctx, in)
+ }
+ info := &grpc.UnaryServerInfo{
+ Server: srv,
+ FullMethod: LoggingService_ListLogs_FullMethodName,
+ }
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+ return srv.(LoggingServiceServer).ListLogs(ctx, req.(*ListLogsRequest))
+ }
+ 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)
+var LoggingService_ServiceDesc = grpc.ServiceDesc{
+ ServiceName: "bytebase.v1.LoggingService",
+ HandlerType: (*LoggingServiceServer)(nil),
+ Methods: []grpc.MethodDesc{
+ {
+ MethodName: "ListLogs",
+ Handler: _LoggingService_ListLogs_Handler,
+ },
+ },
+ Streams: []grpc.StreamDesc{},
+ Metadata: "v1/logging_service.proto",
+}
diff --git a/proto/v1/logging_service.proto b/proto/v1/logging_service.proto
new file mode 100644
index 0000000000..9d8ddea214
--- /dev/null
+++ b/proto/v1/logging_service.proto
@@ -0,0 +1,162 @@
+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/wrappers.proto";
+import "google/protobuf/timestamp.proto";
+import "google/protobuf/struct.proto";
+
+import "v1/common.proto";
+
+option go_package = "generated-go/v1";
+
+service LoggingService {
+ rpc ListLogs(ListLogsRequest) returns (ListLogsResponse) {
+ option (google.api.http) = {
+ post: "/v1/{parent=projects/*}/logs"
+ additional_bindings: {
+ post: "/v1/{parent=workspaces/*}/logs"
+ }
+ };
+ option (google.api.method_signature) = "parent";
+ }
+}
+
+message ListLogsRequest {
+ // The parent resource name.
+ // Format:
+ // projects/{project}
+ // workspaces/{workspace}
+ string parent = 1 [(google.api.field_behavior) = REQUIRED];
+
+ // filter is the filter to apply on the list logs request,
+ // follow the [ebnf](https://en.wikipedia.org/wiki/Extended_Backus%E2%80%93Naur_form) syntax.
+ // The field only support in filter:
+ // - creator
+ // - container
+ // - level
+ // - action
+ // For example:
+ // List the logs of type 'ACTION_ISSUE_COMMENT_CREATE' in issue/123: 'action="ACTION_ISSUE_COMMENT_CREATE", container="issue/123"'
+ string filter = 2;
+
+ // Not used. The maximum number of logs to return.
+ // The service may return fewer than this value.
+ // If unspecified, at most 100 log entries will be returned.
+ // The maximum value is 1000; values above 1000 will be coerced to 1000.
+ int32 page_size = 3;
+
+ // Not used. A page token, received from a previous `ListLogs` call.
+ // Provide this to retrieve the subsequent page.
+ string page_token = 4;
+}
+
+message ListLogsResponse {
+ // The list of log entries.
+ repeated LogEntry log_entries = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
+
+ // A token to retrieve next page of log entries.
+ // Pass this value in the page_token field in the subsequent call to `ListLogs` method
+ // to retrieve the next page of log entries.
+ string next_page_token = 2;
+}
+
+message LogEntry {
+ // The creator of the log entry.
+ // Format: user:{emailid}
+ string creator = 1 [(google.api.field_behavior) = REQUIRED];
+
+ // The timestamp when the backup resource was created initally.
+ google.protobuf.Timestamp create_time = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
+
+ // The timestamp when the backup resource was updated.
+ google.protobuf.Timestamp update_time = 3 [(google.api.field_behavior) = OUTPUT_ONLY];
+
+ enum Action {
+ ACTION_UNSPECIFIED = 0;
+ // In worksapce resource only.
+ //
+ // ACTION_MEMBER_CREATE is the type for creating a new member.
+ ACTION_MEMBER_CREATE = 1;
+ // ACTION_MEMBER_ROLE_UPDATE is the type for updating a member's role.
+ ACTION_MEMBER_ROLE_UPDATE = 2;
+ // ACTION_MEMBER_ACTIVATE_UPDATE is the type for activating members.
+ ACTION_MEMBER_ACTIVATE = 3;
+ // ACTION_MEMBER_DEACTIVE is the type for deactiving members.
+ ACTION_MEMBER_DEACTIVE = 4;
+
+ // In project resource only.
+ //
+ // ACTION_ISSUE_CREATE is the type for creating a new issue.
+ ACTION_ISSUE_CREATE = 5;
+ // ACTION_ISSUE_COMMENT_CREATE is the type for creating a new comment on an issue.
+ ACTION_ISSUE_COMMENT_CREATE = 6;
+ // ACTION_ISSUE_FIELD_UPDATE is the type for updating an issue's field.
+ ACTION_ISSUE_FIELD_UPDATE = 7;
+ // ACTION_ISSUE_STATUS_UPDATE is the type for updating an issue's status.
+ ACTION_ISSUE_STATUS_UPDATE = 8;
+
+ // ACTION_PIPELINE_STAGE_STATUS_UPDATE is the type for stage begins or ends.
+ ACTION_PIPELINE_STAGE_STATUS_UPDATE = 9;
+ // ACTION_PIPELINE_TASK_STATUS_UPDATE is the type for updating pipeline task status.
+ ACTION_PIPELINE_TASK_STATUS_UPDATE = 10;
+ // ACTION_PIPELINE_TASK_FILE_COMMIT is the type for committing pipeline task files.
+ ACTION_PIPELINE_TASK_FILE_COMMIT = 11;
+ // ACTION_PIPELINE_TASK_STATEMENT_UPDATE is the type for updating pipeline task SQL statement.
+ ACTION_PIPELINE_TASK_STATEMENT_UPDATE = 12;
+ // ACTION_PIPELINE_TASK_EARLIEST_ALLOWED_DATE_UPDATE is the type for updating pipeline task the earliest allowed time.
+ ACITON_PIPELINE_TASK_EARLIEST_ALLOWED_DATE_UPDATE = 13;
+
+ // ACTION_PROJECT_MEMBER_CREATE is the type for creating a new project member.
+ ACTION_PROJECT_MEMBER_CREATE = 14;
+ // ACTION_PROJECT_MEMBER_ROLE_UPDATE is the type for updating a project member's role.
+ ACTION_PROJECT_MEMBER_ROLE_UPDATE = 15;
+ // ACTION_PROJECT_MEMBER_DELETE is the type for deleting a project member.
+ ACTION_PROJECT_MEMBER_DELETE = 16;
+
+ // ACTION_PROJECT_REPOSITORY_PUSH is the type for pushing to a project repository.
+ ACTION_PROJECT_REPOSITORY_PUSH = 17;
+
+ // ACTION_PROJECT_DATABASE_TRANSFER is the type for transferring a database to a project.
+ ACTION_PROJECT_DTABASE_TRANSFER = 18;
+
+ // ACTION_PROJECT_DATABASE_RECOVERY_PITR_DONE is the type for database PITR recovery done.
+ ACTION_PROJECT_DATABASE_RECOVERY_PITR_DONE = 19;
+
+ // Both in workspace and project resource.
+ //
+ // ACTION_SQL_EDITOR_QUERY is the type for SQL editor query.
+ // If user runs SQL in Read-only mode, this action will belong to project resource.
+ // If user runs SQL in Read-write mode, this action will belong to workspace resource.
+ ACTION_SQL_EDITOR_QUERY = 20;
+ }
+ Action action = 4 [(google.api.field_behavior) = REQUIRED];
+
+ enum Level {
+ LEVEL_UNSPECIFIED = 0;
+ // LEVEL_INFO is the type for information.
+ LEVEL_INFO = 1;
+ // LEVEL_WARNING is the type for warning.
+ LEVEL_WARNING = 2;
+ // LEVEL_ERROR is the type for error.
+ LEVEL_ERROR = 3;
+ }
+ Level level = 5 [(google.api.field_behavior) = OUTPUT_ONLY];
+
+ // The name of the resource associated with this log entry. For example, the resource user associated with log entry type of "ACTION_MEMBER_CREATE".
+ // Format:
+ // For ACTION_MEMBER_*: user:emailid
+ // For ACTION_ISSUE_*: issues/{issue}
+ // For ACTION_PIPELINE_*: pipelines/{pipeline}
+ // For ACTION_PROJECT_*: projects/{project}
+ // For ACTION_SQL_EDITOR_QUERY: workspaces/{workspace} OR projects/{project}
+ string resource_name = 6 [(google.api.field_behavior) = REQUIRED];
+
+ // The payload of the log entry.
+ google.protobuf.Struct json_payload = 7;
+}