Documentation ¶
Index ¶
- Constants
- Variables
- func SaveTOML(v interface{}, filename string) error
- func WriteToFile(c []byte, filename string) error
- type Option
- func WithApplicationName(name string) Option
- func WithDatabase(dbname string) Option
- func WithDebug(l bool) Option
- func WithHost(host string, port uint16) Option
- func WithLogLevel(level tracelog.LogLevel) Option
- func WithRuntimeParams(r map[string]string) Option
- func WithUserPassword(user, password string) Option
- type PostgresConfig
Constants ¶
View Source
const ConfigFileName = "postgres-config.toml"
Variables ¶
View Source
var ( Provider = wire.NewSet(Loading) // Provider ConfigFullPath = "" // ConfigFullPath )
Functions ¶
func WriteToFile ¶
WriteToFile write []byte to file
Types ¶
type Option ¶
type Option func(*PostgresConfig)
Option ProxyOption options
func WithApplicationName ¶
func WithLogLevel ¶
WithLogLevel new server port in string
func WithRuntimeParams ¶
WithRuntimeParams options
func WithUserPassword ¶
WithUserPassword options
type PostgresConfig ¶
type PostgresConfig struct { ApplicationName string RuntimeParams map[string]string Database string User string Password string Host string PoolConnections string LogLevel tracelog.LogLevel Port uint16 Debug bool }
PostgresConfig postgres configuration
func (*PostgresConfig) SetLogLevel ¶
func (p *PostgresConfig) SetLogLevel(level tracelog.LogLevel)
SetLogLevel set logger
Click to show internal directories.
Click to hide internal directories.