pkgerx

package
v0.0.166 Latest Latest
Warning

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

Go to latest
Published: Dec 1, 2020 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MustRead

func MustRead(f pkging.File, err error) []byte

MustRead reads a pkging.File or panics.

func Read

func Read(f pkging.File, err error) ([]byte, error)

Read reads a pkging.File or returns an error

Types

type MigrationBox added in v0.0.165

type MigrationBox struct {
	pop.Migrator
	Dir pkger.Dir
	// contains filtered or unexported fields
}

MigrationBox is a wrapper around pkger.Dir and Migrator. This will allow you to run migrations from migrations packed inside of a compiled binary.

func NewMigrationBox added in v0.0.165

func NewMigrationBox(dir pkger.Dir, c *pop.Connection, l *logrusx.Logger) (*MigrationBox, error)

NewMigrationBox from a packr.Dir and a Connection.

migrations, err := NewMigrationBox(pkger.Dir("/migrations"))

Jump to

Keyboard shortcuts

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