Documentation ¶
Index ¶
Constants ¶
View Source
const ( // StateMigrationName is the name of the migration used by packr to pack the migration file StateMigrationName = "zkevm-state-db" // PoolMigrationName is the name of the migration used by packr to pack the migration file PoolMigrationName = "zkevm-pool-db" )
Variables ¶
This section is empty.
Functions ¶
func CheckMigrations ¶
CheckMigrations runs migrate-up for the given config.
func RunMigrationsDown ¶
RunMigrationsDown runs migrate-down for the given config.
func RunMigrationsUp ¶
RunMigrationsUp runs migrate-up for the given config.
Types ¶
type Config ¶
type Config struct { // Database name Name string `mapstructure:"Name"` // User name User string `mapstructure:"User"` // Password of the user Password string `mapstructure:"Password"` // Host address Host string `mapstructure:"Host"` // Port Number Port string `mapstructure:"Port"` // EnableLog EnableLog bool `mapstructure:"EnableLog"` // MaxConns is the maximum number of connections in the pool. MaxConns int `mapstructure:"MaxConns"` }
Config provide fields to configure the pool
Click to show internal directories.
Click to hide internal directories.