Function Reference
Complete reference for all GoMask data generation functions
Function Reference
GoMask includes 100+ built-in functions for generating and transforming data.
Function Types
| Type | Description | Use Case |
|---|---|---|
| Generator | Creates new data | Synthetic data generation |
| Transformer | Modifies existing data | Data masking |
| Utility | Helper operations | Validation, formatting |
Browse by Category
Generators
Generate new, realistic data values:
- Person / Identity - Names, SSN, gender, birthdate
- Contact - Email, phone, URL, IP addresses
- Location - Addresses, cities, coordinates
- Finance - Credit cards, IBAN, securities
- DateTime - Dates, timestamps, ages
- Text - Lorem ipsum, UUIDs, colors
- Number - Integers, floats, booleans
- Business - Companies, job titles
- Medical / Healthcare - MRN, NPI, diagnoses
- Insurance - Policies, claims, premiums
- Real Estate - MLS, parcels, property values
- E-commerce - Orders, invoices, coupons
Transformers
Mask and transform existing data:
- Masking - Partial masking, anonymization
- Date Transformers - Date shifting, preservation
- Numeric Transformers - Noise, rounding
Utilities
Helper functions:
- Validation - Email, phone validation
- Formatting - Currency, normalization
- Conversion - Type conversion, hashing
Quick Reference
Most Used Generators
| Function | Description | Example Output |
|---|---|---|
generate_email | Email address | [email protected] |
generate_first_name | First name | John |
generate_last_name | Last name | Smith |
generate_phone_number | Phone number | (555) 123-4567 |
generate_address | Full address | 123 Main St, City, ST 12345 |
generate_date | Random date | 2024-03-15 |
generate_uuid | UUID | a1b2c3d4-e5f6-... |
generate_random_int | Integer | 42 |
generate_price | Monetary amount | 99.99 |
Most Used Transformers
| Function | Description | Example |
|---|---|---|
mask_email_domain | Mask email | j***[email protected] |
mask_ssn | Mask SSN | *--1234 |
mask_credit_card | Mask card | --****-1234 |
mask_phone_partial | Mask phone | (555) ***-4567 |
nullify | Set to NULL | NULL |
hash_sha256 | SHA256 hash | a1b2c3... |
Using Functions
In YAML Configuration
columns:
- name: email
function: generate_email
parameters:
domain: company.com
With Parameters
columns:
- name: age
function: generate_random_int
parameters:
min: 18
max: 65
Discover Functions via CLI
# List all functions
gomask functions list
# Filter by type
gomask functions list --type generator
# Filter by category
gomask functions list --category Finance
# Search
gomask functions list --search email
# Show details
gomask functions show generate_email
Function Details
Each function page includes:
- Description - What the function does
- Parameters - Available options with defaults
- Examples - YAML configuration samples
- Output Samples - Example generated values
- Related Functions - Similar or complementary functions
Custom Functions
Beyond built-in functions, you can create custom functions in the GoMask web application for team-specific data generation needs.
Need Help?
- Browse functions by category using the links above
- Use
gomask functions list --search <term>to find functions - Check
gomask functions show <name>for detailed info