creator

package
v0.7.11 Latest Latest
Warning

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

Go to latest
Published: Feb 5, 2021 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Creator

type Creator interface {
	Name() string
	Create(string, []string) error
}

Creator follows a set of steps to make possible the creation of different migration types for example: -- fizz -- sql -- liquibase

func CreateMigrationFor

func CreateMigrationFor(name string) (Creator, error)

CreateMigrationFor selects the correct creation implemention Based on the input

type FizzCreator

type FizzCreator struct{}

FizzCreator model struct for fizz generation files

func (*FizzCreator) Create

func (f *FizzCreator) Create(dir string, args []string) error

Create will create 2 .fizz files for the migration

func (FizzCreator) Name

func (f FizzCreator) Name() string

Name is the name of the migration type

type SQLCreator

type SQLCreator struct{}

SQLCreator model struct for fizz generation files

func (*SQLCreator) Create

func (s *SQLCreator) Create(dir string, args []string) error

Create will create 2 .sql empty files for the migration

func (SQLCreator) Name

func (s SQLCreator) Name() string

Name is the name of the migration type

Jump to

Keyboard shortcuts

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