Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetClickhouseDB ¶
func GetClickhouseDB(config ClickhouseConfig) *sql.DB
GetClickhouseDB returns a sql.DB connection to clickhouse.
func RunGoose ¶
RunGoose runs the goose command with the provided arguments. args should be the command and the arguments to pass to goose. eg RunGoose(ctx, []string{"up", "-v"}, db).
func SetMigrations ¶
func SetMigrations()
SetMigrations sets the migrations for the goose tool. this will reset the global migrations and FS to avoid any unwanted migrations registers.
Types ¶
type ClickhouseConfig ¶
type ClickhouseConfig struct { Host string `yaml:"CLICKHOUSE_HOST"` Port string `yaml:"CLICKHOUSE_PORT"` User string `yaml:"CLICKHOUSE_USER"` Password string `yaml:"CLICKHOUSE_PASSWORD"` DataBase string `yaml:"CLICKHOUSE_DATABASE"` }
ClickhouseConfig is the configuration for connecting to a clickhouse database.
Click to show internal directories.
Click to hide internal directories.