Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ByteMapURLDB ¶
type ByteMapURLDB struct {
// contains filtered or unexported fields
}
ByteMapURLDB is a map based URL database, storing a hashed URL
func NewByteMapURLDB ¶
func NewByteMapURLDB() *ByteMapURLDB
NewByteMapURLDB initiqlized a new ByteMapURLDB with an empty map
func (*ByteMapURLDB) Hash ¶
func (hmdb *ByteMapURLDB) Hash(data string) (out ByteSum)
Hash the given string (URL)
func (*ByteMapURLDB) Load ¶
func (hmdb *ByteMapURLDB) Load(filename string) (err error)
Load data into the internal map. The file is expected to have a normalized url per line, starting with http://.
func (*ByteMapURLDB) Lookup ¶
func (hmdb *ByteMapURLDB) Lookup(url string) bool
Lookup given URL in data store and return true if the URL is present
type ByteSumBoolMap ¶
ByteSumBoolMap is maps ByteSum to boolean
type StringMapURLDB ¶
type StringMapURLDB struct {
// contains filtered or unexported fields
}
StringMapURLDB is a map based URL database, storing the URL (key) as string.
func NewStringMapURLDB ¶
func NewStringMapURLDB() *StringMapURLDB
NewStringMapURLDB creates a new instance of MapURLDB with an empty map
func (*StringMapURLDB) Load ¶
func (mdb *StringMapURLDB) Load(filename string) error
Load data into the internal map. The file is expected to have a normalized url per line, starting with http://
func (*StringMapURLDB) Lookup ¶
func (mdb *StringMapURLDB) Lookup(url string) bool
Lookup given URL in data store and return true if the URL is present