Migrate proto files for settings and adjusts paths

This commit is contained in:
Juan Pablo Villafáñez
2022-01-31 09:35:39 +01:00
parent e794c623bd
commit 7557e4e0ea
45 changed files with 650 additions and 10471 deletions
+3 -3
View File
@@ -6,7 +6,7 @@ import (
"github.com/owncloud/ocis/ocis-pkg/log"
"github.com/owncloud/ocis/ocis-pkg/roles"
"github.com/owncloud/ocis/ocs/pkg/config"
settings "github.com/owncloud/ocis/settings/pkg/proto/v0"
settingssvc "github.com/owncloud/ocis/protogen/gen/ocis/services/settings/v1"
)
// Option defines a single option function.
@@ -17,7 +17,7 @@ type Options struct {
Logger log.Logger
Config *config.Config
Middleware []func(http.Handler) http.Handler
RoleService settings.RoleService
RoleService settingssvc.RoleService
RoleManager *roles.Manager
}
@@ -54,7 +54,7 @@ func Middleware(val ...func(http.Handler) http.Handler) Option {
}
// RoleService provides a function to set the RoleService option.
func RoleService(val settings.RoleService) Option {
func RoleService(val settingssvc.RoleService) Option {
return func(o *Options) {
o.RoleService = val
}
+3 -3
View File
@@ -21,8 +21,8 @@ import (
ocsm "github.com/owncloud/ocis/ocs/pkg/middleware"
"github.com/owncloud/ocis/ocs/pkg/service/v0/data"
"github.com/owncloud/ocis/ocs/pkg/service/v0/response"
settingssvc "github.com/owncloud/ocis/protogen/gen/ocis/services/settings/v1"
"github.com/owncloud/ocis/proxy/pkg/user/backend"
settings "github.com/owncloud/ocis/settings/pkg/proto/v0"
)
// Service defines the extension handlers.
@@ -40,7 +40,7 @@ func NewService(opts ...Option) Service {
roleService := options.RoleService
if roleService == nil {
roleService = settings.NewRoleService("com.owncloud.api.settings", grpc.DefaultClient)
roleService = settingssvc.NewRoleService("com.owncloud.api.settings", grpc.DefaultClient)
}
roleManager := options.RoleManager
if roleManager == nil {
@@ -144,7 +144,7 @@ func NewService(opts ...Option) Service {
type Ocs struct {
config *config.Config
logger log.Logger
RoleService settings.RoleService
RoleService settingssvc.RoleService
RoleManager *roles.Manager
mux *chi.Mux
}