This commit is contained in:
Willy Kloucek committed 2022-07-25 12:16:37 +02:00
1 parent 14ee864dfb
commit bee33638ef
3 files changed
-37

No files matched your search

@@ -39,14 +39,12 @@ func NewSearchProviderEndpoints() []*api.Endpoint {
Name: "SearchProvider.Search", Name: "SearchProvider.Search",
Path: []string{"/api/v0/search/search"}, Path: []string{"/api/v0/search/search"},
Method: []string{"POST"}, Method: []string{"POST"},
Body: "*",
Handler: "rpc", Handler: "rpc",
}, },
{ {
Name: "SearchProvider.IndexSpace", Name: "SearchProvider.IndexSpace",
Path: []string{"/api/v0/search/index-space"}, Path: []string{"/api/v0/search/index-space"},
Method: []string{"POST"}, Method: []string{"POST"},
Body: "*",
Handler: "rpc", Handler: "rpc",
}, },
} }
@@ -111,14 +109,12 @@ func RegisterSearchProviderHandler(s server.Server, hdlr SearchProviderHandler,
Name: "SearchProvider.Search", Name: "SearchProvider.Search",
Path: []string{"/api/v0/search/search"}, Path: []string{"/api/v0/search/search"},
Method: []string{"POST"}, Method: []string{"POST"},
Body: "*",
Handler: "rpc", Handler: "rpc",
})) }))
opts = append(opts, api.WithEndpoint(&api.Endpoint{ opts = append(opts, api.WithEndpoint(&api.Endpoint{
Name: "SearchProvider.IndexSpace", Name: "SearchProvider.IndexSpace",
Path: []string{"/api/v0/search/index-space"}, Path: []string{"/api/v0/search/index-space"},
Method: []string{"POST"}, Method: []string{"POST"},
Body: "*",
Handler: "rpc", Handler: "rpc",
})) }))
return s.Handle(s.NewHandler(&SearchProvider{h}, opts...)) return s.Handle(s.NewHandler(&SearchProvider{h}, opts...))
@@ -144,7 +140,6 @@ func NewIndexProviderEndpoints() []*api.Endpoint {
Name: "IndexProvider.Search", Name: "IndexProvider.Search",
Path: []string{"/api/v0/search/index/search"}, Path: []string{"/api/v0/search/index/search"},
Method: []string{"POST"}, Method: []string{"POST"},
Body: "*",
Handler: "rpc", Handler: "rpc",
}, },
} }
@@ -196,7 +191,6 @@ func RegisterIndexProviderHandler(s server.Server, hdlr IndexProviderHandler, op
Name: "IndexProvider.Search", Name: "IndexProvider.Search",
Path: []string{"/api/v0/search/index/search"}, Path: []string{"/api/v0/search/index/search"},
Method: []string{"POST"}, Method: []string{"POST"},
Body: "*",
Handler: "rpc", Handler: "rpc",
})) }))
return s.Handle(s.NewHandler(&IndexProvider{h}, opts...)) return s.Handle(s.NewHandler(&IndexProvider{h}, opts...))
@@ -39,35 +39,30 @@ func NewBundleServiceEndpoints() []*api.Endpoint {
Name: "BundleService.SaveBundle", Name: "BundleService.SaveBundle",
Path: []string{"/api/v0/settings/bundle-save"}, Path: []string{"/api/v0/settings/bundle-save"},
Method: []string{"POST"}, Method: []string{"POST"},
Body: "*",
Handler: "rpc", Handler: "rpc",
}, },
{ {
Name: "BundleService.GetBundle", Name: "BundleService.GetBundle",
Path: []string{"/api/v0/settings/bundle-get"}, Path: []string{"/api/v0/settings/bundle-get"},
Method: []string{"POST"}, Method: []string{"POST"},
Body: "*",
Handler: "rpc", Handler: "rpc",
}, },
{ {
Name: "BundleService.ListBundles", Name: "BundleService.ListBundles",
Path: []string{"/api/v0/settings/bundles-list"}, Path: []string{"/api/v0/settings/bundles-list"},
Method: []string{"POST"}, Method: []string{"POST"},
Body: "*",
Handler: "rpc", Handler: "rpc",
}, },
{ {
Name: "BundleService.AddSettingToBundle", Name: "BundleService.AddSettingToBundle",
Path: []string{"/api/v0/settings/bundles-add-setting"}, Path: []string{"/api/v0/settings/bundles-add-setting"},
Method: []string{"POST"}, Method: []string{"POST"},
Body: "*",
Handler: "rpc", Handler: "rpc",
}, },
{ {
Name: "BundleService.RemoveSettingFromBundle", Name: "BundleService.RemoveSettingFromBundle",
Path: []string{"/api/v0/settings/bundles-remove-setting"}, Path: []string{"/api/v0/settings/bundles-remove-setting"},
Method: []string{"POST"}, Method: []string{"POST"},
Body: "*",
Handler: "rpc", Handler: "rpc",
}, },
} }
@@ -171,35 +166,30 @@ func RegisterBundleServiceHandler(s server.Server, hdlr BundleServiceHandler, op
Name: "BundleService.SaveBundle", Name: "BundleService.SaveBundle",
Path: []string{"/api/v0/settings/bundle-save"}, Path: []string{"/api/v0/settings/bundle-save"},
Method: []string{"POST"}, Method: []string{"POST"},
Body: "*",
Handler: "rpc", Handler: "rpc",
})) }))
opts = append(opts, api.WithEndpoint(&api.Endpoint{ opts = append(opts, api.WithEndpoint(&api.Endpoint{
Name: "BundleService.GetBundle", Name: "BundleService.GetBundle",
Path: []string{"/api/v0/settings/bundle-get"}, Path: []string{"/api/v0/settings/bundle-get"},
Method: []string{"POST"}, Method: []string{"POST"},
Body: "*",
Handler: "rpc", Handler: "rpc",
})) }))
opts = append(opts, api.WithEndpoint(&api.Endpoint{ opts = append(opts, api.WithEndpoint(&api.Endpoint{
Name: "BundleService.ListBundles", Name: "BundleService.ListBundles",
Path: []string{"/api/v0/settings/bundles-list"}, Path: []string{"/api/v0/settings/bundles-list"},
Method: []string{"POST"}, Method: []string{"POST"},
Body: "*",
Handler: "rpc", Handler: "rpc",
})) }))
opts = append(opts, api.WithEndpoint(&api.Endpoint{ opts = append(opts, api.WithEndpoint(&api.Endpoint{
Name: "BundleService.AddSettingToBundle", Name: "BundleService.AddSettingToBundle",
Path: []string{"/api/v0/settings/bundles-add-setting"}, Path: []string{"/api/v0/settings/bundles-add-setting"},
Method: []string{"POST"}, Method: []string{"POST"},
Body: "*",
Handler: "rpc", Handler: "rpc",
})) }))
opts = append(opts, api.WithEndpoint(&api.Endpoint{ opts = append(opts, api.WithEndpoint(&api.Endpoint{
Name: "BundleService.RemoveSettingFromBundle", Name: "BundleService.RemoveSettingFromBundle",
Path: []string{"/api/v0/settings/bundles-remove-setting"}, Path: []string{"/api/v0/settings/bundles-remove-setting"},
Method: []string{"POST"}, Method: []string{"POST"},
Body: "*",
Handler: "rpc", Handler: "rpc",
})) }))
return s.Handle(s.NewHandler(&BundleService{h}, opts...)) return s.Handle(s.NewHandler(&BundleService{h}, opts...))
@@ -237,28 +227,24 @@ func NewValueServiceEndpoints() []*api.Endpoint {
Name: "ValueService.SaveValue", Name: "ValueService.SaveValue",
Path: []string{"/api/v0/settings/values-save"}, Path: []string{"/api/v0/settings/values-save"},
Method: []string{"POST"}, Method: []string{"POST"},
Body: "*",
Handler: "rpc", Handler: "rpc",
}, },
{ {
Name: "ValueService.GetValue", Name: "ValueService.GetValue",
Path: []string{"/api/v0/settings/values-get"}, Path: []string{"/api/v0/settings/values-get"},
Method: []string{"POST"}, Method: []string{"POST"},
Body: "*",
Handler: "rpc", Handler: "rpc",
}, },
{ {
Name: "ValueService.ListValues", Name: "ValueService.ListValues",
Path: []string{"/api/v0/settings/values-list"}, Path: []string{"/api/v0/settings/values-list"},
Method: []string{"POST"}, Method: []string{"POST"},
Body: "*",
Handler: "rpc", Handler: "rpc",
}, },
{ {
Name: "ValueService.GetValueByUniqueIdentifiers", Name: "ValueService.GetValueByUniqueIdentifiers",
Path: []string{"/api/v0/settings/values-get-by-unique-identifiers"}, Path: []string{"/api/v0/settings/values-get-by-unique-identifiers"},
Method: []string{"POST"}, Method: []string{"POST"},
Body: "*",
Handler: "rpc", Handler: "rpc",
}, },
} }
@@ -349,28 +335,24 @@ func RegisterValueServiceHandler(s server.Server, hdlr ValueServiceHandler, opts
Name: "ValueService.SaveValue", Name: "ValueService.SaveValue",
Path: []string{"/api/v0/settings/values-save"}, Path: []string{"/api/v0/settings/values-save"},
Method: []string{"POST"}, Method: []string{"POST"},
Body: "*",
Handler: "rpc", Handler: "rpc",
})) }))
opts = append(opts, api.WithEndpoint(&api.Endpoint{ opts = append(opts, api.WithEndpoint(&api.Endpoint{
Name: "ValueService.GetValue", Name: "ValueService.GetValue",
Path: []string{"/api/v0/settings/values-get"}, Path: []string{"/api/v0/settings/values-get"},
Method: []string{"POST"}, Method: []string{"POST"},
Body: "*",
Handler: "rpc", Handler: "rpc",
})) }))
opts = append(opts, api.WithEndpoint(&api.Endpoint{ opts = append(opts, api.WithEndpoint(&api.Endpoint{
Name: "ValueService.ListValues", Name: "ValueService.ListValues",
Path: []string{"/api/v0/settings/values-list"}, Path: []string{"/api/v0/settings/values-list"},
Method: []string{"POST"}, Method: []string{"POST"},
Body: "*",
Handler: "rpc", Handler: "rpc",
})) }))
opts = append(opts, api.WithEndpoint(&api.Endpoint{ opts = append(opts, api.WithEndpoint(&api.Endpoint{
Name: "ValueService.GetValueByUniqueIdentifiers", Name: "ValueService.GetValueByUniqueIdentifiers",
Path: []string{"/api/v0/settings/values-get-by-unique-identifiers"}, Path: []string{"/api/v0/settings/values-get-by-unique-identifiers"},
Method: []string{"POST"}, Method: []string{"POST"},
Body: "*",
Handler: "rpc", Handler: "rpc",
})) }))
return s.Handle(s.NewHandler(&ValueService{h}, opts...)) return s.Handle(s.NewHandler(&ValueService{h}, opts...))
@@ -404,28 +386,24 @@ func NewRoleServiceEndpoints() []*api.Endpoint {
Name: "RoleService.ListRoles", Name: "RoleService.ListRoles",
Path: []string{"/api/v0/settings/roles-list"}, Path: []string{"/api/v0/settings/roles-list"},
Method: []string{"POST"}, Method: []string{"POST"},
Body: "*",
Handler: "rpc", Handler: "rpc",
}, },
{ {
Name: "RoleService.ListRoleAssignments", Name: "RoleService.ListRoleAssignments",
Path: []string{"/api/v0/settings/assignments-list"}, Path: []string{"/api/v0/settings/assignments-list"},
Method: []string{"POST"}, Method: []string{"POST"},
Body: "*",
Handler: "rpc", Handler: "rpc",
}, },
{ {
Name: "RoleService.AssignRoleToUser", Name: "RoleService.AssignRoleToUser",
Path: []string{"/api/v0/settings/assignments-add"}, Path: []string{"/api/v0/settings/assignments-add"},
Method: []string{"POST"}, Method: []string{"POST"},
Body: "*",
Handler: "rpc", Handler: "rpc",
}, },
{ {
Name: "RoleService.RemoveRoleFromUser", Name: "RoleService.RemoveRoleFromUser",
Path: []string{"/api/v0/settings/assignments-remove"}, Path: []string{"/api/v0/settings/assignments-remove"},
Method: []string{"POST"}, Method: []string{"POST"},
Body: "*",
Handler: "rpc", Handler: "rpc",
}, },
} }
@@ -516,28 +494,24 @@ func RegisterRoleServiceHandler(s server.Server, hdlr RoleServiceHandler, opts .
Name: "RoleService.ListRoles", Name: "RoleService.ListRoles",
Path: []string{"/api/v0/settings/roles-list"}, Path: []string{"/api/v0/settings/roles-list"},
Method: []string{"POST"}, Method: []string{"POST"},
Body: "*",
Handler: "rpc", Handler: "rpc",
})) }))
opts = append(opts, api.WithEndpoint(&api.Endpoint{ opts = append(opts, api.WithEndpoint(&api.Endpoint{
Name: "RoleService.ListRoleAssignments", Name: "RoleService.ListRoleAssignments",
Path: []string{"/api/v0/settings/assignments-list"}, Path: []string{"/api/v0/settings/assignments-list"},
Method: []string{"POST"}, Method: []string{"POST"},
Body: "*",
Handler: "rpc", Handler: "rpc",
})) }))
opts = append(opts, api.WithEndpoint(&api.Endpoint{ opts = append(opts, api.WithEndpoint(&api.Endpoint{
Name: "RoleService.AssignRoleToUser", Name: "RoleService.AssignRoleToUser",
Path: []string{"/api/v0/settings/assignments-add"}, Path: []string{"/api/v0/settings/assignments-add"},
Method: []string{"POST"}, Method: []string{"POST"},
Body: "*",
Handler: "rpc", Handler: "rpc",
})) }))
opts = append(opts, api.WithEndpoint(&api.Endpoint{ opts = append(opts, api.WithEndpoint(&api.Endpoint{
Name: "RoleService.RemoveRoleFromUser", Name: "RoleService.RemoveRoleFromUser",
Path: []string{"/api/v0/settings/assignments-remove"}, Path: []string{"/api/v0/settings/assignments-remove"},
Method: []string{"POST"}, Method: []string{"POST"},
Body: "*",
Handler: "rpc", Handler: "rpc",
})) }))
return s.Handle(s.NewHandler(&RoleService{h}, opts...)) return s.Handle(s.NewHandler(&RoleService{h}, opts...))
@@ -571,14 +545,12 @@ func NewPermissionServiceEndpoints() []*api.Endpoint {
Name: "PermissionService.ListPermissionsByResource", Name: "PermissionService.ListPermissionsByResource",
Path: []string{"/api/v0/settings/permissions-list-by-resource"}, Path: []string{"/api/v0/settings/permissions-list-by-resource"},
Method: []string{"POST"}, Method: []string{"POST"},
Body: "*",
Handler: "rpc", Handler: "rpc",
}, },
{ {
Name: "PermissionService.GetPermissionByID", Name: "PermissionService.GetPermissionByID",
Path: []string{"/api/v0/settings/permissions-get-by-id"}, Path: []string{"/api/v0/settings/permissions-get-by-id"},
Method: []string{"POST"}, Method: []string{"POST"},
Body: "*",
Handler: "rpc", Handler: "rpc",
}, },
} }
@@ -643,14 +615,12 @@ func RegisterPermissionServiceHandler(s server.Server, hdlr PermissionServiceHan
Name: "PermissionService.ListPermissionsByResource", Name: "PermissionService.ListPermissionsByResource",
Path: []string{"/api/v0/settings/permissions-list-by-resource"}, Path: []string{"/api/v0/settings/permissions-list-by-resource"},
Method: []string{"POST"}, Method: []string{"POST"},
Body: "*",
Handler: "rpc", Handler: "rpc",
})) }))
opts = append(opts, api.WithEndpoint(&api.Endpoint{ opts = append(opts, api.WithEndpoint(&api.Endpoint{
Name: "PermissionService.GetPermissionByID", Name: "PermissionService.GetPermissionByID",
Path: []string{"/api/v0/settings/permissions-get-by-id"}, Path: []string{"/api/v0/settings/permissions-get-by-id"},
Method: []string{"POST"}, Method: []string{"POST"},
Body: "*",
Handler: "rpc", Handler: "rpc",
})) }))
return s.Handle(s.NewHandler(&PermissionService{h}, opts...)) return s.Handle(s.NewHandler(&PermissionService{h}, opts...))
@@ -59,7 +59,6 @@ func RegisterCS3PermissionsServiceHandler(s server.Server, hdlr permissions.Perm
Name: "PermissionsService.Checkpermission", Name: "PermissionsService.Checkpermission",
Path: []string{"/api/v0/permissions/check-permission"}, Path: []string{"/api/v0/permissions/check-permission"},
Method: []string{"POST"}, Method: []string{"POST"},
Body: "*",
Handler: "rpc", Handler: "rpc",
})) }))
return s.Handle(s.NewHandler(&PermissionsAPI{h}, opts...)) return s.Handle(s.NewHandler(&PermissionsAPI{h}, opts...))