data

package
v0.5.11 Latest Latest
Warning

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

Go to latest
Published: Aug 17, 2022 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MigrateDB

func MigrateDB(cfg *config.Config, db *sqlx.DB) (err error)

func NewDB

func NewDB(cfg *config.Config) (*sqlx.DB, error)

Types

type DisposableStore

type DisposableStore interface {
	FindByDomain(domain string) (*models.DisposableEmail, error)
	Find(id int) (*models.DisposableEmail, error)
	FindAll() (*[]string, error)
	Create(domain string, score int) (*models.DisposableEmail, error)
	Delete(id int) (bool, error)
}

*********************

email

*********************

func NewDisposableStore

func NewDisposableStore(db sqlx.Ext) (DisposableStore, error)

type FreeEmailStore

type FreeEmailStore interface {
	FindByDomain(domain string) (*models.FreeEmail, error)
	Find(id int) (*models.FreeEmail, error)
	FindAll() (*[]string, error)
	Create(domain string, score int) (*models.FreeEmail, error)
	Delete(id int) (bool, error)
}

func NewFreeEmailStore

func NewFreeEmailStore(db sqlx.Ext) (FreeEmailStore, error)

type ProxyStore

type ProxyStore interface {
	Find(id int) (*models.Proxy, error)
	FindAll() (*[]models.Proxy, error)
	FindByIP(ipaddress string) (*models.Proxy, error)
	Create(ip, port, types string) (*models.Proxy, error)
	Delete(id int) (bool, error)
	DeleteOld(hours int) (bool, error)
}

*********************

ipaddress

*********************

func NewProxyStore

func NewProxyStore(db sqlx.Ext) (ProxyStore, error)

type SpamEmailStore

type SpamEmailStore interface {
	FindByDomain(domain string) (*models.SpamEmail, error)
	Find(id int) (*models.SpamEmail, error)
	FindAll() (*[]string, error)
	Create(domain string, score int) (*models.SpamEmail, error)
	Delete(id int) (bool, error)
}

func NewSpamEmailStore

func NewSpamEmailStore(db sqlx.Ext) (SpamEmailStore, error)

type SpamStore

type SpamStore interface {
	FindByIP(ipaddress string) (*models.Spam, error)
	Find(id int) (*models.Spam, error)
	FindAll() (*[]models.Spam, error)
	FindAllIPs() (*[]string, error)
	Create(ip string, prefix byte, score int, iptype string) (*models.Spam, error)
	Delete(id int) (bool, error)
	DeleteOld(hours int) (bool, error)
}

func NewSpamStore

func NewSpamStore(db sqlx.Ext) (SpamStore, error)

type TorStore

type TorStore interface {
	FindByIP(ip string) (*models.Tor, error)
	Find(id int) (*models.Tor, error)
	FindAll() (*[]models.Tor, error)
	FindAllIPs() (*[]string, error)
	Create(ip string, prefix byte, iptype string, source int) (*models.Tor, error)
	Delete(id int) (bool, error)
	DeleteOld(hours int) (bool, error)
}

func NewTorStore

func NewTorStore(db sqlx.Ext) (TorStore, error)

type VpnStore

type VpnStore interface {
	FindByIP(ip string) (*models.Vpn, error)
	Find(id int) (*models.Vpn, error)
	FindAll() (*[]models.Vpn, error)
	FindAllIPs() (*[]string, error)
	Create(ip string, prefix byte, iptype string, source int) (*models.Vpn, error)
	Delete(id int) (bool, error)
	DeleteOld(hours int) (bool, error)
}

func NewVpnStore

func NewVpnStore(db sqlx.Ext) (VpnStore, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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