Database governance built for humans and agents — controlling changes and access across every major database.
Go cicddata-governancedata-maskingdata-securitydatabase-accessdatabase-governancedevopsdevsecopsflywaygitopsliquibasemongodbmysqloraclepostgresqlschema-migrationssecuritysql-clientsqlservertidb
chore(api): using search verb in search anomalies endpoint (#5047)
h3n4l6f174ec976b4
diff --git a/proto/generated-go/v1/anomaly_service.pb.go b/proto/generated-go/v1/anomaly_service.pb.goindex 3766bf2959..29ff298f1d 100644--- a/proto/generated-go/v1/anomaly_service.pb.go+++ b/proto/generated-go/v1/anomaly_service.pb.go@@ -945,18 +945,18 @@ var file_v1_anomaly_service_proto_rawDesc = []byte{0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x09, 0x0a,0x05, 0x55, 0x4e, 0x53, 0x45, 0x54, 0x10, 0x01, 0x12, 0x09, 0x0a, 0x05, 0x44, 0x41, 0x49, 0x4c,0x59, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x57, 0x45, 0x45, 0x4b, 0x4c, 0x59, 0x10, 0x03, 0x42,- 0x08, 0x0a, 0x06, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x32, 0x8f, 0x01, 0x0a, 0x0e, 0x41, 0x6e,- 0x6f, 0x6d, 0x61, 0x6c, 0x79, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x7d, 0x0a, 0x0f,+ 0x08, 0x0a, 0x06, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x32, 0x8c, 0x01, 0x0a, 0x0e, 0x41, 0x6e,+ 0x6f, 0x6d, 0x61, 0x6c, 0x79, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x7a, 0x0a, 0x0f,0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x41, 0x6e, 0x6f, 0x6d, 0x61, 0x6c, 0x69, 0x65, 0x73, 0x12,0x23, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65,0x61, 0x72, 0x63, 0x68, 0x41, 0x6e, 0x6f, 0x6d, 0x61, 0x6c, 0x69, 0x65, 0x73, 0x52, 0x65, 0x71,0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e,0x76, 0x31, 0x2e, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x41, 0x6e, 0x6f, 0x6d, 0x61, 0x6c, 0x69,- 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1f, 0x82, 0xd3, 0xe4, 0x93,- 0x02, 0x19, 0x3a, 0x01, 0x2a, 0x22, 0x14, 0x2f, 0x76, 0x31, 0x2f, 0x61, 0x6e, 0x6f, 0x6d, 0x61,- 0x6c, 0x69, 0x65, 0x73, 0x2f, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 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,+ 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1c, 0x82, 0xd3, 0xe4, 0x93,+ 0x02, 0x16, 0x12, 0x14, 0x2f, 0x76, 0x31, 0x2f, 0x61, 0x6e, 0x6f, 0x6d, 0x61, 0x6c, 0x69, 0x65,+ 0x73, 0x3a, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 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 (diff --git a/proto/generated-go/v1/anomaly_service.pb.gw.go b/proto/generated-go/v1/anomaly_service.pb.gw.goindex bb1966e3d7..677954dff3 100644--- a/proto/generated-go/v1/anomaly_service.pb.gw.go+++ b/proto/generated-go/v1/anomaly_service.pb.gw.go@@ -31,15 +31,18 @@ var _ = runtime.Stringvar _ = utilities.NewDoubleArrayvar _ = metadata.Join+var (+ filter_AnomalyService_SearchAnomalies_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)}+)+func request_AnomalyService_SearchAnomalies_0(ctx context.Context, marshaler runtime.Marshaler, client AnomalyServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {var protoReq SearchAnomaliesRequestvar metadata runtime.ServerMetadata- newReader, berr := utilities.IOReaderFactory(req.Body)- if berr != nil {- return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr)+ if err := req.ParseForm(); err != nil {+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)}- if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF {+ if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_AnomalyService_SearchAnomalies_0); err != nil {return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)}@@ -52,11 +55,10 @@ func local_request_AnomalyService_SearchAnomalies_0(ctx context.Context, marshalvar protoReq SearchAnomaliesRequestvar metadata runtime.ServerMetadata- newReader, berr := utilities.IOReaderFactory(req.Body)- if berr != nil {- return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr)+ if err := req.ParseForm(); err != nil {+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)}- if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF {+ if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_AnomalyService_SearchAnomalies_0); err != nil {return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)}@@ -71,7 +73,7 @@ func local_request_AnomalyService_SearchAnomalies_0(ctx context.Context, marshal// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterAnomalyServiceHandlerFromEndpoint instead.func RegisterAnomalyServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server AnomalyServiceServer) error {- mux.Handle("POST", pattern_AnomalyService_SearchAnomalies_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {+ mux.Handle("GET", pattern_AnomalyService_SearchAnomalies_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {ctx, cancel := context.WithCancel(req.Context())defer cancel()var stream runtime.ServerTransportStream@@ -79,7 +81,7 @@ func RegisterAnomalyServiceHandlerServer(ctx context.Context, mux *runtime.ServeinboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)var err errorvar annotatedContext context.Context- annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/bytebase.v1.AnomalyService/SearchAnomalies", runtime.WithHTTPPathPattern("/v1/anomalies/search"))+ annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/bytebase.v1.AnomalyService/SearchAnomalies", runtime.WithHTTPPathPattern("/v1/anomalies:search"))if err != nil {runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)return@@ -137,13 +139,13 @@ func RegisterAnomalyServiceHandler(ctx context.Context, mux *runtime.ServeMux, c// "AnomalyServiceClient" to call the correct interceptors.func RegisterAnomalyServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client AnomalyServiceClient) error {- mux.Handle("POST", pattern_AnomalyService_SearchAnomalies_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {+ mux.Handle("GET", pattern_AnomalyService_SearchAnomalies_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 errorvar annotatedContext context.Context- annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/bytebase.v1.AnomalyService/SearchAnomalies", runtime.WithHTTPPathPattern("/v1/anomalies/search"))+ annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/bytebase.v1.AnomalyService/SearchAnomalies", runtime.WithHTTPPathPattern("/v1/anomalies:search"))if err != nil {runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)return@@ -163,7 +165,7 @@ func RegisterAnomalyServiceHandlerClient(ctx context.Context, mux *runtime.Serve}var (- pattern_AnomalyService_SearchAnomalies_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "anomalies", "search"}, ""))+ pattern_AnomalyService_SearchAnomalies_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "anomalies"}, "search")))var (diff --git a/proto/v1/anomaly_service.proto b/proto/v1/anomaly_service.protoindex 2928558dce..78f0fa8467 100644--- a/proto/v1/anomaly_service.proto+++ b/proto/v1/anomaly_service.proto@@ -16,8 +16,7 @@ option go_package = "generated-go/v1";service AnomalyService {rpc SearchAnomalies(SearchAnomaliesRequest) returns (SearchAnomaliesResponse) {option (google.api.http) = {- post: "/v1/anomalies/search"- body: "*"+ get: "/v1/anomalies:search"};}}