utils

package
v0.0.0-...-a1a22e4 Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2017 License: MPL-2.0 Imports: 9 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Uint64ToTimestamp

func Uint64ToTimestamp(timestamp uint64) time.Time

Types

type CTConfig

type CTConfig struct {
	LogUrl              *string
	LogUrlList          *string
	CensysPath          *string
	CensysUrl           *string
	CensysStdin         *bool
	DbConnect           *string
	Verbose             *bool
	SQLDebug            *bool
	CertPath            *string
	CertsPerFolder      *uint64
	Offset              *uint64
	OffsetByte          *uint64
	Limit               *uint64
	GeoipDbPath         *string
	NumThreads          *int
	HistoricalDays      *int
	RunForever          *bool
	PollingDelay        *int
	IssuerCNFilter      *string
	EarliestDateFilter  *string
	CorrelateLogEntries *bool
	LogExpiredEntries   *bool
}

func NewCTConfig

func NewCTConfig() *CTConfig

func (*CTConfig) Usage

func (c *CTConfig) Usage()

type FolderDatabase

type FolderDatabase struct {
	// contains filtered or unexported fields
}

func NewFolderDatabase

func NewFolderDatabase(aPath string, aPerms os.FileMode, aFolderSize uint64) (*FolderDatabase, error)

func (*FolderDatabase) Get

func (db *FolderDatabase) Get(aID uint64) ([]byte, error)

func (*FolderDatabase) Store

func (db *FolderDatabase) Store(aID uint64, aData []byte) error

type OperationData

type OperationData struct {
	// contains filtered or unexported fields
}

func NewOperationData

func NewOperationData() *OperationData

type OperationStatus

type OperationStatus struct {
	// Identifier of this Status Update
	Identifier string
	// Start contains the requested starting index of the operation.
	Start uint64
	// Current contains the greatest index that has been processed.
	Current uint64
	// Length contains the total number of entries.
	Length uint64
}

func (OperationStatus) Percentage

func (status OperationStatus) Percentage() float32

type ProgressDisplay

type ProgressDisplay struct {
	// contains filtered or unexported fields
}

func NewProgressDisplay

func NewProgressDisplay() *ProgressDisplay

func (*ProgressDisplay) Close

func (pd *ProgressDisplay) Close()

func (*ProgressDisplay) StartDisplay

func (pd *ProgressDisplay) StartDisplay(wg *sync.WaitGroup)

func (*ProgressDisplay) UpdateProgress

func (pd *ProgressDisplay) UpdateProgress(identifier string, start uint64, index uint64, upTo uint64)

type ProgressMonitor

type ProgressMonitor struct {
	// contains filtered or unexported fields
}

func NewProgressMonitor

func NewProgressMonitor() *ProgressMonitor

func (*ProgressMonitor) CurrentLength

func (pm *ProgressMonitor) CurrentLength() uint64

func (*ProgressMonitor) CurrentPercentage

func (pm *ProgressMonitor) CurrentPercentage() float64

func (*ProgressMonitor) CurrentPosition

func (pm *ProgressMonitor) CurrentPosition() uint64

func (*ProgressMonitor) String

func (pm *ProgressMonitor) String() string

func (*ProgressMonitor) UpdateCount

func (pm *ProgressMonitor) UpdateCount(identifier string, newCount uint64) error

func (*ProgressMonitor) UpdateLength

func (pm *ProgressMonitor) UpdateLength(identifier string, newLength uint64) error

Jump to

Keyboard shortcuts

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