feat(activitylog): initial service
Signed-off-by: jkoberg <jkoberg@owncloud.com>
This commit is contained in:
@@ -8,6 +8,7 @@ import (
|
||||
"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"
|
||||
activitylog "github.com/owncloud/ocis/v2/services/activitylog/pkg/command"
|
||||
antivirus "github.com/owncloud/ocis/v2/services/antivirus/pkg/command"
|
||||
appprovider "github.com/owncloud/ocis/v2/services/app-provider/pkg/command"
|
||||
appregistry "github.com/owncloud/ocis/v2/services/app-registry/pkg/command"
|
||||
@@ -52,6 +53,11 @@ import (
|
||||
)
|
||||
|
||||
var svccmds = []register.Command{
|
||||
func(cfg *config.Config) *cli.Command {
|
||||
return ServiceCommand(cfg, cfg.Activitylog.Service.Name, activitylog.GetCommands(cfg.Activitylog), func(c *config.Config) {
|
||||
cfg.Activitylog.Commons = cfg.Commons
|
||||
})
|
||||
},
|
||||
func(cfg *config.Config) *cli.Command {
|
||||
return ServiceCommand(cfg, cfg.Antivirus.Service.Name, antivirus.GetCommands(cfg.Antivirus), func(c *config.Config) {
|
||||
// cfg.Antivirus.Commons = cfg.Commons // antivirus needs no commons atm
|
||||
|
||||
@@ -25,6 +25,7 @@ import (
|
||||
"github.com/owncloud/ocis/v2/ocis-pkg/log"
|
||||
ogrpc "github.com/owncloud/ocis/v2/ocis-pkg/service/grpc"
|
||||
"github.com/owncloud/ocis/v2/ocis-pkg/shared"
|
||||
activitylog "github.com/owncloud/ocis/v2/services/activitylog/pkg/command"
|
||||
antivirus "github.com/owncloud/ocis/v2/services/antivirus/pkg/command"
|
||||
appProvider "github.com/owncloud/ocis/v2/services/app-provider/pkg/command"
|
||||
appRegistry "github.com/owncloud/ocis/v2/services/app-registry/pkg/command"
|
||||
@@ -144,6 +145,11 @@ func NewService(options ...Option) (*Service, error) {
|
||||
// priority group 2 is empty for now
|
||||
|
||||
// most services are in priority group 3
|
||||
reg(3, opts.Config.Activitylog.Service.Name, func(ctx context.Context, cfg *ociscfg.Config) error {
|
||||
cfg.Activitylog.Context = ctx
|
||||
cfg.Activitylog.Commons = cfg.Commons
|
||||
return activitylog.Execute(cfg.Activitylog)
|
||||
})
|
||||
reg(3, opts.Config.AppProvider.Service.Name, func(ctx context.Context, cfg *ociscfg.Config) error {
|
||||
cfg.AppProvider.Context = ctx
|
||||
cfg.AppProvider.Commons = cfg.Commons
|
||||
|
||||
Reference in New Issue
Block a user