Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ConnectionConfig ¶
type ConnectionConfig struct { DefaultConnectionName string Connections []ConnectionDetail }
ConnectionConfig berisi konfigurasi konesi database
type ConnectionDetail ¶
type ConnectionDetail struct { ConnectionName string Driver DBDriver Username string Host string Port string DBName string Passwrod string }
ConnectionDetail adalah konfigurasi struct untuk membangun suatu koneksi database
type Connections ¶
type Connections struct { DefaultConnectionName string // contains filtered or unexported fields }
Connections merupakan objek berisi kumpulan koneksi yang di buat menggunakan factory function BuildConnections
func BuildConnections ¶
func BuildConnections(cc *ConnectionConfig) (*Connections, error)
BuildConnections merupakan factory function untuk struct Connection
func (*Connections) GetConnection ¶
func (c *Connections) GetConnection(name string) (*DBConnection, error)
Get mengembalikan connectionData sesuai dengan yang diminta
func (*Connections) GetConnectionDefault ¶
func (c *Connections) GetConnectionDefault() (*DBConnection, error)
Default mengembalikan DBConnection default
type DBConnection ¶
type DBConnection struct { Driver DBDriver DBName string Conn *sqlx.DB QueryBuilder squirrel.StatementBuilderType }
DBConnection berisi data untuk melakuakan konesi database
Click to show internal directories.
Click to hide internal directories.