Documentation ¶
Index ¶
Constants ¶
View Source
const ( EngineMySQL = 1 EngineMSSQL = 2 EngineOracle = 3 EnginePostgres = 4 EngineSQLite = 5 EngineTiDB = 6 EngineCockroachDB = 7 )
Constants
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DBConnectionData ¶
DBConnectionData formatted connection information
type DBConnectionPoolOptions ¶
type DBConnectionPoolOptions struct { Engine int DSN string `property:"Database Connection URL" validate:"required"` DriverClassname string `property:"Database Driver Class Name" validate:"required"` Host string `property:"Database Host,descriptor:false"` Port int `property:"Database Port,descriptor:false"` User string `property:"Database User"` Password string `property:"Password,category:password"` ServiceName string `property:"Database Service Name,descriptor:false"` ServiceID string `property:"Database Service ID,descriptor:false"` Database string `property:"Database Name,descriptor:false"` MaxWaitTime int `property:"Max Wait Time,default:500 millis" validate:"required"` MaxTotalConnections int `property:"Max Total Connections,default:8" validate:"required"` SSHTunnelDSN string `property:"SSH Tunnel DSN"` // contains filtered or unexported fields }
DBConnectionPoolOptions options
func NewDBConnectionPoolOptionsWithDSN ¶
func NewDBConnectionPoolOptionsWithDSN(dsn string) *DBConnectionPoolOptions
NewDBConnectionPoolOptionsWithDSN DBConnectionPoolOptions
func (*DBConnectionPoolOptions) Cleanup ¶
func (o *DBConnectionPoolOptions) Cleanup()
Cleanup clean sshtunnel
func (*DBConnectionPoolOptions) GetConnectionData ¶
func (o *DBConnectionPoolOptions) GetConnectionData() (DBConnectionData, error)
GetConnectionData prepare dsn and format connection data
func (*DBConnectionPoolOptions) IsEngineTypeValid ¶
func (o *DBConnectionPoolOptions) IsEngineTypeValid() bool
IsEngineTypeValid check engine type range
func (*DBConnectionPoolOptions) ParseDSN ¶
func (o *DBConnectionPoolOptions) ParseDSN() error
ParseDSN parse dsn field from options
Click to show internal directories.
Click to hide internal directories.