alerts

package
v0.0.0-...-8fd811e Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var SupportedProblemsFields = map[string]map[string]bool{
	"problems": {
		"problem_id":  true,
		"rule_id":     true,
		"client_id":   true,
		"client_name": true,
		"active":      true,
		"created_at":  true,
		"resolved_at": true,
	},
}
View Source
var SupportedProblemsFilters = map[string]bool{
	"problem_id":      true,
	"rule_id":         true,
	"client_id":       true,
	"client_name":     true,
	"active":          true,
	"created_at[gt]":  true,
	"resolved_at[gt]": true,
	"created_at[lt]":  true,
	"resolved_at[lt]": true,
	"created_at[eq]":  true,
	"resolved_at[eq]": true,
}
View Source
var SupportedProblemsListFields = map[string][]string{
	"fields[problems]": {
		"problem_id",
		"rule_id",
		"client_id",
		"client_name",
		"active",
		"created_at",
		"resolved_at",
	},
}
View Source
var SupportedProblemsSorts = map[string]bool{
	"problem_id":  false,
	"rule_id":     true,
	"client_id":   true,
	"client_name": true,
	"active":      true,
	"created_at":  true,
	"resolved_at": true,
}

Functions

func SortProblemsByClientID

func SortProblemsByClientID(problems []*rules.Problem, desc bool)

func SortProblemsByCreatedAt

func SortProblemsByCreatedAt(problems []*rules.Problem, desc bool)

func SortProblemsByResolvedAt

func SortProblemsByResolvedAt(problems []*rules.Problem, desc bool)

func SortProblemsByRuleID

func SortProblemsByRuleID(problems []*rules.Problem, desc bool)

func SortProblemsByState

func SortProblemsByState(problems []*rules.Problem, desc bool)

func SortProblemsFunc

func SortProblemsFunc(sorts []query.SortOption) (sortFunc func(a []*rules.Problem, desc bool), desc bool, err error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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