Documentation ¶
Index ¶
- type DBPostgreOption
- type DBPostgreOptionBuilder
- func (b *DBPostgreOptionBuilder) Build() (*DBPostgreOption, error)
- func (b *DBPostgreOptionBuilder) WithConnMaxLifetime(connMaxLifetime time.Duration) *DBPostgreOptionBuilder
- func (b *DBPostgreOptionBuilder) WithDBName(dBName string) *DBPostgreOptionBuilder
- func (b *DBPostgreOptionBuilder) WithHost(host string) *DBPostgreOptionBuilder
- func (b *DBPostgreOptionBuilder) WithMaxIdleConns(maxIdleConns int) *DBPostgreOptionBuilder
- func (b *DBPostgreOptionBuilder) WithMaxPoolSize(maxPoolSize int) *DBPostgreOptionBuilder
- func (b *DBPostgreOptionBuilder) WithPassword(password string) *DBPostgreOptionBuilder
- func (b *DBPostgreOptionBuilder) WithPort(port int) *DBPostgreOptionBuilder
- func (b *DBPostgreOptionBuilder) WithUsername(username string) *DBPostgreOptionBuilder
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DBPostgreOption ¶
type DBPostgreOption struct { Host string Port int Username string Password string DBName string MaxPoolSize int MaxIdleConns int ConnMaxLifetime time.Duration }
DBPostgreOption options for postgre connection
func (DBPostgreOption) NewPostgreDatabase ¶
func (m DBPostgreOption) NewPostgreDatabase() (db *sqlx.DB, err error)
NewPostgreDatabase return gorp dbmap object with postgre options param
type DBPostgreOptionBuilder ¶
type DBPostgreOptionBuilder struct {
// contains filtered or unexported fields
}
DBPostgreOption builder pattern code
func NewDBPostgreOptionBuilder ¶
func NewDBPostgreOptionBuilder() *DBPostgreOptionBuilder
func (*DBPostgreOptionBuilder) Build ¶
func (b *DBPostgreOptionBuilder) Build() (*DBPostgreOption, error)
func (*DBPostgreOptionBuilder) WithConnMaxLifetime ¶
func (b *DBPostgreOptionBuilder) WithConnMaxLifetime(connMaxLifetime time.Duration) *DBPostgreOptionBuilder
func (*DBPostgreOptionBuilder) WithDBName ¶
func (b *DBPostgreOptionBuilder) WithDBName(dBName string) *DBPostgreOptionBuilder
func (*DBPostgreOptionBuilder) WithHost ¶
func (b *DBPostgreOptionBuilder) WithHost(host string) *DBPostgreOptionBuilder
func (*DBPostgreOptionBuilder) WithMaxIdleConns ¶
func (b *DBPostgreOptionBuilder) WithMaxIdleConns(maxIdleConns int) *DBPostgreOptionBuilder
func (*DBPostgreOptionBuilder) WithMaxPoolSize ¶
func (b *DBPostgreOptionBuilder) WithMaxPoolSize(maxPoolSize int) *DBPostgreOptionBuilder
func (*DBPostgreOptionBuilder) WithPassword ¶
func (b *DBPostgreOptionBuilder) WithPassword(password string) *DBPostgreOptionBuilder
func (*DBPostgreOptionBuilder) WithPort ¶
func (b *DBPostgreOptionBuilder) WithPort(port int) *DBPostgreOptionBuilder
func (*DBPostgreOptionBuilder) WithUsername ¶
func (b *DBPostgreOptionBuilder) WithUsername(username string) *DBPostgreOptionBuilder
Click to show internal directories.
Click to hide internal directories.