sqlite3

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: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MigrateDB

func MigrateDB(db *sqlx.DB) error

func NewDB

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

Types

type DisposableStore

type DisposableStore struct {
	sqlx.Ext
}

func (*DisposableStore) Create

func (db *DisposableStore) Create(domain string, score int) (*models.DisposableEmail, error)

func (*DisposableStore) Delete

func (db *DisposableStore) Delete(id int) (bool, error)

func (*DisposableStore) Find

func (db *DisposableStore) Find(id int) (*models.DisposableEmail, error)

func (*DisposableStore) FindAll

func (db *DisposableStore) FindAll() (*[]string, error)

func (*DisposableStore) FindByDomain

func (db *DisposableStore) FindByDomain(domain string) (*models.DisposableEmail, error)

type FreeEmailStore

type FreeEmailStore struct {
	sqlx.Ext
}

func (*FreeEmailStore) Create

func (db *FreeEmailStore) Create(domain string, score int) (*models.FreeEmail, error)

func (*FreeEmailStore) Delete

func (db *FreeEmailStore) Delete(id int) (bool, error)

func (*FreeEmailStore) Find

func (db *FreeEmailStore) Find(id int) (*models.FreeEmail, error)

func (*FreeEmailStore) FindAll

func (db *FreeEmailStore) FindAll() (*[]string, error)

func (*FreeEmailStore) FindByDomain

func (db *FreeEmailStore) FindByDomain(domain string) (*models.FreeEmail, error)

type ProxyStore

type ProxyStore struct {
	sqlx.Ext
}

func (*ProxyStore) Create

func (db *ProxyStore) Create(ip, port, types string) (*models.Proxy, error)

func (*ProxyStore) Delete

func (db *ProxyStore) Delete(id int) (bool, error)

func (*ProxyStore) DeleteOld

func (db *ProxyStore) DeleteOld(hour int) (bool, error)

func (*ProxyStore) Find

func (db *ProxyStore) Find(id int) (*models.Proxy, error)

func (*ProxyStore) FindAll

func (db *ProxyStore) FindAll() (*[]models.Proxy, error)

func (*ProxyStore) FindByIP

func (db *ProxyStore) FindByIP(ipaddress string) (*models.Proxy, error)

type SpamEmailStore

type SpamEmailStore struct {
	sqlx.Ext
}

func (*SpamEmailStore) Create

func (db *SpamEmailStore) Create(domain string, score int) (*models.SpamEmail, error)

func (*SpamEmailStore) Delete

func (db *SpamEmailStore) Delete(id int) (bool, error)

func (*SpamEmailStore) Find

func (db *SpamEmailStore) Find(id int) (*models.SpamEmail, error)

func (*SpamEmailStore) FindAll

func (db *SpamEmailStore) FindAll() (*[]string, error)

func (*SpamEmailStore) FindByDomain

func (db *SpamEmailStore) FindByDomain(domain string) (*models.SpamEmail, error)

type SpamStore

type SpamStore struct {
	sqlx.Ext
}

func (*SpamStore) Create

func (db *SpamStore) Create(ip string, prefix byte, score int, iptype string) (*models.Spam, error)

func (*SpamStore) Delete

func (db *SpamStore) Delete(id int) (bool, error)

func (*SpamStore) DeleteOld

func (db *SpamStore) DeleteOld(hour int) (bool, error)

func (*SpamStore) Find

func (db *SpamStore) Find(id int) (*models.Spam, error)

func (*SpamStore) FindAll

func (db *SpamStore) FindAll() (*[]models.Spam, error)

func (*SpamStore) FindAllIPs

func (db *SpamStore) FindAllIPs() (*[]string, error)

func (*SpamStore) FindByIP

func (db *SpamStore) FindByIP(ipaddress string) (*models.Spam, error)

type TorStore

type TorStore struct {
	sqlx.Ext
}

func (*TorStore) Create

func (db *TorStore) Create(ip string, prefix byte, iptype string, score int) (*models.Tor, error)

func (*TorStore) Delete

func (db *TorStore) Delete(id int) (bool, error)

func (*TorStore) DeleteOld

func (db *TorStore) DeleteOld(hour int) (bool, error)

func (*TorStore) Find

func (db *TorStore) Find(id int) (*models.Tor, error)

func (*TorStore) FindAll

func (db *TorStore) FindAll() (*[]models.Tor, error)

func (*TorStore) FindAllIPs

func (db *TorStore) FindAllIPs() (*[]string, error)

func (*TorStore) FindByIP

func (db *TorStore) FindByIP(ipaddress string) (*models.Tor, error)

type VpnStore

type VpnStore struct {
	sqlx.Ext
}

func (*VpnStore) Create

func (db *VpnStore) Create(ip string, prefix byte, iptype string, score int) (*models.Vpn, error)

func (*VpnStore) Delete

func (db *VpnStore) Delete(id int) (bool, error)

func (*VpnStore) DeleteOld

func (db *VpnStore) DeleteOld(hour int) (bool, error)

func (*VpnStore) Find

func (db *VpnStore) Find(id int) (*models.Vpn, error)

func (*VpnStore) FindAll

func (db *VpnStore) FindAll() (*[]models.Vpn, error)

func (*VpnStore) FindAllIPs

func (db *VpnStore) FindAllIPs() (*[]string, error)

func (*VpnStore) FindByIP

func (db *VpnStore) FindByIP(ip string) (*models.Vpn, error)

Jump to

Keyboard shortcuts

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