Documentation ¶
Index ¶
- func LoadConfig(confFilePath *string) map[string]PostgresConfig
- type PostgreSqlConn
- func (c *PostgreSqlConn) Close()
- func (c *PostgreSqlConn) GetDatabase(tableName string) *gorm.DB
- func (c *PostgreSqlConn) Insert(tableName string, record interface{}) error
- func (c *PostgreSqlConn) Open() error
- func (c *PostgreSqlConn) Update(tableName string, record interface{}) error
- func (c *PostgreSqlConn) Upsert(tableName string, record interface{}) error
- type PostgresConfig
- type PostgresLogData
- type PostgresService
- type User
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LoadConfig ¶
func LoadConfig(confFilePath *string) map[string]PostgresConfig
Types ¶
type PostgreSqlConn ¶
type PostgreSqlConn struct { Host string Port string User string Pass string DbName string DbClient *sql.DB DbClientPg *gorm.DB }
func (*PostgreSqlConn) Close ¶
func (c *PostgreSqlConn) Close()
func (*PostgreSqlConn) GetDatabase ¶
func (c *PostgreSqlConn) GetDatabase(tableName string) *gorm.DB
func (*PostgreSqlConn) Insert ¶
func (c *PostgreSqlConn) Insert(tableName string, record interface{}) error
func (*PostgreSqlConn) Open ¶
func (c *PostgreSqlConn) Open() error
func (*PostgreSqlConn) Update ¶
func (c *PostgreSqlConn) Update(tableName string, record interface{}) error
func (*PostgreSqlConn) Upsert ¶
func (c *PostgreSqlConn) Upsert(tableName string, record interface{}) error
type PostgresConfig ¶
type PostgresLogData ¶
type PostgresService ¶
type PostgresService struct {
DbConfigs map[string]PostgresConfig
}
func New ¶
func New(configFilePath *string) *PostgresService
func (*PostgresService) Init ¶
func (s *PostgresService) Init(configFilePath *string)
func (*PostgresService) PutData ¶
func (s *PostgresService) PutData(data PostgresLogData) error
Click to show internal directories.
Click to hide internal directories.