Documentation ¶
Index ¶
- Constants
- func FloodCommand(dbConn func() *sqlx.DB) *cli.Command
- func FloodGC(ctx context.Context, dbConn *sqlx.DB) (int64, error)
- func FloodUnban(ctx context.Context, dbConn *sqlx.DB, identifier string) (int64, error)
- func Lock(ctx context.Context, db *sqlx.DB, name string) error
- func MigrateCommand(migrator func() *migrate.Migrate) *cli.Command
- func MysqlDbMigrate(db *sqlx.DB, migrations *bindata.AssetSource) (*migrate.Migrate, error)
- func OpenDb(log zerolog.Logger, driverName string, dsn string, maxOpenConns int) (*sqlx.DB, error)
- func OpenDbFromWhaleblazer(log zerolog.Logger, maxOpenConns int) (*sqlx.DB, error)
- func Unlock(ctx context.Context, name string) error
- func WhaleblazerMysqlConfig() (*mysql2.Config, error)
- type Flood
- type FloodHit
- type FloodSummaryItem
Constants ¶
View Source
const MB = 1 << 20
Variables ¶
This section is empty.
Functions ¶
func FloodCommand ¶ added in v0.5.1
func FloodUnban ¶ added in v0.5.1
func MigrateCommand ¶
func MigrateCommand(migrator func() *migrate.Migrate) *cli.Command
func MysqlDbMigrate ¶
func OpenDbFromWhaleblazer ¶
func WhaleblazerMysqlConfig ¶
Types ¶
type Flood ¶ added in v0.5.1
type FloodSummaryItem ¶ added in v0.5.1
type FloodSummaryItem struct { Event string `db:"event"` Identifier string `db:"identifier"` Count int `db:"count"` LastHit time.Time `db:"lastHit"` }
func FloodGetSummary ¶ added in v0.5.1
Click to show internal directories.
Click to hide internal directories.