Understanding Configu's Types

One of the core values of Configu is its ability to validate and enforce types for your configurations. Configu's types help guard against accidents in configuration updates, and makes your schema easier for humans to understand.

To manage this, Configu implements the following type allowances in configuration objects, which is what schemas become once pushed:

  • Primitive, basic types like numbers, strings, booleans, hex and others are valiadtaed based purely on their content. If your schema declares a number and you give it a string, Configu will issue an error, and you won't be able to validate or push the configuration until you fix it.

  • Patterns, which are needed to fulfill additional expectations for types like regex. A Pattern is needed for any type that can't be checked against itself or a pre-defined pattern (e.g. email, mobile phone number)

  • Templates, which are patterns that combine multiple values from the current schema or others schemas along with other characters, e.g. in order to build a query URL to fetch a feed.

Configu schemas also promote human discovery by including a note field for every key. Notes are optional but strongly encouraged, even if the schema seems obvious right now.

Table Of Available Types

For convenience and reference, we keep the table below up-to-date with the different types that Configu supports.

Fields identified in the "Also Requires" column indicate additional data that you need to specify in order to use a certain type. For instance, using the "Regex" type requires "pattern" also be specified. We recommend that note be specified for human-friendly lookup with every Schema key; the table below shows what's mandatory.

TypeAlso RequiresExample
StringNone"Hello, World!"
UUIDNoneAny generated UUID
EmailNonefoo@example.com, foo+bar@example.com
MobilePhoneNone+1 000 000 0000
LatLongNone41 24.2028, 2 10.4418
Base16NoneA Base16 Encoded Value
Base64NoneA Base64 Encoded Value
HexNoneA Hex Encoded Value
MD5NoneA MD5 Hashed Value
SHANoneA SHA Hashed Value
REFNoneA Reference Value
CountryNoneGB GR
AWSRegionNoneeu-west-1 us-west-2
AzureRegionNonebrazilsouth australiaeast
GCPRegionNoneasia-south1 asia-southeast2
CurrencyNoneAUD USD
LanguageNonehe en