Documentation
¶
Index ¶
- type Config
- type Module
- func (m *Module) BuildCommands(c *typcore.BuildContext) []*cli.Command
- func (m *Module) Configure(loader typcore.ConfigLoader) (prefix string, spec, loadFn interface{})
- func (m *Module) Destroy() []interface{}
- func (m *Module) DockerCompose(version typdocker.Version) *typdocker.ComposeObject
- func (m *Module) Prepare() []interface{}
- func (m *Module) Provide() []interface{}
- func (m *Module) WithDBName(dbname string) *Module
- func (m *Module) WithDockerName(dockerName string) *Module
- func (m *Module) WithHost(host string) *Module
- func (m *Module) WithPassword(password string) *Module
- func (m *Module) WithPort(port int) *Module
- func (m *Module) WithUser(user string) *Module
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 Module ¶
type Module struct {
DBName string
User string
Password string
Host string
Port int
DockerImage string
DockerName string
}
Module of postgres
func (*Module) BuildCommands ¶ added in v0.8.9
func (m *Module) BuildCommands(c *typcore.BuildContext) []*cli.Command
BuildCommands of module
func (*Module) Configure ¶ added in v0.8.9
func (m *Module) Configure(loader typcore.ConfigLoader) (prefix string, spec, loadFn interface{})
Configure the module
func (*Module) Destroy ¶ added in v0.8.9
func (m *Module) Destroy() []interface{}
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() []interface{}
Prepare the module
func (*Module) Provide ¶ added in v0.8.9
func (m *Module) Provide() []interface{}
Provide the dependencies
func (*Module) WithDBName ¶ added in v0.8.15
WithDBName to set database name
func (*Module) WithDockerName ¶ added in v0.8.17
WithDockerName
func (*Module) WithPassword ¶ added in v0.8.17
WithPassword to set password
Click to show internal directories.
Click to hide internal directories.