Database governance built for humans and agents — controlling changes and access across every major database.
Go cicddata-governancedata-maskingdata-securitydatabase-accessdatabase-governancedevopsdevsecopsflywaygitopsliquibasemongodbmysqloraclepostgresqlschema-migrationssecuritysql-clientsqlservertidb
feat: remove logging service (#12113)
p0ny0eba3aa225a0
diff --git a/backend/api/v1/acl_iam.go b/backend/api/v1/acl_iam.goindex ac1e8f1c01..a6386ac8f2 100644--- a/backend/api/v1/acl_iam.go+++ b/backend/api/v1/acl_iam.go@@ -65,9 +65,6 @@ func isSkippedMethod(fullMethod string) bool {v1pb.AuthService_Logout_FullMethodName,v1pb.CelService_BatchParse_FullMethodName,v1pb.CelService_BatchDeparse_FullMethodName,- v1pb.LoggingService_SearchLogs_FullMethodName,- v1pb.LoggingService_GetLog_FullMethodName,- v1pb.LoggingService_ExportLogs_FullMethodName,v1pb.SQLService_Query_FullMethodName,// TODO(steven): maybe needs to add a permission to check.v1pb.SQLService_Execute_FullMethodName,diff --git a/backend/api/v1/logging_service.go b/backend/api/v1/logging_service.godeleted file mode 100644index 00608c238f..0000000000--- a/backend/api/v1/logging_service.go+++ /dev/null@@ -1,556 +0,0 @@-package v1--import (- "context"- "fmt"- "strconv"- "strings"- "time"-- "github.com/pkg/errors"- "google.golang.org/grpc/codes"- "google.golang.org/grpc/status"- "google.golang.org/protobuf/types/known/timestamppb"-- "github.com/bytebase/bytebase/backend/common"- api "github.com/bytebase/bytebase/backend/legacyapi"- "github.com/bytebase/bytebase/backend/store"- storepb "github.com/bytebase/bytebase/proto/generated-go/store"- v1pb "github.com/bytebase/bytebase/proto/generated-go/v1"-)--// LoggingService implements the logging service.-type LoggingService struct {- v1pb.UnimplementedLoggingServiceServer- store *store.Store-}--// NewLoggingService creates a new LoggingService.-func NewLoggingService(store *store.Store) *LoggingService {- return &LoggingService{- store: store,- }-}--var defaultResourceActionTypeMap = map[string][]api.ActivityType{- "users": {- api.ActivityMemberCreate,- api.ActivityMemberRoleUpdate,- api.ActivityMemberActivate,- api.ActivityMemberDeactivate,- },- "instances": {- api.ActivitySQLQuery,- api.ActivitySQLExport,- },- "projects": {- api.ActivityProjectRepositoryPush,- api.ActivityProjectDatabaseTransfer,- api.ActivityProjectMemberCreate,- api.ActivityProjectMemberDelete,- },- "pipelines": {- api.ActivityPipelineStageStatusUpdate,- api.ActivityPipelineTaskStatusUpdate,- api.ActivityPipelineTaskRunStatusUpdate,- api.ActivityPipelineTaskStatementUpdate,- api.ActivityPipelineTaskEarliestAllowedTimeUpdate,- api.ActivityPipelineTaskPriorBackup,- },- "issues": {- api.ActivityIssueCreate,- api.ActivityIssueCommentCreate,- api.ActivityIssueFieldUpdate,- api.ActivityIssueStatusUpdate,- api.ActivityIssueApprovalNotify,- },-}--// SearchLogs search the logs.-func (s *LoggingService) SearchLogs(ctx context.Context, request *v1pb.SearchLogsRequest) (*v1pb.SearchLogsResponse, error) {- limit, offset, err := parseLimitAndOffset(request.PageToken, int(request.PageSize))- if err != nil {- return nil, err- }- limitPlusOne := limit + 1-- activityFind := &store.FindActivityMessage{- Limit: &limitPlusOne,- Offset: &offset,- }-- if err := setActivityFindFilterAndOrder(ctx, s.store, activityFind, request.Filter, request.OrderBy); err != nil {- return nil, err- }-- activityList, err := s.store.ListActivityV2(ctx, activityFind)- if err != nil {- return nil, status.Errorf(codes.Internal, "failed to list activity: %v", err.Error())- }-- nextPageToken := ""- if len(activityList) == limitPlusOne {- activityList = activityList[:limit]- if nextPageToken, err = marshalPageToken(&storepb.PageToken{- Limit: int32(limit),- Offset: int32(limit + offset),- }); err != nil {- return nil, status.Errorf(codes.Internal, "failed to marshal next page token, error: %v", err)- }- }-- resp := &v1pb.SearchLogsResponse{- NextPageToken: nextPageToken,- }- for _, activity := range activityList {- logEntity, err := convertToLogEntity(ctx, s.store, activity)- if err != nil {- return nil, status.Errorf(codes.Internal, "failed to convert log entity, error: %v", err)- }- resp.LogEntities = append(resp.LogEntities, logEntity)- }-- return resp, nil-}--func setActivityFindFilterAndOrder(ctx context.Context, stores *store.Store, activityFind *store.FindActivityMessage, filter, orderBy string) error {- filters, err := parseFilter(filter)- if err != nil {- return status.Errorf(codes.InvalidArgument, err.Error())- }-- if orderBy != "" {- orderByKeys, err := parseOrderBy(orderBy)- if err != nil {- return status.Errorf(codes.InvalidArgument, err.Error())- }- if len(orderByKeys) != 1 || orderByKeys[0].key != "create_time" {- return status.Errorf(codes.InvalidArgument, `invalid order_by, only support order by "create_time" for now`)- }- order := store.DESC- if orderByKeys[0].isAscend {- order = store.ASC- }- activityFind.Order = &order- } else {- order := store.ASC- activityFind.Order = &order- }-- for _, spec := range filters {- switch spec.key {- case "creator":- if spec.operator != comparatorTypeEqual {- return status.Errorf(codes.InvalidArgument, `only support "=" operation for "creator" filter`)- }- creatorEmail := strings.TrimPrefix(spec.value, "users/")- if creatorEmail == "" {- return status.Errorf(codes.InvalidArgument, "invalid empty creator identifier")- }- user, err := stores.GetUserByEmail(ctx, creatorEmail)- if err != nil {- return status.Errorf(codes.Internal, `failed to find user "%s" with error: %v`, creatorEmail, err.Error())- }- if user == nil {- return errors.Errorf("cannot found user %s", creatorEmail)- }- activityFind.CreatorUID = &user.ID- case "resource":- if spec.operator != comparatorTypeEqual {- return status.Errorf(codes.InvalidArgument, `only support "=" operation for "resource" filter`)- }- sections := strings.Split(spec.value, "/")- if len(sections) != 2 {- return status.Errorf(codes.InvalidArgument, `invalid resource "%s" for filter`, spec.value)- }- // Handle the defaultResourceActionType.- if len(activityFind.TypeList) == 0 {- typeList, ok := defaultResourceActionTypeMap[sections[0]]- if !ok {- return status.Errorf(codes.InvalidArgument, `unsupport resource %s`, spec.value)- }- activityFind.TypeList = append(activityFind.TypeList, typeList...)- }- switch fmt.Sprintf("%s/", sections[0]) {- case common.UserNamePrefix:- user, err := stores.GetUserByEmail(ctx, sections[1])- if err != nil {- return status.Errorf(codes.Internal, err.Error())- }- if user == nil {- return status.Errorf(codes.NotFound, "user %q not found", spec.value)- }- activityFind.ContainerUID = &user.ID- case common.InstanceNamePrefix:- instance, err := stores.GetInstanceV2(ctx, &store.FindInstanceMessage{- ResourceID: §ions[1],- ShowDeleted: true,- })- if err != nil {- return status.Errorf(codes.Internal, err.Error())- }- if instance == nil {- return status.Errorf(codes.NotFound, "instance %q not found", spec.value)- }- activityFind.ContainerUID = &instance.UID- case common.ProjectNamePrefix:- project, err := stores.GetProjectV2(ctx, &store.FindProjectMessage{- ResourceID: §ions[1],- ShowDeleted: true,- })- if err != nil {- return status.Errorf(codes.Internal, err.Error())- }- if project == nil {- return status.Errorf(codes.NotFound, "project %q not found", spec.value)- }- activityFind.ContainerUID = &project.UID- case common.PipelineNamePrefix, common.IssueNamePrefix:- uid, err := strconv.Atoi(sections[1])- if err != nil {- return status.Errorf(codes.InvalidArgument, `invalid resource id "%s"`, spec.value)- }- activityFind.ContainerUID = &uid- default:- return status.Errorf(codes.InvalidArgument, `resource "%s" in filter is not support`, spec.value)- }- case "level":- if spec.operator != comparatorTypeEqual {- return status.Errorf(codes.InvalidArgument, `only support "=" operation for "level" filter`)- }- for _, level := range strings.Split(spec.value, " | ") {- activityLevel, err := convertToActivityLevel(v1pb.LogEntity_Level(v1pb.LogEntity_Level_value[level]))- if err != nil {- return err- }- activityFind.LevelList = append(activityFind.LevelList, activityLevel)- }- case "action":- if spec.operator != comparatorTypeEqual {- return status.Errorf(codes.InvalidArgument, `only support "=" operation for "action" filter`)- }- // Handle the defaultResourceActionType.- if len(activityFind.TypeList) > 0 {- activityFind.TypeList = nil- }- for _, action := range strings.Split(spec.value, " | ") {- activityType, err := convertToActivityType(v1pb.LogEntity_Action(v1pb.LogEntity_Action_value[action]))- if err != nil {- return err- }- activityFind.TypeList = append(activityFind.TypeList, activityType)- }- case "create_time":- if spec.operator != comparatorTypeGreaterEqual && spec.operator != comparatorTypeLessEqual {- return status.Errorf(codes.InvalidArgument, `only support "<=" or ">=" operation for "create_time" filter`)- }- t, err := time.Parse(time.RFC3339, spec.value)- if err != nil {- return status.Errorf(codes.InvalidArgument, "invalid start_time filter %q", spec.value)- }- ts := t.Unix()- if spec.operator == comparatorTypeGreaterEqual {- activityFind.CreatedTsAfter = &ts- } else {- activityFind.CreatedTsBefore = &ts- }- default:- return status.Errorf(codes.InvalidArgument, "invalid filter %s", spec.key)- }- }- return nil-}--// GetLog gets the log.-func (s *LoggingService) GetLog(ctx context.Context, request *v1pb.GetLogRequest) (*v1pb.LogEntity, error) {- activityUID, err := common.GetUIDFromName(request.Name, common.LogNamePrefix)- if err != nil {- return nil, status.Errorf(codes.InvalidArgument, err.Error())- }-- activity, err := s.store.GetActivityV2(ctx, activityUID)- if err != nil {- return nil, status.Errorf(codes.Internal, "failed to find activity with error: %v", err.Error())- }- if activity == nil {- return nil, status.Errorf(codes.NotFound, "cannot found activity %s", request.Name)- }-- logEntity, err := convertToLogEntity(ctx, s.store, activity)- if err != nil {- return nil, status.Errorf(codes.Internal, "failed to convert log entity, error: %v", err)- }- return logEntity, nil-}--// ExportLogs exports logs.-func (s *LoggingService) ExportLogs(ctx context.Context, request *v1pb.ExportLogsRequest) (*v1pb.ExportLogsResponse, error) {- activityFind := &store.FindActivityMessage{}- if err := setActivityFindFilterAndOrder(ctx, s.store, activityFind, request.Filter, request.OrderBy); err != nil {- return nil, err- }- activities, err := s.store.ListActivityV2(ctx, activityFind)- if err != nil {- return nil, status.Errorf(codes.Internal, "failed to list activity: %v", err.Error())- }- result := &v1pb.QueryResult{- ColumnNames: []string{"time", "level", "action", "actor", "resource", "comment", "payload"},- }- for _, activity := range activities {- logEntity, err := convertToLogEntity(ctx, s.store, activity)- if err != nil {- return nil, status.Errorf(codes.Internal, "failed to convert log entity, error: %v", err)- }- result.Rows = append(result.Rows, &v1pb.QueryRow{Values: []*v1pb.RowValue{- {Kind: &v1pb.RowValue_StringValue{StringValue: logEntity.CreateTime.AsTime().Format(time.RFC3339)}},- {Kind: &v1pb.RowValue_StringValue{StringValue: logEntity.Level.String()}},- {Kind: &v1pb.RowValue_StringValue{StringValue: logEntity.Action.String()}},- {Kind: &v1pb.RowValue_StringValue{StringValue: logEntity.Creator}},- {Kind: &v1pb.RowValue_StringValue{StringValue: logEntity.Resource}},- {Kind: &v1pb.RowValue_StringValue{StringValue: logEntity.Comment}},- {Kind: &v1pb.RowValue_StringValue{StringValue: logEntity.Payload}},- }})- }-- var content []byte- switch request.Format {- case v1pb.ExportFormat_CSV:- if content, err = exportCSV(result); err != nil {- return nil, err- }- case v1pb.ExportFormat_JSON:- if content, err = exportJSON(result); err != nil {- return nil, err- }- case v1pb.ExportFormat_XLSX:- if content, err = exportXLSX(result); err != nil {- return nil, err- }- default:- return nil, status.Errorf(codes.InvalidArgument, "unsupported export format: %s", request.Format.String())- }-- return &v1pb.ExportLogsResponse{Content: content}, nil-}--func convertToLogEntity(ctx context.Context, stores *store.Store, activity *store.ActivityMessage) (*v1pb.LogEntity, error) {- parent := activity.ResourceContainer- if parent == "" {- workspaceID, err := stores.GetWorkspaceID(ctx)- if err != nil {- return nil, status.Errorf(codes.Internal, "failed to find workspace id with error: %v", err.Error())- }- parent = fmt.Sprintf("workspaces/%s", workspaceID)- }-- resource := ""- switch activity.Type {- case- api.ActivityMemberCreate,- api.ActivityMemberRoleUpdate,- api.ActivityMemberActivate,- api.ActivityMemberDeactivate:- user, err := stores.GetUserByID(ctx, activity.ContainerUID)- if err != nil {- return nil, err- }- if user == nil {- return nil, errors.Errorf("cannot found user with id %d", activity.ContainerUID)- }- resource = common.FormatUserEmail(user.Email)- case- api.ActivityIssueCreate,- api.ActivityIssueCommentCreate,- api.ActivityIssueFieldUpdate,- api.ActivityIssueStatusUpdate,- api.ActivityIssueApprovalNotify:- resource = fmt.Sprintf("%s%d", common.IssueNamePrefix, activity.ContainerUID)- case- api.ActivityPipelineStageStatusUpdate,- api.ActivityPipelineTaskStatusUpdate,- api.ActivityPipelineTaskRunStatusUpdate,- api.ActivityPipelineTaskStatementUpdate,- api.ActivityPipelineTaskEarliestAllowedTimeUpdate,- api.ActivityPipelineTaskPriorBackup:- resource = fmt.Sprintf("%s%d", common.PipelineNamePrefix, activity.ContainerUID)- case- api.ActivityProjectRepositoryPush,- api.ActivityProjectDatabaseTransfer,- api.ActivityProjectMemberCreate,- api.ActivityProjectMemberDelete:- project, err := stores.GetProjectV2(ctx, &store.FindProjectMessage{- UID: &activity.ContainerUID,- })- if err != nil {- return nil, err- }- if project == nil {- return nil, errors.Errorf("failed to find project by id %d", activity.ContainerUID)- }- resource = fmt.Sprintf("%s%s", common.ProjectNamePrefix, project.ResourceID)- case- api.ActivitySQLQuery,- api.ActivitySQLExport:- instance, err := stores.GetInstanceV2(ctx, &store.FindInstanceMessage{- UID: &activity.ContainerUID,- })- if err != nil {- return nil, err- }- if instance == nil {- return nil, errors.Errorf("failed to find instance by id %d", activity.ContainerUID)- }- resource = fmt.Sprintf("%s%s", common.InstanceNamePrefix, instance.ResourceID)- }-- user, err := stores.GetUserByID(ctx, activity.CreatorUID)- if err != nil {- return nil, err- }- if user == nil {- return nil, errors.Errorf("cannot found user with id %d", activity.ContainerUID)- }-- return &v1pb.LogEntity{- Name: fmt.Sprintf("%s/%s%d", parent, common.LogNamePrefix, activity.UID),- Creator: common.FormatUserEmail(user.Email),- Resource: resource,- Action: convertToActionType(activity.Type),- Level: convertToLogLevel(activity.Level),- CreateTime: timestamppb.New(time.Unix(activity.CreatedTs, 0)),- UpdateTime: timestamppb.New(time.Unix(activity.UpdatedTs, 0)),- Comment: activity.Comment,- Payload: activity.Payload,- }, nil-}--func convertToActivityType(action v1pb.LogEntity_Action) (api.ActivityType, error) {- switch action {- case v1pb.LogEntity_ACTION_MEMBER_CREATE:- return api.ActivityMemberCreate, nil- case v1pb.LogEntity_ACTION_MEMBER_ROLE_UPDATE:- return api.ActivityMemberRoleUpdate, nil- case v1pb.LogEntity_ACTION_MEMBER_ACTIVATE:- return api.ActivityMemberActivate, nil- case v1pb.LogEntity_ACTION_MEMBER_DEACTIVE:- return api.ActivityMemberDeactivate, nil-- case v1pb.LogEntity_ACTION_ISSUE_CREATE:- return api.ActivityIssueCreate, nil- case v1pb.LogEntity_ACTION_ISSUE_COMMENT_CREATE:- return api.ActivityIssueCommentCreate, nil- case v1pb.LogEntity_ACTION_ISSUE_FIELD_UPDATE:- return api.ActivityIssueFieldUpdate, nil- case v1pb.LogEntity_ACTION_ISSUE_STATUS_UPDATE:- return api.ActivityIssueStatusUpdate, nil- case v1pb.LogEntity_ACTION_ISSUE_APPROVAL_NOTIFY:- return api.ActivityIssueApprovalNotify, nil-- case v1pb.LogEntity_ACTION_PIPELINE_STAGE_STATUS_UPDATE:- return api.ActivityPipelineStageStatusUpdate, nil- case v1pb.LogEntity_ACTION_PIPELINE_TASK_STATUS_UPDATE:- return api.ActivityPipelineTaskStatusUpdate, nil- case v1pb.LogEntity_ACTION_PIPELINE_TASK_RUN_STATUS_UPDATE:- return api.ActivityPipelineTaskRunStatusUpdate, nil- case v1pb.LogEntity_ACTION_PIPELINE_TASK_STATEMENT_UPDATE:- return api.ActivityPipelineTaskStatementUpdate, nil- case v1pb.LogEntity_ACTION_PIPELINE_TASK_EARLIEST_ALLOWED_TIME_UPDATE:- return api.ActivityPipelineTaskEarliestAllowedTimeUpdate, nil- case v1pb.LogEntity_ACTION_PIPELINE_TASK_PRIOR_BACKUP:- return api.ActivityPipelineTaskPriorBackup, nil-- case v1pb.LogEntity_ACTION_PROJECT_REPOSITORY_PUSH:- return api.ActivityProjectRepositoryPush, nil- case v1pb.LogEntity_ACTION_PROJECT_DATABASE_TRANSFER:- return api.ActivityProjectDatabaseTransfer, nil- case v1pb.LogEntity_ACTION_PROJECT_MEMBER_CREATE:- return api.ActivityProjectMemberCreate, nil- case v1pb.LogEntity_ACTION_PROJECT_MEMBER_DELETE:- return api.ActivityProjectMemberDelete, nil-- case v1pb.LogEntity_ACTION_DATABASE_SQL_EDITOR_QUERY:- return api.ActivitySQLQuery, nil- case v1pb.LogEntity_ACTION_DATABASE_SQL_EXPORT:- return api.ActivitySQLExport, nil- default:- return api.ActivityMemberCreate, status.Errorf(codes.InvalidArgument, "unsupported action type: %v", action)- }-}--func convertToActionType(activityType api.ActivityType) v1pb.LogEntity_Action {- switch activityType {- case api.ActivityMemberCreate:- return v1pb.LogEntity_ACTION_MEMBER_CREATE- case api.ActivityMemberRoleUpdate:- return v1pb.LogEntity_ACTION_MEMBER_ROLE_UPDATE- case api.ActivityMemberActivate:- return v1pb.LogEntity_ACTION_MEMBER_ACTIVATE- case api.ActivityMemberDeactivate:- return v1pb.LogEntity_ACTION_MEMBER_DEACTIVE-- case api.ActivityIssueCreate:- return v1pb.LogEntity_ACTION_ISSUE_CREATE- case api.ActivityIssueCommentCreate:- return v1pb.LogEntity_ACTION_ISSUE_COMMENT_CREATE- case api.ActivityIssueFieldUpdate:- return v1pb.LogEntity_ACTION_ISSUE_FIELD_UPDATE- case api.ActivityIssueStatusUpdate:- return v1pb.LogEntity_ACTION_ISSUE_STATUS_UPDATE- case api.ActivityIssueApprovalNotify:- return v1pb.LogEntity_ACTION_ISSUE_APPROVAL_NOTIFY-- case api.ActivityPipelineStageStatusUpdate:- return v1pb.LogEntity_ACTION_PIPELINE_STAGE_STATUS_UPDATE- case api.ActivityPipelineTaskStatusUpdate:- return v1pb.LogEntity_ACTION_PIPELINE_TASK_STATUS_UPDATE- case api.ActivityPipelineTaskRunStatusUpdate:- return v1pb.LogEntity_ACTION_PIPELINE_TASK_RUN_STATUS_UPDATE- case api.ActivityPipelineTaskStatementUpdate:- return v1pb.LogEntity_ACTION_PIPELINE_TASK_STATEMENT_UPDATE- case api.ActivityPipelineTaskEarliestAllowedTimeUpdate:- return v1pb.LogEntity_ACTION_PIPELINE_TASK_EARLIEST_ALLOWED_TIME_UPDATE- case api.ActivityPipelineTaskPriorBackup:- return v1pb.LogEntity_ACTION_PIPELINE_TASK_PRIOR_BACKUP-- case api.ActivityProjectRepositoryPush:- return v1pb.LogEntity_ACTION_PROJECT_REPOSITORY_PUSH- case api.ActivityProjectDatabaseTransfer:- return v1pb.LogEntity_ACTION_PROJECT_DATABASE_TRANSFER- case api.ActivityProjectMemberCreate:- return v1pb.LogEntity_ACTION_PROJECT_MEMBER_CREATE- case api.ActivityProjectMemberDelete:- return v1pb.LogEntity_ACTION_PROJECT_MEMBER_DELETE- case api.ActivitySQLQuery:- return v1pb.LogEntity_ACTION_DATABASE_SQL_EDITOR_QUERY- case api.ActivitySQLExport:- return v1pb.LogEntity_ACTION_DATABASE_SQL_EXPORT- default:- return v1pb.LogEntity_ACTION_UNSPECIFIED- }-}--func convertToActivityLevel(logLevel v1pb.LogEntity_Level) (api.ActivityLevel, error) {- switch logLevel {- case v1pb.LogEntity_LEVEL_ERROR:- return api.ActivityError, nil- case v1pb.LogEntity_LEVEL_WARNING:- return api.ActivityWarn, nil- case v1pb.LogEntity_LEVEL_INFO:- return api.ActivityInfo, nil- default:- return api.ActivityError, status.Errorf(codes.InvalidArgument, "unsupport log level %v", logLevel)- }-}--func convertToLogLevel(activityLevel api.ActivityLevel) v1pb.LogEntity_Level {- switch activityLevel {- case api.ActivityInfo:- return v1pb.LogEntity_LEVEL_INFO- case api.ActivityWarn:- return v1pb.LogEntity_LEVEL_WARNING- case api.ActivityError:- return v1pb.LogEntity_LEVEL_ERROR- default:- return v1pb.LogEntity_LEVEL_UNSPECIFIED- }-}diff --git a/backend/server/grpc_routes.go b/backend/server/grpc_routes.goindex 9ffa17e8e8..423aff7ca2 100644--- a/backend/server/grpc_routes.go+++ b/backend/server/grpc_routes.go@@ -89,7 +89,6 @@ func configureGrpcRouters(v1pb.RegisterWorksheetServiceServer(grpcServer, apiv1.NewWorksheetService(stores))v1pb.RegisterBranchServiceServer(grpcServer, apiv1.NewBranchService(stores, licenseService, profile, iamManager))v1pb.RegisterCelServiceServer(grpcServer, apiv1.NewCelService())- v1pb.RegisterLoggingServiceServer(grpcServer, apiv1.NewLoggingService(stores))v1pb.RegisterChangelistServiceServer(grpcServer, apiv1.NewChangelistService(stores, profile, iamManager))v1pb.RegisterVCSConnectorServiceServer(grpcServer, apiv1.NewVCSConnectorService(stores))v1pb.RegisterUserGroupServiceServer(grpcServer, apiv1.NewUserGroupService(stores))@@ -167,9 +166,6 @@ func configureGrpcRouters(if err := v1pb.RegisterIssueServiceHandler(ctx, mux, grpcConn); err != nil {return nil, nil, nil, err}- if err := v1pb.RegisterLoggingServiceHandler(ctx, mux, grpcConn); err != nil {- return nil, nil, nil, err- }if err := v1pb.RegisterChangelistServiceHandler(ctx, mux, grpcConn); err != nil {return nil, nil, nil, err}diff --git a/frontend/src/types/proto/v1/logging_service.ts b/frontend/src/types/proto/v1/logging_service.tsdeleted file mode 100644index 61e0d995e0..0000000000--- a/frontend/src/types/proto/v1/logging_service.ts+++ /dev/null@@ -1,1165 +0,0 @@-/* eslint-disable */-import Long from "long";-import _m0 from "protobufjs/minimal";-import { Timestamp } from "../google/protobuf/timestamp";-import { ExportFormat, exportFormatFromJSON, exportFormatToJSON, exportFormatToNumber } from "./common";--export const protobufPackage = "bytebase.v1";--export interface SearchLogsRequest {- /**- * 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, example:- * - creator = "users/{email}"- * - resource, example:- * - resource = "projects/{project resource id}"- * - level, example:- * - level = "INFO"- * - level = "ERROR | WARN"- * - action, example:- * - action = "ACTION_MEMBER_CREATE"- * - action = "ACTION_MEMBER_CREATE | ACTION_ISSUE_CREATE"- * - create_time, example:- * - create_time <= "2022-01-01T12:00:00.000Z"- * - create_time >= "2022-01-01T12:00:00.000Z"- * For example:- * List the logs of type 'ACTION_ISSUE_COMMENT_CREATE' in issue/123: 'action="ACTION_ISSUE_COMMENT_CREATE", resource="issue/123"'- */- filter: string;- /**- * The order by of the log.- * Only support order by create_time.- * For example:- * - order_by = "create_time asc"- * - order_by = "create_time desc"- */- orderBy: 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 `SearchLogs` call.- * Provide this to retrieve the subsequent page.- */- pageToken: string;-}--export interface SearchLogsResponse {- /** The list of log entities. */- logEntities: LogEntity[];- /**- * A token to retrieve next page of log entities.- * Pass this value in the page_token field in the subsequent call to `SearchLogs` method- * to retrieve the next page of log entities.- */- nextPageToken: string;-}--export interface GetLogRequest {- /**- * The name of the log to retrieve.- * Format: logs/{uid}- */- name: string;-}--export interface ExportLogsRequest {- /**- * Consistent with filter and order by in ListLogs.- * 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, example:- * - creator = "users/{email}"- * - resource, example:- * - resource = "projects/{project resource id}"- * - level, example:- * - level = "INFO"- * - level = "ERROR | WARN"- * - action, example:- * - action = "ACTION_MEMBER_CREATE" | "ACTION_ISSUE_CREATE"- * - create_time, example:- * - create_time <= "2022-01-01T12:00:00.000Z"- * - create_time >= "2022-01-01T12:00:00.000Z"- * For example:- * List the logs of type 'ACTION_ISSUE_COMMENT_CREATE' in issue/123: 'action="ACTION_ISSUE_COMMENT_CREATE", resource="issue/123"'- */- filter: string;- /**- * The order by of the log.- * Only support order by create_time.- * For example:- * - order_by = "create_time asc"- * - order_by = "create_time desc"- */- orderBy: string;- /** The export format. */- format: ExportFormat;-}--export interface ExportLogsResponse {- content: Uint8Array;-}--export interface LogEntity {- /**- * The name of the log.- * Format: logs/{uid}- */- name: string;- /**- * The creator of the log entity.- * Format: users/{email}- */- creator: string;- createTime: Date | undefined;- updateTime: Date | undefined;- action: LogEntity_Action;- level: LogEntity_Level;- /**- * The name of the resource associated with this log entity. For example, the resource user associated with log entity type of "ACTION_MEMBER_CREATE".- * Format:- * For ACTION_MEMBER_*: users/{email}- * For ACTION_ISSUE_*: issues/{issue uid}- * For ACTION_PIPELINE_*: pipelines/{pipeline uid}- * For ACTION_PROJECT_*: projects/{project resource id}- * For ACTION_DATABASE_*: instances/{instance resource id}- */- resource: string;- /**- * The payload of the log entity.- * TODO: use oneof- */- payload: string;- comment: string;-}--export enum LogEntity_Action {- /** ACTION_UNSPECIFIED - In worksapce resource only. */- ACTION_UNSPECIFIED = "ACTION_UNSPECIFIED",- /**- * ACTION_MEMBER_CREATE - Member related activity types.- * Enum value 1 - 20- *- * ACTION_MEMBER_CREATE is the type for creating a new member.- */- ACTION_MEMBER_CREATE = "ACTION_MEMBER_CREATE",- /** ACTION_MEMBER_ROLE_UPDATE - ACTION_MEMBER_ROLE_UPDATE is the type for updating a member's role. */- ACTION_MEMBER_ROLE_UPDATE = "ACTION_MEMBER_ROLE_UPDATE",- /** ACTION_MEMBER_ACTIVATE - ACTION_MEMBER_ACTIVATE_UPDATE is the type for activating members. */- ACTION_MEMBER_ACTIVATE = "ACTION_MEMBER_ACTIVATE",- /** ACTION_MEMBER_DEACTIVE - ACTION_MEMBER_DEACTIVE is the type for deactiving members. */- ACTION_MEMBER_DEACTIVE = "ACTION_MEMBER_DEACTIVE",- /**- * ACTION_ISSUE_CREATE - Issue related activity types.- * Enum value 21 - 40- *- * ACTION_ISSUE_CREATE is the type for creating a new issue.- */- ACTION_ISSUE_CREATE = "ACTION_ISSUE_CREATE",- /** ACTION_ISSUE_COMMENT_CREATE - ACTION_ISSUE_COMMENT_CREATE is the type for creating a new comment on an issue. */- ACTION_ISSUE_COMMENT_CREATE = "ACTION_ISSUE_COMMENT_CREATE",- /** ACTION_ISSUE_FIELD_UPDATE - ACTION_ISSUE_FIELD_UPDATE is the type for updating an issue's field. */- ACTION_ISSUE_FIELD_UPDATE = "ACTION_ISSUE_FIELD_UPDATE",- /** ACTION_ISSUE_STATUS_UPDATE - ACTION_ISSUE_STATUS_UPDATE is the type for updating an issue's status. */- ACTION_ISSUE_STATUS_UPDATE = "ACTION_ISSUE_STATUS_UPDATE",- /** ACTION_ISSUE_APPROVAL_NOTIFY - ACTION_ISSUE_APPROVAL_NOTIFY is the type for notifying issue approval. */- ACTION_ISSUE_APPROVAL_NOTIFY = "ACTION_ISSUE_APPROVAL_NOTIFY",- /** ACTION_PIPELINE_STAGE_STATUS_UPDATE - ACTION_PIPELINE_STAGE_STATUS_UPDATE represents the pipeline stage status change, including BEGIN, END for now. */- ACTION_PIPELINE_STAGE_STATUS_UPDATE = "ACTION_PIPELINE_STAGE_STATUS_UPDATE",- /** ACTION_PIPELINE_TASK_STATUS_UPDATE - ACTION_PIPELINE_TASK_STATUS_UPDATE represents the pipeline task status change, including PENDING, PENDING_APPROVAL, RUNNING, SUCCESS, FAILURE, CANCELED for now. */- ACTION_PIPELINE_TASK_STATUS_UPDATE = "ACTION_PIPELINE_TASK_STATUS_UPDATE",- /** ACTION_PIPELINE_TASK_STATEMENT_UPDATE - ACTION_PIPELINE_TASK_STATEMENT_UPDATE represents the manual update of the task statement. */- ACTION_PIPELINE_TASK_STATEMENT_UPDATE = "ACTION_PIPELINE_TASK_STATEMENT_UPDATE",- /** ACTION_PIPELINE_TASK_EARLIEST_ALLOWED_TIME_UPDATE - ACTION_PIPELINE_TASK_EARLIEST_ALLOWED_TIME_UPDATE represents the manual update of the task earliest allowed time. */- ACTION_PIPELINE_TASK_EARLIEST_ALLOWED_TIME_UPDATE = "ACTION_PIPELINE_TASK_EARLIEST_ALLOWED_TIME_UPDATE",- /** ACTION_PIPELINE_TASK_RUN_STATUS_UPDATE - ACTION_PIPELINE_TASK_RUN_STATUS_UPDATE represents the pipeline task run status change, including PENDING, RUNNING, SUCCESS, FAILURE, CANCELED for now. */- ACTION_PIPELINE_TASK_RUN_STATUS_UPDATE = "ACTION_PIPELINE_TASK_RUN_STATUS_UPDATE",- /** ACTION_PIPELINE_TASK_PRIOR_BACKUP - ACTION_PIPELINE_TASK_PRIOR_BACKUP represents the pipeline task prior backup activity. */- ACTION_PIPELINE_TASK_PRIOR_BACKUP = "ACTION_PIPELINE_TASK_PRIOR_BACKUP",- /**- * ACTION_PROJECT_REPOSITORY_PUSH - Project related activity types.- * Enum value 41 - 60- *- * ACTION_PROJECT_REPOSITORY_PUSH represents Bytebase receiving a push event from the project repository.- */- ACTION_PROJECT_REPOSITORY_PUSH = "ACTION_PROJECT_REPOSITORY_PUSH",- /** ACTION_PROJECT_MEMBER_CREATE - ACTION_PROJECT_MEMBER_CREATE represents adding a member to the project. */- ACTION_PROJECT_MEMBER_CREATE = "ACTION_PROJECT_MEMBER_CREATE",- /** ACTION_PROJECT_MEMBER_DELETE - ACTION_PROJECT_MEMBER_DELETE represents removing a member from the project. */- ACTION_PROJECT_MEMBER_DELETE = "ACTION_PROJECT_MEMBER_DELETE",- /** ACTION_PROJECT_DATABASE_TRANSFER - ACTION_PROJECT_DATABASE_TRANSFER represents transfering the database from one project to another. */- ACTION_PROJECT_DATABASE_TRANSFER = "ACTION_PROJECT_DATABASE_TRANSFER",- /**- * ACTION_DATABASE_SQL_EDITOR_QUERY - Database related activity types.- * Enum value 61 - 80- *- * ACTION_DATABASE_SQL_EDITOR_QUERY is the type for SQL editor query.- */- ACTION_DATABASE_SQL_EDITOR_QUERY = "ACTION_DATABASE_SQL_EDITOR_QUERY",- /** ACTION_DATABASE_SQL_EXPORT - ACTION_DATABASE_SQL_EXPORT is the type for exporting SQL. */- ACTION_DATABASE_SQL_EXPORT = "ACTION_DATABASE_SQL_EXPORT",- UNRECOGNIZED = "UNRECOGNIZED",-}--export function logEntity_ActionFromJSON(object: any): LogEntity_Action {- switch (object) {- case 0:- case "ACTION_UNSPECIFIED":- return LogEntity_Action.ACTION_UNSPECIFIED;- case 1:- case "ACTION_MEMBER_CREATE":- return LogEntity_Action.ACTION_MEMBER_CREATE;- case 2:- case "ACTION_MEMBER_ROLE_UPDATE":- return LogEntity_Action.ACTION_MEMBER_ROLE_UPDATE;- case 3:- case "ACTION_MEMBER_ACTIVATE":- return LogEntity_Action.ACTION_MEMBER_ACTIVATE;- case 4:- case "ACTION_MEMBER_DEACTIVE":- return LogEntity_Action.ACTION_MEMBER_DEACTIVE;- case 21:- case "ACTION_ISSUE_CREATE":- return LogEntity_Action.ACTION_ISSUE_CREATE;- case 22:- case "ACTION_ISSUE_COMMENT_CREATE":- return LogEntity_Action.ACTION_ISSUE_COMMENT_CREATE;- case 23:- case "ACTION_ISSUE_FIELD_UPDATE":- return LogEntity_Action.ACTION_ISSUE_FIELD_UPDATE;- case 24:- case "ACTION_ISSUE_STATUS_UPDATE":- return LogEntity_Action.ACTION_ISSUE_STATUS_UPDATE;- case 25:- case "ACTION_ISSUE_APPROVAL_NOTIFY":- return LogEntity_Action.ACTION_ISSUE_APPROVAL_NOTIFY;- case 31:- case "ACTION_PIPELINE_STAGE_STATUS_UPDATE":- return LogEntity_Action.ACTION_PIPELINE_STAGE_STATUS_UPDATE;- case 32:- case "ACTION_PIPELINE_TASK_STATUS_UPDATE":- return LogEntity_Action.ACTION_PIPELINE_TASK_STATUS_UPDATE;- case 34:- case "ACTION_PIPELINE_TASK_STATEMENT_UPDATE":- return LogEntity_Action.ACTION_PIPELINE_TASK_STATEMENT_UPDATE;- case 35:- case "ACTION_PIPELINE_TASK_EARLIEST_ALLOWED_TIME_UPDATE":- return LogEntity_Action.ACTION_PIPELINE_TASK_EARLIEST_ALLOWED_TIME_UPDATE;- case 36:- case "ACTION_PIPELINE_TASK_RUN_STATUS_UPDATE":- return LogEntity_Action.ACTION_PIPELINE_TASK_RUN_STATUS_UPDATE;- case 37:- case "ACTION_PIPELINE_TASK_PRIOR_BACKUP":- return LogEntity_Action.ACTION_PIPELINE_TASK_PRIOR_BACKUP;- case 41:- case "ACTION_PROJECT_REPOSITORY_PUSH":- return LogEntity_Action.ACTION_PROJECT_REPOSITORY_PUSH;- case 42:- case "ACTION_PROJECT_MEMBER_CREATE":- return LogEntity_Action.ACTION_PROJECT_MEMBER_CREATE;- case 43:- case "ACTION_PROJECT_MEMBER_DELETE":- return LogEntity_Action.ACTION_PROJECT_MEMBER_DELETE;- case 45:- case "ACTION_PROJECT_DATABASE_TRANSFER":- return LogEntity_Action.ACTION_PROJECT_DATABASE_TRANSFER;- case 61:- case "ACTION_DATABASE_SQL_EDITOR_QUERY":- return LogEntity_Action.ACTION_DATABASE_SQL_EDITOR_QUERY;- case 62:- case "ACTION_DATABASE_SQL_EXPORT":- return LogEntity_Action.ACTION_DATABASE_SQL_EXPORT;- case -1:- case "UNRECOGNIZED":- default:- return LogEntity_Action.UNRECOGNIZED;- }-}--export function logEntity_ActionToJSON(object: LogEntity_Action): string {- switch (object) {- case LogEntity_Action.ACTION_UNSPECIFIED:- return "ACTION_UNSPECIFIED";- case LogEntity_Action.ACTION_MEMBER_CREATE:- return "ACTION_MEMBER_CREATE";- case LogEntity_Action.ACTION_MEMBER_ROLE_UPDATE:- return "ACTION_MEMBER_ROLE_UPDATE";- case LogEntity_Action.ACTION_MEMBER_ACTIVATE:- return "ACTION_MEMBER_ACTIVATE";- case LogEntity_Action.ACTION_MEMBER_DEACTIVE:- return "ACTION_MEMBER_DEACTIVE";- case LogEntity_Action.ACTION_ISSUE_CREATE:- return "ACTION_ISSUE_CREATE";- case LogEntity_Action.ACTION_ISSUE_COMMENT_CREATE:- return "ACTION_ISSUE_COMMENT_CREATE";- case LogEntity_Action.ACTION_ISSUE_FIELD_UPDATE:- return "ACTION_ISSUE_FIELD_UPDATE";- case LogEntity_Action.ACTION_ISSUE_STATUS_UPDATE:- return "ACTION_ISSUE_STATUS_UPDATE";- case LogEntity_Action.ACTION_ISSUE_APPROVAL_NOTIFY:- return "ACTION_ISSUE_APPROVAL_NOTIFY";- case LogEntity_Action.ACTION_PIPELINE_STAGE_STATUS_UPDATE:- return "ACTION_PIPELINE_STAGE_STATUS_UPDATE";- case LogEntity_Action.ACTION_PIPELINE_TASK_STATUS_UPDATE:- return "ACTION_PIPELINE_TASK_STATUS_UPDATE";- case LogEntity_Action.ACTION_PIPELINE_TASK_STATEMENT_UPDATE:- return "ACTION_PIPELINE_TASK_STATEMENT_UPDATE";- case LogEntity_Action.ACTION_PIPELINE_TASK_EARLIEST_ALLOWED_TIME_UPDATE:- return "ACTION_PIPELINE_TASK_EARLIEST_ALLOWED_TIME_UPDATE";- case LogEntity_Action.ACTION_PIPELINE_TASK_RUN_STATUS_UPDATE:- return "ACTION_PIPELINE_TASK_RUN_STATUS_UPDATE";- case LogEntity_Action.ACTION_PIPELINE_TASK_PRIOR_BACKUP:- return "ACTION_PIPELINE_TASK_PRIOR_BACKUP";- case LogEntity_Action.ACTION_PROJECT_REPOSITORY_PUSH:- return "ACTION_PROJECT_REPOSITORY_PUSH";- case LogEntity_Action.ACTION_PROJECT_MEMBER_CREATE:- return "ACTION_PROJECT_MEMBER_CREATE";- case LogEntity_Action.ACTION_PROJECT_MEMBER_DELETE:- return "ACTION_PROJECT_MEMBER_DELETE";- case LogEntity_Action.ACTION_PROJECT_DATABASE_TRANSFER:- return "ACTION_PROJECT_DATABASE_TRANSFER";- case LogEntity_Action.ACTION_DATABASE_SQL_EDITOR_QUERY:- return "ACTION_DATABASE_SQL_EDITOR_QUERY";- case LogEntity_Action.ACTION_DATABASE_SQL_EXPORT:- return "ACTION_DATABASE_SQL_EXPORT";- case LogEntity_Action.UNRECOGNIZED:- default:- return "UNRECOGNIZED";- }-}--export function logEntity_ActionToNumber(object: LogEntity_Action): number {- switch (object) {- case LogEntity_Action.ACTION_UNSPECIFIED:- return 0;- case LogEntity_Action.ACTION_MEMBER_CREATE:- return 1;- case LogEntity_Action.ACTION_MEMBER_ROLE_UPDATE:- return 2;- case LogEntity_Action.ACTION_MEMBER_ACTIVATE:- return 3;- case LogEntity_Action.ACTION_MEMBER_DEACTIVE:- return 4;- case LogEntity_Action.ACTION_ISSUE_CREATE:- return 21;- case LogEntity_Action.ACTION_ISSUE_COMMENT_CREATE:- return 22;- case LogEntity_Action.ACTION_ISSUE_FIELD_UPDATE:- return 23;- case LogEntity_Action.ACTION_ISSUE_STATUS_UPDATE:- return 24;- case LogEntity_Action.ACTION_ISSUE_APPROVAL_NOTIFY:- return 25;- case LogEntity_Action.ACTION_PIPELINE_STAGE_STATUS_UPDATE:- return 31;- case LogEntity_Action.ACTION_PIPELINE_TASK_STATUS_UPDATE:- return 32;- case LogEntity_Action.ACTION_PIPELINE_TASK_STATEMENT_UPDATE:- return 34;- case LogEntity_Action.ACTION_PIPELINE_TASK_EARLIEST_ALLOWED_TIME_UPDATE:- return 35;- case LogEntity_Action.ACTION_PIPELINE_TASK_RUN_STATUS_UPDATE:- return 36;- case LogEntity_Action.ACTION_PIPELINE_TASK_PRIOR_BACKUP:- return 37;- case LogEntity_Action.ACTION_PROJECT_REPOSITORY_PUSH:- return 41;- case LogEntity_Action.ACTION_PROJECT_MEMBER_CREATE:- return 42;- case LogEntity_Action.ACTION_PROJECT_MEMBER_DELETE:- return 43;- case LogEntity_Action.ACTION_PROJECT_DATABASE_TRANSFER:- return 45;- case LogEntity_Action.ACTION_DATABASE_SQL_EDITOR_QUERY:- return 61;- case LogEntity_Action.ACTION_DATABASE_SQL_EXPORT:- return 62;- case LogEntity_Action.UNRECOGNIZED:- default:- return -1;- }-}--export enum LogEntity_Level {- LEVEL_UNSPECIFIED = "LEVEL_UNSPECIFIED",- /** LEVEL_INFO - LEVEL_INFO is the type for information. */- LEVEL_INFO = "LEVEL_INFO",- /** LEVEL_WARNING - LEVEL_WARNING is the type for warning. */- LEVEL_WARNING = "LEVEL_WARNING",- /** LEVEL_ERROR - LEVEL_ERROR is the type for error. */- LEVEL_ERROR = "LEVEL_ERROR",- UNRECOGNIZED = "UNRECOGNIZED",-}--export function logEntity_LevelFromJSON(object: any): LogEntity_Level {- switch (object) {- case 0:- case "LEVEL_UNSPECIFIED":- return LogEntity_Level.LEVEL_UNSPECIFIED;- case 1:- case "LEVEL_INFO":- return LogEntity_Level.LEVEL_INFO;- case 2:- case "LEVEL_WARNING":- return LogEntity_Level.LEVEL_WARNING;- case 3:- case "LEVEL_ERROR":- return LogEntity_Level.LEVEL_ERROR;- case -1:- case "UNRECOGNIZED":- default:- return LogEntity_Level.UNRECOGNIZED;- }-}--export function logEntity_LevelToJSON(object: LogEntity_Level): string {- switch (object) {- case LogEntity_Level.LEVEL_UNSPECIFIED:- return "LEVEL_UNSPECIFIED";- case LogEntity_Level.LEVEL_INFO:- return "LEVEL_INFO";- case LogEntity_Level.LEVEL_WARNING:- return "LEVEL_WARNING";- case LogEntity_Level.LEVEL_ERROR:- return "LEVEL_ERROR";- case LogEntity_Level.UNRECOGNIZED:- default:- return "UNRECOGNIZED";- }-}--export function logEntity_LevelToNumber(object: LogEntity_Level): number {- switch (object) {- case LogEntity_Level.LEVEL_UNSPECIFIED:- return 0;- case LogEntity_Level.LEVEL_INFO:- return 1;- case LogEntity_Level.LEVEL_WARNING:- return 2;- case LogEntity_Level.LEVEL_ERROR:- return 3;- case LogEntity_Level.UNRECOGNIZED:- default:- return -1;- }-}--function createBaseSearchLogsRequest(): SearchLogsRequest {- return { filter: "", orderBy: "", pageSize: 0, pageToken: "" };-}--export const SearchLogsRequest = {- encode(message: SearchLogsRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {- if (message.filter !== "") {- writer.uint32(10).string(message.filter);- }- if (message.orderBy !== "") {- writer.uint32(18).string(message.orderBy);- }- 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): SearchLogsRequest {- const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);- let end = length === undefined ? reader.len : reader.pos + length;- const message = createBaseSearchLogsRequest();- while (reader.pos < end) {- const tag = reader.uint32();- switch (tag >>> 3) {- case 1:- if (tag !== 10) {- break;- }-- message.filter = reader.string();- continue;- case 2:- if (tag !== 18) {- break;- }-- message.orderBy = reader.string();- continue;- case 3:- if (tag !== 24) {- break;- }-- message.pageSize = reader.int32();- continue;- case 4:- if (tag !== 34) {- break;- }-- message.pageToken = reader.string();- continue;- }- if ((tag & 7) === 4 || tag === 0) {- break;- }- reader.skipType(tag & 7);- }- return message;- },-- fromJSON(object: any): SearchLogsRequest {- return {- filter: isSet(object.filter) ? globalThis.String(object.filter) : "",- orderBy: isSet(object.orderBy) ? globalThis.String(object.orderBy) : "",- pageSize: isSet(object.pageSize) ? globalThis.Number(object.pageSize) : 0,- pageToken: isSet(object.pageToken) ? globalThis.String(object.pageToken) : "",- };- },-- toJSON(message: SearchLogsRequest): unknown {- const obj: any = {};- if (message.filter !== "") {- obj.filter = message.filter;- }- if (message.orderBy !== "") {- obj.orderBy = message.orderBy;- }- if (message.pageSize !== 0) {- obj.pageSize = Math.round(message.pageSize);- }- if (message.pageToken !== "") {- obj.pageToken = message.pageToken;- }- return obj;- },-- create(base?: DeepPartial<SearchLogsRequest>): SearchLogsRequest {- return SearchLogsRequest.fromPartial(base ?? {});- },- fromPartial(object: DeepPartial<SearchLogsRequest>): SearchLogsRequest {- const message = createBaseSearchLogsRequest();- message.filter = object.filter ?? "";- message.orderBy = object.orderBy ?? "";- message.pageSize = object.pageSize ?? 0;- message.pageToken = object.pageToken ?? "";- return message;- },-};--function createBaseSearchLogsResponse(): SearchLogsResponse {- return { logEntities: [], nextPageToken: "" };-}--export const SearchLogsResponse = {- encode(message: SearchLogsResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {- for (const v of message.logEntities) {- LogEntity.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): SearchLogsResponse {- const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);- let end = length === undefined ? reader.len : reader.pos + length;- const message = createBaseSearchLogsResponse();- while (reader.pos < end) {- const tag = reader.uint32();- switch (tag >>> 3) {- case 1:- if (tag !== 10) {- break;- }-- message.logEntities.push(LogEntity.decode(reader, reader.uint32()));- continue;- case 2:- if (tag !== 18) {- break;- }-- message.nextPageToken = reader.string();- continue;- }- if ((tag & 7) === 4 || tag === 0) {- break;- }- reader.skipType(tag & 7);- }- return message;- },-- fromJSON(object: any): SearchLogsResponse {- return {- logEntities: globalThis.Array.isArray(object?.logEntities)- ? object.logEntities.map((e: any) => LogEntity.fromJSON(e))- : [],- nextPageToken: isSet(object.nextPageToken) ? globalThis.String(object.nextPageToken) : "",- };- },-- toJSON(message: SearchLogsResponse): unknown {- const obj: any = {};- if (message.logEntities?.length) {- obj.logEntities = message.logEntities.map((e) => LogEntity.toJSON(e));- }- if (message.nextPageToken !== "") {- obj.nextPageToken = message.nextPageToken;- }- return obj;- },-- create(base?: DeepPartial<SearchLogsResponse>): SearchLogsResponse {- return SearchLogsResponse.fromPartial(base ?? {});- },- fromPartial(object: DeepPartial<SearchLogsResponse>): SearchLogsResponse {- const message = createBaseSearchLogsResponse();- message.logEntities = object.logEntities?.map((e) => LogEntity.fromPartial(e)) || [];- message.nextPageToken = object.nextPageToken ?? "";- return message;- },-};--function createBaseGetLogRequest(): GetLogRequest {- return { name: "" };-}--export const GetLogRequest = {- encode(message: GetLogRequest, 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): GetLogRequest {- const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);- let end = length === undefined ? reader.len : reader.pos + length;- const message = createBaseGetLogRequest();- while (reader.pos < end) {- const tag = reader.uint32();- switch (tag >>> 3) {- case 1:- if (tag !== 10) {- break;- }-- message.name = reader.string();- continue;- }- if ((tag & 7) === 4 || tag === 0) {- break;- }- reader.skipType(tag & 7);- }- return message;- },-- fromJSON(object: any): GetLogRequest {- return { name: isSet(object.name) ? globalThis.String(object.name) : "" };- },-- toJSON(message: GetLogRequest): unknown {- const obj: any = {};- if (message.name !== "") {- obj.name = message.name;- }- return obj;- },-- create(base?: DeepPartial<GetLogRequest>): GetLogRequest {- return GetLogRequest.fromPartial(base ?? {});- },- fromPartial(object: DeepPartial<GetLogRequest>): GetLogRequest {- const message = createBaseGetLogRequest();- message.name = object.name ?? "";- return message;- },-};--function createBaseExportLogsRequest(): ExportLogsRequest {- return { filter: "", orderBy: "", format: ExportFormat.FORMAT_UNSPECIFIED };-}--export const ExportLogsRequest = {- encode(message: ExportLogsRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {- if (message.filter !== "") {- writer.uint32(10).string(message.filter);- }- if (message.orderBy !== "") {- writer.uint32(18).string(message.orderBy);- }- if (message.format !== ExportFormat.FORMAT_UNSPECIFIED) {- writer.uint32(40).int32(exportFormatToNumber(message.format));- }- return writer;- },-- decode(input: _m0.Reader | Uint8Array, length?: number): ExportLogsRequest {- const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);- let end = length === undefined ? reader.len : reader.pos + length;- const message = createBaseExportLogsRequest();- while (reader.pos < end) {- const tag = reader.uint32();- switch (tag >>> 3) {- case 1:- if (tag !== 10) {- break;- }-- message.filter = reader.string();- continue;- case 2:- if (tag !== 18) {- break;- }-- message.orderBy = reader.string();- continue;- case 5:- if (tag !== 40) {- break;- }-- message.format = exportFormatFromJSON(reader.int32());- continue;- }- if ((tag & 7) === 4 || tag === 0) {- break;- }- reader.skipType(tag & 7);- }- return message;- },-- fromJSON(object: any): ExportLogsRequest {- return {- filter: isSet(object.filter) ? globalThis.String(object.filter) : "",- orderBy: isSet(object.orderBy) ? globalThis.String(object.orderBy) : "",- format: isSet(object.format) ? exportFormatFromJSON(object.format) : ExportFormat.FORMAT_UNSPECIFIED,- };- },-- toJSON(message: ExportLogsRequest): unknown {- const obj: any = {};- if (message.filter !== "") {- obj.filter = message.filter;- }- if (message.orderBy !== "") {- obj.orderBy = message.orderBy;- }- if (message.format !== ExportFormat.FORMAT_UNSPECIFIED) {- obj.format = exportFormatToJSON(message.format);- }- return obj;- },-- create(base?: DeepPartial<ExportLogsRequest>): ExportLogsRequest {- return ExportLogsRequest.fromPartial(base ?? {});- },- fromPartial(object: DeepPartial<ExportLogsRequest>): ExportLogsRequest {- const message = createBaseExportLogsRequest();- message.filter = object.filter ?? "";- message.orderBy = object.orderBy ?? "";- message.format = object.format ?? ExportFormat.FORMAT_UNSPECIFIED;- return message;- },-};--function createBaseExportLogsResponse(): ExportLogsResponse {- return { content: new Uint8Array(0) };-}--export const ExportLogsResponse = {- encode(message: ExportLogsResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {- if (message.content.length !== 0) {- writer.uint32(10).bytes(message.content);- }- return writer;- },-- decode(input: _m0.Reader | Uint8Array, length?: number): ExportLogsResponse {- const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);- let end = length === undefined ? reader.len : reader.pos + length;- const message = createBaseExportLogsResponse();- while (reader.pos < end) {- const tag = reader.uint32();- switch (tag >>> 3) {- case 1:- if (tag !== 10) {- break;- }-- message.content = reader.bytes();- continue;- }- if ((tag & 7) === 4 || tag === 0) {- break;- }- reader.skipType(tag & 7);- }- return message;- },-- fromJSON(object: any): ExportLogsResponse {- return { content: isSet(object.content) ? bytesFromBase64(object.content) : new Uint8Array(0) };- },-- toJSON(message: ExportLogsResponse): unknown {- const obj: any = {};- if (message.content.length !== 0) {- obj.content = base64FromBytes(message.content);- }- return obj;- },-- create(base?: DeepPartial<ExportLogsResponse>): ExportLogsResponse {- return ExportLogsResponse.fromPartial(base ?? {});- },- fromPartial(object: DeepPartial<ExportLogsResponse>): ExportLogsResponse {- const message = createBaseExportLogsResponse();- message.content = object.content ?? new Uint8Array(0);- return message;- },-};--function createBaseLogEntity(): LogEntity {- return {- name: "",- creator: "",- createTime: undefined,- updateTime: undefined,- action: LogEntity_Action.ACTION_UNSPECIFIED,- level: LogEntity_Level.LEVEL_UNSPECIFIED,- resource: "",- payload: "",- comment: "",- };-}--export const LogEntity = {- encode(message: LogEntity, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {- if (message.name !== "") {- writer.uint32(10).string(message.name);- }- if (message.creator !== "") {- writer.uint32(18).string(message.creator);- }- if (message.createTime !== undefined) {- Timestamp.encode(toTimestamp(message.createTime), writer.uint32(26).fork()).ldelim();- }- if (message.updateTime !== undefined) {- Timestamp.encode(toTimestamp(message.updateTime), writer.uint32(34).fork()).ldelim();- }- if (message.action !== LogEntity_Action.ACTION_UNSPECIFIED) {- writer.uint32(40).int32(logEntity_ActionToNumber(message.action));- }- if (message.level !== LogEntity_Level.LEVEL_UNSPECIFIED) {- writer.uint32(48).int32(logEntity_LevelToNumber(message.level));- }- if (message.resource !== "") {- writer.uint32(58).string(message.resource);- }- if (message.payload !== "") {- writer.uint32(66).string(message.payload);- }- if (message.comment !== "") {- writer.uint32(74).string(message.comment);- }- return writer;- },-- decode(input: _m0.Reader | Uint8Array, length?: number): LogEntity {- const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);- let end = length === undefined ? reader.len : reader.pos + length;- const message = createBaseLogEntity();- while (reader.pos < end) {- const tag = reader.uint32();- switch (tag >>> 3) {- case 1:- if (tag !== 10) {- break;- }-- message.name = reader.string();- continue;- case 2:- if (tag !== 18) {- break;- }-- message.creator = reader.string();- continue;- case 3:- if (tag !== 26) {- break;- }-- message.createTime = fromTimestamp(Timestamp.decode(reader, reader.uint32()));- continue;- case 4:- if (tag !== 34) {- break;- }-- message.updateTime = fromTimestamp(Timestamp.decode(reader, reader.uint32()));- continue;- case 5:- if (tag !== 40) {- break;- }-- message.action = logEntity_ActionFromJSON(reader.int32());- continue;- case 6:- if (tag !== 48) {- break;- }-- message.level = logEntity_LevelFromJSON(reader.int32());- continue;- case 7:- if (tag !== 58) {- break;- }-- message.resource = reader.string();- continue;- case 8:- if (tag !== 66) {- break;- }-- message.payload = reader.string();- continue;- case 9:- if (tag !== 74) {- break;- }-- message.comment = reader.string();- continue;- }- if ((tag & 7) === 4 || tag === 0) {- break;- }- reader.skipType(tag & 7);- }- return message;- },-- fromJSON(object: any): LogEntity {- return {- name: isSet(object.name) ? globalThis.String(object.name) : "",- creator: isSet(object.creator) ? globalThis.String(object.creator) : "",- createTime: isSet(object.createTime) ? fromJsonTimestamp(object.createTime) : undefined,- updateTime: isSet(object.updateTime) ? fromJsonTimestamp(object.updateTime) : undefined,- action: isSet(object.action) ? logEntity_ActionFromJSON(object.action) : LogEntity_Action.ACTION_UNSPECIFIED,- level: isSet(object.level) ? logEntity_LevelFromJSON(object.level) : LogEntity_Level.LEVEL_UNSPECIFIED,- resource: isSet(object.resource) ? globalThis.String(object.resource) : "",- payload: isSet(object.payload) ? globalThis.String(object.payload) : "",- comment: isSet(object.comment) ? globalThis.String(object.comment) : "",- };- },-- toJSON(message: LogEntity): unknown {- const obj: any = {};- if (message.name !== "") {- obj.name = message.name;- }- if (message.creator !== "") {- obj.creator = message.creator;- }- if (message.createTime !== undefined) {- obj.createTime = message.createTime.toISOString();- }- if (message.updateTime !== undefined) {- obj.updateTime = message.updateTime.toISOString();- }- if (message.action !== LogEntity_Action.ACTION_UNSPECIFIED) {- obj.action = logEntity_ActionToJSON(message.action);- }- if (message.level !== LogEntity_Level.LEVEL_UNSPECIFIED) {- obj.level = logEntity_LevelToJSON(message.level);- }- if (message.resource !== "") {- obj.resource = message.resource;- }- if (message.payload !== "") {- obj.payload = message.payload;- }- if (message.comment !== "") {- obj.comment = message.comment;- }- return obj;- },-- create(base?: DeepPartial<LogEntity>): LogEntity {- return LogEntity.fromPartial(base ?? {});- },- fromPartial(object: DeepPartial<LogEntity>): LogEntity {- const message = createBaseLogEntity();- message.name = object.name ?? "";- message.creator = object.creator ?? "";- message.createTime = object.createTime ?? undefined;- message.updateTime = object.updateTime ?? undefined;- message.action = object.action ?? LogEntity_Action.ACTION_UNSPECIFIED;- message.level = object.level ?? LogEntity_Level.LEVEL_UNSPECIFIED;- message.resource = object.resource ?? "";- message.payload = object.payload ?? "";- message.comment = object.comment ?? "";- return message;- },-};--export type LoggingServiceDefinition = typeof LoggingServiceDefinition;-export const LoggingServiceDefinition = {- name: "LoggingService",- fullName: "bytebase.v1.LoggingService",- methods: {- searchLogs: {- name: "SearchLogs",- requestType: SearchLogsRequest,- requestStream: false,- responseType: SearchLogsResponse,- responseStream: false,- options: {- _unknownFields: {- 578365826: [- new Uint8Array([17, 18, 15, 47, 118, 49, 47, 108, 111, 103, 115, 58, 115, 101, 97, 114, 99, 104]),- ],- },- },- },- getLog: {- name: "GetLog",- requestType: GetLogRequest,- requestStream: false,- responseType: LogEntity,- responseStream: false,- options: {- _unknownFields: {- 8410: [new Uint8Array([4, 110, 97, 109, 101])],- 578365826: [- new Uint8Array([19, 18, 17, 47, 118, 49, 47, 123, 110, 97, 109, 101, 61, 108, 111, 103, 115, 47, 42, 125]),- ],- },- },- },- exportLogs: {- name: "ExportLogs",- requestType: ExportLogsRequest,- requestStream: false,- responseType: ExportLogsResponse,- responseStream: false,- options: {- _unknownFields: {- 578365826: [- new Uint8Array([- 20,- 58,- 1,- 42,- 34,- 15,- 47,- 118,- 49,- 47,- 108,- 111,- 103,- 115,- 58,- 101,- 120,- 112,- 111,- 114,- 116,- ]),- ],- },- },- },- },-} as const;--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(globalThis.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 Long ? string | number | Long : T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>>- : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>>- : T extends {} ? { [K in keyof T]?: DeepPartial<T[K]> }- : Partial<T>;--function toTimestamp(date: Date): Timestamp {- const seconds = numberToLong(date.getTime() / 1_000);- const nanos = (date.getTime() % 1_000) * 1_000_000;- return { seconds, nanos };-}--function fromTimestamp(t: Timestamp): Date {- let millis = (t.seconds.toNumber() || 0) * 1_000;- millis += (t.nanos || 0) / 1_000_000;- return new globalThis.Date(millis);-}--function fromJsonTimestamp(o: any): Date {- if (o instanceof globalThis.Date) {- return o;- } else if (typeof o === "string") {- return new globalThis.Date(o);- } else {- return fromTimestamp(Timestamp.fromJSON(o));- }-}--function numberToLong(number: number) {- return Long.fromNumber(number);-}--if (_m0.util.Long !== Long) {- _m0.util.Long = Long as any;- _m0.configure();-}--function isSet(value: any): boolean {- return value !== null && value !== undefined;-}diff --git a/frontend/src/types/proto/v1/vcs.ts b/frontend/src/types/proto/v1/vcs.tsdeleted file mode 100644index 483f23a835..0000000000--- a/frontend/src/types/proto/v1/vcs.ts+++ /dev/null@@ -1,48 +0,0 @@-/* eslint-disable */--export const protobufPackage = "bytebase.v1";--export enum VcsType {- VCS_TYPE_UNSPECIFIED = 0,- GITLAB = 1,- GITHUB = 2,- BITBUCKET = 3,- UNRECOGNIZED = -1,-}--export function vcsTypeFromJSON(object: any): VcsType {- switch (object) {- case 0:- case "VCS_TYPE_UNSPECIFIED":- return VcsType.VCS_TYPE_UNSPECIFIED;- case 1:- case "GITLAB":- return VcsType.GITLAB;- case 2:- case "GITHUB":- return VcsType.GITHUB;- case 3:- case "BITBUCKET":- return VcsType.BITBUCKET;- case -1:- case "UNRECOGNIZED":- default:- return VcsType.UNRECOGNIZED;- }-}--export function vcsTypeToJSON(object: VcsType): string {- switch (object) {- case VcsType.VCS_TYPE_UNSPECIFIED:- return "VCS_TYPE_UNSPECIFIED";- case VcsType.GITLAB:- return "GITLAB";- case VcsType.GITHUB:- return "GITHUB";- case VcsType.BITBUCKET:- return "BITBUCKET";- case VcsType.UNRECOGNIZED:- default:- return "UNRECOGNIZED";- }-}diff --git a/proto/gen/grpc-doc/openapi.yaml b/proto/gen/grpc-doc/openapi.yamlindex 04ef50ba26..87c8bede77 100644--- a/proto/gen/grpc-doc/openapi.yaml+++ b/proto/gen/grpc-doc/openapi.yaml@@ -3319,124 +3319,6 @@ paths:application/json:schema:$ref: '#/components/schemas/Status'- /v1/logs/{log}:- get:- tags:- - LoggingService- operationId: LoggingService_GetLog- parameters:- - name: log- in: path- description: The log id.- required: true- schema:- type: string- responses:- "200":- description: OK- content:- application/json:- schema:- $ref: '#/components/schemas/LogEntity'- default:- description: Default error response- content:- application/json:- schema:- $ref: '#/components/schemas/Status'- /v1/logs:export:- post:- tags:- - LoggingService- operationId: LoggingService_ExportLogs- requestBody:- content:- application/json:- schema:- $ref: '#/components/schemas/ExportLogsRequest'- required: true- responses:- "200":- description: OK- content:- application/json:- schema:- $ref: '#/components/schemas/ExportLogsResponse'- default:- description: Default error response- content:- application/json:- schema:- $ref: '#/components/schemas/Status'- /v1/logs:search:- get:- tags:- - LoggingService- operationId: LoggingService_SearchLogs- parameters:- - name: filter- in: query- description: |-- 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, example:- - creator = "users/{email}"- - resource, example:- - resource = "projects/{project resource id}"- - level, example:- - level = "INFO"- - level = "ERROR | WARN"- - action, example:- - action = "ACTION_MEMBER_CREATE"- - action = "ACTION_MEMBER_CREATE | ACTION_ISSUE_CREATE"- - create_time, example:- - create_time <= "2022-01-01T12:00:00.000Z"- - create_time >= "2022-01-01T12:00:00.000Z"- For example:- List the logs of type 'ACTION_ISSUE_COMMENT_CREATE' in issue/123: 'action="ACTION_ISSUE_COMMENT_CREATE", resource="issue/123"'- schema:- type: string- - name: orderBy- in: query- description: |-- The order by of the log.- Only support order by create_time.- For example:- - order_by = "create_time asc"- - order_by = "create_time desc"- schema:- type: string- - name: pageSize- in: query- description: |-- 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.- schema:- type: integer- format: int32- - name: pageToken- in: query- description: |-- Not used. A page token, received from a previous `SearchLogs` call.- Provide this to retrieve the subsequent page.- schema:- type: string- responses:- "200":- description: OK- content:- application/json:- schema:- $ref: '#/components/schemas/SearchLogsResponse'- default:- description: Default error response- content:- application/json:- schema:- $ref: '#/components/schemas/Status'/v1/policies:get:tags:@@ -9876,54 +9758,6 @@ components:content:type: stringformat: bytes- ExportLogsRequest:- type: object- properties:- filter:- type: string- description: |-- Consistent with filter and order by in ListLogs.- 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, example:- - creator = "users/{email}"- - resource, example:- - resource = "projects/{project resource id}"- - level, example:- - level = "INFO"- - level = "ERROR | WARN"- - action, example:- - action = "ACTION_MEMBER_CREATE" | "ACTION_ISSUE_CREATE"- - create_time, example:- - create_time <= "2022-01-01T12:00:00.000Z"- - create_time >= "2022-01-01T12:00:00.000Z"- For example:- List the logs of type 'ACTION_ISSUE_COMMENT_CREATE' in issue/123: 'action="ACTION_ISSUE_COMMENT_CREATE", resource="issue/123"'- orderBy:- type: string- description: |-- The order by of the log.- Only support order by create_time.- For example:- - order_by = "create_time asc"- - order_by = "create_time desc"- format:- enum:- - FORMAT_UNSPECIFIED- - CSV- - JSON- - SQL- - XLSX- type: string- description: The export format.- format: enum- ExportLogsResponse:- type: object- properties:- content:- type: string- format: bytesExportRequest:required:- name@@ -11142,85 +10976,6 @@ components:description: |-Not used. A token, which can be sent as `page_token` to retrieve the next page.If this field is omitted, there are no subsequent pages.- LogEntity:- required:- - action- - level- - resource- - payload- type: object- properties:- name:- readOnly: true- type: string- description: |-- The name of the log.- Format: logs/{uid}- creator:- readOnly: true- type: string- description: |-- The creator of the log entity.- Format: users/{email}- createTime:- readOnly: true- type: string- format: date-time- updateTime:- readOnly: true- type: string- format: date-time- action:- enum:- - ACTION_UNSPECIFIED- - ACTION_MEMBER_CREATE- - ACTION_MEMBER_ROLE_UPDATE- - ACTION_MEMBER_ACTIVATE- - ACTION_MEMBER_DEACTIVE- - ACTION_ISSUE_CREATE- - ACTION_ISSUE_COMMENT_CREATE- - ACTION_ISSUE_FIELD_UPDATE- - ACTION_ISSUE_STATUS_UPDATE- - ACTION_ISSUE_APPROVAL_NOTIFY- - ACTION_PIPELINE_STAGE_STATUS_UPDATE- - ACTION_PIPELINE_TASK_STATUS_UPDATE- - ACTION_PIPELINE_TASK_STATEMENT_UPDATE- - ACTION_PIPELINE_TASK_EARLIEST_ALLOWED_TIME_UPDATE- - ACTION_PIPELINE_TASK_RUN_STATUS_UPDATE- - ACTION_PIPELINE_TASK_PRIOR_BACKUP- - ACTION_PROJECT_REPOSITORY_PUSH- - ACTION_PROJECT_MEMBER_CREATE- - ACTION_PROJECT_MEMBER_DELETE- - ACTION_PROJECT_DATABASE_TRANSFER- - ACTION_DATABASE_SQL_EDITOR_QUERY- - ACTION_DATABASE_SQL_EXPORT- type: string- format: enum- level:- enum:- - LEVEL_UNSPECIFIED- - LEVEL_INFO- - LEVEL_WARNING- - LEVEL_ERROR- type: string- format: enum- resource:- type: string- description: |-- The name of the resource associated with this log entity. For example, the resource user associated with log entity type of "ACTION_MEMBER_CREATE".- Format:- For ACTION_MEMBER_*: users/{email}- For ACTION_ISSUE_*: issues/{issue uid}- For ACTION_PIPELINE_*: pipelines/{pipeline uid}- For ACTION_PROJECT_*: projects/{project resource id}- For ACTION_DATABASE_*: instances/{instance resource id}- payload:- type: string- description: |-- The payload of the log entity.- TODO: use oneof- comment:- type: stringLoginRequest:required:- idpName@@ -12732,21 +12487,6 @@ components:description: |-A token, which can be sent as `page_token` to retrieve the next page.If this field is omitted, there are no subsequent pages.- SearchLogsResponse:- type: object- properties:- logEntities:- readOnly: true- type: array- items:- $ref: '#/components/schemas/LogEntity'- description: The list of log entities.- nextPageToken:- type: string- description: |-- A token to retrieve next page of log entities.- Pass this value in the page_token field in the subsequent call to `SearchLogs` method- to retrieve the next page of log entities.SearchPlansResponse:type: objectproperties:@@ -14402,7 +14142,6 @@ tags:- name: InstanceRoleService- name: InstanceService- name: IssueService- - name: LoggingService- name: OrgPolicyService- name: PlanService- name: ProjectServicediff --git a/proto/gen/grpc-doc/v1/README.md b/proto/gen/grpc-doc/v1/README.mdindex 66b2fbb09d..062de7232a 100644--- a/proto/gen/grpc-doc/v1/README.md+++ b/proto/gen/grpc-doc/v1/README.md@@ -317,19 +317,6 @@- [IssueService](#bytebase-v1-IssueService)-- [v1/logging_service.proto](#v1_logging_service-proto)- - [ExportLogsRequest](#bytebase-v1-ExportLogsRequest)- - [ExportLogsResponse](#bytebase-v1-ExportLogsResponse)- - [GetLogRequest](#bytebase-v1-GetLogRequest)- - [LogEntity](#bytebase-v1-LogEntity)- - [SearchLogsRequest](#bytebase-v1-SearchLogsRequest)- - [SearchLogsResponse](#bytebase-v1-SearchLogsResponse)-- - [LogEntity.Action](#bytebase-v1-LogEntity-Action)- - [LogEntity.Level](#bytebase-v1-LogEntity-Level)-- - [LoggingService](#bytebase-v1-LoggingService)-- [v1/org_policy_service.proto](#v1_org_policy_service-proto)- [CreatePolicyRequest](#bytebase-v1-CreatePolicyRequest)- [DeletePolicyRequest](#bytebase-v1-DeletePolicyRequest)@@ -5461,192 +5448,6 @@ ANY means approving any node will proceed.-<a name="v1_logging_service-proto"></a>-<p align="right"><a href="#top">Top</a></p>--## v1/logging_service.proto----<a name="bytebase-v1-ExportLogsRequest"></a>--### ExportLogsRequest----| Field | Type | Label | Description |-| ----- | ---- | ----- | ----------- |-| filter | [string](#string) | | Consistent with filter and order by in ListLogs. 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, example: - creator = "users/{email}" - resource, example: - resource = "projects/{project resource id}" - level, example: - level = "INFO" - level = "ERROR | WARN" - action, example: - action = "ACTION_MEMBER_CREATE" | "ACTION_ISSUE_CREATE" - create_time, example: - create_time <= "2022-01-01T12:00:00.000Z" - create_time >= "2022-01-01T12:00:00.000Z" For example: List the logs of type 'ACTION_ISSUE_COMMENT_CREATE' in issue/123: 'action="ACTION_ISSUE_COMMENT_CREATE", resource="issue/123"' |-| order_by | [string](#string) | | The order by of the log. Only support order by create_time. For example: - order_by = "create_time asc" - order_by = "create_time desc" |-| format | [ExportFormat](#bytebase-v1-ExportFormat) | | The export format. |-------<a name="bytebase-v1-ExportLogsResponse"></a>--### ExportLogsResponse----| Field | Type | Label | Description |-| ----- | ---- | ----- | ----------- |-| content | [bytes](#bytes) | | |-------<a name="bytebase-v1-GetLogRequest"></a>--### GetLogRequest----| Field | Type | Label | Description |-| ----- | ---- | ----- | ----------- |-| name | [string](#string) | | The name of the log to retrieve. Format: logs/{uid} |-------<a name="bytebase-v1-LogEntity"></a>--### LogEntity----| Field | Type | Label | Description |-| ----- | ---- | ----- | ----------- |-| name | [string](#string) | | The name of the log. Format: logs/{uid} |-| creator | [string](#string) | | The creator of the log entity. Format: users/{email} |-| create_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | |-| update_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | |-| action | [LogEntity.Action](#bytebase-v1-LogEntity-Action) | | |-| level | [LogEntity.Level](#bytebase-v1-LogEntity-Level) | | |-| resource | [string](#string) | | The name of the resource associated with this log entity. For example, the resource user associated with log entity type of "ACTION_MEMBER_CREATE". Format: For ACTION_MEMBER_*: users/{email} For ACTION_ISSUE_*: issues/{issue uid} For ACTION_PIPELINE_*: pipelines/{pipeline uid} For ACTION_PROJECT_*: projects/{project resource id} For ACTION_DATABASE_*: instances/{instance resource id} |-| payload | [string](#string) | | The payload of the log entity. TODO: use oneof |-| comment | [string](#string) | | |-------<a name="bytebase-v1-SearchLogsRequest"></a>--### SearchLogsRequest----| Field | Type | Label | Description |-| ----- | ---- | ----- | ----------- |-| 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, example: - creator = "users/{email}" - resource, example: - resource = "projects/{project resource id}" - level, example: - level = "INFO" - level = "ERROR | WARN" - action, example: - action = "ACTION_MEMBER_CREATE" - action = "ACTION_MEMBER_CREATE | ACTION_ISSUE_CREATE" - create_time, example: - create_time <= "2022-01-01T12:00:00.000Z" - create_time >= "2022-01-01T12:00:00.000Z" For example: List the logs of type 'ACTION_ISSUE_COMMENT_CREATE' in issue/123: 'action="ACTION_ISSUE_COMMENT_CREATE", resource="issue/123"' |-| order_by | [string](#string) | | The order by of the log. Only support order by create_time. For example: - order_by = "create_time asc" - order_by = "create_time desc" |-| 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 `SearchLogs` call. Provide this to retrieve the subsequent page. |-------<a name="bytebase-v1-SearchLogsResponse"></a>--### SearchLogsResponse----| Field | Type | Label | Description |-| ----- | ---- | ----- | ----------- |-| log_entities | [LogEntity](#bytebase-v1-LogEntity) | repeated | The list of log entities. |-| next_page_token | [string](#string) | | A token to retrieve next page of log entities. Pass this value in the page_token field in the subsequent call to `SearchLogs` method to retrieve the next page of log entities. |---------<a name="bytebase-v1-LogEntity-Action"></a>--### LogEntity.Action---| Name | Number | Description |-| ---- | ------ | ----------- |-| ACTION_UNSPECIFIED | 0 | In worksapce resource only. |-| ACTION_MEMBER_CREATE | 1 | Member related activity types. Enum value 1 - 20--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'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 | 21 | Issue related activity types. Enum value 21 - 40--ACTION_ISSUE_CREATE is the type for creating a new issue. |-| ACTION_ISSUE_COMMENT_CREATE | 22 | ACTION_ISSUE_COMMENT_CREATE is the type for creating a new comment on an issue. |-| ACTION_ISSUE_FIELD_UPDATE | 23 | ACTION_ISSUE_FIELD_UPDATE is the type for updating an issue's field. |-| ACTION_ISSUE_STATUS_UPDATE | 24 | ACTION_ISSUE_STATUS_UPDATE is the type for updating an issue's status. |-| ACTION_ISSUE_APPROVAL_NOTIFY | 25 | ACTION_ISSUE_APPROVAL_NOTIFY is the type for notifying issue approval. |-| ACTION_PIPELINE_STAGE_STATUS_UPDATE | 31 | ACTION_PIPELINE_STAGE_STATUS_UPDATE represents the pipeline stage status change, including BEGIN, END for now. |-| ACTION_PIPELINE_TASK_STATUS_UPDATE | 32 | ACTION_PIPELINE_TASK_STATUS_UPDATE represents the pipeline task status change, including PENDING, PENDING_APPROVAL, RUNNING, SUCCESS, FAILURE, CANCELED for now. |-| ACTION_PIPELINE_TASK_STATEMENT_UPDATE | 34 | ACTION_PIPELINE_TASK_STATEMENT_UPDATE represents the manual update of the task statement. |-| ACTION_PIPELINE_TASK_EARLIEST_ALLOWED_TIME_UPDATE | 35 | ACTION_PIPELINE_TASK_EARLIEST_ALLOWED_TIME_UPDATE represents the manual update of the task earliest allowed time. |-| ACTION_PIPELINE_TASK_RUN_STATUS_UPDATE | 36 | ACTION_PIPELINE_TASK_RUN_STATUS_UPDATE represents the pipeline task run status change, including PENDING, RUNNING, SUCCESS, FAILURE, CANCELED for now. |-| ACTION_PIPELINE_TASK_PRIOR_BACKUP | 37 | ACTION_PIPELINE_TASK_PRIOR_BACKUP represents the pipeline task prior backup activity. |-| ACTION_PROJECT_REPOSITORY_PUSH | 41 | Project related activity types. Enum value 41 - 60--ACTION_PROJECT_REPOSITORY_PUSH represents Bytebase receiving a push event from the project repository. |-| ACTION_PROJECT_MEMBER_CREATE | 42 | ACTION_PROJECT_MEMBER_CREATE represents adding a member to the project. |-| ACTION_PROJECT_MEMBER_DELETE | 43 | ACTION_PROJECT_MEMBER_DELETE represents removing a member from the project. |-| ACTION_PROJECT_DATABASE_TRANSFER | 45 | ACTION_PROJECT_DATABASE_TRANSFER represents transfering the database from one project to another. |-| ACTION_DATABASE_SQL_EDITOR_QUERY | 61 | Database related activity types. Enum value 61 - 80--ACTION_DATABASE_SQL_EDITOR_QUERY is the type for SQL editor query. |-| ACTION_DATABASE_SQL_EXPORT | 62 | ACTION_DATABASE_SQL_EXPORT is the type for exporting SQL. |----<a name="bytebase-v1-LogEntity-Level"></a>--### LogEntity.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 |-| ----------- | ------------ | ------------- | ------------|-| SearchLogs | [SearchLogsRequest](#bytebase-v1-SearchLogsRequest) | [SearchLogsResponse](#bytebase-v1-SearchLogsResponse) | |-| GetLog | [GetLogRequest](#bytebase-v1-GetLogRequest) | [LogEntity](#bytebase-v1-LogEntity) | |-| ExportLogs | [ExportLogsRequest](#bytebase-v1-ExportLogsRequest) | [ExportLogsResponse](#bytebase-v1-ExportLogsResponse) | |-----<a name="v1_org_policy_service-proto"></a><p align="right"><a href="#top">Top</a></p>diff --git a/proto/gen/grpc-doc/v1/index.html b/proto/gen/grpc-doc/v1/index.htmlindex 9bbe4759c7..8719edc26c 100644--- a/proto/gen/grpc-doc/v1/index.html+++ b/proto/gen/grpc-doc/v1/index.html@@ -1387,53 +1387,6 @@</li>- <li>- <a href="#v1%2flogging_service.proto">v1/logging_service.proto</a>- <ul>-- <li>- <a href="#bytebase.v1.ExportLogsRequest"><span class="badge">M</span>ExportLogsRequest</a>- </li>-- <li>- <a href="#bytebase.v1.ExportLogsResponse"><span class="badge">M</span>ExportLogsResponse</a>- </li>-- <li>- <a href="#bytebase.v1.GetLogRequest"><span class="badge">M</span>GetLogRequest</a>- </li>-- <li>- <a href="#bytebase.v1.LogEntity"><span class="badge">M</span>LogEntity</a>- </li>-- <li>- <a href="#bytebase.v1.SearchLogsRequest"><span class="badge">M</span>SearchLogsRequest</a>- </li>-- <li>- <a href="#bytebase.v1.SearchLogsResponse"><span class="badge">M</span>SearchLogsResponse</a>- </li>--- <li>- <a href="#bytebase.v1.LogEntity.Action"><span class="badge">E</span>LogEntity.Action</a>- </li>-- <li>- <a href="#bytebase.v1.LogEntity.Level"><span class="badge">E</span>LogEntity.Level</a>- </li>---- <li>- <a href="#bytebase.v1.LoggingService"><span class="badge">S</span>LoggingService</a>- </li>-- </ul>- </li>--<li><a href="#v1%2forg_policy_service.proto">v1/org_policy_service.proto</a><ul>@@ -15727,591 +15680,6 @@ Format: projects/{project}/issues/{issue} </p></td>- <div class="file-heading">- <h2 id="v1/logging_service.proto">v1/logging_service.proto</h2><a href="#title">Top</a>- </div>- <p></p>--- <h3 id="bytebase.v1.ExportLogsRequest">ExportLogsRequest</h3>- <p></p>--- <table class="field-table">- <thead>- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>- </thead>- <tbody>-- <tr>- <td>filter</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>Consistent with filter and order by in ListLogs.-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, example:- - creator = "users/{email}"-- resource, example:- - resource = "projects/{project resource id}"-- level, example:- - level = "INFO"- - level = "ERROR | WARN"-- action, example:- - action = "ACTION_MEMBER_CREATE" | "ACTION_ISSUE_CREATE"-- create_time, example:- - create_time <= "2022-01-01T12:00:00.000Z"- - create_time >= "2022-01-01T12:00:00.000Z"-For example:-List the logs of type 'ACTION_ISSUE_COMMENT_CREATE' in issue/123: 'action="ACTION_ISSUE_COMMENT_CREATE", resource="issue/123"' </p></td>- </tr>-- <tr>- <td>order_by</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>The order by of the log.-Only support order by create_time.-For example:- - order_by = "create_time asc"- - order_by = "create_time desc" </p></td>- </tr>-- <tr>- <td>format</td>- <td><a href="#bytebase.v1.ExportFormat">ExportFormat</a></td>- <td></td>- <td><p>The export format. </p></td>- </tr>-- </tbody>- </table>------ <h3 id="bytebase.v1.ExportLogsResponse">ExportLogsResponse</h3>- <p></p>--- <table class="field-table">- <thead>- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>- </thead>- <tbody>-- <tr>- <td>content</td>- <td><a href="#bytes">bytes</a></td>- <td></td>- <td><p> </p></td>- </tr>-- </tbody>- </table>------ <h3 id="bytebase.v1.GetLogRequest">GetLogRequest</h3>- <p></p>--- <table class="field-table">- <thead>- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>- </thead>- <tbody>-- <tr>- <td>name</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>The name of the log to retrieve.-Format: logs/{uid} </p></td>- </tr>-- </tbody>- </table>------ <h3 id="bytebase.v1.LogEntity">LogEntity</h3>- <p></p>--- <table class="field-table">- <thead>- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>- </thead>- <tbody>-- <tr>- <td>name</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>The name of the log.-Format: logs/{uid} </p></td>- </tr>-- <tr>- <td>creator</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>The creator of the log entity.-Format: users/{email} </p></td>- </tr>-- <tr>- <td>create_time</td>- <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>- <td></td>- <td><p> </p></td>- </tr>-- <tr>- <td>update_time</td>- <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>- <td></td>- <td><p> </p></td>- </tr>-- <tr>- <td>action</td>- <td><a href="#bytebase.v1.LogEntity.Action">LogEntity.Action</a></td>- <td></td>- <td><p> </p></td>- </tr>-- <tr>- <td>level</td>- <td><a href="#bytebase.v1.LogEntity.Level">LogEntity.Level</a></td>- <td></td>- <td><p> </p></td>- </tr>-- <tr>- <td>resource</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>The name of the resource associated with this log entity. For example, the resource user associated with log entity type of "ACTION_MEMBER_CREATE".-Format:-For ACTION_MEMBER_*: users/{email}-For ACTION_ISSUE_*: issues/{issue uid}-For ACTION_PIPELINE_*: pipelines/{pipeline uid}-For ACTION_PROJECT_*: projects/{project resource id}-For ACTION_DATABASE_*: instances/{instance resource id} </p></td>- </tr>-- <tr>- <td>payload</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>The payload of the log entity.-TODO: use oneof </p></td>- </tr>-- <tr>- <td>comment</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p> </p></td>- </tr>-- </tbody>- </table>------ <h3 id="bytebase.v1.SearchLogsRequest">SearchLogsRequest</h3>- <p></p>--- <table class="field-table">- <thead>- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>- </thead>- <tbody>-- <tr>- <td>filter</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>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, example:- - creator = "users/{email}"-- resource, example:- - resource = "projects/{project resource id}"-- level, example:- - level = "INFO"- - level = "ERROR | WARN"-- action, example:- - action = "ACTION_MEMBER_CREATE"- - action = "ACTION_MEMBER_CREATE | ACTION_ISSUE_CREATE"-- create_time, example:- - create_time <= "2022-01-01T12:00:00.000Z"- - create_time >= "2022-01-01T12:00:00.000Z"-For example:-List the logs of type 'ACTION_ISSUE_COMMENT_CREATE' in issue/123: 'action="ACTION_ISSUE_COMMENT_CREATE", resource="issue/123"' </p></td>- </tr>-- <tr>- <td>order_by</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>The order by of the log.-Only support order by create_time.-For example:- - order_by = "create_time asc"- - order_by = "create_time desc" </p></td>- </tr>-- <tr>- <td>page_size</td>- <td><a href="#int32">int32</a></td>- <td></td>- <td><p>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. </p></td>- </tr>-- <tr>- <td>page_token</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>Not used. A page token, received from a previous `SearchLogs` call.-Provide this to retrieve the subsequent page. </p></td>- </tr>-- </tbody>- </table>------ <h3 id="bytebase.v1.SearchLogsResponse">SearchLogsResponse</h3>- <p></p>--- <table class="field-table">- <thead>- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>- </thead>- <tbody>-- <tr>- <td>log_entities</td>- <td><a href="#bytebase.v1.LogEntity">LogEntity</a></td>- <td>repeated</td>- <td><p>The list of log entities. </p></td>- </tr>-- <tr>- <td>next_page_token</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>A token to retrieve next page of log entities.-Pass this value in the page_token field in the subsequent call to `SearchLogs` method-to retrieve the next page of log entities. </p></td>- </tr>-- </tbody>- </table>-------- <h3 id="bytebase.v1.LogEntity.Action">LogEntity.Action</h3>- <p></p>- <table class="enum-table">- <thead>- <tr><td>Name</td><td>Number</td><td>Description</td></tr>- </thead>- <tbody>-- <tr>- <td>ACTION_UNSPECIFIED</td>- <td>0</td>- <td><p>In worksapce resource only.</p></td>- </tr>-- <tr>- <td>ACTION_MEMBER_CREATE</td>- <td>1</td>- <td><p>Member related activity types.-Enum value 1 - 20--ACTION_MEMBER_CREATE is the type for creating a new member.</p></td>- </tr>-- <tr>- <td>ACTION_MEMBER_ROLE_UPDATE</td>- <td>2</td>- <td><p>ACTION_MEMBER_ROLE_UPDATE is the type for updating a member's role.</p></td>- </tr>-- <tr>- <td>ACTION_MEMBER_ACTIVATE</td>- <td>3</td>- <td><p>ACTION_MEMBER_ACTIVATE_UPDATE is the type for activating members.</p></td>- </tr>-- <tr>- <td>ACTION_MEMBER_DEACTIVE</td>- <td>4</td>- <td><p>ACTION_MEMBER_DEACTIVE is the type for deactiving members.</p></td>- </tr>-- <tr>- <td>ACTION_ISSUE_CREATE</td>- <td>21</td>- <td><p>Issue related activity types.-Enum value 21 - 40--ACTION_ISSUE_CREATE is the type for creating a new issue.</p></td>- </tr>-- <tr>- <td>ACTION_ISSUE_COMMENT_CREATE</td>- <td>22</td>- <td><p>ACTION_ISSUE_COMMENT_CREATE is the type for creating a new comment on an issue.</p></td>- </tr>-- <tr>- <td>ACTION_ISSUE_FIELD_UPDATE</td>- <td>23</td>- <td><p>ACTION_ISSUE_FIELD_UPDATE is the type for updating an issue's field.</p></td>- </tr>-- <tr>- <td>ACTION_ISSUE_STATUS_UPDATE</td>- <td>24</td>- <td><p>ACTION_ISSUE_STATUS_UPDATE is the type for updating an issue's status.</p></td>- </tr>-- <tr>- <td>ACTION_ISSUE_APPROVAL_NOTIFY</td>- <td>25</td>- <td><p>ACTION_ISSUE_APPROVAL_NOTIFY is the type for notifying issue approval.</p></td>- </tr>-- <tr>- <td>ACTION_PIPELINE_STAGE_STATUS_UPDATE</td>- <td>31</td>- <td><p>ACTION_PIPELINE_STAGE_STATUS_UPDATE represents the pipeline stage status change, including BEGIN, END for now.</p></td>- </tr>-- <tr>- <td>ACTION_PIPELINE_TASK_STATUS_UPDATE</td>- <td>32</td>- <td><p>ACTION_PIPELINE_TASK_STATUS_UPDATE represents the pipeline task status change, including PENDING, PENDING_APPROVAL, RUNNING, SUCCESS, FAILURE, CANCELED for now.</p></td>- </tr>-- <tr>- <td>ACTION_PIPELINE_TASK_STATEMENT_UPDATE</td>- <td>34</td>- <td><p>ACTION_PIPELINE_TASK_STATEMENT_UPDATE represents the manual update of the task statement.</p></td>- </tr>-- <tr>- <td>ACTION_PIPELINE_TASK_EARLIEST_ALLOWED_TIME_UPDATE</td>- <td>35</td>- <td><p>ACTION_PIPELINE_TASK_EARLIEST_ALLOWED_TIME_UPDATE represents the manual update of the task earliest allowed time.</p></td>- </tr>-- <tr>- <td>ACTION_PIPELINE_TASK_RUN_STATUS_UPDATE</td>- <td>36</td>- <td><p>ACTION_PIPELINE_TASK_RUN_STATUS_UPDATE represents the pipeline task run status change, including PENDING, RUNNING, SUCCESS, FAILURE, CANCELED for now.</p></td>- </tr>-- <tr>- <td>ACTION_PIPELINE_TASK_PRIOR_BACKUP</td>- <td>37</td>- <td><p>ACTION_PIPELINE_TASK_PRIOR_BACKUP represents the pipeline task prior backup activity.</p></td>- </tr>-- <tr>- <td>ACTION_PROJECT_REPOSITORY_PUSH</td>- <td>41</td>- <td><p>Project related activity types.-Enum value 41 - 60--ACTION_PROJECT_REPOSITORY_PUSH represents Bytebase receiving a push event from the project repository.</p></td>- </tr>-- <tr>- <td>ACTION_PROJECT_MEMBER_CREATE</td>- <td>42</td>- <td><p>ACTION_PROJECT_MEMBER_CREATE represents adding a member to the project.</p></td>- </tr>-- <tr>- <td>ACTION_PROJECT_MEMBER_DELETE</td>- <td>43</td>- <td><p>ACTION_PROJECT_MEMBER_DELETE represents removing a member from the project.</p></td>- </tr>-- <tr>- <td>ACTION_PROJECT_DATABASE_TRANSFER</td>- <td>45</td>- <td><p>ACTION_PROJECT_DATABASE_TRANSFER represents transfering the database from one project to another.</p></td>- </tr>-- <tr>- <td>ACTION_DATABASE_SQL_EDITOR_QUERY</td>- <td>61</td>- <td><p>Database related activity types.-Enum value 61 - 80--ACTION_DATABASE_SQL_EDITOR_QUERY is the type for SQL editor query.</p></td>- </tr>-- <tr>- <td>ACTION_DATABASE_SQL_EXPORT</td>- <td>62</td>- <td><p>ACTION_DATABASE_SQL_EXPORT is the type for exporting SQL.</p></td>- </tr>-- </tbody>- </table>-- <h3 id="bytebase.v1.LogEntity.Level">LogEntity.Level</h3>- <p></p>- <table class="enum-table">- <thead>- <tr><td>Name</td><td>Number</td><td>Description</td></tr>- </thead>- <tbody>-- <tr>- <td>LEVEL_UNSPECIFIED</td>- <td>0</td>- <td><p></p></td>- </tr>-- <tr>- <td>LEVEL_INFO</td>- <td>1</td>- <td><p>LEVEL_INFO is the type for information.</p></td>- </tr>-- <tr>- <td>LEVEL_WARNING</td>- <td>2</td>- <td><p>LEVEL_WARNING is the type for warning.</p></td>- </tr>-- <tr>- <td>LEVEL_ERROR</td>- <td>3</td>- <td><p>LEVEL_ERROR is the type for error.</p></td>- </tr>-- </tbody>- </table>------ <h3 id="bytebase.v1.LoggingService">LoggingService</h3>- <p></p>- <table class="enum-table">- <thead>- <tr><td>Method Name</td><td>Request Type</td><td>Response Type</td><td>Description</td></tr>- </thead>- <tbody>-- <tr>- <td>SearchLogs</td>- <td><a href="#bytebase.v1.SearchLogsRequest">SearchLogsRequest</a></td>- <td><a href="#bytebase.v1.SearchLogsResponse">SearchLogsResponse</a></td>- <td><p></p></td>- </tr>-- <tr>- <td>GetLog</td>- <td><a href="#bytebase.v1.GetLogRequest">GetLogRequest</a></td>- <td><a href="#bytebase.v1.LogEntity">LogEntity</a></td>- <td><p></p></td>- </tr>-- <tr>- <td>ExportLogs</td>- <td><a href="#bytebase.v1.ExportLogsRequest">ExportLogsRequest</a></td>- <td><a href="#bytebase.v1.ExportLogsResponse">ExportLogsResponse</a></td>- <td><p></p></td>- </tr>-- </tbody>- </table>----- <h4>Methods with HTTP bindings</h4>- <table>- <thead>- <tr>- <td>Method Name</td>- <td>Method</td>- <td>Pattern</td>- <td>Body</td>- </tr>- </thead>- <tbody>---- <tr>- <td>SearchLogs</td>- <td>GET</td>- <td>/v1/logs:search</td>- <td></td>- </tr>----- <tr>- <td>GetLog</td>- <td>GET</td>- <td>/v1/{name=logs/*}</td>- <td></td>- </tr>----- <tr>- <td>ExportLogs</td>- <td>POST</td>- <td>/v1/logs:export</td>- <td>*</td>- </tr>--- </tbody>- </table>----<div class="file-heading"><h2 id="v1/org_policy_service.proto">v1/org_policy_service.proto</h2><a href="#title">Top</a></div>diff --git a/proto/generated-go/v1/logging_service.pb.go b/proto/generated-go/v1/logging_service.pb.godeleted file mode 100644index 7270fb6971..0000000000--- a/proto/generated-go/v1/logging_service.pb.go+++ /dev/null@@ -1,988 +0,0 @@-// Code generated by protoc-gen-go. DO NOT EDIT.-// versions:-// protoc-gen-go v1.34.1-// 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"- timestamppb "google.golang.org/protobuf/types/known/timestamppb"- 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 LogEntity_Action int32--const (- LogEntity_ACTION_UNSPECIFIED LogEntity_Action = 0 // In worksapce resource only.- // Member related activity types.- // Enum value 1 - 20- //- // ACTION_MEMBER_CREATE is the type for creating a new member.- LogEntity_ACTION_MEMBER_CREATE LogEntity_Action = 1- // ACTION_MEMBER_ROLE_UPDATE is the type for updating a member's role.- LogEntity_ACTION_MEMBER_ROLE_UPDATE LogEntity_Action = 2- // ACTION_MEMBER_ACTIVATE_UPDATE is the type for activating members.- LogEntity_ACTION_MEMBER_ACTIVATE LogEntity_Action = 3- // ACTION_MEMBER_DEACTIVE is the type for deactiving members.- LogEntity_ACTION_MEMBER_DEACTIVE LogEntity_Action = 4- // Issue related activity types.- // Enum value 21 - 40- //- // ACTION_ISSUE_CREATE is the type for creating a new issue.- LogEntity_ACTION_ISSUE_CREATE LogEntity_Action = 21- // ACTION_ISSUE_COMMENT_CREATE is the type for creating a new comment on an issue.- LogEntity_ACTION_ISSUE_COMMENT_CREATE LogEntity_Action = 22- // ACTION_ISSUE_FIELD_UPDATE is the type for updating an issue's field.- LogEntity_ACTION_ISSUE_FIELD_UPDATE LogEntity_Action = 23- // ACTION_ISSUE_STATUS_UPDATE is the type for updating an issue's status.- LogEntity_ACTION_ISSUE_STATUS_UPDATE LogEntity_Action = 24- // ACTION_ISSUE_APPROVAL_NOTIFY is the type for notifying issue approval.- LogEntity_ACTION_ISSUE_APPROVAL_NOTIFY LogEntity_Action = 25- // ACTION_PIPELINE_STAGE_STATUS_UPDATE represents the pipeline stage status change, including BEGIN, END for now.- LogEntity_ACTION_PIPELINE_STAGE_STATUS_UPDATE LogEntity_Action = 31- // ACTION_PIPELINE_TASK_STATUS_UPDATE represents the pipeline task status change, including PENDING, PENDING_APPROVAL, RUNNING, SUCCESS, FAILURE, CANCELED for now.- LogEntity_ACTION_PIPELINE_TASK_STATUS_UPDATE LogEntity_Action = 32- // ACTION_PIPELINE_TASK_STATEMENT_UPDATE represents the manual update of the task statement.- LogEntity_ACTION_PIPELINE_TASK_STATEMENT_UPDATE LogEntity_Action = 34- // ACTION_PIPELINE_TASK_EARLIEST_ALLOWED_TIME_UPDATE represents the manual update of the task earliest allowed time.- LogEntity_ACTION_PIPELINE_TASK_EARLIEST_ALLOWED_TIME_UPDATE LogEntity_Action = 35- // ACTION_PIPELINE_TASK_RUN_STATUS_UPDATE represents the pipeline task run status change, including PENDING, RUNNING, SUCCESS, FAILURE, CANCELED for now.- LogEntity_ACTION_PIPELINE_TASK_RUN_STATUS_UPDATE LogEntity_Action = 36- // ACTION_PIPELINE_TASK_PRIOR_BACKUP represents the pipeline task prior backup activity.- LogEntity_ACTION_PIPELINE_TASK_PRIOR_BACKUP LogEntity_Action = 37- // Project related activity types.- // Enum value 41 - 60- //- // ACTION_PROJECT_REPOSITORY_PUSH represents Bytebase receiving a push event from the project repository.- LogEntity_ACTION_PROJECT_REPOSITORY_PUSH LogEntity_Action = 41- // ACTION_PROJECT_MEMBER_CREATE represents adding a member to the project.- LogEntity_ACTION_PROJECT_MEMBER_CREATE LogEntity_Action = 42- // ACTION_PROJECT_MEMBER_DELETE represents removing a member from the project.- LogEntity_ACTION_PROJECT_MEMBER_DELETE LogEntity_Action = 43- // ACTION_PROJECT_DATABASE_TRANSFER represents transfering the database from one project to another.- LogEntity_ACTION_PROJECT_DATABASE_TRANSFER LogEntity_Action = 45- // Database related activity types.- // Enum value 61 - 80- //- // ACTION_DATABASE_SQL_EDITOR_QUERY is the type for SQL editor query.- LogEntity_ACTION_DATABASE_SQL_EDITOR_QUERY LogEntity_Action = 61- // ACTION_DATABASE_SQL_EXPORT is the type for exporting SQL.- LogEntity_ACTION_DATABASE_SQL_EXPORT LogEntity_Action = 62-)--// Enum value maps for LogEntity_Action.-var (- LogEntity_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",- 21: "ACTION_ISSUE_CREATE",- 22: "ACTION_ISSUE_COMMENT_CREATE",- 23: "ACTION_ISSUE_FIELD_UPDATE",- 24: "ACTION_ISSUE_STATUS_UPDATE",- 25: "ACTION_ISSUE_APPROVAL_NOTIFY",- 31: "ACTION_PIPELINE_STAGE_STATUS_UPDATE",- 32: "ACTION_PIPELINE_TASK_STATUS_UPDATE",- 34: "ACTION_PIPELINE_TASK_STATEMENT_UPDATE",- 35: "ACTION_PIPELINE_TASK_EARLIEST_ALLOWED_TIME_UPDATE",- 36: "ACTION_PIPELINE_TASK_RUN_STATUS_UPDATE",- 37: "ACTION_PIPELINE_TASK_PRIOR_BACKUP",- 41: "ACTION_PROJECT_REPOSITORY_PUSH",- 42: "ACTION_PROJECT_MEMBER_CREATE",- 43: "ACTION_PROJECT_MEMBER_DELETE",- 45: "ACTION_PROJECT_DATABASE_TRANSFER",- 61: "ACTION_DATABASE_SQL_EDITOR_QUERY",- 62: "ACTION_DATABASE_SQL_EXPORT",- }- LogEntity_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": 21,- "ACTION_ISSUE_COMMENT_CREATE": 22,- "ACTION_ISSUE_FIELD_UPDATE": 23,- "ACTION_ISSUE_STATUS_UPDATE": 24,- "ACTION_ISSUE_APPROVAL_NOTIFY": 25,- "ACTION_PIPELINE_STAGE_STATUS_UPDATE": 31,- "ACTION_PIPELINE_TASK_STATUS_UPDATE": 32,- "ACTION_PIPELINE_TASK_STATEMENT_UPDATE": 34,- "ACTION_PIPELINE_TASK_EARLIEST_ALLOWED_TIME_UPDATE": 35,- "ACTION_PIPELINE_TASK_RUN_STATUS_UPDATE": 36,- "ACTION_PIPELINE_TASK_PRIOR_BACKUP": 37,- "ACTION_PROJECT_REPOSITORY_PUSH": 41,- "ACTION_PROJECT_MEMBER_CREATE": 42,- "ACTION_PROJECT_MEMBER_DELETE": 43,- "ACTION_PROJECT_DATABASE_TRANSFER": 45,- "ACTION_DATABASE_SQL_EDITOR_QUERY": 61,- "ACTION_DATABASE_SQL_EXPORT": 62,- }-)--func (x LogEntity_Action) Enum() *LogEntity_Action {- p := new(LogEntity_Action)- *p = x- return p-}--func (x LogEntity_Action) String() string {- return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))-}--func (LogEntity_Action) Descriptor() protoreflect.EnumDescriptor {- return file_v1_logging_service_proto_enumTypes[0].Descriptor()-}--func (LogEntity_Action) Type() protoreflect.EnumType {- return &file_v1_logging_service_proto_enumTypes[0]-}--func (x LogEntity_Action) Number() protoreflect.EnumNumber {- return protoreflect.EnumNumber(x)-}--// Deprecated: Use LogEntity_Action.Descriptor instead.-func (LogEntity_Action) EnumDescriptor() ([]byte, []int) {- return file_v1_logging_service_proto_rawDescGZIP(), []int{5, 0}-}--type LogEntity_Level int32--const (- LogEntity_LEVEL_UNSPECIFIED LogEntity_Level = 0- // LEVEL_INFO is the type for information.- LogEntity_LEVEL_INFO LogEntity_Level = 1- // LEVEL_WARNING is the type for warning.- LogEntity_LEVEL_WARNING LogEntity_Level = 2- // LEVEL_ERROR is the type for error.- LogEntity_LEVEL_ERROR LogEntity_Level = 3-)--// Enum value maps for LogEntity_Level.-var (- LogEntity_Level_name = map[int32]string{- 0: "LEVEL_UNSPECIFIED",- 1: "LEVEL_INFO",- 2: "LEVEL_WARNING",- 3: "LEVEL_ERROR",- }- LogEntity_Level_value = map[string]int32{- "LEVEL_UNSPECIFIED": 0,- "LEVEL_INFO": 1,- "LEVEL_WARNING": 2,- "LEVEL_ERROR": 3,- }-)--func (x LogEntity_Level) Enum() *LogEntity_Level {- p := new(LogEntity_Level)- *p = x- return p-}--func (x LogEntity_Level) String() string {- return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))-}--func (LogEntity_Level) Descriptor() protoreflect.EnumDescriptor {- return file_v1_logging_service_proto_enumTypes[1].Descriptor()-}--func (LogEntity_Level) Type() protoreflect.EnumType {- return &file_v1_logging_service_proto_enumTypes[1]-}--func (x LogEntity_Level) Number() protoreflect.EnumNumber {- return protoreflect.EnumNumber(x)-}--// Deprecated: Use LogEntity_Level.Descriptor instead.-func (LogEntity_Level) EnumDescriptor() ([]byte, []int) {- return file_v1_logging_service_proto_rawDescGZIP(), []int{5, 1}-}--type SearchLogsRequest struct {- state protoimpl.MessageState- sizeCache protoimpl.SizeCache- unknownFields protoimpl.UnknownFields-- // 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, example:- // - creator = "users/{email}"- //- // - resource, example:- // - resource = "projects/{project resource id}"- //- // - level, example:- // - level = "INFO"- // - level = "ERROR | WARN"- //- // - action, example:- // - action = "ACTION_MEMBER_CREATE"- // - action = "ACTION_MEMBER_CREATE | ACTION_ISSUE_CREATE"- //- // - create_time, example:- // - create_time <= "2022-01-01T12:00:00.000Z"- // - create_time >= "2022-01-01T12:00:00.000Z"- //- // For example:- // List the logs of type 'ACTION_ISSUE_COMMENT_CREATE' in issue/123: 'action="ACTION_ISSUE_COMMENT_CREATE", resource="issue/123"'- Filter string `protobuf:"bytes,1,opt,name=filter,proto3" json:"filter,omitempty"`- // The order by of the log.- // Only support order by create_time.- // For example:- // - order_by = "create_time asc"- // - order_by = "create_time desc"- OrderBy string `protobuf:"bytes,2,opt,name=order_by,json=orderBy,proto3" json:"order_by,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 `SearchLogs` 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 *SearchLogsRequest) Reset() {- *x = SearchLogsRequest{}- if protoimpl.UnsafeEnabled {- mi := &file_v1_logging_service_proto_msgTypes[0]- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))- ms.StoreMessageInfo(mi)- }-}--func (x *SearchLogsRequest) String() string {- return protoimpl.X.MessageStringOf(x)-}--func (*SearchLogsRequest) ProtoMessage() {}--func (x *SearchLogsRequest) 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 SearchLogsRequest.ProtoReflect.Descriptor instead.-func (*SearchLogsRequest) Descriptor() ([]byte, []int) {- return file_v1_logging_service_proto_rawDescGZIP(), []int{0}-}--func (x *SearchLogsRequest) GetFilter() string {- if x != nil {- return x.Filter- }- return ""-}--func (x *SearchLogsRequest) GetOrderBy() string {- if x != nil {- return x.OrderBy- }- return ""-}--func (x *SearchLogsRequest) GetPageSize() int32 {- if x != nil {- return x.PageSize- }- return 0-}--func (x *SearchLogsRequest) GetPageToken() string {- if x != nil {- return x.PageToken- }- return ""-}--type SearchLogsResponse struct {- state protoimpl.MessageState- sizeCache protoimpl.SizeCache- unknownFields protoimpl.UnknownFields-- // The list of log entities.- LogEntities []*LogEntity `protobuf:"bytes,1,rep,name=log_entities,json=logEntities,proto3" json:"log_entities,omitempty"`- // A token to retrieve next page of log entities.- // Pass this value in the page_token field in the subsequent call to `SearchLogs` method- // to retrieve the next page of log entities.- NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"`-}--func (x *SearchLogsResponse) Reset() {- *x = SearchLogsResponse{}- if protoimpl.UnsafeEnabled {- mi := &file_v1_logging_service_proto_msgTypes[1]- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))- ms.StoreMessageInfo(mi)- }-}--func (x *SearchLogsResponse) String() string {- return protoimpl.X.MessageStringOf(x)-}--func (*SearchLogsResponse) ProtoMessage() {}--func (x *SearchLogsResponse) 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 SearchLogsResponse.ProtoReflect.Descriptor instead.-func (*SearchLogsResponse) Descriptor() ([]byte, []int) {- return file_v1_logging_service_proto_rawDescGZIP(), []int{1}-}--func (x *SearchLogsResponse) GetLogEntities() []*LogEntity {- if x != nil {- return x.LogEntities- }- return nil-}--func (x *SearchLogsResponse) GetNextPageToken() string {- if x != nil {- return x.NextPageToken- }- return ""-}--type GetLogRequest struct {- state protoimpl.MessageState- sizeCache protoimpl.SizeCache- unknownFields protoimpl.UnknownFields-- // The name of the log to retrieve.- // Format: logs/{uid}- Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`-}--func (x *GetLogRequest) Reset() {- *x = GetLogRequest{}- if protoimpl.UnsafeEnabled {- mi := &file_v1_logging_service_proto_msgTypes[2]- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))- ms.StoreMessageInfo(mi)- }-}--func (x *GetLogRequest) String() string {- return protoimpl.X.MessageStringOf(x)-}--func (*GetLogRequest) ProtoMessage() {}--func (x *GetLogRequest) 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 GetLogRequest.ProtoReflect.Descriptor instead.-func (*GetLogRequest) Descriptor() ([]byte, []int) {- return file_v1_logging_service_proto_rawDescGZIP(), []int{2}-}--func (x *GetLogRequest) GetName() string {- if x != nil {- return x.Name- }- return ""-}--type ExportLogsRequest struct {- state protoimpl.MessageState- sizeCache protoimpl.SizeCache- unknownFields protoimpl.UnknownFields-- // Consistent with filter and order by in ListLogs.- // 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, example:- // - creator = "users/{email}"- //- // - resource, example:- // - resource = "projects/{project resource id}"- //- // - level, example:- // - level = "INFO"- // - level = "ERROR | WARN"- //- // - action, example:- // - action = "ACTION_MEMBER_CREATE" | "ACTION_ISSUE_CREATE"- //- // - create_time, example:- // - create_time <= "2022-01-01T12:00:00.000Z"- // - create_time >= "2022-01-01T12:00:00.000Z"- //- // For example:- // List the logs of type 'ACTION_ISSUE_COMMENT_CREATE' in issue/123: 'action="ACTION_ISSUE_COMMENT_CREATE", resource="issue/123"'- Filter string `protobuf:"bytes,1,opt,name=filter,proto3" json:"filter,omitempty"`- // The order by of the log.- // Only support order by create_time.- // For example:- // - order_by = "create_time asc"- // - order_by = "create_time desc"- OrderBy string `protobuf:"bytes,2,opt,name=order_by,json=orderBy,proto3" json:"order_by,omitempty"`- // The export format.- Format ExportFormat `protobuf:"varint,5,opt,name=format,proto3,enum=bytebase.v1.ExportFormat" json:"format,omitempty"`-}--func (x *ExportLogsRequest) Reset() {- *x = ExportLogsRequest{}- if protoimpl.UnsafeEnabled {- mi := &file_v1_logging_service_proto_msgTypes[3]- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))- ms.StoreMessageInfo(mi)- }-}--func (x *ExportLogsRequest) String() string {- return protoimpl.X.MessageStringOf(x)-}--func (*ExportLogsRequest) ProtoMessage() {}--func (x *ExportLogsRequest) ProtoReflect() protoreflect.Message {- mi := &file_v1_logging_service_proto_msgTypes[3]- if protoimpl.UnsafeEnabled && x != nil {- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))- if ms.LoadMessageInfo() == nil {- ms.StoreMessageInfo(mi)- }- return ms- }- return mi.MessageOf(x)-}--// Deprecated: Use ExportLogsRequest.ProtoReflect.Descriptor instead.-func (*ExportLogsRequest) Descriptor() ([]byte, []int) {- return file_v1_logging_service_proto_rawDescGZIP(), []int{3}-}--func (x *ExportLogsRequest) GetFilter() string {- if x != nil {- return x.Filter- }- return ""-}--func (x *ExportLogsRequest) GetOrderBy() string {- if x != nil {- return x.OrderBy- }- return ""-}--func (x *ExportLogsRequest) GetFormat() ExportFormat {- if x != nil {- return x.Format- }- return ExportFormat_FORMAT_UNSPECIFIED-}--type ExportLogsResponse struct {- state protoimpl.MessageState- sizeCache protoimpl.SizeCache- unknownFields protoimpl.UnknownFields-- Content []byte `protobuf:"bytes,1,opt,name=content,proto3" json:"content,omitempty"`-}--func (x *ExportLogsResponse) Reset() {- *x = ExportLogsResponse{}- if protoimpl.UnsafeEnabled {- mi := &file_v1_logging_service_proto_msgTypes[4]- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))- ms.StoreMessageInfo(mi)- }-}--func (x *ExportLogsResponse) String() string {- return protoimpl.X.MessageStringOf(x)-}--func (*ExportLogsResponse) ProtoMessage() {}--func (x *ExportLogsResponse) ProtoReflect() protoreflect.Message {- mi := &file_v1_logging_service_proto_msgTypes[4]- if protoimpl.UnsafeEnabled && x != nil {- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))- if ms.LoadMessageInfo() == nil {- ms.StoreMessageInfo(mi)- }- return ms- }- return mi.MessageOf(x)-}--// Deprecated: Use ExportLogsResponse.ProtoReflect.Descriptor instead.-func (*ExportLogsResponse) Descriptor() ([]byte, []int) {- return file_v1_logging_service_proto_rawDescGZIP(), []int{4}-}--func (x *ExportLogsResponse) GetContent() []byte {- if x != nil {- return x.Content- }- return nil-}--type LogEntity struct {- state protoimpl.MessageState- sizeCache protoimpl.SizeCache- unknownFields protoimpl.UnknownFields-- // The name of the log.- // Format: logs/{uid}- Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`- // The creator of the log entity.- // Format: users/{email}- Creator string `protobuf:"bytes,2,opt,name=creator,proto3" json:"creator,omitempty"`- CreateTime *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=create_time,json=createTime,proto3" json:"create_time,omitempty"`- UpdateTime *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=update_time,json=updateTime,proto3" json:"update_time,omitempty"`- Action LogEntity_Action `protobuf:"varint,5,opt,name=action,proto3,enum=bytebase.v1.LogEntity_Action" json:"action,omitempty"`- Level LogEntity_Level `protobuf:"varint,6,opt,name=level,proto3,enum=bytebase.v1.LogEntity_Level" json:"level,omitempty"`- // The name of the resource associated with this log entity. For example, the resource user associated with log entity type of "ACTION_MEMBER_CREATE".- // Format:- // For ACTION_MEMBER_*: users/{email}- // For ACTION_ISSUE_*: issues/{issue uid}- // For ACTION_PIPELINE_*: pipelines/{pipeline uid}- // For ACTION_PROJECT_*: projects/{project resource id}- // For ACTION_DATABASE_*: instances/{instance resource id}- Resource string `protobuf:"bytes,7,opt,name=resource,proto3" json:"resource,omitempty"`- // The payload of the log entity.- // TODO: use oneof- Payload string `protobuf:"bytes,8,opt,name=payload,proto3" json:"payload,omitempty"`- Comment string `protobuf:"bytes,9,opt,name=comment,proto3" json:"comment,omitempty"`-}--func (x *LogEntity) Reset() {- *x = LogEntity{}- if protoimpl.UnsafeEnabled {- mi := &file_v1_logging_service_proto_msgTypes[5]- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))- ms.StoreMessageInfo(mi)- }-}--func (x *LogEntity) String() string {- return protoimpl.X.MessageStringOf(x)-}--func (*LogEntity) ProtoMessage() {}--func (x *LogEntity) ProtoReflect() protoreflect.Message {- mi := &file_v1_logging_service_proto_msgTypes[5]- if protoimpl.UnsafeEnabled && x != nil {- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))- if ms.LoadMessageInfo() == nil {- ms.StoreMessageInfo(mi)- }- return ms- }- return mi.MessageOf(x)-}--// Deprecated: Use LogEntity.ProtoReflect.Descriptor instead.-func (*LogEntity) Descriptor() ([]byte, []int) {- return file_v1_logging_service_proto_rawDescGZIP(), []int{5}-}--func (x *LogEntity) GetName() string {- if x != nil {- return x.Name- }- return ""-}--func (x *LogEntity) GetCreator() string {- if x != nil {- return x.Creator- }- return ""-}--func (x *LogEntity) GetCreateTime() *timestamppb.Timestamp {- if x != nil {- return x.CreateTime- }- return nil-}--func (x *LogEntity) GetUpdateTime() *timestamppb.Timestamp {- if x != nil {- return x.UpdateTime- }- return nil-}--func (x *LogEntity) GetAction() LogEntity_Action {- if x != nil {- return x.Action- }- return LogEntity_ACTION_UNSPECIFIED-}--func (x *LogEntity) GetLevel() LogEntity_Level {- if x != nil {- return x.Level- }- return LogEntity_LEVEL_UNSPECIFIED-}--func (x *LogEntity) GetResource() string {- if x != nil {- return x.Resource- }- return ""-}--func (x *LogEntity) GetPayload() string {- if x != nil {- return x.Payload- }- return ""-}--func (x *LogEntity) GetComment() string {- if x != nil {- return x.Comment- }- return ""-}--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,- 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, 0x0f, 0x76, 0x31, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74,- 0x6f, 0x22, 0x82, 0x01, 0x0a, 0x11, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x4c, 0x6f, 0x67, 0x73,- 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65,- 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12,- 0x19, 0x0a, 0x08, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x5f, 0x62, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28,- 0x09, 0x52, 0x07, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x42, 0x79, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x61,- 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x70,- 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x65, 0x5f,- 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x61, 0x67,- 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x7d, 0x0a, 0x12, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68,- 0x4c, 0x6f, 0x67, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3f, 0x0a, 0x0c,- 0x6c, 0x6f, 0x67, 0x5f, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x69, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03,- 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31,- 0x2e, 0x4c, 0x6f, 0x67, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x42, 0x04, 0xe2, 0x41, 0x01, 0x03,- 0x52, 0x0b, 0x6c, 0x6f, 0x67, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x69, 0x65, 0x73, 0x12, 0x26, 0x0a,- 0x0f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e,- 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6e, 0x65, 0x78, 0x74, 0x50, 0x61, 0x67, 0x65,- 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x29, 0x0a, 0x0d, 0x47, 0x65, 0x74, 0x4c, 0x6f, 0x67, 0x52,- 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x18, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01,- 0x20, 0x01, 0x28, 0x09, 0x42, 0x04, 0xe2, 0x41, 0x01, 0x02, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65,- 0x22, 0x79, 0x0a, 0x11, 0x45, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x4c, 0x6f, 0x67, 0x73, 0x52, 0x65,- 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18,- 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x19, 0x0a,- 0x08, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x5f, 0x62, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52,- 0x07, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x42, 0x79, 0x12, 0x31, 0x0a, 0x06, 0x66, 0x6f, 0x72, 0x6d,- 0x61, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x19, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62,- 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x46, 0x6f, 0x72,- 0x6d, 0x61, 0x74, 0x52, 0x06, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x22, 0x2e, 0x0a, 0x12, 0x45,- 0x78, 0x70, 0x6f, 0x72, 0x74, 0x4c, 0x6f, 0x67, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,- 0x65, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01,- 0x28, 0x0c, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x22, 0xfb, 0x09, 0x0a, 0x09,- 0x4c, 0x6f, 0x67, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x12, 0x18, 0x0a, 0x04, 0x6e, 0x61, 0x6d,- 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x04, 0xe2, 0x41, 0x01, 0x03, 0x52, 0x04, 0x6e,- 0x61, 0x6d, 0x65, 0x12, 0x1e, 0x0a, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x02,- 0x20, 0x01, 0x28, 0x09, 0x42, 0x04, 0xe2, 0x41, 0x01, 0x03, 0x52, 0x07, 0x63, 0x72, 0x65, 0x61,- 0x74, 0x6f, 0x72, 0x12, 0x41, 0x0a, 0x0b, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x5f, 0x74, 0x69,- 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c,- 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73,- 0x74, 0x61, 0x6d, 0x70, 0x42, 0x04, 0xe2, 0x41, 0x01, 0x03, 0x52, 0x0a, 0x63, 0x72, 0x65, 0x61,- 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x41, 0x0a, 0x0b, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65,- 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f,- 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69,- 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x04, 0xe2, 0x41, 0x01, 0x03, 0x52, 0x0a, 0x75,- 0x70, 0x64, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x3b, 0x0a, 0x06, 0x61, 0x63, 0x74,- 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1d, 0x2e, 0x62, 0x79, 0x74, 0x65,- 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x6f, 0x67, 0x45, 0x6e, 0x74, 0x69, 0x74,- 0x79, 0x2e, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x04, 0xe2, 0x41, 0x01, 0x02, 0x52, 0x06,- 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x38, 0x0a, 0x05, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x18,- 0x06, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1c, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65,- 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x6f, 0x67, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x2e, 0x4c, 0x65,- 0x76, 0x65, 0x6c, 0x42, 0x04, 0xe2, 0x41, 0x01, 0x02, 0x52, 0x05, 0x6c, 0x65, 0x76, 0x65, 0x6c,- 0x12, 0x20, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x07, 0x20, 0x01,- 0x28, 0x09, 0x42, 0x04, 0xe2, 0x41, 0x01, 0x02, 0x52, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72,- 0x63, 0x65, 0x12, 0x1e, 0x0a, 0x07, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x18, 0x08, 0x20,- 0x01, 0x28, 0x09, 0x42, 0x04, 0xe2, 0x41, 0x01, 0x02, 0x52, 0x07, 0x70, 0x61, 0x79, 0x6c, 0x6f,- 0x61, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x09, 0x20,- 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x22, 0x86, 0x06, 0x0a,- 0x06, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x16, 0x0a, 0x12, 0x41, 0x43, 0x54, 0x49, 0x4f,- 0x4e, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12,- 0x18, 0x0a, 0x14, 0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x4d, 0x45, 0x4d, 0x42, 0x45, 0x52,- 0x5f, 0x43, 0x52, 0x45, 0x41, 0x54, 0x45, 0x10, 0x01, 0x12, 0x1d, 0x0a, 0x19, 0x41, 0x43, 0x54,- 0x49, 0x4f, 0x4e, 0x5f, 0x4d, 0x45, 0x4d, 0x42, 0x45, 0x52, 0x5f, 0x52, 0x4f, 0x4c, 0x45, 0x5f,- 0x55, 0x50, 0x44, 0x41, 0x54, 0x45, 0x10, 0x02, 0x12, 0x1a, 0x0a, 0x16, 0x41, 0x43, 0x54, 0x49,- 0x4f, 0x4e, 0x5f, 0x4d, 0x45, 0x4d, 0x42, 0x45, 0x52, 0x5f, 0x41, 0x43, 0x54, 0x49, 0x56, 0x41,- 0x54, 0x45, 0x10, 0x03, 0x12, 0x1a, 0x0a, 0x16, 0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x4d,- 0x45, 0x4d, 0x42, 0x45, 0x52, 0x5f, 0x44, 0x45, 0x41, 0x43, 0x54, 0x49, 0x56, 0x45, 0x10, 0x04,- 0x12, 0x17, 0x0a, 0x13, 0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x49, 0x53, 0x53, 0x55, 0x45,- 0x5f, 0x43, 0x52, 0x45, 0x41, 0x54, 0x45, 0x10, 0x15, 0x12, 0x1f, 0x0a, 0x1b, 0x41, 0x43, 0x54,- 0x49, 0x4f, 0x4e, 0x5f, 0x49, 0x53, 0x53, 0x55, 0x45, 0x5f, 0x43, 0x4f, 0x4d, 0x4d, 0x45, 0x4e,- 0x54, 0x5f, 0x43, 0x52, 0x45, 0x41, 0x54, 0x45, 0x10, 0x16, 0x12, 0x1d, 0x0a, 0x19, 0x41, 0x43,- 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x49, 0x53, 0x53, 0x55, 0x45, 0x5f, 0x46, 0x49, 0x45, 0x4c, 0x44,- 0x5f, 0x55, 0x50, 0x44, 0x41, 0x54, 0x45, 0x10, 0x17, 0x12, 0x1e, 0x0a, 0x1a, 0x41, 0x43, 0x54,- 0x49, 0x4f, 0x4e, 0x5f, 0x49, 0x53, 0x53, 0x55, 0x45, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53,- 0x5f, 0x55, 0x50, 0x44, 0x41, 0x54, 0x45, 0x10, 0x18, 0x12, 0x20, 0x0a, 0x1c, 0x41, 0x43, 0x54,- 0x49, 0x4f, 0x4e, 0x5f, 0x49, 0x53, 0x53, 0x55, 0x45, 0x5f, 0x41, 0x50, 0x50, 0x52, 0x4f, 0x56,- 0x41, 0x4c, 0x5f, 0x4e, 0x4f, 0x54, 0x49, 0x46, 0x59, 0x10, 0x19, 0x12, 0x27, 0x0a, 0x23, 0x41,- 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x50, 0x49, 0x50, 0x45, 0x4c, 0x49, 0x4e, 0x45, 0x5f, 0x53,- 0x54, 0x41, 0x47, 0x45, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x55, 0x50, 0x44, 0x41,- 0x54, 0x45, 0x10, 0x1f, 0x12, 0x26, 0x0a, 0x22, 0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x50,- 0x49, 0x50, 0x45, 0x4c, 0x49, 0x4e, 0x45, 0x5f, 0x54, 0x41, 0x53, 0x4b, 0x5f, 0x53, 0x54, 0x41,- 0x54, 0x55, 0x53, 0x5f, 0x55, 0x50, 0x44, 0x41, 0x54, 0x45, 0x10, 0x20, 0x12, 0x29, 0x0a, 0x25,- 0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x50, 0x49, 0x50, 0x45, 0x4c, 0x49, 0x4e, 0x45, 0x5f,- 0x54, 0x41, 0x53, 0x4b, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x45, 0x4d, 0x45, 0x4e, 0x54, 0x5f, 0x55,- 0x50, 0x44, 0x41, 0x54, 0x45, 0x10, 0x22, 0x12, 0x35, 0x0a, 0x31, 0x41, 0x43, 0x54, 0x49, 0x4f,- 0x4e, 0x5f, 0x50, 0x49, 0x50, 0x45, 0x4c, 0x49, 0x4e, 0x45, 0x5f, 0x54, 0x41, 0x53, 0x4b, 0x5f,- 0x45, 0x41, 0x52, 0x4c, 0x49, 0x45, 0x53, 0x54, 0x5f, 0x41, 0x4c, 0x4c, 0x4f, 0x57, 0x45, 0x44,- 0x5f, 0x54, 0x49, 0x4d, 0x45, 0x5f, 0x55, 0x50, 0x44, 0x41, 0x54, 0x45, 0x10, 0x23, 0x12, 0x2a,- 0x0a, 0x26, 0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x50, 0x49, 0x50, 0x45, 0x4c, 0x49, 0x4e,- 0x45, 0x5f, 0x54, 0x41, 0x53, 0x4b, 0x5f, 0x52, 0x55, 0x4e, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55,- 0x53, 0x5f, 0x55, 0x50, 0x44, 0x41, 0x54, 0x45, 0x10, 0x24, 0x12, 0x25, 0x0a, 0x21, 0x41, 0x43,- 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x50, 0x49, 0x50, 0x45, 0x4c, 0x49, 0x4e, 0x45, 0x5f, 0x54, 0x41,- 0x53, 0x4b, 0x5f, 0x50, 0x52, 0x49, 0x4f, 0x52, 0x5f, 0x42, 0x41, 0x43, 0x4b, 0x55, 0x50, 0x10,- 0x25, 0x12, 0x22, 0x0a, 0x1e, 0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x50, 0x52, 0x4f, 0x4a,- 0x45, 0x43, 0x54, 0x5f, 0x52, 0x45, 0x50, 0x4f, 0x53, 0x49, 0x54, 0x4f, 0x52, 0x59, 0x5f, 0x50,- 0x55, 0x53, 0x48, 0x10, 0x29, 0x12, 0x20, 0x0a, 0x1c, 0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f,- 0x50, 0x52, 0x4f, 0x4a, 0x45, 0x43, 0x54, 0x5f, 0x4d, 0x45, 0x4d, 0x42, 0x45, 0x52, 0x5f, 0x43,- 0x52, 0x45, 0x41, 0x54, 0x45, 0x10, 0x2a, 0x12, 0x20, 0x0a, 0x1c, 0x41, 0x43, 0x54, 0x49, 0x4f,- 0x4e, 0x5f, 0x50, 0x52, 0x4f, 0x4a, 0x45, 0x43, 0x54, 0x5f, 0x4d, 0x45, 0x4d, 0x42, 0x45, 0x52,- 0x5f, 0x44, 0x45, 0x4c, 0x45, 0x54, 0x45, 0x10, 0x2b, 0x12, 0x24, 0x0a, 0x20, 0x41, 0x43, 0x54,- 0x49, 0x4f, 0x4e, 0x5f, 0x50, 0x52, 0x4f, 0x4a, 0x45, 0x43, 0x54, 0x5f, 0x44, 0x41, 0x54, 0x41,- 0x42, 0x41, 0x53, 0x45, 0x5f, 0x54, 0x52, 0x41, 0x4e, 0x53, 0x46, 0x45, 0x52, 0x10, 0x2d, 0x12,- 0x24, 0x0a, 0x20, 0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x44, 0x41, 0x54, 0x41, 0x42, 0x41,- 0x53, 0x45, 0x5f, 0x53, 0x51, 0x4c, 0x5f, 0x45, 0x44, 0x49, 0x54, 0x4f, 0x52, 0x5f, 0x51, 0x55,- 0x45, 0x52, 0x59, 0x10, 0x3d, 0x12, 0x1e, 0x0a, 0x1a, 0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f,- 0x44, 0x41, 0x54, 0x41, 0x42, 0x41, 0x53, 0x45, 0x5f, 0x53, 0x51, 0x4c, 0x5f, 0x45, 0x58, 0x50,- 0x4f, 0x52, 0x54, 0x10, 0x3e, 0x22, 0x52, 0x0a, 0x05, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x12, 0x15,- 0x0a, 0x11, 0x4c, 0x45, 0x56, 0x45, 0x4c, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46,- 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0e, 0x0a, 0x0a, 0x4c, 0x45, 0x56, 0x45, 0x4c, 0x5f, 0x49,- 0x4e, 0x46, 0x4f, 0x10, 0x01, 0x12, 0x11, 0x0a, 0x0d, 0x4c, 0x45, 0x56, 0x45, 0x4c, 0x5f, 0x57,- 0x41, 0x52, 0x4e, 0x49, 0x4e, 0x47, 0x10, 0x02, 0x12, 0x0f, 0x0a, 0x0b, 0x4c, 0x45, 0x56, 0x45,- 0x4c, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, 0x03, 0x32, 0xc3, 0x02, 0x0a, 0x0e, 0x4c, 0x6f,- 0x67, 0x67, 0x69, 0x6e, 0x67, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x66, 0x0a, 0x0a,- 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x4c, 0x6f, 0x67, 0x73, 0x12, 0x1e, 0x2e, 0x62, 0x79, 0x74,- 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x4c,- 0x6f, 0x67, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x62, 0x79, 0x74,- 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x4c,- 0x6f, 0x67, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x17, 0x82, 0xd3, 0xe4,- 0x93, 0x02, 0x11, 0x12, 0x0f, 0x2f, 0x76, 0x31, 0x2f, 0x6c, 0x6f, 0x67, 0x73, 0x3a, 0x73, 0x65,- 0x61, 0x72, 0x63, 0x68, 0x12, 0x5e, 0x0a, 0x06, 0x47, 0x65, 0x74, 0x4c, 0x6f, 0x67, 0x12, 0x1a,- 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74,- 0x4c, 0x6f, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x62, 0x79, 0x74,- 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x6f, 0x67, 0x45, 0x6e, 0x74, 0x69,- 0x74, 0x79, 0x22, 0x20, 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x82, 0xd3, 0xe4, 0x93, 0x02,- 0x13, 0x12, 0x11, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x6c, 0x6f, 0x67,- 0x73, 0x2f, 0x2a, 0x7d, 0x12, 0x69, 0x0a, 0x0a, 0x45, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x4c, 0x6f,- 0x67, 0x73, 0x12, 0x1e, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31,- 0x2e, 0x45, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x4c, 0x6f, 0x67, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65,- 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31,- 0x2e, 0x45, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x4c, 0x6f, 0x67, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f,- 0x6e, 0x73, 0x65, 0x22, 0x1a, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x14, 0x3a, 0x01, 0x2a, 0x22, 0x0f,- 0x2f, 0x76, 0x31, 0x2f, 0x6c, 0x6f, 0x67, 0x73, 0x3a, 0x65, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x42,- 0x11, 0x5a, 0x0f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2d, 0x67, 0x6f, 0x2f,- 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,-}--var (- 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, 6)-var file_v1_logging_service_proto_goTypes = []interface{}{- (LogEntity_Action)(0), // 0: bytebase.v1.LogEntity.Action- (LogEntity_Level)(0), // 1: bytebase.v1.LogEntity.Level- (*SearchLogsRequest)(nil), // 2: bytebase.v1.SearchLogsRequest- (*SearchLogsResponse)(nil), // 3: bytebase.v1.SearchLogsResponse- (*GetLogRequest)(nil), // 4: bytebase.v1.GetLogRequest- (*ExportLogsRequest)(nil), // 5: bytebase.v1.ExportLogsRequest- (*ExportLogsResponse)(nil), // 6: bytebase.v1.ExportLogsResponse- (*LogEntity)(nil), // 7: bytebase.v1.LogEntity- (ExportFormat)(0), // 8: bytebase.v1.ExportFormat- (*timestamppb.Timestamp)(nil), // 9: google.protobuf.Timestamp-}-var file_v1_logging_service_proto_depIdxs = []int32{- 7, // 0: bytebase.v1.SearchLogsResponse.log_entities:type_name -> bytebase.v1.LogEntity- 8, // 1: bytebase.v1.ExportLogsRequest.format:type_name -> bytebase.v1.ExportFormat- 9, // 2: bytebase.v1.LogEntity.create_time:type_name -> google.protobuf.Timestamp- 9, // 3: bytebase.v1.LogEntity.update_time:type_name -> google.protobuf.Timestamp- 0, // 4: bytebase.v1.LogEntity.action:type_name -> bytebase.v1.LogEntity.Action- 1, // 5: bytebase.v1.LogEntity.level:type_name -> bytebase.v1.LogEntity.Level- 2, // 6: bytebase.v1.LoggingService.SearchLogs:input_type -> bytebase.v1.SearchLogsRequest- 4, // 7: bytebase.v1.LoggingService.GetLog:input_type -> bytebase.v1.GetLogRequest- 5, // 8: bytebase.v1.LoggingService.ExportLogs:input_type -> bytebase.v1.ExportLogsRequest- 3, // 9: bytebase.v1.LoggingService.SearchLogs:output_type -> bytebase.v1.SearchLogsResponse- 7, // 10: bytebase.v1.LoggingService.GetLog:output_type -> bytebase.v1.LogEntity- 6, // 11: bytebase.v1.LoggingService.ExportLogs:output_type -> bytebase.v1.ExportLogsResponse- 9, // [9:12] is the sub-list for method output_type- 6, // [6:9] is the sub-list for method input_type- 6, // [6:6] is the sub-list for extension type_name- 6, // [6:6] is the sub-list for extension extendee- 0, // [0:6] is the sub-list for field type_name-}--func init() { file_v1_logging_service_proto_init() }-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.(*SearchLogsRequest); 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.(*SearchLogsResponse); 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.(*GetLogRequest); 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[3].Exporter = func(v interface{}, i int) interface{} {- switch v := v.(*ExportLogsRequest); i {- case 0:- return &v.state- case 1:- return &v.sizeCache- case 2:- return &v.unknownFields- default:- return nil- }- }- file_v1_logging_service_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {- switch v := v.(*ExportLogsResponse); i {- case 0:- return &v.state- case 1:- return &v.sizeCache- case 2:- return &v.unknownFields- default:- return nil- }- }- file_v1_logging_service_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {- switch v := v.(*LogEntity); i {- case 0:- return &v.state- 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: 6,- 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.godeleted file mode 100644index d82bcce2b5..0000000000--- a/proto/generated-go/v1/logging_service.pb.gw.go+++ /dev/null@@ -1,353 +0,0 @@-// 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_SearchLogs_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)}-)--func request_LoggingService_SearchLogs_0(ctx context.Context, marshaler runtime.Marshaler, client LoggingServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {- var protoReq SearchLogsRequest- var metadata runtime.ServerMetadata-- if err := req.ParseForm(); err != nil {- return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)- }- if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_LoggingService_SearchLogs_0); err != nil {- return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)- }-- msg, err := client.SearchLogs(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))- return msg, metadata, err--}--func local_request_LoggingService_SearchLogs_0(ctx context.Context, marshaler runtime.Marshaler, server LoggingServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {- var protoReq SearchLogsRequest- var metadata runtime.ServerMetadata-- if err := req.ParseForm(); err != nil {- return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)- }- if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_LoggingService_SearchLogs_0); err != nil {- return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)- }-- msg, err := server.SearchLogs(ctx, &protoReq)- return msg, metadata, err--}--func request_LoggingService_GetLog_0(ctx context.Context, marshaler runtime.Marshaler, client LoggingServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {- var protoReq GetLogRequest- var metadata runtime.ServerMetadata-- var (- val string- ok bool- err error- _ = err- )-- val, ok = pathParams["name"]- if !ok {- return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name")- }-- protoReq.Name, err = runtime.String(val)- if err != nil {- return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err)- }-- msg, err := client.GetLog(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))- return msg, metadata, err--}--func local_request_LoggingService_GetLog_0(ctx context.Context, marshaler runtime.Marshaler, server LoggingServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {- var protoReq GetLogRequest- var metadata runtime.ServerMetadata-- var (- val string- ok bool- err error- _ = err- )-- val, ok = pathParams["name"]- if !ok {- return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name")- }-- protoReq.Name, err = runtime.String(val)- if err != nil {- return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err)- }-- msg, err := server.GetLog(ctx, &protoReq)- return msg, metadata, err--}--func request_LoggingService_ExportLogs_0(ctx context.Context, marshaler runtime.Marshaler, client LoggingServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {- var protoReq ExportLogsRequest- var metadata runtime.ServerMetadata-- if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF {- return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)- }-- msg, err := client.ExportLogs(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))- return msg, metadata, err--}--func local_request_LoggingService_ExportLogs_0(ctx context.Context, marshaler runtime.Marshaler, server LoggingServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {- var protoReq ExportLogsRequest- var metadata runtime.ServerMetadata-- if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF {- return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)- }-- msg, err := server.ExportLogs(ctx, &protoReq)- return msg, metadata, err--}--// RegisterLoggingServiceHandlerServer registers the http handlers for service LoggingService to "mux".-// UnaryRPC :call LoggingServiceServer directly.-// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906.-// 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("GET", pattern_LoggingService_SearchLogs_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/SearchLogs", runtime.WithHTTPPathPattern("/v1/logs:search"))- if err != nil {- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)- return- }- resp, md, err := local_request_LoggingService_SearchLogs_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_SearchLogs_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)-- })-- mux.Handle("GET", pattern_LoggingService_GetLog_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/GetLog", runtime.WithHTTPPathPattern("/v1/{name=logs/*}"))- if err != nil {- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)- return- }- resp, md, err := local_request_LoggingService_GetLog_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_GetLog_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)-- })-- mux.Handle("POST", pattern_LoggingService_ExportLogs_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {- ctx, cancel := context.WithCancel(req.Context())- defer cancel()- var stream runtime.ServerTransportStream- ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)- inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)- var err error- var annotatedContext context.Context- annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/bytebase.v1.LoggingService/ExportLogs", runtime.WithHTTPPathPattern("/v1/logs:export"))- if err != nil {- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)- return- }- resp, md, err := local_request_LoggingService_ExportLogs_0(annotatedContext, inboundMarshaler, server, req, pathParams)- md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())- annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)- if err != nil {- runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)- return- }-- forward_LoggingService_ExportLogs_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)-- })-- return nil-}--// 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.NewClient(endpoint, opts...)- if err != nil {- return err- }- defer func() {- if err != nil {- if cerr := conn.Close(); cerr != nil {- grpclog.Errorf("Failed to close conn to %s: %v", endpoint, cerr)- }- return- }- go func() {- <-ctx.Done()- if cerr := conn.Close(); cerr != nil {- grpclog.Errorf("Failed to close conn to %s: %v", endpoint, cerr)- }- }()- }()-- return 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("GET", pattern_LoggingService_SearchLogs_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/SearchLogs", runtime.WithHTTPPathPattern("/v1/logs:search"))- if err != nil {- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)- return- }- resp, md, err := request_LoggingService_SearchLogs_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_SearchLogs_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)-- })-- mux.Handle("GET", pattern_LoggingService_GetLog_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/GetLog", runtime.WithHTTPPathPattern("/v1/{name=logs/*}"))- if err != nil {- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)- return- }- resp, md, err := request_LoggingService_GetLog_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_GetLog_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)-- })-- mux.Handle("POST", pattern_LoggingService_ExportLogs_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {- ctx, cancel := context.WithCancel(req.Context())- defer cancel()- inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)- var err error- var annotatedContext context.Context- annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/bytebase.v1.LoggingService/ExportLogs", runtime.WithHTTPPathPattern("/v1/logs:export"))- if err != nil {- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)- return- }- resp, md, err := request_LoggingService_ExportLogs_0(annotatedContext, inboundMarshaler, client, req, pathParams)- annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)- if err != nil {- runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)- return- }-- forward_LoggingService_ExportLogs_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)-- })-- return nil-}--var (- pattern_LoggingService_SearchLogs_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "logs"}, "search"))-- pattern_LoggingService_GetLog_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 2, 5, 2}, []string{"v1", "logs", "name"}, ""))-- pattern_LoggingService_ExportLogs_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "logs"}, "export"))-)--var (- forward_LoggingService_SearchLogs_0 = runtime.ForwardResponseMessage-- forward_LoggingService_GetLog_0 = runtime.ForwardResponseMessage-- forward_LoggingService_ExportLogs_0 = runtime.ForwardResponseMessage-)diff --git a/proto/generated-go/v1/logging_service_grpc.pb.go b/proto/generated-go/v1/logging_service_grpc.pb.godeleted file mode 100644index 7df469b5e5..0000000000--- a/proto/generated-go/v1/logging_service_grpc.pb.go+++ /dev/null@@ -1,183 +0,0 @@-// 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_SearchLogs_FullMethodName = "/bytebase.v1.LoggingService/SearchLogs"- LoggingService_GetLog_FullMethodName = "/bytebase.v1.LoggingService/GetLog"- LoggingService_ExportLogs_FullMethodName = "/bytebase.v1.LoggingService/ExportLogs"-)--// 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 {- SearchLogs(ctx context.Context, in *SearchLogsRequest, opts ...grpc.CallOption) (*SearchLogsResponse, error)- GetLog(ctx context.Context, in *GetLogRequest, opts ...grpc.CallOption) (*LogEntity, error)- ExportLogs(ctx context.Context, in *ExportLogsRequest, opts ...grpc.CallOption) (*ExportLogsResponse, error)-}--type loggingServiceClient struct {- cc grpc.ClientConnInterface-}--func NewLoggingServiceClient(cc grpc.ClientConnInterface) LoggingServiceClient {- return &loggingServiceClient{cc}-}--func (c *loggingServiceClient) SearchLogs(ctx context.Context, in *SearchLogsRequest, opts ...grpc.CallOption) (*SearchLogsResponse, error) {- out := new(SearchLogsResponse)- err := c.cc.Invoke(ctx, LoggingService_SearchLogs_FullMethodName, in, out, opts...)- if err != nil {- return nil, err- }- return out, nil-}--func (c *loggingServiceClient) GetLog(ctx context.Context, in *GetLogRequest, opts ...grpc.CallOption) (*LogEntity, error) {- out := new(LogEntity)- err := c.cc.Invoke(ctx, LoggingService_GetLog_FullMethodName, in, out, opts...)- if err != nil {- return nil, err- }- return out, nil-}--func (c *loggingServiceClient) ExportLogs(ctx context.Context, in *ExportLogsRequest, opts ...grpc.CallOption) (*ExportLogsResponse, error) {- out := new(ExportLogsResponse)- err := c.cc.Invoke(ctx, LoggingService_ExportLogs_FullMethodName, in, out, opts...)- if err != nil {- return nil, err- }- return out, nil-}--// LoggingServiceServer is the server API for LoggingService service.-// All implementations must embed UnimplementedLoggingServiceServer-// for forward compatibility-type LoggingServiceServer interface {- SearchLogs(context.Context, *SearchLogsRequest) (*SearchLogsResponse, error)- GetLog(context.Context, *GetLogRequest) (*LogEntity, error)- ExportLogs(context.Context, *ExportLogsRequest) (*ExportLogsResponse, error)- mustEmbedUnimplementedLoggingServiceServer()-}--// UnimplementedLoggingServiceServer must be embedded to have forward compatible implementations.-type UnimplementedLoggingServiceServer struct {-}--func (UnimplementedLoggingServiceServer) SearchLogs(context.Context, *SearchLogsRequest) (*SearchLogsResponse, error) {- return nil, status.Errorf(codes.Unimplemented, "method SearchLogs not implemented")-}-func (UnimplementedLoggingServiceServer) GetLog(context.Context, *GetLogRequest) (*LogEntity, error) {- return nil, status.Errorf(codes.Unimplemented, "method GetLog not implemented")-}-func (UnimplementedLoggingServiceServer) ExportLogs(context.Context, *ExportLogsRequest) (*ExportLogsResponse, error) {- return nil, status.Errorf(codes.Unimplemented, "method ExportLogs not implemented")-}-func (UnimplementedLoggingServiceServer) mustEmbedUnimplementedLoggingServiceServer() {}--// UnsafeLoggingServiceServer may be embedded to opt out of forward compatibility for this service.-// 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_SearchLogs_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {- in := new(SearchLogsRequest)- if err := dec(in); err != nil {- return nil, err- }- if interceptor == nil {- return srv.(LoggingServiceServer).SearchLogs(ctx, in)- }- info := &grpc.UnaryServerInfo{- Server: srv,- FullMethod: LoggingService_SearchLogs_FullMethodName,- }- handler := func(ctx context.Context, req interface{}) (interface{}, error) {- return srv.(LoggingServiceServer).SearchLogs(ctx, req.(*SearchLogsRequest))- }- return interceptor(ctx, in, info, handler)-}--func _LoggingService_GetLog_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {- in := new(GetLogRequest)- if err := dec(in); err != nil {- return nil, err- }- if interceptor == nil {- return srv.(LoggingServiceServer).GetLog(ctx, in)- }- info := &grpc.UnaryServerInfo{- Server: srv,- FullMethod: LoggingService_GetLog_FullMethodName,- }- handler := func(ctx context.Context, req interface{}) (interface{}, error) {- return srv.(LoggingServiceServer).GetLog(ctx, req.(*GetLogRequest))- }- return interceptor(ctx, in, info, handler)-}--func _LoggingService_ExportLogs_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {- in := new(ExportLogsRequest)- if err := dec(in); err != nil {- return nil, err- }- if interceptor == nil {- return srv.(LoggingServiceServer).ExportLogs(ctx, in)- }- info := &grpc.UnaryServerInfo{- Server: srv,- FullMethod: LoggingService_ExportLogs_FullMethodName,- }- handler := func(ctx context.Context, req interface{}) (interface{}, error) {- return srv.(LoggingServiceServer).ExportLogs(ctx, req.(*ExportLogsRequest))- }- return interceptor(ctx, in, info, handler)-}--// LoggingService_ServiceDesc is the grpc.ServiceDesc for LoggingService service.-// It's only intended for direct use with grpc.RegisterService,-// and not to be introspected or modified (even as a copy)-var LoggingService_ServiceDesc = grpc.ServiceDesc{- ServiceName: "bytebase.v1.LoggingService",- HandlerType: (*LoggingServiceServer)(nil),- Methods: []grpc.MethodDesc{- {- MethodName: "SearchLogs",- Handler: _LoggingService_SearchLogs_Handler,- },- {- MethodName: "GetLog",- Handler: _LoggingService_GetLog_Handler,- },- {- MethodName: "ExportLogs",- Handler: _LoggingService_ExportLogs_Handler,- },- },- Streams: []grpc.StreamDesc{},- Metadata: "v1/logging_service.proto",-}diff --git a/proto/v1/logging_service.proto b/proto/v1/logging_service.protodeleted file mode 100644index ad495083df..0000000000--- a/proto/v1/logging_service.proto+++ /dev/null@@ -1,228 +0,0 @@-syntax = "proto3";--package bytebase.v1;--import "google/api/annotations.proto";-import "google/api/client.proto";-import "google/api/field_behavior.proto";-import "google/protobuf/timestamp.proto";-import "v1/common.proto";--option go_package = "generated-go/v1";--service LoggingService {- rpc SearchLogs(SearchLogsRequest) returns (SearchLogsResponse) {- option (google.api.http) = {get: "/v1/logs:search"};- }-- rpc GetLog(GetLogRequest) returns (LogEntity) {- option (google.api.http) = {get: "/v1/{name=logs/*}"};- option (google.api.method_signature) = "name";- }-- rpc ExportLogs(ExportLogsRequest) returns (ExportLogsResponse) {- option (google.api.http) = {- post: "/v1/logs:export"- body: "*"- };- }-}--message SearchLogsRequest {- // 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, example:- // - creator = "users/{email}"- // - resource, example:- // - resource = "projects/{project resource id}"- // - level, example:- // - level = "INFO"- // - level = "ERROR | WARN"- // - action, example:- // - action = "ACTION_MEMBER_CREATE"- // - action = "ACTION_MEMBER_CREATE | ACTION_ISSUE_CREATE"- // - create_time, example:- // - create_time <= "2022-01-01T12:00:00.000Z"- // - create_time >= "2022-01-01T12:00:00.000Z"- // For example:- // List the logs of type 'ACTION_ISSUE_COMMENT_CREATE' in issue/123: 'action="ACTION_ISSUE_COMMENT_CREATE", resource="issue/123"'- string filter = 1;-- // The order by of the log.- // Only support order by create_time.- // For example:- // - order_by = "create_time asc"- // - order_by = "create_time desc"- string order_by = 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 `SearchLogs` call.- // Provide this to retrieve the subsequent page.- string page_token = 4;-}--message SearchLogsResponse {- // The list of log entities.- repeated LogEntity log_entities = 1 [(google.api.field_behavior) = OUTPUT_ONLY];-- // A token to retrieve next page of log entities.- // Pass this value in the page_token field in the subsequent call to `SearchLogs` method- // to retrieve the next page of log entities.- string next_page_token = 2;-}--message GetLogRequest {- // The name of the log to retrieve.- // Format: logs/{uid}- string name = 1 [(google.api.field_behavior) = REQUIRED];-}--message ExportLogsRequest {- // Consistent with filter and order by in ListLogs.- // 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, example:- // - creator = "users/{email}"- // - resource, example:- // - resource = "projects/{project resource id}"- // - level, example:- // - level = "INFO"- // - level = "ERROR | WARN"- // - action, example:- // - action = "ACTION_MEMBER_CREATE" | "ACTION_ISSUE_CREATE"- // - create_time, example:- // - create_time <= "2022-01-01T12:00:00.000Z"- // - create_time >= "2022-01-01T12:00:00.000Z"- // For example:- // List the logs of type 'ACTION_ISSUE_COMMENT_CREATE' in issue/123: 'action="ACTION_ISSUE_COMMENT_CREATE", resource="issue/123"'- string filter = 1;-- // The order by of the log.- // Only support order by create_time.- // For example:- // - order_by = "create_time asc"- // - order_by = "create_time desc"- string order_by = 2;-- // The export format.- ExportFormat format = 5;-}--message ExportLogsResponse {- bytes content = 1;-}--message LogEntity {- // The name of the log.- // Format: logs/{uid}- string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY];-- // The creator of the log entity.- // Format: users/{email}- string creator = 2 [(google.api.field_behavior) = OUTPUT_ONLY];-- google.protobuf.Timestamp create_time = 3 [(google.api.field_behavior) = OUTPUT_ONLY];-- google.protobuf.Timestamp update_time = 4 [(google.api.field_behavior) = OUTPUT_ONLY];-- enum Action {- ACTION_UNSPECIFIED = 0;- // In worksapce resource only.-- // Member related activity types.- // Enum value 1 - 20- //- // 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.-- // Issue related activity types.- // Enum value 21 - 40- //- // ACTION_ISSUE_CREATE is the type for creating a new issue.- ACTION_ISSUE_CREATE = 21;- // ACTION_ISSUE_COMMENT_CREATE is the type for creating a new comment on an issue.- ACTION_ISSUE_COMMENT_CREATE = 22;- // ACTION_ISSUE_FIELD_UPDATE is the type for updating an issue's field.- ACTION_ISSUE_FIELD_UPDATE = 23;- // ACTION_ISSUE_STATUS_UPDATE is the type for updating an issue's status.- ACTION_ISSUE_STATUS_UPDATE = 24;- // ACTION_ISSUE_APPROVAL_NOTIFY is the type for notifying issue approval.- ACTION_ISSUE_APPROVAL_NOTIFY = 25;- // ACTION_PIPELINE_STAGE_STATUS_UPDATE represents the pipeline stage status change, including BEGIN, END for now.- ACTION_PIPELINE_STAGE_STATUS_UPDATE = 31;- // ACTION_PIPELINE_TASK_STATUS_UPDATE represents the pipeline task status change, including PENDING, PENDING_APPROVAL, RUNNING, SUCCESS, FAILURE, CANCELED for now.- ACTION_PIPELINE_TASK_STATUS_UPDATE = 32;- // ACTION_PIPELINE_TASK_STATEMENT_UPDATE represents the manual update of the task statement.- ACTION_PIPELINE_TASK_STATEMENT_UPDATE = 34;- // ACTION_PIPELINE_TASK_EARLIEST_ALLOWED_TIME_UPDATE represents the manual update of the task earliest allowed time.- ACTION_PIPELINE_TASK_EARLIEST_ALLOWED_TIME_UPDATE = 35;- // ACTION_PIPELINE_TASK_RUN_STATUS_UPDATE represents the pipeline task run status change, including PENDING, RUNNING, SUCCESS, FAILURE, CANCELED for now.- ACTION_PIPELINE_TASK_RUN_STATUS_UPDATE = 36;- // ACTION_PIPELINE_TASK_PRIOR_BACKUP represents the pipeline task prior backup activity.- ACTION_PIPELINE_TASK_PRIOR_BACKUP = 37;-- // Project related activity types.- // Enum value 41 - 60- //- // ACTION_PROJECT_REPOSITORY_PUSH represents Bytebase receiving a push event from the project repository.- ACTION_PROJECT_REPOSITORY_PUSH = 41;- // ACTION_PROJECT_MEMBER_CREATE represents adding a member to the project.- ACTION_PROJECT_MEMBER_CREATE = 42;- // ACTION_PROJECT_MEMBER_DELETE represents removing a member from the project.- ACTION_PROJECT_MEMBER_DELETE = 43;- // ACTION_PROJECT_DATABASE_TRANSFER represents transfering the database from one project to another.- ACTION_PROJECT_DATABASE_TRANSFER = 45;-- // In instance resource only.-- // Database related activity types.- // Enum value 61 - 80- //- // ACTION_DATABASE_SQL_EDITOR_QUERY is the type for SQL editor query.- ACTION_DATABASE_SQL_EDITOR_QUERY = 61;- // ACTION_DATABASE_SQL_EXPORT is the type for exporting SQL.- ACTION_DATABASE_SQL_EXPORT = 62;- }- Action action = 5 [(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 = 6 [(google.api.field_behavior) = REQUIRED];-- // The name of the resource associated with this log entity. For example, the resource user associated with log entity type of "ACTION_MEMBER_CREATE".- // Format:- // For ACTION_MEMBER_*: users/{email}- // For ACTION_ISSUE_*: issues/{issue uid}- // For ACTION_PIPELINE_*: pipelines/{pipeline uid}- // For ACTION_PROJECT_*: projects/{project resource id}- // For ACTION_DATABASE_*: instances/{instance resource id}- string resource = 7 [(google.api.field_behavior) = REQUIRED];-- // The payload of the log entity.- // TODO: use oneof- string payload = 8 [(google.api.field_behavior) = REQUIRED];-- string comment = 9;-}