Reader

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Feb 12, 2025 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Data

type Data struct {
	Hash *big.Int
	Data []Types.TypeInterface
}

func (*Data) Base added in v1.0.3

func (d *Data) Base() *Types.Base

func (*Data) Deserialize

func (d *Data) Deserialize(b []byte)

func (*Data) DomainCommon added in v1.0.3

func (d *Data) DomainCommon() *Types.DomainCommon

func (*Data) DomainDisposable added in v1.0.3

func (d *Data) DomainDisposable() *Types.DomainDisposable

func (*Data) DomainVelocity added in v1.0.3

func (d *Data) DomainVelocity() *Types.DomainVelocity

func (*Data) FraudScore added in v1.0.3

func (d *Data) FraudScore() *Types.FraudScore

func (*Data) GetSize

func (d *Data) GetSize() int64

func (*Data) Leaked added in v1.0.3

func (d *Data) Leaked() *Types.Leaked

func (*Data) RecentAbuse added in v1.0.3

func (d *Data) RecentAbuse() *Types.RecentAbuse

func (*Data) UserVelocity added in v1.0.3

func (d *Data) UserVelocity() *Types.UserVelocity
type Header struct {
	Header  [4]byte
	Version byte
	// Type 0x00 for email 0x01 for domain
	Type         byte
	CreationTime uint64
	Headers      []Types.TypeInterface
}

func (*Header) Deserialize

func (h *Header) Deserialize(file *os.File) error

func (*Header) GetSize

func (h *Header) GetSize() int64

type Reader

type Reader struct {
	Header Header
	F      *os.File
}

F should be a pointer to a tree file, Reader.Header.Deserialize will init the header variable

func (*Reader) Close

func (r *Reader) Close()

cleanup function to close the file

func (*Reader) ContainsOnOffset

func (r *Reader) ContainsOnOffset(hash *big.Int, offset int64) *Data

Recursive function to search for a hash in the tree the first call should have offset at the end of the header

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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