typpostgres

package
v0.8.24 Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2020 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	DBName   string `required:"true"`
	User     string `required:"true" default:"postgres"`
	Password string `required:"true" default:"pgpass"`
	Host     string `default:"localhost"`
	Port     int    `default:"5432"`
}

Config is postgres configuration

type Context added in v0.8.23

type Context struct {
	*typbuildtool.Context
	*Module
	Cli *cli.Context
}

Context of postgress

func (*Context) Config added in v0.8.23

func (c *Context) Config() (cfg *Config, err error)

Config of postgres

type DB added in v0.8.18

type DB struct {
	*sql.DB
}

DB is postgres database handle

func NewDB added in v0.8.19

func NewDB(db *sql.DB) *DB

NewDB return new instance of DB

type Module

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

Module of postgres

func New added in v0.8.15

func New() *Module

New postgres module

func (*Module) Commands added in v0.8.23

func (m *Module) Commands(c *typbuildtool.Context) []*cli.Command

Commands of module

func (*Module) Configure added in v0.8.9

func (m *Module) Configure() *typcore.Configuration

Configure the module

func (*Module) Destroy added in v0.8.9

func (m *Module) Destroy() []*typdep.Invocation

Destroy dependencies

func (*Module) DockerCompose added in v0.8.9

func (m *Module) DockerCompose(version typdocker.Version) *typdocker.ComposeObject

DockerCompose template

func (*Module) Prepare added in v0.8.9

func (m *Module) Prepare() []*typdep.Invocation

Prepare the module

func (*Module) Provide added in v0.8.9

func (m *Module) Provide() []*typdep.Constructor

Provide the dependencies

func (*Module) WithConfigName added in v0.8.23

func (m *Module) WithConfigName(configName string) *Module

WithConfigName return module with new configName

func (*Module) WithDBName added in v0.8.15

func (m *Module) WithDBName(dbname string) *Module

WithDBName return module with new database name

func (*Module) WithDockerImage added in v0.8.18

func (m *Module) WithDockerImage(dockerImage string) *Module

WithDockerImage return module with new docker image

func (*Module) WithDockerName added in v0.8.17

func (m *Module) WithDockerName(dockerName string) *Module

WithDockerName to return module with new docker name

func (*Module) WithHost added in v0.8.17

func (m *Module) WithHost(host string) *Module

WithHost return module with new host

func (*Module) WithMigrationSource added in v0.8.18

func (m *Module) WithMigrationSource(migrationSource string) *Module

WithMigrationSource return module with new migration source

func (*Module) WithPassword added in v0.8.17

func (m *Module) WithPassword(password string) *Module

WithPassword return module with new password

func (*Module) WithPort added in v0.8.17

func (m *Module) WithPort(port int) *Module

WithPort return module with new port

func (*Module) WithSeedSource added in v0.8.18

func (m *Module) WithSeedSource(seedSource string) *Module

WithSeedSource return module with new seed source

func (*Module) WithUser added in v0.8.17

func (m *Module) WithUser(user string) *Module

WithUser to return module with new user

Jump to

Keyboard shortcuts

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