Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func RegisterExporter ¶
func RegisterExporter(dataFmt DataFormat, ext string, exporter Exporter)
func RegisterLoader ¶
func RegisterLoader(dataFmt DataFormat, ext string, loader Loader)
Types ¶
type Config ¶
type Config struct { DatabaseURL *DatabaseURL FixtureDataDir string SchemaFilepath string }
type DataFormat ¶
type DataFormat int
const ( SQL DataFormat = iota YAML JSON )
func LookupDataFormatByExt ¶
func LookupDataFormatByExt(ext string) (DataFormat, bool)
func (DataFormat) String ¶
func (f DataFormat) String() string
type DatabaseURL ¶
type DatabaseURL struct {
// contains filtered or unexported fields
}
func Parse ¶
func Parse(rawurl string) (*DatabaseURL, error)
func (*DatabaseURL) DBName ¶
func (dbURL *DatabaseURL) DBName() string
func (*DatabaseURL) DSN ¶
func (dbURL *DatabaseURL) DSN() string
func (*DatabaseURL) Driver ¶
func (dbURL *DatabaseURL) Driver() string
func (*DatabaseURL) String ¶
func (dbURL *DatabaseURL) String() string
type Exporter ¶
type Exporter interface {
Export(tableName string, columns []string, rawRows [][][]byte) ([]byte, error)
}
func LookupExporter ¶
func LookupExporter(format DataFormat) Exporter
type Loader ¶
func LookupLoader ¶
func LookupLoader(dataFmt DataFormat) Loader
type TestFixture ¶
type TestFixture struct {
// contains filtered or unexported fields
}
func New ¶
func New(opts ...Option) *TestFixture
func (*TestFixture) Config ¶
func (tf *TestFixture) Config() *Config
func (*TestFixture) DropTables ¶
func (tf *TestFixture) DropTables()
DropTables drops all the test tables
func (*TestFixture) String ¶
func (tf *TestFixture) String() string
func (*TestFixture) TableNames ¶
func (tf *TestFixture) TableNames() []string
func (*TestFixture) Use ¶
func (tf *TestFixture) Use(tableNames ...string) *Scope
Source Files ¶
Click to show internal directories.
Click to hide internal directories.