Documentation ¶
Index ¶
- Variables
- func Identifier(i string) (string, error)
- func MustRead(f pkging.File, err error) []byte
- func Read(f pkging.File, err error) ([]byte, error)
- func WithMigrationContentMiddleware(middleware func(content string, err error) (string, error)) func(*MigrationBox) *MigrationBox
- func WithTemplateValues(v map[string]interface{}) func(*MigrationBox) *MigrationBox
- type MigrationBox
- type MigrationContent
Constants ¶
This section is empty.
Variables ¶
View Source
var SQLTemplateFuncs = map[string]interface{}{ "identifier": Identifier, }
Functions ¶
func Identifier ¶ added in v0.0.179
func WithMigrationContentMiddleware ¶ added in v0.0.179
func WithMigrationContentMiddleware(middleware func(content string, err error) (string, error)) func(*MigrationBox) *MigrationBox
func WithTemplateValues ¶ added in v0.0.179
func WithTemplateValues(v map[string]interface{}) func(*MigrationBox) *MigrationBox
Types ¶
type MigrationBox ¶ added in v0.0.165
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, opts ...func(*MigrationBox) *MigrationBox) (*MigrationBox, error)
NewMigrationBox from a packr.Dir and a Connection.
migrations, err := NewMigrationBox(pkger.Dir("/migrations"))
Click to show internal directories.
Click to hide internal directories.