Versions in this module Expand all Collapse all v1 v1.0.4 Apr 3, 2022 Changes in this version + const TYPE_IP + const TYPE_MAC + const WB_BLACK + const WB_WHITE + type FirewallDB struct + func ConnectDB(datasource string) (db *FirewallDB, err error) + func (v *FirewallDB) AutoVacuum() error + func (v *FirewallDB) Close() + func (v *FirewallDB) Count() (int64, error) + func (v *FirewallDB) DeleteData(whiteblack, addresstype int, address string) (int64, error) + func (v *FirewallDB) GetAllHosts() (*list.List, error) + func (v *FirewallDB) GetBlackHosts(addresstype int) (*list.List, error) + func (v *FirewallDB) GetHosts(whiteblack, addresstype int) (*list.List, error) + func (v *FirewallDB) GetWhiteHosts(addresstype int) (*list.List, error) + func (v *FirewallDB) InitDB() error + func (v *FirewallDB) InsertData(whiteblack, addresstype int, address string) (int64, error) + func (v *FirewallDB) InsertIgnoreData(whiteblack, addresstype int, address string) (int64, error) + func (v *FirewallDB) Lock() + func (v *FirewallDB) Reduce() error + func (v *FirewallDB) ResetAutoincrement() (int64, error) + func (v *FirewallDB) Unlock() + type FirewallRule struct + Address string + AddressType int + Id int64 + WhiteBlack int