Documentation
¶
Overview ¶
Package seed provides development and test data generation. Seed plans are not a production migration mechanism and their generated data must not contain real credentials or personal information.
Index ¶
- Variables
- func Run(ctx context.Context, client *dbcore.Client, plans ...Plan) error
- type Faker
- func (f *Faker) Address() string
- func (f *Faker) Bool() bool
- func (f *Faker) Company() string
- func (f *Faker) Email() string
- func (f *Faker) FloatRange(min, max float64) float64
- func (f *Faker) FutureDate() time.Time
- func (f *Faker) IntRange(min, max int) int
- func (f *Faker) Name() string
- func (f *Faker) Paragraph() string
- func (f *Faker) Password() string
- func (f *Faker) PastDate() time.Time
- func (f *Faker) Phone() string
- func (f *Faker) Select(options ...string) string
- func (f *Faker) Sentence() string
- func (f *Faker) UUID() string
- type Plan
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultFaker = NewFaker()
DefaultFaker is the process-wide development data generator.
Functions ¶
Types ¶
type Faker ¶
type Faker struct {
// contains filtered or unexported fields
}
Faker generates realistic fake data for testing and database seeding without external dependencies.
func (*Faker) Address ¶
Address generates a random street address (e.g. "742 Evergreen Terrace, San Francisco, CA").
func (*Faker) FloatRange ¶
FloatRange returns a random float64 between min and max.
func (*Faker) FutureDate ¶
FutureDate returns a time.Time in the future up to 365 days ahead.
Click to show internal directories.
Click to hide internal directories.