config

package
v0.0.0-...-7f16cab Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2022 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Dashboards []Dashboard          `yaml:"dashboards"`
	Patch      GlobalDashboardPatch `yaml:"patch"`
}

func ParseConfig

func ParseConfig(path string) (*Config, error)

type Dashboard

type Dashboard struct {
	Name        string               `yaml:"name"`
	Format      string               `yaml:"format"`
	Source      DashboardSource      `yaml:"source"`
	Destination DashboardDestination `yaml:"destination"`
	Patch       DashboardPatch       `yaml:"patch"`
	Editable    bool                 `yaml:"editable"`
}

type DashboardDatasource

type DashboardDatasource struct {
	Name  string `yaml:"name"`
	Label string `yaml:"label"`
	Regex string `yaml:"regex"`
	Hide  bool   `yaml:"hide"`
}

type DashboardDestination

type DashboardDestination struct {
	Format    OutputFormat `yaml:"format"`
	Directory string       `yaml:"directory"`
}

type DashboardPatch

type DashboardPatch struct {
	Title string   `yaml:"title"`
	Tags  []string `yaml:"tags"`
}

type DashboardSource

type DashboardSource struct {
	Kind  SourceKind `yaml:"kind"`
	Value string     `yaml:"value"`
}

type DashboardVariable

type DashboardVariable struct {
	Name  string `yaml:"name"`
	Label string `yaml:"label"`
	Query string `yaml:"query"`
}

type GlobalDashboardPatch

type GlobalDashboardPatch struct {
	Variables  []DashboardVariable  `yaml:"variables"`
	Datasource *DashboardDatasource `yaml:"datasource"`
}

type OutputFormat

type OutputFormat string
const (
	OutputFormatJson       OutputFormat = "JSON"
	OutputFormatKubernetes OutputFormat = "Kubernetes"
)

type SourceKind

type SourceKind string
const (
	SourceKindGrafanaLabs SourceKind = "GrafanaLabs"
	SourceKindURL         SourceKind = "URL"
	SourceKindPath        SourceKind = "Path"
)

Jump to

Keyboard shortcuts

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