Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix naming of the user- and groupprovider services #2388

Merged
merged 1 commit into from
Aug 13, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions ocis/pkg/runtime/service/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,8 @@ func NewService(options ...Option) (*Service, error) {
s.ServicesRegistry["webdav"] = webdav.NewSutureService
s.ServicesRegistry["storage-frontend"] = storage.NewFrontend
s.ServicesRegistry["storage-gateway"] = storage.NewGateway
s.ServicesRegistry["storage-users-provider"] = storage.NewUsersProviderService
s.ServicesRegistry["storage-groupsprovider"] = storage.NewGroupsProvider
s.ServicesRegistry["storage-userprovider"] = storage.NewUserProvider
s.ServicesRegistry["storage-groupprovider"] = storage.NewGroupProvider
s.ServicesRegistry["storage-authbasic"] = storage.NewAuthBasic
s.ServicesRegistry["storage-authbearer"] = storage.NewAuthBearer
s.ServicesRegistry["storage-home"] = storage.NewStorageHome
Expand Down
12 changes: 6 additions & 6 deletions storage/pkg/command/groups.go
Original file line number Diff line number Diff line change
Expand Up @@ -156,22 +156,22 @@ func groupsConfigFromStruct(c *cli.Context, cfg *config.Config) map[string]inter
}
}

// GroupsProvider allows for the storage-groupsprovider command to be embedded and supervised by a suture supervisor tree.
type GroupsProvider struct {
// GroupProvider allows for the storage-groupprovider command to be embedded and supervised by a suture supervisor tree.
type GroupProvider struct {
cfg *config.Config
}

// NewGroupsProvider creates a new storage.GroupsProvider
func NewGroupsProvider(cfg *ociscfg.Config) suture.Service {
// NewGroupProvider creates a new storage.GroupProvider
func NewGroupProvider(cfg *ociscfg.Config) suture.Service {
if cfg.Mode == 0 {
cfg.Storage.Reva.Groups.Supervised = true
}
return GroupsProvider{
return GroupProvider{
cfg: cfg.Storage,
}
}

func (s GroupsProvider) Serve(ctx context.Context) error {
func (s GroupProvider) Serve(ctx context.Context) error {
s.cfg.Reva.Groups.Context = ctx
f := &flag.FlagSet{}
for k := range Groups(s.cfg).Flags {
Expand Down
12 changes: 6 additions & 6 deletions storage/pkg/command/users.go
Original file line number Diff line number Diff line change
Expand Up @@ -159,22 +159,22 @@ func usersConfigFromStruct(c *cli.Context, cfg *config.Config) map[string]interf
return rcfg
}

// UsersProviderService allows for the storage-userprovider command to be embedded and supervised by a suture supervisor tree.
type UsersProviderService struct {
// UserProvider allows for the storage-userprovider command to be embedded and supervised by a suture supervisor tree.
type UserProvider struct {
cfg *config.Config
}

// NewUsersProviderService creates a new storage.UsersProviderService
func NewUsersProviderService(cfg *ociscfg.Config) suture.Service {
// NewUserProvider creates a new storage.UserProvider
func NewUserProvider(cfg *ociscfg.Config) suture.Service {
if cfg.Mode == 0 {
cfg.Storage.Reva.Users.Supervised = true
}
return UsersProviderService{
return UserProvider{
cfg: cfg.Storage,
}
}

func (s UsersProviderService) Serve(ctx context.Context) error {
func (s UserProvider) Serve(ctx context.Context) error {
s.cfg.Reva.Users.Context = ctx
f := &flag.FlagSet{}
for k := range Users(s.cfg).Flags {
Expand Down