state

package
v0.0.0-...-72c2bb7 Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2020 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Stater

type Stater interface {
	// DoBruteETLD increments a counter so we don't overload an etld
	DoBruteETLD(ctx context.Context, orgID, scanGroupID, expireSeconds int, maxAllowed int, etld string) (int, bool, error)
	// DoBruteDomain returns true if we should brute force the zone and sets a key in redis. Otherwise
	// returns false stating we've already brute forced it (until expireSeconds)
	DoBruteDomain(ctx context.Context, orgID, scanGroupID int, expireSeconds int, zone string) (bool, error)
	// DoMutateDomain returns true if we should mutate the zone and sets a key in redis. Otherwise
	// returns false stating we've already brute forced it (until expireSeconds)
	DoMutateDomain(ctx context.Context, orgID, scanGroupID int, expireSeconds int, zone string) (bool, error)
	// Subscribe for updates
	Subscribe(ctx context.Context, onStartFn state.SubOnStart, onMessageFn state.SubOnMessage, channels ...string) error
	// GetGroup returns the requested group with/without modules
	GetGroup(ctx context.Context, orgID, scanGroupID int, wantModules bool) (*am.ScanGroup, error)
}

Stater is for interfacing with a state management system (see pkg/state/redis/redis.go for implementation)

Jump to

Keyboard shortcuts

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