Documentation ¶
Index ¶
- Constants
- type Connection
- type ConnectionConfig
- type ConnectionManager
- func (m *ConnectionManager) Add(name string, conf *ConnectionConfig)
- func (m *ConnectionManager) Exist(name string) bool
- func (m *ConnectionManager) Get(name string) *Connection
- func (m *ConnectionManager) Length() int
- func (m *ConnectionManager) Remove(name string)
- func (m ConnectionManager) String() string
Constants ¶
View Source
const ( DRIVER_MY_SQL = "mysql" DRIVER_POSTGRE_SQL = "postgres" DRIVER_SQLITE3 = "sqlite3" DRIVER_SQL_SERVER = "mssql" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Connection ¶
type Connection struct {
// contains filtered or unexported fields
}
func (*Connection) DisconnectGormDB ¶
func (c *Connection) DisconnectGormDB() bool
func (*Connection) ReconnectGormDB ¶
func (c *Connection) ReconnectGormDB() error
type ConnectionConfig ¶
type ConnectionManager ¶
type ConnectionManager struct {
// contains filtered or unexported fields
}
func NewConnectionManager ¶
func NewConnectionManager() *ConnectionManager
func (*ConnectionManager) Add ¶
func (m *ConnectionManager) Add(name string, conf *ConnectionConfig)
func (*ConnectionManager) Exist ¶
func (m *ConnectionManager) Exist(name string) bool
func (*ConnectionManager) Get ¶
func (m *ConnectionManager) Get(name string) *Connection
func (*ConnectionManager) Length ¶
func (m *ConnectionManager) Length() int
func (*ConnectionManager) Remove ¶
func (m *ConnectionManager) Remove(name string)
func (ConnectionManager) String ¶
func (m ConnectionManager) String() string
Click to show internal directories.
Click to hide internal directories.