validate

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2023 License: MPL-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AbsolutePath

func AbsolutePath() schema.SchemaValidateDiagFunc

func All

All returns a SchemaValidateDiagFunc which tests if the provided value passes all provided SchemaValidateDiagFunc

func Any

Any returns a SchemaValidateDiagFunc which tests if the provided value passes at least one (any) of the provided SchemaValidateDiagFunc

func AuthorizedKey

func AuthorizedKey() schema.SchemaValidateDiagFunc

AuthorizedKey validates if the value can be parsed using ssh.ParsePublicKey.

func Base64PublicKey

func Base64PublicKey() schema.SchemaValidateDiagFunc

Base64PublicKey validates if the value can be parsed using ssh.ParsePublicKey.

func Duration

func Duration() schema.SchemaValidateDiagFunc

Duration returns a schema.SchemaValidateDiagFunc which tests if the provided value is of type string and can be parsed as time.Duration

func DurationAtLeast

func DurationAtLeast(min time.Duration) schema.SchemaValidateDiagFunc

DurationAtLeast returns a schema.SchemaValidateDiagFunc if the provided value is of type string, can be parsed as time.Duration, and is at least min (inclusive)

func DurationAtMost

func DurationAtMost(max time.Duration) schema.SchemaValidateDiagFunc

DurationAtMost returns a schema.SchemaValidateDiagFunc if the provided value is of type string, can be parsed as time.Duration, and is at most max (inclusive)

func ExpectUrl

func ExpectUrl(val interface{}, path cty.Path) (*url.URL, diag.Diagnostics)

func FileMode

func FileMode() schema.SchemaValidateDiagFunc

func PrivateKey

func PrivateKey() schema.SchemaValidateDiagFunc

PrivateKey validates if the value can be parsed using ssh.ParseRawPrivateKey. Supported private keys are unencrypted pem encoded RSA (PKCS#1), PKCS#8, DSA (OpenSSL), and ECDSA private keys.

func StringMatch

func StringMatch(r *regexp.Regexp, message string) schema.SchemaValidateDiagFunc

Types

This section is empty.

Jump to

Keyboard shortcuts

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