typpostgres

package
v0.8.22 Latest Latest
Warning

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

Go to latest
Published: Mar 11, 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 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 Postgres added in v0.8.20

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

Postgres of postgres

func New added in v0.8.15

func New() *Postgres

New postgres module

func (*Postgres) Commands added in v0.8.20

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

Commands of module

func (*Postgres) Configure added in v0.8.20

func (m *Postgres) Configure(loader typcfg.Loader) *typcfg.Configuration

Configure the module

func (*Postgres) Destroy added in v0.8.20

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

Destroy dependencies

func (*Postgres) DockerCompose added in v0.8.20

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

DockerCompose template

func (*Postgres) Prepare added in v0.8.20

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

Prepare the module

func (*Postgres) Provide added in v0.8.20

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

Provide the dependencies

func (*Postgres) WithConfigName added in v0.8.22

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

WithConfigName return module with new configName

func (*Postgres) WithDBName added in v0.8.20

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

WithDBName return module with new database name

func (*Postgres) WithDockerImage added in v0.8.20

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

WithDockerImage return module with new docker image

func (*Postgres) WithDockerName added in v0.8.20

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

WithDockerName to return module with new docker name

func (*Postgres) WithHost added in v0.8.20

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

WithHost return module with new host

func (*Postgres) WithMigrationSource added in v0.8.20

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

WithMigrationSource return module with new migration source

func (*Postgres) WithPassword added in v0.8.20

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

WithPassword return module with new password

func (*Postgres) WithPort added in v0.8.20

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

WithPort return module with new port

func (*Postgres) WithSeedSource added in v0.8.20

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

WithSeedSource return module with new seed source

func (*Postgres) WithUser added in v0.8.20

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

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