inputvalidation

package
v0.0.0-...-3e5e6b6 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2024 License: Apache-2.0 Imports: 17 Imported by: 2

Documentation

Index

Constants

View Source
const (
	// GlobalAccessLevel is an access level that is not tied to a specific tenant entity but rather it's used globally
	GlobalAccessLevel = "global"
)

Variables

View Source
var AreTenantAccessLevelsValid = &certMappingTenantAccessLevelValidator{}

AreTenantAccessLevelsValid is a custom validation rule that validates certificate subject mapping's tenant access levels input

View Source
var DNSName = &dnsNameRule{}

DNSName missing godoc

View Source
var IsURL = &urlValidator{}

IsURL missing godoc

View Source
var IsValidCertSubject = &certMappingSubjectValidator{}

IsValidCertSubject is a custom validation rule that validates certificate subject mapping's subject input

View Source
var IsValidConsumerType = &certMappingConsumerTypeValidator{}

IsValidConsumerType is a custom validation rule that validates certificate subject mapping's consumer type input

SupportedAccessLevels is a map of all supported tenant access levels

SupportedConsumerTypes is a map of all supported consumer types

Functions

func Each

func Each(rules ...validation.Rule) *eachRule

Each returns a validation rule that loops through an iterable (map, slice or array) and validates each value inside with the provided rules. An empty iterable is considered valid. Use the Required rule to make sure the iterable is not empty.

func EachKey

func EachKey(rules ...validation.Rule) *eachKeyRule

EachKey returns a validation rule that loops through a map and validates each key inside with the provided rules. An empty iterable is considered valid. Use the Required rule to make sure the iterable is not empty.

func NewDirective

func NewDirective() *directive

NewDirective missing godoc

func Validate

func Validate(validatable Validatable) error

Validate missing godoc

func ValidateExactlyOneNotNil

func ValidateExactlyOneNotNil(errorMessage string, ptr interface{}, ptrs ...interface{}) error

ValidateExactlyOneNotNil validates if exactly one of passed pointers is not a nil.

Types

type Validatable

type Validatable interface {
	Validate() error
}

Validatable missing godoc

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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