Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreatePostgresConnectionString ¶
func CreatePostgresConnectionString(config PostgresConfig) string
Types ¶
type Database ¶
type Database interface {
Close() error
GetContext(ctx context.Context, dest interface{}, query string, args ...interface{}) error
SelectContext(ctx context.Context, dest interface{}, query string, args ...interface{}) error
ExecContext(ctx context.Context, query string, args ...interface{}) (sql.Result, error)
}
type PostgresConfig ¶
type PostgresConfig struct {
Host string `json:"host" yaml:"host" toml:"host"`
Port int `json:"port" yaml:"port" toml:"port"`
Username string `json:"username" yaml:"username" toml:"username"`
Password string `json:"password" yaml:"password" toml:"password"`
Database string `json:"database" yaml:"database" toml:"database"`
UseSsl bool `json:"use_ssl" yaml:"use_ssl" toml:"use_ssl"`
}
Click to show internal directories.
Click to hide internal directories.