validators

package
v3.6.0 Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2021 License: MPL-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ValidateDatadogDowntimeRecurrenceType

func ValidateDatadogDowntimeRecurrenceType(v interface{}, k string) (ws []string, errors []error)

ValidateDatadogDowntimeRecurrenceType ensures a string is a valid recurrence type

func ValidateDatadogDowntimeRecurrenceWeekDays

func ValidateDatadogDowntimeRecurrenceWeekDays(v interface{}, k string) (ws []string, errors []error)

ValidateDatadogDowntimeRecurrenceWeekDays ensures a string is a valid recurrence week day

func ValidateDatadogDowntimeTimezone

func ValidateDatadogDowntimeTimezone(v interface{}, k string) (ws []string, errors []error)

ValidateDatadogDowntimeTimezone ensures a string is a valid timezone

func ValidateEnumValue

func ValidateEnumValue(newEnumFunc interface{}) schema.SchemaValidateDiagFunc

ValidateEnumValue returns a validate func for an enum value. It takes the constructor with validation for the enum as an argument. Such a constructor is for instance `datadogV1.NewWidgetLineWidthFromValue`

func ValidateFloatString

func ValidateFloatString(v interface{}, k string) (ws []string, errors []error)

ValidateFloatString makes sure a string can be parsed into a float

Types

type EnumChecker

type EnumChecker struct{}

EnumChecker type to get allowed enum values from validate func

Jump to

Keyboard shortcuts

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