rules

package
v0.0.0-...-3532b49 Latest Latest
Warning

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

Go to latest
Published: Apr 14, 2021 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Condition

type Condition string
const (
	Equal       Condition = "eq"
	NotEqual    Condition = "ne"
	LessThan    Condition = "lt"
	GreaterThan Condition = "gt"
)

type Info

type Info struct {
	Advice string `json:"advice"`
	Reason string `json:"reason"`
	Level  Level  `json:"level"`
}

func NewDefaultInfo

func NewDefaultInfo() *Info

type Level

type Level string
const (
	Ok         Level = "ok"
	Warn       Level = "warning"
	Critical   Level = "critical"
	Deprecated Level = "deprecated"
)

type Parameters

type Parameters map[string]Rules

func GetParameters

func GetParameters(version RedisVersion) Parameters

type RedisVersion

type RedisVersion string
const (
	RedisVersion6 RedisVersion = "6"
)

type Rule

type Rule struct {
	Index     uint8     `json:"index"`
	Value     string    `json:"value"`
	Required  bool      `json:"required"`
	Info      *Info     `json:"info"`
	Condition Condition `json:"condition"`
}

func (*Rule) Check

func (r *Rule) Check(args []string) *Info

type Rules

type Rules []*Rule

Jump to

Keyboard shortcuts

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