max_depth

package
v0.18.2 Latest Latest
Warning

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

Go to latest
Published: Jan 8, 2025 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewMaxDepthRule

func NewMaxDepthRule(log *slog.Logger, cfg Config)

Types

type Config

type Config struct {
	Enabled         bool    `yaml:"enabled"` // deprecated
	Max             int     `yaml:"max"`     // deprecated
	Field           MaxRule `yaml:"field"`
	List            MaxRule `yaml:"list"`
	RejectOnFailure bool    `yaml:"reject_on_failure"` // deprecated
}

func DefaultConfig added in v0.17.0

func DefaultConfig() Config

type MaxRule added in v0.17.0

type MaxRule struct {
	Enabled         bool `yaml:"enabled"`
	Max             int  `yaml:"max"`
	RejectOnFailure bool `yaml:"reject_on_failure"`
}

Jump to

Keyboard shortcuts

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