@@ -16,6 +16,7 @@ import (
|
||||
authbearer "github.com/owncloud/ocis/v2/services/auth-bearer/pkg/command"
|
||||
authmachine "github.com/owncloud/ocis/v2/services/auth-machine/pkg/command"
|
||||
authservice "github.com/owncloud/ocis/v2/services/auth-service/pkg/command"
|
||||
clientlog "github.com/owncloud/ocis/v2/services/clientlog/pkg/command"
|
||||
eventhistory "github.com/owncloud/ocis/v2/services/eventhistory/pkg/command"
|
||||
frontend "github.com/owncloud/ocis/v2/services/frontend/pkg/command"
|
||||
gateway "github.com/owncloud/ocis/v2/services/gateway/pkg/command"
|
||||
@@ -89,6 +90,11 @@ var svccmds = []register.Command{
|
||||
cfg.AuthService.Commons = cfg.Commons
|
||||
})
|
||||
},
|
||||
func(cfg *config.Config) *cli.Command {
|
||||
return ServiceCommand(cfg, cfg.Clientlog.Service.Name, clientlog.GetCommands(cfg.Clientlog), func(c *config.Config) {
|
||||
cfg.Clientlog.Commons = cfg.Commons
|
||||
})
|
||||
},
|
||||
func(cfg *config.Config) *cli.Command {
|
||||
return ServiceCommand(cfg, cfg.EventHistory.Service.Name, eventhistory.GetCommands(cfg.EventHistory), func(c *config.Config) {
|
||||
cfg.EventHistory.Commons = cfg.Commons
|
||||
|
||||
@@ -142,6 +142,10 @@ type AuthService struct {
|
||||
ServiceAccount ServiceAccount `yaml:"service_account"`
|
||||
}
|
||||
|
||||
type Clientlog struct {
|
||||
ServiceAccount ServiceAccount `yaml:"service_account"`
|
||||
}
|
||||
|
||||
type Nats struct {
|
||||
// The nats config has a field called nats
|
||||
Nats struct {
|
||||
@@ -194,6 +198,7 @@ type OcisConfig struct {
|
||||
Gateway Gateway
|
||||
Userlog Userlog
|
||||
AuthService AuthService `yaml:"auth_service"`
|
||||
Clientlog Clientlog
|
||||
}
|
||||
|
||||
func checkConfigPath(configPath string) error {
|
||||
@@ -381,6 +386,9 @@ func CreateConfig(insecure, forceOverwrite bool, configPath, adminPassword strin
|
||||
Frontend: FrontendService{
|
||||
ServiceAccount: serviceAccount,
|
||||
},
|
||||
Clientlog: Clientlog{
|
||||
ServiceAccount: serviceAccount,
|
||||
},
|
||||
}
|
||||
|
||||
if insecure {
|
||||
|
||||
@@ -27,6 +27,7 @@ import (
|
||||
authbasic "github.com/owncloud/ocis/v2/services/auth-basic/pkg/command"
|
||||
authmachine "github.com/owncloud/ocis/v2/services/auth-machine/pkg/command"
|
||||
authservice "github.com/owncloud/ocis/v2/services/auth-service/pkg/command"
|
||||
clientlog "github.com/owncloud/ocis/v2/services/clientlog/pkg/command"
|
||||
eventhistory "github.com/owncloud/ocis/v2/services/eventhistory/pkg/command"
|
||||
frontend "github.com/owncloud/ocis/v2/services/frontend/pkg/command"
|
||||
gateway "github.com/owncloud/ocis/v2/services/gateway/pkg/command"
|
||||
@@ -141,6 +142,11 @@ func NewService(options ...Option) (*Service, error) {
|
||||
cfg.AuthService.Commons = cfg.Commons
|
||||
return authservice.Execute(cfg.AuthService)
|
||||
})
|
||||
reg(opts.Config.Clientlog.Service.Name, func(ctx context.Context, cfg *ociscfg.Config) error {
|
||||
cfg.Clientlog.Context = ctx
|
||||
cfg.Clientlog.Commons = cfg.Commons
|
||||
return clientlog.Execute(cfg.Clientlog)
|
||||
})
|
||||
reg(opts.Config.EventHistory.Service.Name, func(ctx context.Context, cfg *ociscfg.Config) error {
|
||||
cfg.EventHistory.Context = ctx
|
||||
cfg.EventHistory.Commons = cfg.Commons
|
||||
|
||||
Reference in New Issue
Block a user