runner

package
v0.0.0-...-c3b67b6 Latest Latest
Warning

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

Go to latest
Published: Jun 9, 2023 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Option

type Option func(*Runner)

Option allows the Runner to be configured by the user.

func WithDateFormat

func WithDateFormat(f string) Option

WithDateFormat sets the default date format for the Runner.

func WithDebug

func WithDebug(d bool) Option

WithDebug puts the Runner in debug mode, meaning nothing will be written to a database.

func WithStringFDefaults

func WithStringFDefaults(d random.StringFDefaults) Option

WithStringFDefaults sets the default format min and max values for the Runner.

type Runner

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

Runner holds the configuration that will be used at runtime.

func New

func New(db *sql.DB, opts ...Option) *Runner

New returns a pointer to a newly configured Runner. Optionally taking a variable number of configuration options.

func (*Runner) ResetEach

func (r *Runner) ResetEach(name string)

ResetEach resets the variables used for keeping track of sequential row references of previous block results.

func (*Runner) Run

func (r *Runner) Run(b parse.Block) error

Run executes a given block, returning any errors encountered.

Jump to

Keyboard shortcuts

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