metricsToDash

package
v0.1.22 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 16, 2023 License: AGPL-3.0 Imports: 3 Imported by: 0

Documentation

Overview

Copyright © 2022 Polygon <engineering@polygon.technology>

This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.

Index

Constants

This section is empty.

Variables

View Source
var MetricsToDashCmd = &cobra.Command{
	Use:     "metrics-to-dash",
	Aliases: []string{"metricstodash", "metricsToDash"},
	Short:   "A brief description of your command",
	Long: `A longer description that spans multiple lines and likely contains examples
and usage of using your command. For example:

Cobra is a CLI library for Go that empowers applications.
This application is a tool to generate the needed files
to quickly create a Cobra application.`,
	RunE: func(cmd *cobra.Command, args []string) error {
		do := dashboard.DashboardOptions{
			File:                *inputMetricsToDashFile,
			Title:               *inputMetricsToDashTitle,
			Prefix:              *inputMetricsToDashPrefix,
			Description:         *inputMetricsToDashDesc,
			WidgetHeight:        *inputMetricsToDashHeight,
			WidgetWidth:         *inputMetricsToDashWidth,
			TemplateVars:        *inputMetricsToDashTemplateVars,
			TemplateVarDefaults: *inputMetricsToDashTemplateVarDefaults,
			StripPrefixes:       *inputMetricsToDashStripPrefixes,
			Pretty:              *inputMetricsToDashPretty,
			ShowHelp:            *inputMetricsToDashShowHelp,
		}
		data, err := dashboard.ConvertMetricsToDashboard(&do)
		if err != nil {
			return err
		}
		fmt.Println(string(data))
		return nil
	},
}

MetricsToDashCmd represents the metricsToDash command

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL