mirror of
https://github.com/crowdsecurity/crowdsec.git
synced 2026-10-12 02:12:31 +00:00
38 lines
825 B
Go
38 lines
825 B
Go
//go:build linux
|
|
|
|
package main
|
|
|
|
import (
|
|
"errors"
|
|
"fmt"
|
|
"os"
|
|
|
|
"github.com/spf13/cobra"
|
|
)
|
|
|
|
type cliDashboard struct{}
|
|
|
|
func NewCLIDashboard() *cliDashboard {
|
|
return &cliDashboard{}
|
|
}
|
|
|
|
var ErrDashboardDeprecated = errors.New("command 'dashboard' has been removed, please read https://docs.crowdsec.net/blog/cscli_dashboard_deprecation/")
|
|
|
|
func (*cliDashboard) NewCommand() *cobra.Command {
|
|
cmd := &cobra.Command{
|
|
Use: "dashboard [command]",
|
|
Hidden: true,
|
|
Short: "Manage your metabase dashboard container [requires local API]",
|
|
DisableAutoGenTag: true,
|
|
RunE: func(_ *cobra.Command, _ []string) error {
|
|
return ErrDashboardDeprecated
|
|
},
|
|
}
|
|
|
|
cmd.SetHelpFunc(func(_ *cobra.Command, _ []string) {
|
|
fmt.Fprintln(os.Stdout, ErrDashboardDeprecated.Error())
|
|
})
|
|
|
|
return cmd
|
|
}
|