mirror of
https://github.com/opencloud-eu/opencloud.git
synced 2026-05-24 08:27:27 -04:00
Merge remote-tracking branch 'origin/master' into fix-commands
This commit is contained in:
@@ -1,32 +0,0 @@
|
||||
package command
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/owncloud/ocis/v2/extensions/accounts/pkg/command"
|
||||
"github.com/owncloud/ocis/v2/ocis-pkg/config"
|
||||
"github.com/owncloud/ocis/v2/ocis-pkg/config/parser"
|
||||
"github.com/owncloud/ocis/v2/ocis/pkg/register"
|
||||
"github.com/urfave/cli/v2"
|
||||
)
|
||||
|
||||
// AccountsCommand is the entrypoint for the accounts command.
|
||||
func AccountsCommand(cfg *config.Config) *cli.Command {
|
||||
return &cli.Command{
|
||||
Name: cfg.Accounts.Service.Name,
|
||||
Usage: subcommandDescription(cfg.Accounts.Service.Name),
|
||||
Category: "extensions",
|
||||
Before: func(c *cli.Context) error {
|
||||
if err := parser.ParseConfig(cfg); err != nil {
|
||||
fmt.Printf("%v", err)
|
||||
}
|
||||
cfg.Accounts.Commons = cfg.Commons
|
||||
return nil
|
||||
},
|
||||
Subcommands: command.GetCommands(cfg.Accounts),
|
||||
}
|
||||
}
|
||||
|
||||
func init() {
|
||||
register.AddCommand(AccountsCommand)
|
||||
}
|
||||
@@ -1,32 +0,0 @@
|
||||
package command
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/owncloud/ocis/v2/extensions/glauth/pkg/command"
|
||||
"github.com/owncloud/ocis/v2/ocis-pkg/config"
|
||||
"github.com/owncloud/ocis/v2/ocis-pkg/config/parser"
|
||||
"github.com/owncloud/ocis/v2/ocis/pkg/register"
|
||||
"github.com/urfave/cli/v2"
|
||||
)
|
||||
|
||||
// GLAuthCommand is the entrypoint for the glauth command.
|
||||
func GLAuthCommand(cfg *config.Config) *cli.Command {
|
||||
return &cli.Command{
|
||||
Name: cfg.GLAuth.Service.Name,
|
||||
Usage: subcommandDescription(cfg.GLAuth.Service.Name),
|
||||
Category: "extensions",
|
||||
Before: func(c *cli.Context) error {
|
||||
if err := parser.ParseConfig(cfg); err != nil {
|
||||
fmt.Printf("%v", err)
|
||||
}
|
||||
cfg.GLAuth.Commons = cfg.Commons
|
||||
return nil
|
||||
},
|
||||
Subcommands: command.GetCommands(cfg.GLAuth),
|
||||
}
|
||||
}
|
||||
|
||||
func init() {
|
||||
register.AddCommand(GLAuthCommand)
|
||||
}
|
||||
@@ -28,6 +28,7 @@ func VersionCommand(cfg *config.Config) *cli.Command {
|
||||
serviceList, err := reg.ListServices()
|
||||
if err != nil {
|
||||
fmt.Println(fmt.Errorf("could not list services: %v", err))
|
||||
return err
|
||||
}
|
||||
|
||||
var services []*mreg.Service
|
||||
|
||||
Reference in New Issue
Block a user