database

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 3, 2024 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNoUpdateRequired = errors.New("no update required")
	ErrNoIpAddress      = errors.New("no ip address in the database")
)

Functions

This section is empty.

Types

type Database

type Database interface {
	IpInfo(ip net.IP) (*domain.IpInfo, error)
	UpdateIpDatabase() (nextUpdate time.Duration, err error)

	Close() error
}

func Connect

func Connect(ctx context.Context, cfg *domain.AppConfig, l *log.Logger) (d Database, err error)

Jump to

Keyboard shortcuts

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