Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type IDataBase ¶
type IDataBase interface { // master ReadWrite Node Master() *gorm.DB // slave ReadOnly Node Slave() *gorm.DB }
IDataBase ReadWrite/ReadOnly オブジェクトインターフェイス
func New ¶
func New() IDataBase
New DB接続
Environments ¶
DB_MASTER_NAME: Database host for readwrite
DB_SLAVE_NAME: Database host for readonly
DB_USER: Username
DB_PASSWORD: password
DB_PORT: database port number
DB_DBNAME: database name
DB_SCHEMA: schema name
REPLICA: Y: ReadWrite and ReadOnly
DB_LOG: Y: gorm.LogMode -> true
Click to show internal directories.
Click to hide internal directories.