initial invitations skeleton
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
package command
|
||||
|
||||
import (
|
||||
"github.com/owncloud/ocis/v2/ocis-pkg/config"
|
||||
"github.com/owncloud/ocis/v2/ocis-pkg/config/configlog"
|
||||
"github.com/owncloud/ocis/v2/ocis-pkg/config/parser"
|
||||
"github.com/owncloud/ocis/v2/ocis/pkg/command/helper"
|
||||
"github.com/owncloud/ocis/v2/ocis/pkg/register"
|
||||
"github.com/owncloud/ocis/v2/services/invitations/pkg/command"
|
||||
"github.com/urfave/cli/v2"
|
||||
)
|
||||
|
||||
// InvitationsCommand is the entrypoint for the invitations command.
|
||||
func InvitationsCommand(cfg *config.Config) *cli.Command {
|
||||
return &cli.Command{
|
||||
Name: cfg.Invitations.Service.Name,
|
||||
Usage: helper.SubcommandDescription(cfg.Invitations.Service.Name),
|
||||
Category: "services",
|
||||
Before: func(c *cli.Context) error {
|
||||
configlog.Error(parser.ParseConfig(cfg, true))
|
||||
cfg.Invitations.Commons = cfg.Commons
|
||||
return nil
|
||||
},
|
||||
Subcommands: command.GetCommands(cfg.Invitations),
|
||||
}
|
||||
}
|
||||
|
||||
func init() {
|
||||
register.AddCommand(InvitationsCommand)
|
||||
}
|
||||
@@ -29,6 +29,7 @@ import (
|
||||
groups "github.com/owncloud/ocis/v2/services/groups/pkg/command"
|
||||
idm "github.com/owncloud/ocis/v2/services/idm/pkg/command"
|
||||
idp "github.com/owncloud/ocis/v2/services/idp/pkg/command"
|
||||
invitations "github.com/owncloud/ocis/v2/services/invitations/pkg/command"
|
||||
nats "github.com/owncloud/ocis/v2/services/nats/pkg/command"
|
||||
notifications "github.com/owncloud/ocis/v2/services/notifications/pkg/command"
|
||||
ocdav "github.com/owncloud/ocis/v2/services/ocdav/pkg/command"
|
||||
@@ -108,6 +109,7 @@ func NewService(options ...Option) (*Service, error) {
|
||||
s.ServicesRegistry[opts.Config.StorageSystem.Service.Name] = storageSystem.NewSutureService
|
||||
s.ServicesRegistry[opts.Config.Graph.Service.Name] = graph.NewSutureService
|
||||
s.ServicesRegistry[opts.Config.IDM.Service.Name] = idm.NewSutureService
|
||||
s.ServicesRegistry[opts.Config.Invitations.Service.Name] = invitations.NewSutureService
|
||||
s.ServicesRegistry[opts.Config.OCS.Service.Name] = ocs.NewSutureService
|
||||
s.ServicesRegistry[opts.Config.Store.Service.Name] = store.NewSutureService
|
||||
s.ServicesRegistry[opts.Config.Thumbnails.Service.Name] = thumbnails.NewSutureService
|
||||
|
||||
Reference in New Issue
Block a user