Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var CompletionCmd = &cobra.Command{ Use: "completion [bash|zsh|fish|powershell]", Short: "Generate completion script", Long: "To load completions", DisableFlagsInUseLine: true, ValidArgs: []string{"bash", "zsh", "fish", "powershell"}, Args: cobra.ExactValidArgs(1), Run: func(cmd *cobra.Command, args []string) { var err error switch args[0] { case "bash": err = cmd.Root().GenBashCompletion(os.Stdout) case "zsh": err = cmd.Root().GenZshCompletion(os.Stdout) case "fish": err = cmd.Root().GenFishCompletion(os.Stdout, true) case "powershell": err = cmd.Root().GenPowerShellCompletion(os.Stdout) } if err != nil { log.Error("Failed to generation shell completion.") } }, }
View Source
var (
DefaultConfig string
)
View Source
var ImportDataSources = &cobra.Command{ Use: "import", Short: "import all datasources", Long: `import all datasources from grafana to local filesystem`, Run: func(cmd *cobra.Command, args []string) { log.Infof("Importing datasources for context: '%s'", apphelpers.GetContext()) filters := getDatasourcesGlobalFlags(cmd) savedFiles := client.ImportDataSources(filters) tableObj.AppendHeader(table.Row{"type", "filename"}) for _, file := range savedFiles { tableObj.AppendRow(table.Row{"datasource", file}) } tableObj.Render() }, }
Functions ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.