Documentation ¶
Index ¶
Constants ¶
View Source
const ( // ENV_DB_USER is the name of the environment variable that specifies // the user of required db we have to connect to. ENV_DB_USER = "ZINDEXER_DB_USER" // ENV_DB_PASSWORD is the name of the environment variable that specifies // the password of required db we have to connect to. ENV_DB_PASSWORD = "ZINDEXER_DB_PASSWORD" // nolint // ENV_DB_NAME is the name of the environment variable that specifies // the schema of required db we have to connect to. ENV_DB_NAME = "ZINDEXER_DB_NAME" // ENV_DB_HOST is the name of the environment variable that specifies // the host IP of required db we have to connect to. ENV_DB_HOST = "ZINDEXER_DB_HOST" // ENV_DB_PORT is the name of the environment variable that specifies // the port of required db we have to connect to. ENV_DB_PORT = "ZINDEXER_DB_PORT" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ConnectionParams ¶
func GetConnectionParamsFromEnv ¶
func GetConnectionParamsFromEnv() (*ConnectionParams, error)
GetConnectionParamsFromEnv gets required config options from environmental variables
func (*ConnectionParams) GetDSN ¶
func (p *ConnectionParams) GetDSN() (string, error)
type DBConnection ¶
type GormConnection ¶
type GormConnection struct {
// contains filtered or unexported fields
}
func NewPostgresConnection ¶
func NewPostgresConnection(params *ConnectionParams) (*GormConnection, error)
func (*GormConnection) GetDB ¶
func (c *GormConnection) GetDB() *gorm.DB
type IndexingWorker ¶
IndexingWorker interface
Click to show internal directories.
Click to hide internal directories.