Skip to content

Fields Overview

The fields section declares the individual elements that make up the schema, and their corresponding types. Each field has a name, type, and corresponding generator function that produces values for that field.

fields {
field_name() return_type
field_with_params(param1 type1, param2 type2) return_type
}
  • Shows basic, static value generation
  • Shows various primitive types (int, string, bool, float32, time.Time), and use of iter for sequential ID generation
func id() {
return iter + 1 // Creates 1, 2, 3, 4...
}
func amount() {
return FloatBetween(10.0, 1000.0)
}