seeds

package
v0.0.0-...-f2f1368 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 25, 2021 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Loader

type Loader = struct {
	// contains filtered or unexported fields
}

Loader represent a pair of fake data generating function and its generated ids.

type Seeder

type Seeder struct {
	DB *database.DB
	// contains filtered or unexported fields
}

Seeder represents a seeder instance.

func NewSeeder

func NewSeeder(db *database.DB, appKind string) Seeder

NewSeeder creates a new seeder.

func (*Seeder) Add

func (seeder *Seeder) Add(tableName string) error

Add adds seed data for a table to the DB.

func (*Seeder) AddAll

func (seeder *Seeder) AddAll() error

AddAll adds all seed data to the DB.

func (*Seeder) Remove

func (seeder *Seeder) Remove(tableName string) error

Remove removes seed data for a table in the DB.

func (*Seeder) RemoveAll

func (seeder *Seeder) RemoveAll() error

RemoveAll removes all seed data in the DB.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL