validators

package
v0.6.4 Latest Latest
Warning

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

Go to latest
Published: May 4, 2019 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	FieldHostRulesHost          = "host"
	FieldHostRulesDefaultTarget = "defaultTarget"
	FieldHostRulesRules         = "rules"
)

HostRules field names

View Source
const (
	FieldRuleResolver   = "resolver"
	FieldRuleSourcePath = "sourcePath"
	FieldRuleTarget     = "target"
	FieldRuleActiveTo   = "activeTo"
)

Rule field names

View Source
const (
	FieldTargetHTTPCode = "httpCode"
	FieldTargetPath     = "path"
)

Target field names

Variables

This section is empty.

Functions

func ValidateHostRules

func ValidateHostRules(hostRules models.HostRules) (
	modelError models.ModelValidationError,
)

ValidateHostRules with all embedded structs

func ValidateRule

func ValidateRule(rule models.Rule, otherRules []models.Rule) (
	modelError models.ModelValidationError,
)

ValidateRule return nil if rule is valid or models.ModelValidationError if is invalid

func ValidateTarget

func ValidateTarget(target models.Target) (
	modelError models.ModelValidationError,
)

ValidateTarget return validation error list and valid true if invalid. Otherwise return nil list and valid false.

Types

This section is empty.

Jump to

Keyboard shortcuts

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