chartmeta

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Jan 6, 2022 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ChartMeta

type ChartMeta struct {
	Name        string               `yaml:"name" json:"name"`
	Title       string               `yaml:"title" json:"title"`
	MetricNames string               `yaml:"metric_names" json:"metric_names"`
	Defines     map[string]*DataMeta `yaml:"defines" json:"defines"`
	Parameters  map[string][]string  `yaml:"parameters" json:"parameters"`
	Type        string               `yaml:"type" json:"type"`
	// ChartType   string               `yaml:"chart_type" json:"chart_type"`
	Order int `yaml:"order" json:"order"`
}

type ChartMetas

type ChartMetas []*ChartMeta

func (ChartMetas) Len

func (s ChartMetas) Len() int

func (ChartMetas) Less

func (s ChartMetas) Less(i, j int) bool

func (ChartMetas) Swap

func (s ChartMetas) Swap(i, j int)

type DataMeta

type DataMeta struct {
	Label        *string `yaml:"label" json:"label"`
	Unit         *string `yaml:"unit" json:"unit"`
	UnitType     *string `yaml:"unit_type" json:"unit_type"`
	OriginalUnit *string `yaml:"original_unit" json:"original_unit"`
	AxisIndex    *int    `yaml:"axis_index" json:"axis_index"`
	ChartType    *string `yaml:"chart_type" json:"chart_type"`
	Column       *int    `yaml:"column" json:"column"`
}

type FieldInfo

type FieldInfo struct {
	DataMeta
}

type Manager

type Manager struct {
	// contains filtered or unexported fields
}

func NewManager

func NewManager(db *gorm.DB, reload time.Duration, files string, t i18n.Translator, log logs.Logger) *Manager

func (*Manager) ChartMeta

func (m *Manager) ChartMeta(langCodes i18n.LanguageCodes, name string) *ChartMeta

ChartMeta .

func (*Manager) ChartMetaList

func (m *Manager) ChartMetaList(langCode i18n.LanguageCodes, typ string) []*ChartMeta

func (*Manager) Init

func (m *Manager) Init() error

func (*Manager) LoadDatabase

func (m *Manager) LoadDatabase() error

func (*Manager) LoadFiles

func (m *Manager) LoadFiles() error

type Table

type Table struct {
	Name        string `gorm:"column:name"`
	Title       string `gorm:"column:title"`
	MetricsName string `gorm:"column:metricsName"`
	Fields      string `gorm:"column:fields"`
	Parameters  string `gorm:"column:parameters"`
	Type        string `gorm:"column:type"`
	Order       int    `gorm:"column:order"`
	Unit        string `gorm:"column:unit"`
}

Jump to

Keyboard shortcuts

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