database

package
v0.0.0-...-0bbd9ea Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 10, 2025 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DB

type DB struct {
	SQLDB *sqlx.DB
	Redis *redis.Client
	// contains filtered or unexported fields
}

func NewDB

func NewDB(dsn, redisAddress string, log *logger.Logger) *DB

func (*DB) CheckInRedis

func (d *DB) CheckInRedis(listType, ip string) (bool, error)

CheckInRedis проверяет наличие ключа в Redis.

func (*DB) Close

func (d *DB) Close()

func (*DB) UpdateRedis

func (d *DB) UpdateRedis(listType, subnet string, add bool) bool

UpdateRedis обновляет список в Redis.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL