Documentation ¶
Index ¶
- func FormatFilterExp(query *q.Query, columnInTable map[string]string) (string, []interface{})
- func FormatSortExp(query *q.Query) string
- func NewMySQLDB(db *MySQL) (*gorm.DB, error)
- func NewSqliteDB(file string) (*gorm.DB, error)
- func ValidateQuery(query q.Query, columnInTable map[string]string) map[string]interface{}
- type MySQL
- type MySQLMetricsCollector
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FormatFilterExp ¶
FormatFilterExp returns a where condition string which has prefixed "and"
func FormatSortExp ¶
Types ¶
type MySQL ¶
type MySQL struct { Host string `json:"host"` Port int `json:"port"` Username string `json:"username"` Password string `json:"password,omitempty"` Database string `json:"database"` PrometheusEnabled bool `json:"prometheusEnabled"` }
MySQL ...
type MySQLMetricsCollector ¶
type MySQLMetricsCollector struct { Prefix string Interval uint32 VariableNames []string // contains filtered or unexported fields }
func (*MySQLMetricsCollector) Metrics ¶
func (m *MySQLMetricsCollector) Metrics(p *gormprom.Prometheus) []prometheus.Collector
Click to show internal directories.
Click to hide internal directories.