utils

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Oct 14, 2020 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IntAtLeast

func IntAtLeast(min int) schema.SchemaValidateFunc

IntAtLeast returns a SchemaValidateFunc which tests if the provided value is of type int and is at least min (inclusive)

func ParseTwoPartID

func ParseTwoPartID(id, left, right string) (string, string, error)

ParseTwoPartID returns the pieces of id `left:right` as left, right

func StringInSlice

func StringInSlice(valid []string, ignoreCase bool) schema.SchemaValidateFunc

StringInSlice returns a SchemaValidateFunc which tests if the provided value is of type string and matches the value of an element in the valid slice will test with in lower case if ignoreCase is true

func ValidateValueFunc

func ValidateValueFunc(values []string) schema.SchemaValidateFunc

ValidateValueFunc check arguments based on list of strings

Types

This section is empty.

Jump to

Keyboard shortcuts

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