remove commented out code

This commit is contained in:
David Christofas
2022-04-26 13:52:40 +02:00
parent 4ae93e6efb
commit e2ea74c9bc
7 changed files with 1 additions and 29 deletions
@@ -24,9 +24,6 @@ func AppProvider(cfg *config.Config) *cli.Command {
return &cli.Command{ return &cli.Command{
Name: "app-provider", Name: "app-provider",
Usage: "start appprovider for providing apps", Usage: "start appprovider for providing apps",
// Before: func(c *cli.Context) error {
// return ParseConfig(c, cfg, "storage-app-provider")
// },
Action: func(c *cli.Context) error { Action: func(c *cli.Context) error {
logCfg := cfg.Logging logCfg := cfg.Logging
logger := log.NewLogger( logger := log.NewLogger(
@@ -105,7 +102,6 @@ func appProviderConfigFromStruct(c *cli.Context, cfg *config.Config) map[string]
// TODO build services dynamically // TODO build services dynamically
"services": map[string]interface{}{ "services": map[string]interface{}{
"appprovider": map[string]interface{}{ "appprovider": map[string]interface{}{
// "gatewaysvc": cfg.Reva.Gateway.Endpoint,
"app_provider_url": cfg.ExternalAddr, "app_provider_url": cfg.ExternalAddr,
"driver": cfg.Driver, "driver": cfg.Driver,
"drivers": map[string]interface{}{ "drivers": map[string]interface{}{
@@ -143,7 +139,6 @@ func NewAppProvider(cfg *ociscfg.Config) suture.Service {
} }
func (s AppProviderSutureService) Serve(ctx context.Context) error { func (s AppProviderSutureService) Serve(ctx context.Context) error {
// s.cfg.Reva.AppProvider.Context = ctx
cmd := AppProvider(s.cfg) cmd := AppProvider(s.cfg)
f := &flag.FlagSet{} f := &flag.FlagSet{}
cmdFlags := cmd.Flags cmdFlags := cmd.Flags
@@ -162,7 +162,6 @@ func NewAuthBasic(cfg *ociscfg.Config) suture.Service {
} }
func (s AuthBasicSutureService) Serve(ctx context.Context) error { func (s AuthBasicSutureService) Serve(ctx context.Context) error {
// s.cfg.Reva.AuthBasic.Context = ctx
f := &flag.FlagSet{} f := &flag.FlagSet{}
cmdFlags := AuthBasic(s.cfg).Flags cmdFlags := AuthBasic(s.cfg).Flags
for k := range cmdFlags { for k := range cmdFlags {
@@ -134,7 +134,6 @@ func NewAuthBearer(cfg *ociscfg.Config) suture.Service {
} }
func (s AuthBearerSutureService) Serve(ctx context.Context) error { func (s AuthBearerSutureService) Serve(ctx context.Context) error {
// s.cfg.Reva.AuthBearer.Context = ctx
cmd := AuthBearer(s.cfg) cmd := AuthBearer(s.cfg)
f := &flag.FlagSet{} f := &flag.FlagSet{}
cmdFlags := cmd.Flags cmdFlags := cmd.Flags
@@ -394,7 +394,6 @@ func NewGateway(cfg *ociscfg.Config) suture.Service {
} }
func (s GatewaySutureService) Serve(ctx context.Context) error { func (s GatewaySutureService) Serve(ctx context.Context) error {
// s.cfg.Reva.Gateway.Context = ctx
cmd := Gateway(s.cfg) cmd := Gateway(s.cfg)
f := &flag.FlagSet{} f := &flag.FlagSet{}
cmdFlags := cmd.Flags cmdFlags := cmd.Flags
-3
View File
@@ -14,9 +14,6 @@ func Health(cfg *config.Config) *cli.Command {
Name: "health", Name: "health",
Usage: "check health status", Usage: "check health status",
Category: "info", Category: "info",
// Before: func(c *cli.Context) error {
// return ParseConfig(c, cfg, "storage")
// },
Action: func(c *cli.Context) error { Action: func(c *cli.Context) error {
logger := NewLogger(cfg) logger := NewLogger(cfg)
-17
View File
@@ -12,19 +12,6 @@ import (
// GetCommands provides all commands for this service // GetCommands provides all commands for this service
func GetCommands(cfg *config.Config) cli.Commands { func GetCommands(cfg *config.Config) cli.Commands {
return []*cli.Command{ return []*cli.Command{
// Frontend(cfg),
// Gateway(cfg),
// Users(cfg),
// Groups(cfg),
// AppProvider(cfg),
// AuthBasic(cfg),
// AuthBearer(cfg),
// AuthMachine(cfg),
// Sharing(cfg),
// StoragePublicLink(cfg),
// StorageShares(cfg),
// StorageUsers(cfg),
// StorageMetadata(cfg),
Health(cfg), Health(cfg),
} }
} }
@@ -35,10 +22,6 @@ func Execute(cfg *config.Config) error {
Name: "storage", Name: "storage",
Usage: "Storage service for oCIS", Usage: "Storage service for oCIS",
// Before: func(c *cli.Context) error {
// return ParseConfig(c, cfg, "storage")
// },
Commands: GetCommands(cfg), Commands: GetCommands(cfg),
}) })
+1 -1
View File
@@ -16,7 +16,7 @@ func WaitForCA(log log.Logger, insecure bool, caCert string) error {
log.Warn().Str("LDAP CACert", caCert).Msgf("File does not exist. Waiting %d seconds for it to appear.", _caTimeout) log.Warn().Str("LDAP CACert", caCert).Msgf("File does not exist. Waiting %d seconds for it to appear.", _caTimeout)
time.Sleep(_caTimeout * time.Second) time.Sleep(_caTimeout * time.Second)
if _, err := os.Stat(caCert); errors.Is(err, os.ErrNotExist) { if _, err := os.Stat(caCert); errors.Is(err, os.ErrNotExist) {
log.Warn().Str("LDAP CACert", caCert).Msgf("File does still not exist after Timeout") log.Warn().Str("LDAP CACert", caCert).Msgf("File still does not exist after Timeout")
return err return err
} }
} }