From bee33638ef3aae2a135dd123fcbb4762f7ace640 Mon Sep 17 00:00:00 2001 From: Willy Kloucek Date: Mon, 25 Jul 2022 12:16:37 +0200 Subject: [PATCH] remove Body from endpoint, see https://github.com/asim/go-micro/commit/3381a9f3dba45f07a6dcdba163158c68a7bc4a89 --- .../services/search/v0/search.pb.micro.go | 6 ---- .../services/settings/v0/settings.pb.micro.go | 30 ------------------- services/settings/pkg/server/grpc/server.go | 1 - 3 files changed, 37 deletions(-) diff --git a/protogen/gen/ocis/services/search/v0/search.pb.micro.go b/protogen/gen/ocis/services/search/v0/search.pb.micro.go index 157d3a0c90..4e069f8448 100644 --- a/protogen/gen/ocis/services/search/v0/search.pb.micro.go +++ b/protogen/gen/ocis/services/search/v0/search.pb.micro.go @@ -39,14 +39,12 @@ func NewSearchProviderEndpoints() []*api.Endpoint { Name: "SearchProvider.Search", Path: []string{"/api/v0/search/search"}, Method: []string{"POST"}, - Body: "*", Handler: "rpc", }, { Name: "SearchProvider.IndexSpace", Path: []string{"/api/v0/search/index-space"}, Method: []string{"POST"}, - Body: "*", Handler: "rpc", }, } @@ -111,14 +109,12 @@ func RegisterSearchProviderHandler(s server.Server, hdlr SearchProviderHandler, Name: "SearchProvider.Search", Path: []string{"/api/v0/search/search"}, Method: []string{"POST"}, - Body: "*", Handler: "rpc", })) opts = append(opts, api.WithEndpoint(&api.Endpoint{ Name: "SearchProvider.IndexSpace", Path: []string{"/api/v0/search/index-space"}, Method: []string{"POST"}, - Body: "*", Handler: "rpc", })) return s.Handle(s.NewHandler(&SearchProvider{h}, opts...)) @@ -144,7 +140,6 @@ func NewIndexProviderEndpoints() []*api.Endpoint { Name: "IndexProvider.Search", Path: []string{"/api/v0/search/index/search"}, Method: []string{"POST"}, - Body: "*", Handler: "rpc", }, } @@ -196,7 +191,6 @@ func RegisterIndexProviderHandler(s server.Server, hdlr IndexProviderHandler, op Name: "IndexProvider.Search", Path: []string{"/api/v0/search/index/search"}, Method: []string{"POST"}, - Body: "*", Handler: "rpc", })) return s.Handle(s.NewHandler(&IndexProvider{h}, opts...)) diff --git a/protogen/gen/ocis/services/settings/v0/settings.pb.micro.go b/protogen/gen/ocis/services/settings/v0/settings.pb.micro.go index 8308ad5cce..6d1c9324c0 100644 --- a/protogen/gen/ocis/services/settings/v0/settings.pb.micro.go +++ b/protogen/gen/ocis/services/settings/v0/settings.pb.micro.go @@ -39,35 +39,30 @@ func NewBundleServiceEndpoints() []*api.Endpoint { Name: "BundleService.SaveBundle", Path: []string{"/api/v0/settings/bundle-save"}, Method: []string{"POST"}, - Body: "*", Handler: "rpc", }, { Name: "BundleService.GetBundle", Path: []string{"/api/v0/settings/bundle-get"}, Method: []string{"POST"}, - Body: "*", Handler: "rpc", }, { Name: "BundleService.ListBundles", Path: []string{"/api/v0/settings/bundles-list"}, Method: []string{"POST"}, - Body: "*", Handler: "rpc", }, { Name: "BundleService.AddSettingToBundle", Path: []string{"/api/v0/settings/bundles-add-setting"}, Method: []string{"POST"}, - Body: "*", Handler: "rpc", }, { Name: "BundleService.RemoveSettingFromBundle", Path: []string{"/api/v0/settings/bundles-remove-setting"}, Method: []string{"POST"}, - Body: "*", Handler: "rpc", }, } @@ -171,35 +166,30 @@ func RegisterBundleServiceHandler(s server.Server, hdlr BundleServiceHandler, op Name: "BundleService.SaveBundle", Path: []string{"/api/v0/settings/bundle-save"}, Method: []string{"POST"}, - Body: "*", Handler: "rpc", })) opts = append(opts, api.WithEndpoint(&api.Endpoint{ Name: "BundleService.GetBundle", Path: []string{"/api/v0/settings/bundle-get"}, Method: []string{"POST"}, - Body: "*", Handler: "rpc", })) opts = append(opts, api.WithEndpoint(&api.Endpoint{ Name: "BundleService.ListBundles", Path: []string{"/api/v0/settings/bundles-list"}, Method: []string{"POST"}, - Body: "*", Handler: "rpc", })) opts = append(opts, api.WithEndpoint(&api.Endpoint{ Name: "BundleService.AddSettingToBundle", Path: []string{"/api/v0/settings/bundles-add-setting"}, Method: []string{"POST"}, - Body: "*", Handler: "rpc", })) opts = append(opts, api.WithEndpoint(&api.Endpoint{ Name: "BundleService.RemoveSettingFromBundle", Path: []string{"/api/v0/settings/bundles-remove-setting"}, Method: []string{"POST"}, - Body: "*", Handler: "rpc", })) return s.Handle(s.NewHandler(&BundleService{h}, opts...)) @@ -237,28 +227,24 @@ func NewValueServiceEndpoints() []*api.Endpoint { Name: "ValueService.SaveValue", Path: []string{"/api/v0/settings/values-save"}, Method: []string{"POST"}, - Body: "*", Handler: "rpc", }, { Name: "ValueService.GetValue", Path: []string{"/api/v0/settings/values-get"}, Method: []string{"POST"}, - Body: "*", Handler: "rpc", }, { Name: "ValueService.ListValues", Path: []string{"/api/v0/settings/values-list"}, Method: []string{"POST"}, - Body: "*", Handler: "rpc", }, { Name: "ValueService.GetValueByUniqueIdentifiers", Path: []string{"/api/v0/settings/values-get-by-unique-identifiers"}, Method: []string{"POST"}, - Body: "*", Handler: "rpc", }, } @@ -349,28 +335,24 @@ func RegisterValueServiceHandler(s server.Server, hdlr ValueServiceHandler, opts Name: "ValueService.SaveValue", Path: []string{"/api/v0/settings/values-save"}, Method: []string{"POST"}, - Body: "*", Handler: "rpc", })) opts = append(opts, api.WithEndpoint(&api.Endpoint{ Name: "ValueService.GetValue", Path: []string{"/api/v0/settings/values-get"}, Method: []string{"POST"}, - Body: "*", Handler: "rpc", })) opts = append(opts, api.WithEndpoint(&api.Endpoint{ Name: "ValueService.ListValues", Path: []string{"/api/v0/settings/values-list"}, Method: []string{"POST"}, - Body: "*", Handler: "rpc", })) opts = append(opts, api.WithEndpoint(&api.Endpoint{ Name: "ValueService.GetValueByUniqueIdentifiers", Path: []string{"/api/v0/settings/values-get-by-unique-identifiers"}, Method: []string{"POST"}, - Body: "*", Handler: "rpc", })) return s.Handle(s.NewHandler(&ValueService{h}, opts...)) @@ -404,28 +386,24 @@ func NewRoleServiceEndpoints() []*api.Endpoint { Name: "RoleService.ListRoles", Path: []string{"/api/v0/settings/roles-list"}, Method: []string{"POST"}, - Body: "*", Handler: "rpc", }, { Name: "RoleService.ListRoleAssignments", Path: []string{"/api/v0/settings/assignments-list"}, Method: []string{"POST"}, - Body: "*", Handler: "rpc", }, { Name: "RoleService.AssignRoleToUser", Path: []string{"/api/v0/settings/assignments-add"}, Method: []string{"POST"}, - Body: "*", Handler: "rpc", }, { Name: "RoleService.RemoveRoleFromUser", Path: []string{"/api/v0/settings/assignments-remove"}, Method: []string{"POST"}, - Body: "*", Handler: "rpc", }, } @@ -516,28 +494,24 @@ func RegisterRoleServiceHandler(s server.Server, hdlr RoleServiceHandler, opts . Name: "RoleService.ListRoles", Path: []string{"/api/v0/settings/roles-list"}, Method: []string{"POST"}, - Body: "*", Handler: "rpc", })) opts = append(opts, api.WithEndpoint(&api.Endpoint{ Name: "RoleService.ListRoleAssignments", Path: []string{"/api/v0/settings/assignments-list"}, Method: []string{"POST"}, - Body: "*", Handler: "rpc", })) opts = append(opts, api.WithEndpoint(&api.Endpoint{ Name: "RoleService.AssignRoleToUser", Path: []string{"/api/v0/settings/assignments-add"}, Method: []string{"POST"}, - Body: "*", Handler: "rpc", })) opts = append(opts, api.WithEndpoint(&api.Endpoint{ Name: "RoleService.RemoveRoleFromUser", Path: []string{"/api/v0/settings/assignments-remove"}, Method: []string{"POST"}, - Body: "*", Handler: "rpc", })) return s.Handle(s.NewHandler(&RoleService{h}, opts...)) @@ -571,14 +545,12 @@ func NewPermissionServiceEndpoints() []*api.Endpoint { Name: "PermissionService.ListPermissionsByResource", Path: []string{"/api/v0/settings/permissions-list-by-resource"}, Method: []string{"POST"}, - Body: "*", Handler: "rpc", }, { Name: "PermissionService.GetPermissionByID", Path: []string{"/api/v0/settings/permissions-get-by-id"}, Method: []string{"POST"}, - Body: "*", Handler: "rpc", }, } @@ -643,14 +615,12 @@ func RegisterPermissionServiceHandler(s server.Server, hdlr PermissionServiceHan Name: "PermissionService.ListPermissionsByResource", Path: []string{"/api/v0/settings/permissions-list-by-resource"}, Method: []string{"POST"}, - Body: "*", Handler: "rpc", })) opts = append(opts, api.WithEndpoint(&api.Endpoint{ Name: "PermissionService.GetPermissionByID", Path: []string{"/api/v0/settings/permissions-get-by-id"}, Method: []string{"POST"}, - Body: "*", Handler: "rpc", })) return s.Handle(s.NewHandler(&PermissionService{h}, opts...)) diff --git a/services/settings/pkg/server/grpc/server.go b/services/settings/pkg/server/grpc/server.go index b8690a3db7..937f8d2e2c 100644 --- a/services/settings/pkg/server/grpc/server.go +++ b/services/settings/pkg/server/grpc/server.go @@ -59,7 +59,6 @@ func RegisterCS3PermissionsServiceHandler(s server.Server, hdlr permissions.Perm Name: "PermissionsService.Checkpermission", Path: []string{"/api/v0/permissions/check-permission"}, Method: []string{"POST"}, - Body: "*", Handler: "rpc", })) return s.Handle(s.NewHandler(&PermissionsAPI{h}, opts...))