Database governance built for humans and agents — controlling changes and access across every major database.
Go cicddata-governancedata-maskingdata-securitydatabase-accessdatabase-governancedevopsdevsecopsflywaygitopsliquibasemongodbmysqloraclepostgresqlschema-migrationssecuritysql-clientsqlservertidb
refactor: risk proto, flatten&remove risk rule (#5166)
p0nyd00015bdda05
diff --git a/frontend/src/types/proto/google/longrunning/operations.ts b/frontend/src/types/proto/google/longrunning/operations.tsdeleted file mode 100644index 10fd7c279f..0000000000--- a/frontend/src/types/proto/google/longrunning/operations.ts+++ /dev/null@@ -1,855 +0,0 @@-/* eslint-disable */-import type { CallContext, CallOptions } from "nice-grpc-common";-import * as _m0 from "protobufjs/minimal";-import { Any } from "../protobuf/any";-import { Duration } from "../protobuf/duration";-import { Empty } from "../protobuf/empty";-import { Status } from "../rpc/status";--export const protobufPackage = "google.longrunning";--/**- * This resource represents a long-running operation that is the result of a- * network API call.- */-export interface Operation {- /**- * The server-assigned name, which is only unique within the same service that- * originally returns it. If you use the default HTTP mapping, the- * `name` should be a resource name ending with `operations/{unique_id}`.- */- name: string;- /**- * Service-specific metadata associated with the operation. It typically- * contains progress information and common metadata such as create time.- * Some services might not provide such metadata. Any method that returns a- * long-running operation should document the metadata type, if any.- */- metadata?: Any;- /**- * If the value is `false`, it means the operation is still in progress.- * If `true`, the operation is completed, and either `error` or `response` is- * available.- */- done: boolean;- /** The error result of the operation in case of failure or cancellation. */- error?:- | Status- | undefined;- /**- * The normal response of the operation in case of success. If the original- * method returns no data on success, such as `Delete`, the response is- * `google.protobuf.Empty`. If the original method is standard- * `Get`/`Create`/`Update`, the response should be the resource. For other- * methods, the response should have the type `XxxResponse`, where `Xxx`- * is the original method name. For example, if the original method name- * is `TakeSnapshot()`, the inferred response type is- * `TakeSnapshotResponse`.- */- response?: Any | undefined;-}--/** The request message for [Operations.GetOperation][google.longrunning.Operations.GetOperation]. */-export interface GetOperationRequest {- /** The name of the operation resource. */- name: string;-}--/** The request message for [Operations.ListOperations][google.longrunning.Operations.ListOperations]. */-export interface ListOperationsRequest {- /** The name of the operation's parent resource. */- name: string;- /** The standard list filter. */- filter: string;- /** The standard list page size. */- pageSize: number;- /** The standard list page token. */- pageToken: string;-}--/** The response message for [Operations.ListOperations][google.longrunning.Operations.ListOperations]. */-export interface ListOperationsResponse {- /** A list of operations that matches the specified filter in the request. */- operations: Operation[];- /** The standard List next-page token. */- nextPageToken: string;-}--/** The request message for [Operations.CancelOperation][google.longrunning.Operations.CancelOperation]. */-export interface CancelOperationRequest {- /** The name of the operation resource to be cancelled. */- name: string;-}--/** The request message for [Operations.DeleteOperation][google.longrunning.Operations.DeleteOperation]. */-export interface DeleteOperationRequest {- /** The name of the operation resource to be deleted. */- name: string;-}--/** The request message for [Operations.WaitOperation][google.longrunning.Operations.WaitOperation]. */-export interface WaitOperationRequest {- /** The name of the operation resource to wait on. */- name: string;- /**- * The maximum duration to wait before timing out. If left blank, the wait- * will be at most the time permitted by the underlying HTTP/RPC protocol.- * If RPC context deadline is also specified, the shorter one will be used.- */- timeout?: Duration;-}--/**- * A message representing the message types used by a long-running operation.- *- * Example:- *- * rpc LongRunningRecognize(LongRunningRecognizeRequest)- * returns (google.longrunning.Operation) {- * option (google.longrunning.operation_info) = {- * response_type: "LongRunningRecognizeResponse"- * metadata_type: "LongRunningRecognizeMetadata"- * };- * }- */-export interface OperationInfo {- /**- * Required. The message name of the primary return type for this- * long-running operation.- * This type will be used to deserialize the LRO's response.- *- * If the response is in a different package from the rpc, a fully-qualified- * message name must be used (e.g. `google.protobuf.Struct`).- *- * Note: Altering this value constitutes a breaking change.- */- responseType: string;- /**- * Required. The message name of the metadata type for this long-running- * operation.- *- * If the response is in a different package from the rpc, a fully-qualified- * message name must be used (e.g. `google.protobuf.Struct`).- *- * Note: Altering this value constitutes a breaking change.- */- metadataType: string;-}--function createBaseOperation(): Operation {- return { name: "", metadata: undefined, done: false, error: undefined, response: undefined };-}--export const Operation = {- encode(message: Operation, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {- if (message.name !== "") {- writer.uint32(10).string(message.name);- }- if (message.metadata !== undefined) {- Any.encode(message.metadata, writer.uint32(18).fork()).ldelim();- }- if (message.done === true) {- writer.uint32(24).bool(message.done);- }- if (message.error !== undefined) {- Status.encode(message.error, writer.uint32(34).fork()).ldelim();- }- if (message.response !== undefined) {- Any.encode(message.response, writer.uint32(42).fork()).ldelim();- }- return writer;- },-- decode(input: _m0.Reader | Uint8Array, length?: number): Operation {- const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);- let end = length === undefined ? reader.len : reader.pos + length;- const message = createBaseOperation();- while (reader.pos < end) {- const tag = reader.uint32();- switch (tag >>> 3) {- case 1:- message.name = reader.string();- break;- case 2:- message.metadata = Any.decode(reader, reader.uint32());- break;- case 3:- message.done = reader.bool();- break;- case 4:- message.error = Status.decode(reader, reader.uint32());- break;- case 5:- message.response = Any.decode(reader, reader.uint32());- break;- default:- reader.skipType(tag & 7);- break;- }- }- return message;- },-- fromJSON(object: any): Operation {- return {- name: isSet(object.name) ? String(object.name) : "",- metadata: isSet(object.metadata) ? Any.fromJSON(object.metadata) : undefined,- done: isSet(object.done) ? Boolean(object.done) : false,- error: isSet(object.error) ? Status.fromJSON(object.error) : undefined,- response: isSet(object.response) ? Any.fromJSON(object.response) : undefined,- };- },-- toJSON(message: Operation): unknown {- const obj: any = {};- message.name !== undefined && (obj.name = message.name);- message.metadata !== undefined && (obj.metadata = message.metadata ? Any.toJSON(message.metadata) : undefined);- message.done !== undefined && (obj.done = message.done);- message.error !== undefined && (obj.error = message.error ? Status.toJSON(message.error) : undefined);- message.response !== undefined && (obj.response = message.response ? Any.toJSON(message.response) : undefined);- return obj;- },-- fromPartial(object: DeepPartial<Operation>): Operation {- const message = createBaseOperation();- message.name = object.name ?? "";- message.metadata = (object.metadata !== undefined && object.metadata !== null)- ? Any.fromPartial(object.metadata)- : undefined;- message.done = object.done ?? false;- message.error = (object.error !== undefined && object.error !== null)- ? Status.fromPartial(object.error)- : undefined;- message.response = (object.response !== undefined && object.response !== null)- ? Any.fromPartial(object.response)- : undefined;- return message;- },-};--function createBaseGetOperationRequest(): GetOperationRequest {- return { name: "" };-}--export const GetOperationRequest = {- encode(message: GetOperationRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {- if (message.name !== "") {- writer.uint32(10).string(message.name);- }- return writer;- },-- decode(input: _m0.Reader | Uint8Array, length?: number): GetOperationRequest {- const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);- let end = length === undefined ? reader.len : reader.pos + length;- const message = createBaseGetOperationRequest();- while (reader.pos < end) {- const tag = reader.uint32();- switch (tag >>> 3) {- case 1:- message.name = reader.string();- break;- default:- reader.skipType(tag & 7);- break;- }- }- return message;- },-- fromJSON(object: any): GetOperationRequest {- return { name: isSet(object.name) ? String(object.name) : "" };- },-- toJSON(message: GetOperationRequest): unknown {- const obj: any = {};- message.name !== undefined && (obj.name = message.name);- return obj;- },-- fromPartial(object: DeepPartial<GetOperationRequest>): GetOperationRequest {- const message = createBaseGetOperationRequest();- message.name = object.name ?? "";- return message;- },-};--function createBaseListOperationsRequest(): ListOperationsRequest {- return { name: "", filter: "", pageSize: 0, pageToken: "" };-}--export const ListOperationsRequest = {- encode(message: ListOperationsRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {- if (message.name !== "") {- writer.uint32(34).string(message.name);- }- if (message.filter !== "") {- writer.uint32(10).string(message.filter);- }- if (message.pageSize !== 0) {- writer.uint32(16).int32(message.pageSize);- }- if (message.pageToken !== "") {- writer.uint32(26).string(message.pageToken);- }- return writer;- },-- decode(input: _m0.Reader | Uint8Array, length?: number): ListOperationsRequest {- const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);- let end = length === undefined ? reader.len : reader.pos + length;- const message = createBaseListOperationsRequest();- while (reader.pos < end) {- const tag = reader.uint32();- switch (tag >>> 3) {- case 4:- message.name = reader.string();- break;- case 1:- message.filter = reader.string();- break;- case 2:- message.pageSize = reader.int32();- break;- case 3:- message.pageToken = reader.string();- break;- default:- reader.skipType(tag & 7);- break;- }- }- return message;- },-- fromJSON(object: any): ListOperationsRequest {- return {- name: isSet(object.name) ? String(object.name) : "",- filter: isSet(object.filter) ? String(object.filter) : "",- pageSize: isSet(object.pageSize) ? Number(object.pageSize) : 0,- pageToken: isSet(object.pageToken) ? String(object.pageToken) : "",- };- },-- toJSON(message: ListOperationsRequest): unknown {- const obj: any = {};- message.name !== undefined && (obj.name = message.name);- 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<ListOperationsRequest>): ListOperationsRequest {- const message = createBaseListOperationsRequest();- message.name = object.name ?? "";- message.filter = object.filter ?? "";- message.pageSize = object.pageSize ?? 0;- message.pageToken = object.pageToken ?? "";- return message;- },-};--function createBaseListOperationsResponse(): ListOperationsResponse {- return { operations: [], nextPageToken: "" };-}--export const ListOperationsResponse = {- encode(message: ListOperationsResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {- for (const v of message.operations) {- Operation.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): ListOperationsResponse {- const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);- let end = length === undefined ? reader.len : reader.pos + length;- const message = createBaseListOperationsResponse();- while (reader.pos < end) {- const tag = reader.uint32();- switch (tag >>> 3) {- case 1:- message.operations.push(Operation.decode(reader, reader.uint32()));- break;- case 2:- message.nextPageToken = reader.string();- break;- default:- reader.skipType(tag & 7);- break;- }- }- return message;- },-- fromJSON(object: any): ListOperationsResponse {- return {- operations: Array.isArray(object?.operations) ? object.operations.map((e: any) => Operation.fromJSON(e)) : [],- nextPageToken: isSet(object.nextPageToken) ? String(object.nextPageToken) : "",- };- },-- toJSON(message: ListOperationsResponse): unknown {- const obj: any = {};- if (message.operations) {- obj.operations = message.operations.map((e) => e ? Operation.toJSON(e) : undefined);- } else {- obj.operations = [];- }- message.nextPageToken !== undefined && (obj.nextPageToken = message.nextPageToken);- return obj;- },-- fromPartial(object: DeepPartial<ListOperationsResponse>): ListOperationsResponse {- const message = createBaseListOperationsResponse();- message.operations = object.operations?.map((e) => Operation.fromPartial(e)) || [];- message.nextPageToken = object.nextPageToken ?? "";- return message;- },-};--function createBaseCancelOperationRequest(): CancelOperationRequest {- return { name: "" };-}--export const CancelOperationRequest = {- encode(message: CancelOperationRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {- if (message.name !== "") {- writer.uint32(10).string(message.name);- }- return writer;- },-- decode(input: _m0.Reader | Uint8Array, length?: number): CancelOperationRequest {- const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);- let end = length === undefined ? reader.len : reader.pos + length;- const message = createBaseCancelOperationRequest();- while (reader.pos < end) {- const tag = reader.uint32();- switch (tag >>> 3) {- case 1:- message.name = reader.string();- break;- default:- reader.skipType(tag & 7);- break;- }- }- return message;- },-- fromJSON(object: any): CancelOperationRequest {- return { name: isSet(object.name) ? String(object.name) : "" };- },-- toJSON(message: CancelOperationRequest): unknown {- const obj: any = {};- message.name !== undefined && (obj.name = message.name);- return obj;- },-- fromPartial(object: DeepPartial<CancelOperationRequest>): CancelOperationRequest {- const message = createBaseCancelOperationRequest();- message.name = object.name ?? "";- return message;- },-};--function createBaseDeleteOperationRequest(): DeleteOperationRequest {- return { name: "" };-}--export const DeleteOperationRequest = {- encode(message: DeleteOperationRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {- if (message.name !== "") {- writer.uint32(10).string(message.name);- }- return writer;- },-- decode(input: _m0.Reader | Uint8Array, length?: number): DeleteOperationRequest {- const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);- let end = length === undefined ? reader.len : reader.pos + length;- const message = createBaseDeleteOperationRequest();- while (reader.pos < end) {- const tag = reader.uint32();- switch (tag >>> 3) {- case 1:- message.name = reader.string();- break;- default:- reader.skipType(tag & 7);- break;- }- }- return message;- },-- fromJSON(object: any): DeleteOperationRequest {- return { name: isSet(object.name) ? String(object.name) : "" };- },-- toJSON(message: DeleteOperationRequest): unknown {- const obj: any = {};- message.name !== undefined && (obj.name = message.name);- return obj;- },-- fromPartial(object: DeepPartial<DeleteOperationRequest>): DeleteOperationRequest {- const message = createBaseDeleteOperationRequest();- message.name = object.name ?? "";- return message;- },-};--function createBaseWaitOperationRequest(): WaitOperationRequest {- return { name: "", timeout: undefined };-}--export const WaitOperationRequest = {- encode(message: WaitOperationRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {- if (message.name !== "") {- writer.uint32(10).string(message.name);- }- if (message.timeout !== undefined) {- Duration.encode(message.timeout, writer.uint32(18).fork()).ldelim();- }- return writer;- },-- decode(input: _m0.Reader | Uint8Array, length?: number): WaitOperationRequest {- const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);- let end = length === undefined ? reader.len : reader.pos + length;- const message = createBaseWaitOperationRequest();- while (reader.pos < end) {- const tag = reader.uint32();- switch (tag >>> 3) {- case 1:- message.name = reader.string();- break;- case 2:- message.timeout = Duration.decode(reader, reader.uint32());- break;- default:- reader.skipType(tag & 7);- break;- }- }- return message;- },-- fromJSON(object: any): WaitOperationRequest {- return {- name: isSet(object.name) ? String(object.name) : "",- timeout: isSet(object.timeout) ? Duration.fromJSON(object.timeout) : undefined,- };- },-- toJSON(message: WaitOperationRequest): unknown {- const obj: any = {};- message.name !== undefined && (obj.name = message.name);- message.timeout !== undefined && (obj.timeout = message.timeout ? Duration.toJSON(message.timeout) : undefined);- return obj;- },-- fromPartial(object: DeepPartial<WaitOperationRequest>): WaitOperationRequest {- const message = createBaseWaitOperationRequest();- message.name = object.name ?? "";- message.timeout = (object.timeout !== undefined && object.timeout !== null)- ? Duration.fromPartial(object.timeout)- : undefined;- return message;- },-};--function createBaseOperationInfo(): OperationInfo {- return { responseType: "", metadataType: "" };-}--export const OperationInfo = {- encode(message: OperationInfo, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {- if (message.responseType !== "") {- writer.uint32(10).string(message.responseType);- }- if (message.metadataType !== "") {- writer.uint32(18).string(message.metadataType);- }- return writer;- },-- decode(input: _m0.Reader | Uint8Array, length?: number): OperationInfo {- const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);- let end = length === undefined ? reader.len : reader.pos + length;- const message = createBaseOperationInfo();- while (reader.pos < end) {- const tag = reader.uint32();- switch (tag >>> 3) {- case 1:- message.responseType = reader.string();- break;- case 2:- message.metadataType = reader.string();- break;- default:- reader.skipType(tag & 7);- break;- }- }- return message;- },-- fromJSON(object: any): OperationInfo {- return {- responseType: isSet(object.responseType) ? String(object.responseType) : "",- metadataType: isSet(object.metadataType) ? String(object.metadataType) : "",- };- },-- toJSON(message: OperationInfo): unknown {- const obj: any = {};- message.responseType !== undefined && (obj.responseType = message.responseType);- message.metadataType !== undefined && (obj.metadataType = message.metadataType);- return obj;- },-- fromPartial(object: DeepPartial<OperationInfo>): OperationInfo {- const message = createBaseOperationInfo();- message.responseType = object.responseType ?? "";- message.metadataType = object.metadataType ?? "";- return message;- },-};--/**- * Manages long-running operations with an API service.- *- * When an API method normally takes long time to complete, it can be designed- * to return [Operation][google.longrunning.Operation] to the client, and the client can use this- * interface to receive the real response asynchronously by polling the- * operation resource, or pass the operation resource to another API (such as- * Google Cloud Pub/Sub API) to receive the response. Any API service that- * returns long-running operations should implement the `Operations` interface- * so developers can have a consistent client experience.- */-export type OperationsDefinition = typeof OperationsDefinition;-export const OperationsDefinition = {- name: "Operations",- fullName: "google.longrunning.Operations",- methods: {- /**- * Lists operations that match the specified filter in the request. If the- * server doesn't support this method, it returns `UNIMPLEMENTED`.- *- * NOTE: the `name` binding allows API services to override the binding- * to use different resource name schemes, such as `users/* /operations`. To- * override the binding, API services can add a binding such as- * `"/v1/{name=users/*}/operations"` to their service configuration.- * For backwards compatibility, the default name includes the operations- * collection id, however overriding users must ensure the name binding- * is the parent resource, without the operations collection id.- */- listOperations: {- name: "ListOperations",- requestType: ListOperationsRequest,- requestStream: false,- responseType: ListOperationsResponse,- responseStream: false,- options: {},- },- /**- * Gets the latest state of a long-running operation. Clients can use this- * method to poll the operation result at intervals as recommended by the API- * service.- */- getOperation: {- name: "GetOperation",- requestType: GetOperationRequest,- requestStream: false,- responseType: Operation,- responseStream: false,- options: {},- },- /**- * Deletes a long-running operation. This method indicates that the client is- * no longer interested in the operation result. It does not cancel the- * operation. If the server doesn't support this method, it returns- * `google.rpc.Code.UNIMPLEMENTED`.- */- deleteOperation: {- name: "DeleteOperation",- requestType: DeleteOperationRequest,- requestStream: false,- responseType: Empty,- responseStream: false,- options: {},- },- /**- * Starts asynchronous cancellation on a long-running operation. The server- * makes a best effort to cancel the operation, but success is not- * guaranteed. If the server doesn't support this method, it returns- * `google.rpc.Code.UNIMPLEMENTED`. Clients can use- * [Operations.GetOperation][google.longrunning.Operations.GetOperation] or- * other methods to check whether the cancellation succeeded or whether the- * operation completed despite cancellation. On successful cancellation,- * the operation is not deleted; instead, it becomes an operation with- * an [Operation.error][google.longrunning.Operation.error] value with a [google.rpc.Status.code][google.rpc.Status.code] of 1,- * corresponding to `Code.CANCELLED`.- */- cancelOperation: {- name: "CancelOperation",- requestType: CancelOperationRequest,- requestStream: false,- responseType: Empty,- responseStream: false,- options: {},- },- /**- * Waits until the specified long-running operation is done or reaches at most- * a specified timeout, returning the latest state. If the operation is- * already done, the latest state is immediately returned. If the timeout- * specified is greater than the default HTTP/RPC timeout, the HTTP/RPC- * timeout is used. If the server does not support this method, it returns- * `google.rpc.Code.UNIMPLEMENTED`.- * Note that this method is on a best-effort basis. It may return the latest- * state before the specified timeout (including immediately), meaning even an- * immediate response is no guarantee that the operation is done.- */- waitOperation: {- name: "WaitOperation",- requestType: WaitOperationRequest,- requestStream: false,- responseType: Operation,- responseStream: false,- options: {},- },- },-} as const;--export interface OperationsServiceImplementation<CallContextExt = {}> {- /**- * Lists operations that match the specified filter in the request. If the- * server doesn't support this method, it returns `UNIMPLEMENTED`.- *- * NOTE: the `name` binding allows API services to override the binding- * to use different resource name schemes, such as `users/* /operations`. To- * override the binding, API services can add a binding such as- * `"/v1/{name=users/*}/operations"` to their service configuration.- * For backwards compatibility, the default name includes the operations- * collection id, however overriding users must ensure the name binding- * is the parent resource, without the operations collection id.- */- listOperations(- request: ListOperationsRequest,- context: CallContext & CallContextExt,- ): Promise<DeepPartial<ListOperationsResponse>>;- /**- * Gets the latest state of a long-running operation. Clients can use this- * method to poll the operation result at intervals as recommended by the API- * service.- */- getOperation(request: GetOperationRequest, context: CallContext & CallContextExt): Promise<DeepPartial<Operation>>;- /**- * Deletes a long-running operation. This method indicates that the client is- * no longer interested in the operation result. It does not cancel the- * operation. If the server doesn't support this method, it returns- * `google.rpc.Code.UNIMPLEMENTED`.- */- deleteOperation(request: DeleteOperationRequest, context: CallContext & CallContextExt): Promise<DeepPartial<Empty>>;- /**- * Starts asynchronous cancellation on a long-running operation. The server- * makes a best effort to cancel the operation, but success is not- * guaranteed. If the server doesn't support this method, it returns- * `google.rpc.Code.UNIMPLEMENTED`. Clients can use- * [Operations.GetOperation][google.longrunning.Operations.GetOperation] or- * other methods to check whether the cancellation succeeded or whether the- * operation completed despite cancellation. On successful cancellation,- * the operation is not deleted; instead, it becomes an operation with- * an [Operation.error][google.longrunning.Operation.error] value with a [google.rpc.Status.code][google.rpc.Status.code] of 1,- * corresponding to `Code.CANCELLED`.- */- cancelOperation(request: CancelOperationRequest, context: CallContext & CallContextExt): Promise<DeepPartial<Empty>>;- /**- * Waits until the specified long-running operation is done or reaches at most- * a specified timeout, returning the latest state. If the operation is- * already done, the latest state is immediately returned. If the timeout- * specified is greater than the default HTTP/RPC timeout, the HTTP/RPC- * timeout is used. If the server does not support this method, it returns- * `google.rpc.Code.UNIMPLEMENTED`.- * Note that this method is on a best-effort basis. It may return the latest- * state before the specified timeout (including immediately), meaning even an- * immediate response is no guarantee that the operation is done.- */- waitOperation(request: WaitOperationRequest, context: CallContext & CallContextExt): Promise<DeepPartial<Operation>>;-}--export interface OperationsClient<CallOptionsExt = {}> {- /**- * Lists operations that match the specified filter in the request. If the- * server doesn't support this method, it returns `UNIMPLEMENTED`.- *- * NOTE: the `name` binding allows API services to override the binding- * to use different resource name schemes, such as `users/* /operations`. To- * override the binding, API services can add a binding such as- * `"/v1/{name=users/*}/operations"` to their service configuration.- * For backwards compatibility, the default name includes the operations- * collection id, however overriding users must ensure the name binding- * is the parent resource, without the operations collection id.- */- listOperations(- request: DeepPartial<ListOperationsRequest>,- options?: CallOptions & CallOptionsExt,- ): Promise<ListOperationsResponse>;- /**- * Gets the latest state of a long-running operation. Clients can use this- * method to poll the operation result at intervals as recommended by the API- * service.- */- getOperation(request: DeepPartial<GetOperationRequest>, options?: CallOptions & CallOptionsExt): Promise<Operation>;- /**- * Deletes a long-running operation. This method indicates that the client is- * no longer interested in the operation result. It does not cancel the- * operation. If the server doesn't support this method, it returns- * `google.rpc.Code.UNIMPLEMENTED`.- */- deleteOperation(request: DeepPartial<DeleteOperationRequest>, options?: CallOptions & CallOptionsExt): Promise<Empty>;- /**- * Starts asynchronous cancellation on a long-running operation. The server- * makes a best effort to cancel the operation, but success is not- * guaranteed. If the server doesn't support this method, it returns- * `google.rpc.Code.UNIMPLEMENTED`. Clients can use- * [Operations.GetOperation][google.longrunning.Operations.GetOperation] or- * other methods to check whether the cancellation succeeded or whether the- * operation completed despite cancellation. On successful cancellation,- * the operation is not deleted; instead, it becomes an operation with- * an [Operation.error][google.longrunning.Operation.error] value with a [google.rpc.Status.code][google.rpc.Status.code] of 1,- * corresponding to `Code.CANCELLED`.- */- cancelOperation(request: DeepPartial<CancelOperationRequest>, options?: CallOptions & CallOptionsExt): Promise<Empty>;- /**- * Waits until the specified long-running operation is done or reaches at most- * a specified timeout, returning the latest state. If the operation is- * already done, the latest state is immediately returned. If the timeout- * specified is greater than the default HTTP/RPC timeout, the HTTP/RPC- * timeout is used. If the server does not support this method, it returns- * `google.rpc.Code.UNIMPLEMENTED`.- * Note that this method is on a best-effort basis. It may return the latest- * state before the specified timeout (including immediately), meaning even an- * immediate response is no guarantee that the operation is done.- */- waitOperation(request: DeepPartial<WaitOperationRequest>, options?: CallOptions & CallOptionsExt): Promise<Operation>;-}--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 isSet(value: any): boolean {- return value !== null && value !== undefined;-}diff --git a/frontend/src/types/proto/google/protobuf/any.ts b/frontend/src/types/proto/google/protobuf/any.tsdeleted file mode 100644index 01118e5223..0000000000--- a/frontend/src/types/proto/google/protobuf/any.ts+++ /dev/null@@ -1,236 +0,0 @@-/* eslint-disable */-import * as _m0 from "protobufjs/minimal";--export const protobufPackage = "google.protobuf";--/**- * `Any` contains an arbitrary serialized protocol buffer message along with a- * URL that describes the type of the serialized message.- *- * Protobuf library provides support to pack/unpack Any values in the form- * of utility functions or additional generated methods of the Any type.- *- * Example 1: Pack and unpack a message in C++.- *- * Foo foo = ...;- * Any any;- * any.PackFrom(foo);- * ...- * if (any.UnpackTo(&foo)) {- * ...- * }- *- * Example 2: Pack and unpack a message in Java.- *- * Foo foo = ...;- * Any any = Any.pack(foo);- * ...- * if (any.is(Foo.class)) {- * foo = any.unpack(Foo.class);- * }- *- * Example 3: Pack and unpack a message in Python.- *- * foo = Foo(...)- * any = Any()- * any.Pack(foo)- * ...- * if any.Is(Foo.DESCRIPTOR):- * any.Unpack(foo)- * ...- *- * Example 4: Pack and unpack a message in Go- *- * foo := &pb.Foo{...}- * any, err := anypb.New(foo)- * if err != nil {- * ...- * }- * ...- * foo := &pb.Foo{}- * if err := any.UnmarshalTo(foo); err != nil {- * ...- * }- *- * The pack methods provided by protobuf library will by default use- * 'type.googleapis.com/full.type.name' as the type URL and the unpack- * methods only use the fully qualified type name after the last '/'- * in the type URL, for example "foo.bar.com/x/y.z" will yield type- * name "y.z".- *- * JSON- *- * The JSON representation of an `Any` value uses the regular- * representation of the deserialized, embedded message, with an- * additional field `@type` which contains the type URL. Example:- *- * package google.profile;- * message Person {- * string first_name = 1;- * string last_name = 2;- * }- *- * {- * "@type": "type.googleapis.com/google.profile.Person",- * "firstName": <string>,- * "lastName": <string>- * }- *- * If the embedded message type is well-known and has a custom JSON- * representation, that representation will be embedded adding a field- * `value` which holds the custom JSON in addition to the `@type`- * field. Example (for message [google.protobuf.Duration][]):- *- * {- * "@type": "type.googleapis.com/google.protobuf.Duration",- * "value": "1.212s"- * }- */-export interface Any {- /**- * A URL/resource name that uniquely identifies the type of the serialized- * protocol buffer message. This string must contain at least- * one "/" character. The last segment of the URL's path must represent- * the fully qualified name of the type (as in- * `path/google.protobuf.Duration`). The name should be in a canonical form- * (e.g., leading "." is not accepted).- *- * In practice, teams usually precompile into the binary all types that they- * expect it to use in the context of Any. However, for URLs which use the- * scheme `http`, `https`, or no scheme, one can optionally set up a type- * server that maps type URLs to message definitions as follows:- *- * * If no scheme is provided, `https` is assumed.- * * An HTTP GET on the URL must yield a [google.protobuf.Type][]- * value in binary format, or produce an error.- * * Applications are allowed to cache lookup results based on the- * URL, or have them precompiled into a binary to avoid any- * lookup. Therefore, binary compatibility needs to be preserved- * on changes to types. (Use versioned type names to manage- * breaking changes.)- *- * Note: this functionality is not currently available in the official- * protobuf release, and it is not used for type URLs beginning with- * type.googleapis.com.- *- * Schemes other than `http`, `https` (or the empty scheme) might be- * used with implementation specific semantics.- */- typeUrl: string;- /** Must be a valid serialized protocol buffer of the above specified type. */- value: Uint8Array;-}--function createBaseAny(): Any {- return { typeUrl: "", value: new Uint8Array() };-}--export const Any = {- encode(message: Any, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {- if (message.typeUrl !== "") {- writer.uint32(10).string(message.typeUrl);- }- if (message.value.length !== 0) {- writer.uint32(18).bytes(message.value);- }- return writer;- },-- decode(input: _m0.Reader | Uint8Array, length?: number): Any {- const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);- let end = length === undefined ? reader.len : reader.pos + length;- const message = createBaseAny();- while (reader.pos < end) {- const tag = reader.uint32();- switch (tag >>> 3) {- case 1:- message.typeUrl = reader.string();- break;- case 2:- message.value = reader.bytes();- break;- default:- reader.skipType(tag & 7);- break;- }- }- return message;- },-- fromJSON(object: any): Any {- return {- typeUrl: isSet(object.typeUrl) ? String(object.typeUrl) : "",- value: isSet(object.value) ? bytesFromBase64(object.value) : new Uint8Array(),- };- },-- toJSON(message: Any): unknown {- const obj: any = {};- message.typeUrl !== undefined && (obj.typeUrl = message.typeUrl);- message.value !== undefined &&- (obj.value = base64FromBytes(message.value !== undefined ? message.value : new Uint8Array()));- return obj;- },-- fromPartial(object: DeepPartial<Any>): Any {- const message = createBaseAny();- message.typeUrl = object.typeUrl ?? "";- message.value = object.value ?? new Uint8Array();- return message;- },-};--declare var self: any | undefined;-declare var window: any | undefined;-declare var global: any | undefined;-var globalThis: any = (() => {- if (typeof globalThis !== "undefined") {- return globalThis;- }- if (typeof self !== "undefined") {- return self;- }- if (typeof window !== "undefined") {- return window;- }- if (typeof global !== "undefined") {- return global;- }- throw "Unable to locate global object";-})();--function bytesFromBase64(b64: string): Uint8Array {- if (globalThis.Buffer) {- return Uint8Array.from(globalThis.Buffer.from(b64, "base64"));- } else {- const bin = globalThis.atob(b64);- const arr = new Uint8Array(bin.length);- for (let i = 0; i < bin.length; ++i) {- arr[i] = bin.charCodeAt(i);- }- return arr;- }-}--function base64FromBytes(arr: Uint8Array): string {- if (globalThis.Buffer) {- return globalThis.Buffer.from(arr).toString("base64");- } else {- const bin: string[] = [];- arr.forEach((byte) => {- bin.push(String.fromCharCode(byte));- });- return globalThis.btoa(bin.join(""));- }-}--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 isSet(value: any): boolean {- return value !== null && value !== undefined;-}diff --git a/frontend/src/types/proto/google/rpc/status.ts b/frontend/src/types/proto/google/rpc/status.tsdeleted file mode 100644index d0bf4282a9..0000000000--- a/frontend/src/types/proto/google/rpc/status.ts+++ /dev/null@@ -1,116 +0,0 @@-/* eslint-disable */-import * as _m0 from "protobufjs/minimal";-import { Any } from "../protobuf/any";--export const protobufPackage = "google.rpc";--/**- * The `Status` type defines a logical error model that is suitable for- * different programming environments, including REST APIs and RPC APIs. It is- * used by [gRPC](https://github.com/grpc). Each `Status` message contains- * three pieces of data: error code, error message, and error details.- *- * You can find out more about this error model and how to work with it in the- * [API Design Guide](https://cloud.google.com/apis/design/errors).- */-export interface Status {- /**- * The status code, which should be an enum value of- * [google.rpc.Code][google.rpc.Code].- */- code: number;- /**- * A developer-facing error message, which should be in English. Any- * user-facing error message should be localized and sent in the- * [google.rpc.Status.details][google.rpc.Status.details] field, or localized- * by the client.- */- message: string;- /**- * A list of messages that carry the error details. There is a common set of- * message types for APIs to use.- */- details: Any[];-}--function createBaseStatus(): Status {- return { code: 0, message: "", details: [] };-}--export const Status = {- encode(message: Status, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {- if (message.code !== 0) {- writer.uint32(8).int32(message.code);- }- if (message.message !== "") {- writer.uint32(18).string(message.message);- }- for (const v of message.details) {- Any.encode(v!, writer.uint32(26).fork()).ldelim();- }- return writer;- },-- decode(input: _m0.Reader | Uint8Array, length?: number): Status {- const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);- let end = length === undefined ? reader.len : reader.pos + length;- const message = createBaseStatus();- while (reader.pos < end) {- const tag = reader.uint32();- switch (tag >>> 3) {- case 1:- message.code = reader.int32();- break;- case 2:- message.message = reader.string();- break;- case 3:- message.details.push(Any.decode(reader, reader.uint32()));- break;- default:- reader.skipType(tag & 7);- break;- }- }- return message;- },-- fromJSON(object: any): Status {- return {- code: isSet(object.code) ? Number(object.code) : 0,- message: isSet(object.message) ? String(object.message) : "",- details: Array.isArray(object?.details) ? object.details.map((e: any) => Any.fromJSON(e)) : [],- };- },-- toJSON(message: Status): unknown {- const obj: any = {};- message.code !== undefined && (obj.code = Math.round(message.code));- message.message !== undefined && (obj.message = message.message);- if (message.details) {- obj.details = message.details.map((e) => e ? Any.toJSON(e) : undefined);- } else {- obj.details = [];- }- return obj;- },-- fromPartial(object: DeepPartial<Status>): Status {- const message = createBaseStatus();- message.code = object.code ?? 0;- message.message = object.message ?? "";- message.details = object.details?.map((e) => Any.fromPartial(e)) || [];- return message;- },-};--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 isSet(value: any): boolean {- return value !== null && value !== undefined;-}diff --git a/frontend/src/types/proto/store/risk.ts b/frontend/src/types/proto/store/risk.tsdeleted file mode 100644index 77019ee93c..0000000000--- a/frontend/src/types/proto/store/risk.ts+++ /dev/null@@ -1,92 +0,0 @@-/* eslint-disable */-import * as _m0 from "protobufjs/minimal";-import { ParsedExpr } from "../google/api/expr/v1alpha1/syntax";--export const protobufPackage = "bytebase.store";--export interface RiskRule {- title: string;- expression?: ParsedExpr;- active: boolean;-}--function createBaseRiskRule(): RiskRule {- return { title: "", expression: undefined, active: false };-}--export const RiskRule = {- encode(message: RiskRule, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {- if (message.title !== "") {- writer.uint32(10).string(message.title);- }- if (message.expression !== undefined) {- ParsedExpr.encode(message.expression, writer.uint32(18).fork()).ldelim();- }- if (message.active === true) {- writer.uint32(24).bool(message.active);- }- return writer;- },-- decode(input: _m0.Reader | Uint8Array, length?: number): RiskRule {- const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);- let end = length === undefined ? reader.len : reader.pos + length;- const message = createBaseRiskRule();- while (reader.pos < end) {- const tag = reader.uint32();- switch (tag >>> 3) {- case 1:- message.title = reader.string();- break;- case 2:- message.expression = ParsedExpr.decode(reader, reader.uint32());- break;- case 3:- message.active = reader.bool();- break;- default:- reader.skipType(tag & 7);- break;- }- }- return message;- },-- fromJSON(object: any): RiskRule {- return {- title: isSet(object.title) ? String(object.title) : "",- expression: isSet(object.expression) ? ParsedExpr.fromJSON(object.expression) : undefined,- active: isSet(object.active) ? Boolean(object.active) : false,- };- },-- toJSON(message: RiskRule): unknown {- const obj: any = {};- message.title !== undefined && (obj.title = message.title);- message.expression !== undefined &&- (obj.expression = message.expression ? ParsedExpr.toJSON(message.expression) : undefined);- message.active !== undefined && (obj.active = message.active);- return obj;- },-- fromPartial(object: DeepPartial<RiskRule>): RiskRule {- const message = createBaseRiskRule();- message.title = object.title ?? "";- message.expression = (object.expression !== undefined && object.expression !== null)- ? ParsedExpr.fromPartial(object.expression)- : undefined;- message.active = object.active ?? false;- return message;- },-};--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 isSet(value: any): boolean {- return value !== null && value !== undefined;-}diff --git a/frontend/src/types/proto/v1/risk_service.ts b/frontend/src/types/proto/v1/risk_service.tsindex 8541cb1175..8c2b90013c 100644--- a/frontend/src/types/proto/v1/risk_service.ts+++ b/frontend/src/types/proto/v1/risk_service.ts@@ -68,7 +68,8 @@ export interface Risk {source: Risk_Source;title: string;level: number;- rule?: RiskRule;+ expression?: ParsedExpr;+ active: boolean;}export enum Risk_Source {@@ -116,12 +117,6 @@ export function risk_SourceToJSON(object: Risk_Source): string {}}-export interface RiskRule {- title: string;- expression?: ParsedExpr;- active: boolean;-}-function createBaseListRisksRequest(): ListRisksRequest {return { pageSize: 0, pageToken: "" };}@@ -395,7 +390,7 @@ export const DeleteRiskRequest = {};function createBaseRisk(): Risk {- return { name: "", uid: "", source: 0, title: "", level: 0, rule: undefined };+ return { name: "", uid: "", source: 0, title: "", level: 0, expression: undefined, active: false };}export const Risk = {@@ -415,8 +410,11 @@ export const Risk = {if (message.level !== 0) {writer.uint32(40).int64(message.level);}- if (message.rule !== undefined) {- RiskRule.encode(message.rule, writer.uint32(58).fork()).ldelim();+ if (message.expression !== undefined) {+ ParsedExpr.encode(message.expression, writer.uint32(50).fork()).ldelim();+ }+ if (message.active === true) {+ writer.uint32(56).bool(message.active);}return writer;},@@ -443,8 +441,11 @@ export const Risk = {case 5:message.level = longToNumber(reader.int64() as Long);break;+ case 6:+ message.expression = ParsedExpr.decode(reader, reader.uint32());+ break;case 7:- message.rule = RiskRule.decode(reader, reader.uint32());+ message.active = reader.bool();break;default:reader.skipType(tag & 7);@@ -461,7 +462,8 @@ export const Risk = {source: isSet(object.source) ? risk_SourceFromJSON(object.source) : 0,title: isSet(object.title) ? String(object.title) : "",level: isSet(object.level) ? Number(object.level) : 0,- rule: isSet(object.rule) ? RiskRule.fromJSON(object.rule) : undefined,+ expression: isSet(object.expression) ? ParsedExpr.fromJSON(object.expression) : undefined,+ active: isSet(object.active) ? Boolean(object.active) : false,};},@@ -472,7 +474,9 @@ export const Risk = {message.source !== undefined && (obj.source = risk_SourceToJSON(message.source));message.title !== undefined && (obj.title = message.title);message.level !== undefined && (obj.level = Math.round(message.level));- message.rule !== undefined && (obj.rule = message.rule ? RiskRule.toJSON(message.rule) : undefined);+ message.expression !== undefined &&+ (obj.expression = message.expression ? ParsedExpr.toJSON(message.expression) : undefined);+ message.active !== undefined && (obj.active = message.active);return obj;},@@ -483,73 +487,6 @@ export const Risk = {message.source = object.source ?? 0;message.title = object.title ?? "";message.level = object.level ?? 0;- message.rule = (object.rule !== undefined && object.rule !== null) ? RiskRule.fromPartial(object.rule) : undefined;- return message;- },-};--function createBaseRiskRule(): RiskRule {- return { title: "", expression: undefined, active: false };-}--export const RiskRule = {- encode(message: RiskRule, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {- if (message.title !== "") {- writer.uint32(10).string(message.title);- }- if (message.expression !== undefined) {- ParsedExpr.encode(message.expression, writer.uint32(18).fork()).ldelim();- }- if (message.active === true) {- writer.uint32(24).bool(message.active);- }- return writer;- },-- decode(input: _m0.Reader | Uint8Array, length?: number): RiskRule {- const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);- let end = length === undefined ? reader.len : reader.pos + length;- const message = createBaseRiskRule();- while (reader.pos < end) {- const tag = reader.uint32();- switch (tag >>> 3) {- case 1:- message.title = reader.string();- break;- case 2:- message.expression = ParsedExpr.decode(reader, reader.uint32());- break;- case 3:- message.active = reader.bool();- break;- default:- reader.skipType(tag & 7);- break;- }- }- return message;- },-- fromJSON(object: any): RiskRule {- return {- title: isSet(object.title) ? String(object.title) : "",- expression: isSet(object.expression) ? ParsedExpr.fromJSON(object.expression) : undefined,- active: isSet(object.active) ? Boolean(object.active) : false,- };- },-- toJSON(message: RiskRule): unknown {- const obj: any = {};- message.title !== undefined && (obj.title = message.title);- message.expression !== undefined &&- (obj.expression = message.expression ? ParsedExpr.toJSON(message.expression) : undefined);- message.active !== undefined && (obj.active = message.active);- return obj;- },-- fromPartial(object: DeepPartial<RiskRule>): RiskRule {- const message = createBaseRiskRule();- message.title = object.title ?? "";message.expression = (object.expression !== undefined && object.expression !== null)? ParsedExpr.fromPartial(object.expression): undefined;diff --git a/proto/gen/grpc-doc/store/README.md b/proto/gen/grpc-doc/store/README.mdindex 9e357a8eb5..f32361c4bc 100644--- a/proto/gen/grpc-doc/store/README.md+++ b/proto/gen/grpc-doc/store/README.md@@ -36,9 +36,6 @@- [IdentityProviderType](#bytebase-store-IdentityProviderType)-- [store/risk.proto](#store_risk-proto)- - [RiskRule](#bytebase-store-RiskRule)-- [store/setting.proto](#store_setting-proto)- [AgentPluginSetting](#bytebase-store-AgentPluginSetting)- [WorkspaceProfileSetting](#bytebase-store-WorkspaceProfileSetting)@@ -533,39 +530,6 @@ OIDCIdentityProviderConfig is the structure for OIDC identity provider config.-<a name="store_risk-proto"></a>-<p align="right"><a href="#top">Top</a></p>--## store/risk.proto----<a name="bytebase-store-RiskRule"></a>--### RiskRule----| Field | Type | Label | Description |-| ----- | ---- | ----- | ----------- |-| title | [string](#string) | | |-| expression | [google.api.expr.v1alpha1.ParsedExpr](#google-api-expr-v1alpha1-ParsedExpr) | | |-| active | [bool](#bool) | | |---------------<a name="store_setting-proto"></a><p align="right"><a href="#top">Top</a></p>diff --git a/proto/gen/grpc-doc/v1/README.md b/proto/gen/grpc-doc/v1/README.mdindex 870efee7ed..a44c033aba 100644--- a/proto/gen/grpc-doc/v1/README.md+++ b/proto/gen/grpc-doc/v1/README.md@@ -274,7 +274,6 @@- [ListRisksRequest](#bytebase-v1-ListRisksRequest)- [ListRisksResponse](#bytebase-v1-ListRisksResponse)- [Risk](#bytebase-v1-Risk)- - [RiskRule](#bytebase-v1-RiskRule)- [UpdateRiskRequest](#bytebase-v1-UpdateRiskRequest)- [Risk.Source](#bytebase-v1-Risk-Source)@@ -4182,22 +4181,6 @@ When paginating, all other parameters provided to `LiskRisks` must match the cal| source | [Risk.Source](#bytebase-v1-Risk-Source) | | || title | [string](#string) | | || level | [int64](#int64) | | |-| rule | [RiskRule](#bytebase-v1-RiskRule) | | |-------<a name="bytebase-v1-RiskRule"></a>--### RiskRule----| Field | Type | Label | Description |-| ----- | ---- | ----- | ----------- |-| title | [string](#string) | | || expression | [google.api.expr.v1alpha1.ParsedExpr](#google-api-expr-v1alpha1-ParsedExpr) | | || active | [bool](#bool) | | |diff --git a/proto/generated-go/store/risk.pb.go b/proto/generated-go/store/risk.pb.godeleted file mode 100644index 4753a5ab3a..0000000000--- a/proto/generated-go/store/risk.pb.go+++ /dev/null@@ -1,170 +0,0 @@-// Code generated by protoc-gen-go. DO NOT EDIT.-// versions:-// protoc-gen-go v1.29.0-// protoc (unknown)-// source: store/risk.proto--package store--import (- v1alpha1 "google.golang.org/genproto/googleapis/api/expr/v1alpha1"- protoreflect "google.golang.org/protobuf/reflect/protoreflect"- protoimpl "google.golang.org/protobuf/runtime/protoimpl"- 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 RiskRule struct {- state protoimpl.MessageState- sizeCache protoimpl.SizeCache- unknownFields protoimpl.UnknownFields-- Title string `protobuf:"bytes,1,opt,name=title,proto3" json:"title,omitempty"`- Expression *v1alpha1.ParsedExpr `protobuf:"bytes,2,opt,name=expression,proto3" json:"expression,omitempty"`- Active bool `protobuf:"varint,3,opt,name=active,proto3" json:"active,omitempty"`-}--func (x *RiskRule) Reset() {- *x = RiskRule{}- if protoimpl.UnsafeEnabled {- mi := &file_store_risk_proto_msgTypes[0]- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))- ms.StoreMessageInfo(mi)- }-}--func (x *RiskRule) String() string {- return protoimpl.X.MessageStringOf(x)-}--func (*RiskRule) ProtoMessage() {}--func (x *RiskRule) ProtoReflect() protoreflect.Message {- mi := &file_store_risk_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 RiskRule.ProtoReflect.Descriptor instead.-func (*RiskRule) Descriptor() ([]byte, []int) {- return file_store_risk_proto_rawDescGZIP(), []int{0}-}--func (x *RiskRule) GetTitle() string {- if x != nil {- return x.Title- }- return ""-}--func (x *RiskRule) GetExpression() *v1alpha1.ParsedExpr {- if x != nil {- return x.Expression- }- return nil-}--func (x *RiskRule) GetActive() bool {- if x != nil {- return x.Active- }- return false-}--var File_store_risk_proto protoreflect.FileDescriptor--var file_store_risk_proto_rawDesc = []byte{- 0x0a, 0x10, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2f, 0x72, 0x69, 0x73, 0x6b, 0x2e, 0x70, 0x72, 0x6f,- 0x74, 0x6f, 0x12, 0x0e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x73, 0x74, 0x6f,- 0x72, 0x65, 0x1a, 0x25, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x65,- 0x78, 0x70, 0x72, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x73, 0x79, 0x6e,- 0x74, 0x61, 0x78, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x7e, 0x0a, 0x08, 0x52, 0x69, 0x73,- 0x6b, 0x52, 0x75, 0x6c, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x18, 0x01,- 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x12, 0x44, 0x0a, 0x0a, 0x65,- 0x78, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32,- 0x24, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x65, 0x78, 0x70,- 0x72, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x72, 0x73, 0x65,- 0x64, 0x45, 0x78, 0x70, 0x72, 0x52, 0x0a, 0x65, 0x78, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f,- 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28,- 0x08, 0x52, 0x06, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x42, 0x14, 0x5a, 0x12, 0x67, 0x65, 0x6e,- 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2d, 0x67, 0x6f, 0x2f, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x62,- 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,-}--var (- file_store_risk_proto_rawDescOnce sync.Once- file_store_risk_proto_rawDescData = file_store_risk_proto_rawDesc-)--func file_store_risk_proto_rawDescGZIP() []byte {- file_store_risk_proto_rawDescOnce.Do(func() {- file_store_risk_proto_rawDescData = protoimpl.X.CompressGZIP(file_store_risk_proto_rawDescData)- })- return file_store_risk_proto_rawDescData-}--var file_store_risk_proto_msgTypes = make([]protoimpl.MessageInfo, 1)-var file_store_risk_proto_goTypes = []interface{}{- (*RiskRule)(nil), // 0: bytebase.store.RiskRule- (*v1alpha1.ParsedExpr)(nil), // 1: google.api.expr.v1alpha1.ParsedExpr-}-var file_store_risk_proto_depIdxs = []int32{- 1, // 0: bytebase.store.RiskRule.expression:type_name -> google.api.expr.v1alpha1.ParsedExpr- 1, // [1:1] is the sub-list for method output_type- 1, // [1:1] is the sub-list for method input_type- 1, // [1:1] is the sub-list for extension type_name- 1, // [1:1] is the sub-list for extension extendee- 0, // [0:1] is the sub-list for field type_name-}--func init() { file_store_risk_proto_init() }-func file_store_risk_proto_init() {- if File_store_risk_proto != nil {- return- }- if !protoimpl.UnsafeEnabled {- file_store_risk_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {- switch v := v.(*RiskRule); 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_store_risk_proto_rawDesc,- NumEnums: 0,- NumMessages: 1,- NumExtensions: 0,- NumServices: 0,- },- GoTypes: file_store_risk_proto_goTypes,- DependencyIndexes: file_store_risk_proto_depIdxs,- MessageInfos: file_store_risk_proto_msgTypes,- }.Build()- File_store_risk_proto = out.File- file_store_risk_proto_rawDesc = nil- file_store_risk_proto_goTypes = nil- file_store_risk_proto_depIdxs = nil-}diff --git a/proto/generated-go/v1/risk_service.pb.go b/proto/generated-go/v1/risk_service.pb.goindex 3d90c5313f..d4759009da 100644--- a/proto/generated-go/v1/risk_service.pb.go+++ b/proto/generated-go/v1/risk_service.pb.go@@ -362,11 +362,12 @@ type Risk struct {// Format: risks/{risk}Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`// system-generated unique identifier.- Uid string `protobuf:"bytes,2,opt,name=uid,proto3" json:"uid,omitempty"`- Source Risk_Source `protobuf:"varint,3,opt,name=source,proto3,enum=bytebase.v1.Risk_Source" json:"source,omitempty"`- Title string `protobuf:"bytes,4,opt,name=title,proto3" json:"title,omitempty"`- Level int64 `protobuf:"varint,5,opt,name=level,proto3" json:"level,omitempty"`- Rule *RiskRule `protobuf:"bytes,7,opt,name=rule,proto3" json:"rule,omitempty"`+ Uid string `protobuf:"bytes,2,opt,name=uid,proto3" json:"uid,omitempty"`+ Source Risk_Source `protobuf:"varint,3,opt,name=source,proto3,enum=bytebase.v1.Risk_Source" json:"source,omitempty"`+ Title string `protobuf:"bytes,4,opt,name=title,proto3" json:"title,omitempty"`+ Level int64 `protobuf:"varint,5,opt,name=level,proto3" json:"level,omitempty"`+ Expression *v1alpha1.ParsedExpr `protobuf:"bytes,6,opt,name=expression,proto3" json:"expression,omitempty"`+ Active bool `protobuf:"varint,7,opt,name=active,proto3" json:"active,omitempty"`}func (x *Risk) Reset() {@@ -436,70 +437,14 @@ func (x *Risk) GetLevel() int64 {return 0}-func (x *Risk) GetRule() *RiskRule {- if x != nil {- return x.Rule- }- return nil-}--type RiskRule struct {- state protoimpl.MessageState- sizeCache protoimpl.SizeCache- unknownFields protoimpl.UnknownFields-- Title string `protobuf:"bytes,1,opt,name=title,proto3" json:"title,omitempty"`- Expression *v1alpha1.ParsedExpr `protobuf:"bytes,2,opt,name=expression,proto3" json:"expression,omitempty"`- Active bool `protobuf:"varint,3,opt,name=active,proto3" json:"active,omitempty"`-}--func (x *RiskRule) Reset() {- *x = RiskRule{}- if protoimpl.UnsafeEnabled {- mi := &file_v1_risk_service_proto_msgTypes[6]- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))- ms.StoreMessageInfo(mi)- }-}--func (x *RiskRule) String() string {- return protoimpl.X.MessageStringOf(x)-}--func (*RiskRule) ProtoMessage() {}--func (x *RiskRule) ProtoReflect() protoreflect.Message {- mi := &file_v1_risk_service_proto_msgTypes[6]- if protoimpl.UnsafeEnabled && x != nil {- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))- if ms.LoadMessageInfo() == nil {- ms.StoreMessageInfo(mi)- }- return ms- }- return mi.MessageOf(x)-}--// Deprecated: Use RiskRule.ProtoReflect.Descriptor instead.-func (*RiskRule) Descriptor() ([]byte, []int) {- return file_v1_risk_service_proto_rawDescGZIP(), []int{6}-}--func (x *RiskRule) GetTitle() string {- if x != nil {- return x.Title- }- return ""-}--func (x *RiskRule) GetExpression() *v1alpha1.ParsedExpr {+func (x *Risk) GetExpression() *v1alpha1.ParsedExpr {if x != nil {return x.Expression}return nil}-func (x *RiskRule) GetActive() bool {+func (x *Risk) GetActive() bool {if x != nil {return x.Active}@@ -549,7 +494,7 @@ var file_v1_risk_service_proto_rawDesc = []byte{0x61, 0x74, 0x65, 0x4d, 0x61, 0x73, 0x6b, 0x22, 0x2c, 0x0a, 0x11, 0x44, 0x65, 0x6c, 0x65, 0x74,0x65, 0x52, 0x69, 0x73, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x17, 0x0a, 0x04,0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52,- 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x83, 0x02, 0x0a, 0x04, 0x52, 0x69, 0x73, 0x6b, 0x12, 0x12,+ 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0xb6, 0x02, 0x0a, 0x04, 0x52, 0x69, 0x73, 0x6b, 0x12, 0x12,0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61,0x6d, 0x65, 0x12, 0x15, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42,0x03, 0xe0, 0x41, 0x03, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x30, 0x0a, 0x06, 0x73, 0x6f, 0x75,@@ -558,51 +503,46 @@ var file_v1_risk_service_proto_rawDesc = []byte{0x72, 0x63, 0x65, 0x52, 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x74,0x69, 0x74, 0x6c, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x69, 0x74, 0x6c,0x65, 0x12, 0x14, 0x0a, 0x05, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03,- 0x52, 0x05, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x12, 0x29, 0x0a, 0x04, 0x72, 0x75, 0x6c, 0x65, 0x18,- 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65,- 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x69, 0x73, 0x6b, 0x52, 0x75, 0x6c, 0x65, 0x52, 0x04, 0x72, 0x75,- 0x6c, 0x65, 0x22, 0x47, 0x0a, 0x06, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x16, 0x0a, 0x12,- 0x53, 0x4f, 0x55, 0x52, 0x43, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49,- 0x45, 0x44, 0x10, 0x00, 0x12, 0x07, 0x0a, 0x03, 0x44, 0x44, 0x4c, 0x10, 0x01, 0x12, 0x07, 0x0a,- 0x03, 0x44, 0x4d, 0x4c, 0x10, 0x02, 0x12, 0x13, 0x0a, 0x0f, 0x43, 0x52, 0x45, 0x41, 0x54, 0x45,- 0x5f, 0x44, 0x41, 0x54, 0x41, 0x42, 0x41, 0x53, 0x45, 0x10, 0x03, 0x22, 0x7e, 0x0a, 0x08, 0x52,- 0x69, 0x73, 0x6b, 0x52, 0x75, 0x6c, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65,- 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x12, 0x44, 0x0a,- 0x0a, 0x65, 0x78, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28,- 0x0b, 0x32, 0x24, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x65,- 0x78, 0x70, 0x72, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x72,- 0x73, 0x65, 0x64, 0x45, 0x78, 0x70, 0x72, 0x52, 0x0a, 0x65, 0x78, 0x70, 0x72, 0x65, 0x73, 0x73,- 0x69, 0x6f, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x18, 0x03, 0x20,- 0x01, 0x28, 0x08, 0x52, 0x06, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x32, 0xad, 0x03, 0x0a, 0x0b,- 0x52, 0x69, 0x73, 0x6b, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x60, 0x0a, 0x09, 0x4c,- 0x69, 0x73, 0x74, 0x52, 0x69, 0x73, 0x6b, 0x73, 0x12, 0x1d, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62,- 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x69, 0x73, 0x6b, 0x73,- 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61,- 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x69, 0x73, 0x6b, 0x73, 0x52,- 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x14, 0xda, 0x41, 0x00, 0x82, 0xd3, 0xe4, 0x93,- 0x02, 0x0b, 0x12, 0x09, 0x2f, 0x76, 0x31, 0x2f, 0x72, 0x69, 0x73, 0x6b, 0x73, 0x12, 0x5f, 0x0a,- 0x0a, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x69, 0x73, 0x6b, 0x12, 0x1e, 0x2e, 0x62, 0x79,- 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65,- 0x52, 0x69, 0x73, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x11, 0x2e, 0x62, 0x79,- 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x69, 0x73, 0x6b, 0x22, 0x1e,- 0xda, 0x41, 0x04, 0x72, 0x69, 0x73, 0x6b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x11, 0x3a, 0x04, 0x72,- 0x69, 0x73, 0x6b, 0x22, 0x09, 0x2f, 0x76, 0x31, 0x2f, 0x72, 0x69, 0x73, 0x6b, 0x73, 0x12, 0x79,- 0x0a, 0x0a, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x69, 0x73, 0x6b, 0x12, 0x1e, 0x2e, 0x62,- 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74,- 0x65, 0x52, 0x69, 0x73, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x11, 0x2e, 0x62,- 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x69, 0x73, 0x6b, 0x22,- 0x38, 0xda, 0x41, 0x10, 0x72, 0x69, 0x73, 0x6b, 0x2c, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f,- 0x6d, 0x61, 0x73, 0x6b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1f, 0x3a, 0x04, 0x72, 0x69, 0x73, 0x6b,- 0x32, 0x17, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x72, 0x69, 0x73, 0x6b, 0x2e, 0x6e, 0x61, 0x6d, 0x65,- 0x3d, 0x72, 0x69, 0x73, 0x6b, 0x73, 0x2f, 0x2a, 0x7d, 0x12, 0x60, 0x0a, 0x0a, 0x44, 0x65, 0x6c,- 0x65, 0x74, 0x65, 0x52, 0x69, 0x73, 0x6b, 0x12, 0x1e, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61,- 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x69, 0x73, 0x6b,- 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65,- 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22,- 0x1a, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x14, 0x2a, 0x12, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x6e, 0x61,- 0x6d, 0x65, 0x3d, 0x72, 0x69, 0x73, 0x6b, 0x73, 0x2f, 0x2a, 0x7d, 0x42, 0x11, 0x5a, 0x0f, 0x67,- 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2d, 0x67, 0x6f, 0x2f, 0x76, 0x31, 0x62, 0x06,- 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,+ 0x52, 0x05, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x12, 0x44, 0x0a, 0x0a, 0x65, 0x78, 0x70, 0x72, 0x65,+ 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x67, 0x6f,+ 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x65, 0x78, 0x70, 0x72, 0x2e, 0x76, 0x31,+ 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x72, 0x73, 0x65, 0x64, 0x45, 0x78, 0x70,+ 0x72, 0x52, 0x0a, 0x65, 0x78, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x16, 0x0a,+ 0x06, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x61,+ 0x63, 0x74, 0x69, 0x76, 0x65, 0x22, 0x47, 0x0a, 0x06, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12,+ 0x16, 0x0a, 0x12, 0x53, 0x4f, 0x55, 0x52, 0x43, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43,+ 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x07, 0x0a, 0x03, 0x44, 0x44, 0x4c, 0x10, 0x01,+ 0x12, 0x07, 0x0a, 0x03, 0x44, 0x4d, 0x4c, 0x10, 0x02, 0x12, 0x13, 0x0a, 0x0f, 0x43, 0x52, 0x45,+ 0x41, 0x54, 0x45, 0x5f, 0x44, 0x41, 0x54, 0x41, 0x42, 0x41, 0x53, 0x45, 0x10, 0x03, 0x32, 0xad,+ 0x03, 0x0a, 0x0b, 0x52, 0x69, 0x73, 0x6b, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x60,+ 0x0a, 0x09, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x69, 0x73, 0x6b, 0x73, 0x12, 0x1d, 0x2e, 0x62, 0x79,+ 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x69,+ 0x73, 0x6b, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x62, 0x79, 0x74,+ 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x69, 0x73,+ 0x6b, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x14, 0xda, 0x41, 0x00, 0x82,+ 0xd3, 0xe4, 0x93, 0x02, 0x0b, 0x12, 0x09, 0x2f, 0x76, 0x31, 0x2f, 0x72, 0x69, 0x73, 0x6b, 0x73,+ 0x12, 0x5f, 0x0a, 0x0a, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x69, 0x73, 0x6b, 0x12, 0x1e,+ 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65,+ 0x61, 0x74, 0x65, 0x52, 0x69, 0x73, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x11,+ 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x69, 0x73,+ 0x6b, 0x22, 0x1e, 0xda, 0x41, 0x04, 0x72, 0x69, 0x73, 0x6b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x11,+ 0x3a, 0x04, 0x72, 0x69, 0x73, 0x6b, 0x22, 0x09, 0x2f, 0x76, 0x31, 0x2f, 0x72, 0x69, 0x73, 0x6b,+ 0x73, 0x12, 0x79, 0x0a, 0x0a, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x69, 0x73, 0x6b, 0x12,+ 0x1e, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70,+ 0x64, 0x61, 0x74, 0x65, 0x52, 0x69, 0x73, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a,+ 0x11, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x69,+ 0x73, 0x6b, 0x22, 0x38, 0xda, 0x41, 0x10, 0x72, 0x69, 0x73, 0x6b, 0x2c, 0x75, 0x70, 0x64, 0x61,+ 0x74, 0x65, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1f, 0x3a, 0x04, 0x72,+ 0x69, 0x73, 0x6b, 0x32, 0x17, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x72, 0x69, 0x73, 0x6b, 0x2e, 0x6e,+ 0x61, 0x6d, 0x65, 0x3d, 0x72, 0x69, 0x73, 0x6b, 0x73, 0x2f, 0x2a, 0x7d, 0x12, 0x60, 0x0a, 0x0a,+ 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x69, 0x73, 0x6b, 0x12, 0x1e, 0x2e, 0x62, 0x79, 0x74,+ 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52,+ 0x69, 0x73, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f,+ 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70,+ 0x74, 0x79, 0x22, 0x1a, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x14, 0x2a, 0x12, 0x2f, 0x76, 0x31, 0x2f,+ 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x72, 0x69, 0x73, 0x6b, 0x73, 0x2f, 0x2a, 0x7d, 0x42, 0x11,+ 0x5a, 0x0f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2d, 0x67, 0x6f, 0x2f, 0x76,+ 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,}var (@@ -618,7 +558,7 @@ func file_v1_risk_service_proto_rawDescGZIP() []byte {}var file_v1_risk_service_proto_enumTypes = make([]protoimpl.EnumInfo, 1)-var file_v1_risk_service_proto_msgTypes = make([]protoimpl.MessageInfo, 7)+var file_v1_risk_service_proto_msgTypes = make([]protoimpl.MessageInfo, 6)var file_v1_risk_service_proto_goTypes = []interface{}{(Risk_Source)(0), // 0: bytebase.v1.Risk.Source(*ListRisksRequest)(nil), // 1: bytebase.v1.ListRisksRequest@@ -627,32 +567,30 @@ var file_v1_risk_service_proto_goTypes = []interface{}{(*UpdateRiskRequest)(nil), // 4: bytebase.v1.UpdateRiskRequest(*DeleteRiskRequest)(nil), // 5: bytebase.v1.DeleteRiskRequest(*Risk)(nil), // 6: bytebase.v1.Risk- (*RiskRule)(nil), // 7: bytebase.v1.RiskRule- (*fieldmaskpb.FieldMask)(nil), // 8: google.protobuf.FieldMask- (*v1alpha1.ParsedExpr)(nil), // 9: google.api.expr.v1alpha1.ParsedExpr- (*emptypb.Empty)(nil), // 10: google.protobuf.Empty+ (*fieldmaskpb.FieldMask)(nil), // 7: google.protobuf.FieldMask+ (*v1alpha1.ParsedExpr)(nil), // 8: google.api.expr.v1alpha1.ParsedExpr+ (*emptypb.Empty)(nil), // 9: google.protobuf.Empty}var file_v1_risk_service_proto_depIdxs = []int32{6, // 0: bytebase.v1.ListRisksResponse.risks:type_name -> bytebase.v1.Risk6, // 1: bytebase.v1.CreateRiskRequest.risk:type_name -> bytebase.v1.Risk6, // 2: bytebase.v1.UpdateRiskRequest.risk:type_name -> bytebase.v1.Risk- 8, // 3: bytebase.v1.UpdateRiskRequest.update_mask:type_name -> google.protobuf.FieldMask+ 7, // 3: bytebase.v1.UpdateRiskRequest.update_mask:type_name -> google.protobuf.FieldMask0, // 4: bytebase.v1.Risk.source:type_name -> bytebase.v1.Risk.Source- 7, // 5: bytebase.v1.Risk.rule:type_name -> bytebase.v1.RiskRule- 9, // 6: bytebase.v1.RiskRule.expression:type_name -> google.api.expr.v1alpha1.ParsedExpr- 1, // 7: bytebase.v1.RiskService.ListRisks:input_type -> bytebase.v1.ListRisksRequest- 3, // 8: bytebase.v1.RiskService.CreateRisk:input_type -> bytebase.v1.CreateRiskRequest- 4, // 9: bytebase.v1.RiskService.UpdateRisk:input_type -> bytebase.v1.UpdateRiskRequest- 5, // 10: bytebase.v1.RiskService.DeleteRisk:input_type -> bytebase.v1.DeleteRiskRequest- 2, // 11: bytebase.v1.RiskService.ListRisks:output_type -> bytebase.v1.ListRisksResponse- 6, // 12: bytebase.v1.RiskService.CreateRisk:output_type -> bytebase.v1.Risk- 6, // 13: bytebase.v1.RiskService.UpdateRisk:output_type -> bytebase.v1.Risk- 10, // 14: bytebase.v1.RiskService.DeleteRisk:output_type -> google.protobuf.Empty- 11, // [11:15] is the sub-list for method output_type- 7, // [7:11] is the sub-list for method input_type- 7, // [7:7] is the sub-list for extension type_name- 7, // [7:7] is the sub-list for extension extendee- 0, // [0:7] is the sub-list for field type_name+ 8, // 5: bytebase.v1.Risk.expression:type_name -> google.api.expr.v1alpha1.ParsedExpr+ 1, // 6: bytebase.v1.RiskService.ListRisks:input_type -> bytebase.v1.ListRisksRequest+ 3, // 7: bytebase.v1.RiskService.CreateRisk:input_type -> bytebase.v1.CreateRiskRequest+ 4, // 8: bytebase.v1.RiskService.UpdateRisk:input_type -> bytebase.v1.UpdateRiskRequest+ 5, // 9: bytebase.v1.RiskService.DeleteRisk:input_type -> bytebase.v1.DeleteRiskRequest+ 2, // 10: bytebase.v1.RiskService.ListRisks:output_type -> bytebase.v1.ListRisksResponse+ 6, // 11: bytebase.v1.RiskService.CreateRisk:output_type -> bytebase.v1.Risk+ 6, // 12: bytebase.v1.RiskService.UpdateRisk:output_type -> bytebase.v1.Risk+ 9, // 13: bytebase.v1.RiskService.DeleteRisk:output_type -> google.protobuf.Empty+ 10, // [10:14] is the sub-list for method output_type+ 6, // [6:10] is the sub-list for method input_type+ 6, // [6:6] is the sub-list for extension type_name+ 6, // [6:6] is the sub-list for extension extendee+ 0, // [0:6] is the sub-list for field type_name}func init() { file_v1_risk_service_proto_init() }@@ -733,18 +671,6 @@ func file_v1_risk_service_proto_init() {return nil}}- file_v1_risk_service_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {- switch v := v.(*RiskRule); 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{@@ -752,7 +678,7 @@ func file_v1_risk_service_proto_init() {GoPackagePath: reflect.TypeOf(x{}).PkgPath(),RawDescriptor: file_v1_risk_service_proto_rawDesc,NumEnums: 1,- NumMessages: 7,+ NumMessages: 6,NumExtensions: 0,NumServices: 1,},diff --git a/proto/store/risk.proto b/proto/store/risk.protodeleted file mode 100644index 723c358c30..0000000000--- a/proto/store/risk.proto+++ /dev/null@@ -1,13 +0,0 @@-syntax = "proto3";--package bytebase.store;--import "google/api/expr/v1alpha1/syntax.proto";--option go_package = "generated-go/store";--message RiskRule {- string title = 1;- google.api.expr.v1alpha1.ParsedExpr expression = 2;- bool active = 3;-}diff --git a/proto/v1/risk_service.proto b/proto/v1/risk_service.protoindex 4cc05d13a9..8300bdc1fd 100644--- a/proto/v1/risk_service.proto+++ b/proto/v1/risk_service.proto@@ -100,11 +100,6 @@ message Risk {string title = 4;int64 level = 5;- RiskRule rule = 7;-}--message RiskRule {- string title = 1;- google.api.expr.v1alpha1.ParsedExpr expression = 2;- bool active = 3;+ google.api.expr.v1alpha1.ParsedExpr expression = 6;+ bool active = 7;}