testfixture

package module
v0.0.0-...-2e91d2c Latest Latest
Warning

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

Go to latest
Published: May 7, 2021 License: BSD-2-Clause Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConfigOption

type ConfigOption func(f *Loader)

func WithTruncateTable

func WithTruncateTable() ConfigOption

type Fixture

type Fixture struct {
	Model string `yaml:"model"`
	Rows  []row  `yaml:"rows"`
}

type Loader

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

func NewLoader

func NewLoader(db *bun.DB, opts ...ConfigOption) *Loader

func (*Loader) Get

func (f *Loader) Get(model, rowID string) (interface{}, error)

func (*Loader) Load

func (f *Loader) Load(ctx context.Context, fsys fs.FS, names ...string) error

func (*Loader) MustGet

func (f *Loader) MustGet(table, rowID string) interface{}

Jump to

Keyboard shortcuts

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