don't expose services by default
This commit is contained in:
@@ -157,22 +157,22 @@ func groupsConfigFromStruct(c *cli.Context, cfg *config.Config) map[string]inter
|
||||
}
|
||||
}
|
||||
|
||||
// GroupProvider allows for the storage-groupprovider command to be embedded and supervised by a suture supervisor tree.
|
||||
type GroupProvider struct {
|
||||
// GroupSutureService allows for the storage-groupprovider command to be embedded and supervised by a suture supervisor tree.
|
||||
type GroupSutureService struct {
|
||||
cfg *config.Config
|
||||
}
|
||||
|
||||
// NewGroupProvider creates a new storage.GroupProvider
|
||||
// NewGroupProviderSutureService creates a new storage.GroupProvider
|
||||
func NewGroupProvider(cfg *ociscfg.Config) suture.Service {
|
||||
if cfg.Mode == 0 {
|
||||
cfg.Storage.Reva.Groups.Supervised = true
|
||||
}
|
||||
return GroupProvider{
|
||||
return GroupSutureService{
|
||||
cfg: cfg.Storage,
|
||||
}
|
||||
}
|
||||
|
||||
func (s GroupProvider) Serve(ctx context.Context) error {
|
||||
func (s GroupSutureService) Serve(ctx context.Context) error {
|
||||
s.cfg.Reva.Groups.Context = ctx
|
||||
f := &flag.FlagSet{}
|
||||
cmdFlags := Groups(s.cfg).Flags
|
||||
|
||||
@@ -159,7 +159,7 @@ func storageMetadataFromStruct(c *cli.Context, cfg *config.Config) map[string]in
|
||||
}
|
||||
|
||||
// SutureService allows for the storage-metadata command to be embedded and supervised by a suture supervisor tree.
|
||||
type SutureService struct {
|
||||
type MetadataSutureService struct {
|
||||
cfg *config.Config
|
||||
}
|
||||
|
||||
@@ -168,12 +168,12 @@ func NewStorageMetadata(cfg *ociscfg.Config) suture.Service {
|
||||
if cfg.Mode == 0 {
|
||||
cfg.Storage.Reva.StorageMetadata.Supervised = true
|
||||
}
|
||||
return SutureService{
|
||||
return MetadataSutureService{
|
||||
cfg: cfg.Storage,
|
||||
}
|
||||
}
|
||||
|
||||
func (s SutureService) Serve(ctx context.Context) error {
|
||||
func (s MetadataSutureService) Serve(ctx context.Context) error {
|
||||
s.cfg.Reva.StorageMetadata.Context = ctx
|
||||
f := &flag.FlagSet{}
|
||||
cmdFlags := StorageMetadata(s.cfg).Flags
|
||||
|
||||
@@ -178,22 +178,22 @@ func usersConfigFromStruct(c *cli.Context, cfg *config.Config) map[string]interf
|
||||
return rcfg
|
||||
}
|
||||
|
||||
// UserProvider allows for the storage-userprovider command to be embedded and supervised by a suture supervisor tree.
|
||||
type UserProvider struct {
|
||||
// UserProviderSutureService allows for the storage-userprovider command to be embedded and supervised by a suture supervisor tree.
|
||||
type UserProviderSutureService struct {
|
||||
cfg *config.Config
|
||||
}
|
||||
|
||||
// NewUserProvider creates a new storage.UserProvider
|
||||
// NewUserProviderSutureService creates a new storage.UserProvider
|
||||
func NewUserProvider(cfg *ociscfg.Config) suture.Service {
|
||||
if cfg.Mode == 0 {
|
||||
cfg.Storage.Reva.Users.Supervised = true
|
||||
}
|
||||
return UserProvider{
|
||||
return UserProviderSutureService{
|
||||
cfg: cfg.Storage,
|
||||
}
|
||||
}
|
||||
|
||||
func (s UserProvider) Serve(ctx context.Context) error {
|
||||
func (s UserProviderSutureService) Serve(ctx context.Context) error {
|
||||
s.cfg.Reva.Users.Context = ctx
|
||||
f := &flag.FlagSet{}
|
||||
cmdFlags := Users(s.cfg).Flags
|
||||
|
||||
Reference in New Issue
Block a user