seed

package
v0.0.0-...-0907076 Latest Latest
Warning

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

Go to latest
Published: Jun 16, 2021 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateSeedFile

func CreateSeedFile(fs afero.Fs, opts CreateSeedOpts) (*string, error)

CreateSeedFile creates a .sql file according to the arguments it'll return full filepath and an error if any

func IsSeedsSupported

func IsSeedsSupported(kind hasura.SourceKind) bool

Types

type CreateSeedOpts

type CreateSeedOpts struct {
	UserProvidedSeedName string
	// DirectoryPath in which seed file should be created
	DirectoryPath string
	Data          io.Reader
	Database      string
}

CreateSeedOpts has the list of options required to create a seed file

type Driver

type Driver struct {
	SendBulk     sendBulk
	PGDumpClient hasura.PGDump
}

func NewDriver

func NewDriver(s sendBulk, pgDumpClient hasura.PGDump) *Driver

func (*Driver) ApplySeedsToDatabase

func (d *Driver) ApplySeedsToDatabase(fs afero.Fs, rootSeedsDirectory string, filenames []string, source cli.Source) error

ApplySeedsToDatabase will read all .sql files in the given directory and apply it to hasura

func (*Driver) ExportDatadump

func (d *Driver) ExportDatadump(tableNames []string, sourceName string) (io.Reader, error)

Jump to

Keyboard shortcuts

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