app

package
v0.0.0-...-25c1baa Latest Latest
Warning

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

Go to latest
Published: Jun 2, 2020 License: MIT Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetDB

func GetDB() *gorm.DB

func Seed

func Seed(path string, store Store, value ...interface{})

Seed ...

func SetExec

func SetExec()

func SetMigration

func SetMigration(name string, m Migrationer) error

func ToSnakeCase

func ToSnakeCase(str string) string

Types

type Migration

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

Migration ...

type MigrationCommand

type MigrationCommand interface {
	CreateFile(name string, extention string, fileType string, additionalInfo ...interface{}) error
	Migrate(status string)
	Seed()
}

Migration is type for creating thing that related with migration database

func NewMigration

func NewMigration(dir string, conn string, seedDir string, projectStructere ...interface{}) MigrationCommand

NewMigration ..

type Migrationer

type Migrationer interface {
	Up()
	Down()
	Exec(status string)
	GetSQL() string
}

type Store

type Store interface {
	Create(v interface{}) error
}

Jump to

Keyboard shortcuts

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