configuration-tools-0.2.7: Tools for specifying and parsing configurations

CopyrightCopyright © 2014 AlephCloud Systems, Inc.
LicenseMIT
MaintainerLars Kuhtz <lars@alephcloud.com>
Stabilityexperimental
Safe HaskellNone
LanguageHaskell2010

Configuration.Utils.Validation

Contents

Description

Utilities for validating configuration values

Synopsis

Networking

validateHttpOrHttpsUrl Source

Arguments

:: Text

configuration property name that is used in the error message

-> ConfigValidation String λ 

Validates that a value is an HTTP or HTTPS URL

validateHttpUrl Source

Arguments

:: Text

configuration property name that is used in the error message

-> ConfigValidation String λ 

Validates that a value is an HTTP URL

validateHttpsUrl Source

Arguments

:: Text

configuration property name that is used in the error message

-> ConfigValidation String λ 

Validates that a value is an HTTPS URL

validateUri Source

Arguments

:: Text

configuration property name that is used in the error message

-> ConfigValidation String λ 

Validates that a value is an URI without a fragment identifier

validateAbsoluteUri Source

Arguments

:: Text

configuration property name that is used in the error message

-> ConfigValidation String λ 

Validates that a value is an absolute URI without a fragment identifier

validateAbsoluteUriFragment Source

Arguments

:: Text

configuration property name that is used in the error message

-> ConfigValidation String λ 

Validates that a value is an absolute URI with an optional fragment identifier

validateIPv4 Source

Arguments

:: Text

configuration property name that is used in the error message

-> ConfigValidation String λ 

validateIPv6 Source

Arguments

:: Text

configuration property name that is used in the error message

-> ConfigValidation String λ 

validatePort Source

Arguments

:: Text

configuration property name that is used in the error message

-> ConfigValidation Int λ 

Monoids, Foldables and Co

validateNonEmpty Source

Arguments

:: (Eq α, Monoid α) 
=> Text

configuration property name that is used in the error message

-> ConfigValidation α λ 

validateLength Source

Arguments

:: Foldable φ 
=> Text

configuration property name that is used in the error message

-> Int

exact length of the validated value

-> ConfigValidation (φ α) λ 

validateMinLength Source

Arguments

:: Foldable φ 
=> Text

configuration property name that is used in the error message

-> Int

minimum length of the validated value

-> ConfigValidation (φ α) λ 

validateMaxLength Source

Arguments

:: Foldable φ 
=> Text

configuration property name that is used in the error message

-> Int

maximum length of the validated value

-> ConfigValidation (φ α) λ 

validateMinMaxLength Source

Arguments

:: Foldable φ 
=> Text

configuration property name that is used in the error message

-> Int

minimum length of the validated value

-> Int

maximum length of the validated value

-> ConfigValidation (φ α) λ 

Files

validateFilePath Source

Arguments

:: Text

configuration property name that is used in the error message

-> ConfigValidation FilePath λ 

validateFile Source

Arguments

:: Text

configuration property name that is used in the error message

-> ConfigValidation FilePath λ 

validateFileReadable Source

Arguments

:: Text

configuration property name that is used in the error message

-> ConfigValidation FilePath λ 

validateFileWritable Source

Arguments

:: Text

configuration property name that is used in the error message

-> ConfigValidation FilePath λ 

validateExecutable Source

Arguments

:: Text

configuration property name that is used in the error message

-> ConfigValidation FilePath λ 

Validates if the given executable name can be found in the system and can be executed.

validateDirectory Source

Arguments

:: Text

configuration property name that is used in the error message

-> ConfigValidation FilePath λ