mirror of
https://github.com/opencloud-eu/opencloud.git
synced 2026-02-26 15:39:18 -06:00
public link config on a working state
This commit is contained in:
36
pkg/command/reva-storage-public-link.go
Normal file
36
pkg/command/reva-storage-public-link.go
Normal file
@@ -0,0 +1,36 @@
|
||||
package command
|
||||
|
||||
import (
|
||||
"github.com/micro/cli/v2"
|
||||
"github.com/owncloud/ocis-reva/pkg/command"
|
||||
svcconfig "github.com/owncloud/ocis-reva/pkg/config"
|
||||
"github.com/owncloud/ocis-reva/pkg/flagset"
|
||||
"github.com/owncloud/ocis/pkg/config"
|
||||
"github.com/owncloud/ocis/pkg/register"
|
||||
)
|
||||
|
||||
// RevaPublicLinkStorage is the entry point for the proxy command.
|
||||
func RevaPublicLinkStorage(cfg *config.Config) *cli.Command {
|
||||
return &cli.Command{
|
||||
Name: "reva-storage-public-link",
|
||||
Usage: "Start public link storage driver",
|
||||
Category: "Extensions",
|
||||
Flags: flagset.StoragePublicLink(cfg.Reva),
|
||||
Action: func(ctx *cli.Context) error {
|
||||
publicStorageCmd := command.StoragePublicLink(configurePublicStorage(cfg))
|
||||
return cli.HandleAction(publicStorageCmd.Action, ctx)
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
func configurePublicStorage(cfg *config.Config) *svcconfig.Config {
|
||||
cfg.Reva.Log.Level = cfg.Log.Level
|
||||
cfg.Reva.Log.Pretty = cfg.Log.Pretty
|
||||
cfg.Reva.Log.Color = cfg.Log.Color
|
||||
|
||||
return cfg.Reva
|
||||
}
|
||||
|
||||
func init() {
|
||||
register.AddCommand(RevaPublicLinkStorage)
|
||||
}
|
||||
Reference in New Issue
Block a user