gomask functions
Explore and manage data generation functions
gomask functions
Explore and manage data generation functions.
Synopsis
gomask functions <subcommand> [OPTIONS]
Subcommands
| Command | Description |
|---|---|
list | List available data generation functions |
show | Show detailed function information |
categories | List function categories |
tags | List function tags |
gomask functions list
List available data generation functions.
Synopsis
gomask functions list [OPTIONS]
Options
| Option | Type | Default | Description |
|---|---|---|---|
--type TYPE | string | all | Filter by type: generator, transformer, utility |
--data-type TEXT | string | all | Filter by data type (string, integer, etc.) |
--tag TEXT | string | all | Filter by tag (can specify multiple) |
--category TEXT | string | all | Filter by category |
--search TEXT | string | none | Search in names and descriptions |
--format FORMAT | string | table | Output: table, json, names |
--verbose, -v | flag | false | Show detailed information |
--limit, -l INT | integer | none | Limit number of results |
Examples
# List all functions
gomask functions list
Output:
Function Category Type Description
──────────────────────── ─────────── ────────── ─────────────────────────
generate_first_name Person generator Generate realistic first name
generate_last_name Person generator Generate realistic last name
generate_email Contact generator Generate email address
generate_phone_number Contact generator Generate phone number
mask_email Masking transformer Mask email address
mask_credit_card Masking transformer Mask credit card number
...
Showing 50 of 127 functions. Use --limit to see more.
# Filter by type
gomask functions list --type generator
# Filter by category
gomask functions list --category Finance
# Search functions
gomask functions list --search email
# Multiple filters
gomask functions list --type transformer --category Masking
# Verbose output
gomask functions list --category Person --verbose
# JSON output for scripting
gomask functions list --format json
# Just function names
gomask functions list --format names
gomask functions show
Show detailed information about a specific function.
Synopsis
gomask functions show IDENTIFIER
Arguments
| Argument | Description |
|---|---|
IDENTIFIER | Function name or ID |
Examples
gomask functions show generate_email
Output:
Function: generate_email
────────────────────
Category: Contact
Type: generator
Data Type: string
Description:
Generate a realistic email address. Optionally specify domain
or use provider-specific formats.
Parameters:
┌──────────────┬──────────┬──────────┬─────────────────────────────┐
│ Name │ Type │ Required │ Description │
├──────────────┼──────────┼──────────┼─────────────────────────────┤
│ domain │ string │ no │ Email domain (default: random) │
│ provider │ string │ no │ Email provider: gmail, outlook │
│ safe │ boolean │ no │ Use safe domain (example.com) │
└──────────────┴──────────┴──────────┴─────────────────────────────┘
Examples:
# Basic usage
- column_name: email
generation_function: generate_email
# With custom domain
- column_name: work_email
generation_function: generate_email
generation_parameters:
domain: "company.com"
# Gmail addresses
- column_name: personal_email
generation_function: generate_email
generation_parameters:
provider: "gmail"
Output Examples:
- [email protected]
- [email protected]
- [email protected]
Tags: pii, contact, email
# Show masking function
gomask functions show mask_credit_card
Output:
Function: mask_credit_card
──────────────────────────
Category: Masking
Type: transformer
Data Type: string
Description:
Mask credit card numbers while optionally preserving
the last N digits for identification.
Parameters:
┌───────────────┬──────────┬──────────┬────────────────────────────┐
│ Name │ Type │ Required │ Description │
├───────────────┼──────────┼──────────┼────────────────────────────┤
│ preserve_last │ integer │ no │ Digits to preserve (default: 4) │
│ mask_char │ string │ no │ Masking character (default: *) │
│ preserve_format │ boolean │ no │ Keep original spacing/dashes │
└───────────────┴──────────┴──────────┴────────────────────────────┘
Examples:
# Basic masking (preserves last 4)
- column_name: credit_card
masking_function: mask_credit_card
# Input: 4532-1234-5678-9012
# Output: ****-****-****-9012
# Preserve more digits
- column_name: credit_card
masking_function: mask_credit_card
masking_config:
preserve_last: 6
# Output: ****-****-**78-9012
Tags: pii, financial, masking
gomask functions categories
List all available function categories.
Synopsis
gomask functions categories [OPTIONS]
Options
| Option | Type | Default | Description |
|---|---|---|---|
--format | string | table | Output: table, json |
Examples
gomask functions categories
Output:
Category Functions Description
──────────────── ────────── ────────────────────────────────
Person 15 Names, titles, demographics
Contact 8 Email, phone, addresses
Location 12 Addresses, cities, coordinates
Finance 18 Currency, accounts, transactions
Date & Time 10 Dates, timestamps, durations
Text 9 Lorem ipsum, sentences, words
Number 7 Integers, decimals, ranges
Medical 14 Healthcare and patient data
Insurance 11 Policies, claims, coverage
Real Estate 9 Properties, listings, agents
E-Commerce 13 Products, orders, inventory
Business 10 Companies, departments, employees
Masking 15 Data masking transformers
Utilities 8 Validation, formatting, helpers
gomask functions tags
List all available function tags.
Synopsis
gomask functions tags [OPTIONS]
Options
| Option | Type | Default | Description |
|---|---|---|---|
--format | string | table | Output: table, json |
Examples
gomask functions tags
Output:
Tag Functions Description
─────────────── ────────── ────────────────────────────
pii 32 Personally identifiable information
financial 24 Financial and payment data
healthcare 14 Medical and health data
contact 12 Contact information
address 10 Physical addresses
identifier 18 IDs, codes, references
temporal 10 Date and time related
text 9 Text generation
numeric 12 Number generation
masking 15 Data masking functions
gdpr 28 GDPR-relevant data types
hipaa 16 HIPAA-relevant data types
# Use tags to find relevant functions
gomask functions list --tag pii
gomask functions list --tag gdpr --type generator
Function Types
Generators
Create new synthetic data from scratch.
columns:
- column_name: email
generation_function: generate_email # Generator
Transformers
Modify existing data (used primarily for masking).
columns:
- column_name: email
masking_function: mask_email # Transformer
masking_config:
preserve_domain: true
Utilities
Helper functions for validation, formatting, etc.
columns:
- column_name: checksum
generation_function: calculate_checksum # Utility
generation_parameters:
algorithm: luhn
Exit Codes
| Code | Description |
|---|---|
| 0 | Command completed successfully |
| 1 | Error (function not found, etc.) |