Documentation
¶
Index ¶
- Variables
- func ComposeFiles(dir string) []string
- func CreateMigrationFile(migrationSrc, name string)
- type DBConfig
- type DBEnvKeys
- type Docker
- type MySQL
- func (t *MySQL) Console(c *typgo.Context) error
- func (t *MySQL) CreateDB(c *typgo.Context) error
- func (t *MySQL) DropDB(c *typgo.Context) error
- func (t *MySQL) MigrateDB(c *typgo.Context) error
- func (t *MySQL) MigrationFile(c *typgo.Context) error
- func (t *MySQL) RollbackDB(c *typgo.Context) error
- func (t *MySQL) SeedDB(c *typgo.Context) error
- func (t *MySQL) Task() *typgo.Task
- type Postgres
- func (t *Postgres) Console(c *typgo.Context) error
- func (t *Postgres) CreateDB(c *typgo.Context) error
- func (t *Postgres) DropDB(c *typgo.Context) error
- func (t *Postgres) MigrateDB(c *typgo.Context) error
- func (t *Postgres) MigrationFile(c *typgo.Context) error
- func (t *Postgres) RollbackDB(c *typgo.Context) error
- func (t *Postgres) SeedDB(c *typgo.Context) error
- func (t *Postgres) Task() *typgo.Task
- type Redis
- type RedisConfig
- type RedisEnvKeys
Constants ¶
This section is empty.
Variables ¶
View Source
var (
DefaultDBEnvKeys = &DBEnvKeys{
DBName: "DBNAME",
DBUser: "DBUSER",
DBPass: "DBPASS",
Host: "HOST",
Port: "PORT",
}
)
View Source
var DefaultRedisEnvKeys = &RedisEnvKeys{
Host: "HOST",
Port: "PORT",
Pass: "PASS",
}
Functions ¶
func ComposeFiles ¶
func CreateMigrationFile ¶
func CreateMigrationFile(migrationSrc, name string)
CreateMigrationFile createa migration file
Types ¶
type Docker ¶
Docker is wrapper for docker-compose command support with predefined multiple compose file and environment
func (*Docker) DockerCompose ¶
DockerUp docker up
func (*Docker) DockerWipe ¶
DockerWipe clean all docker process
type MySQL ¶
type MySQL struct {
Name string
EnvKeys *DBEnvKeys
MigrationSrc string
SeedSrc string
DockerName string
}
MySQL for postgres
func (*MySQL) MigrationFile ¶
MigrationFile seed database
func (*MySQL) RollbackDB ¶
RollbackDB rollback database
type Postgres ¶
type Postgres struct {
Name string
EnvKeys *DBEnvKeys
MigrationSrc string
SeedSrc string
DockerName string
}
func (*Postgres) MigrationFile ¶
MigrationFile seed database
func (*Postgres) RollbackDB ¶
RollbackDB rollback database
type Redis ¶
type Redis struct {
Name string
EnvKeys *RedisEnvKeys
DockerName string
}
type RedisConfig ¶
type RedisEnvKeys ¶
type RedisEnvKeys RedisConfig
func RedisEnvKeysWithPrefix ¶
func RedisEnvKeysWithPrefix(prefix string) *RedisEnvKeys
func (*RedisEnvKeys) Config ¶
func (r *RedisEnvKeys) Config() *RedisConfig
Click to show internal directories.
Click to hide internal directories.