Documentation ¶
Index ¶
- Variables
- func AddStringSliceItem(item string, slice *[]string)
- func HandleTestChannel(chunksCh chan *sources.Chunk, cf ChunkFunc) error
- func IsDone(ctx context.Context) bool
- func PinnedCertPool() *x509.CertPool
- func PinnedRetryableHttpClient() *http.Client
- func RemoveStringSliceItem(item string, slice *[]string)
- func RetryableHttpClient() *http.Client
- func SaneHttpClient() *http.Client
- func SaneHttpClientTimeOut(timeOutSeconds int64) *http.Client
- func SkipFile(filename string, data []byte) bool
- type ChunkFunc
- type CustomTransport
- type Filter
- type FilterRuleSet
- type Secret
Constants ¶
This section is empty.
Variables ¶
View Source
var (
KB, MB, GB, TB, PB = 1e3, 1e6, 1e9, 1e12, 1e15
IGNORED_EXTENSIONS = []string{"pdf", "mp4", "avi", "mpeg", "mpg", "mov", "wmv", "m4p", "swf", "mp2", "flv", "vob", "webm", "hdv", "3gp", "ogg", "mp3", "wav", "flac", "tif", "tiff", "jpg", "jpeg", "png", "gif", "zip", "webp"}
)
View Source
var MatchError = errors.New("chunk doesn't match")
Functions ¶
func AddStringSliceItem ¶
func PinnedCertPool ¶
func RemoveStringSliceItem ¶
func RetryableHttpClient ¶
func SaneHttpClient ¶
func SaneHttpClientTimeOut ¶
custom timeout for some scanners
Types ¶
type CustomTransport ¶
type CustomTransport struct {
T http.RoundTripper
}
func NewCustomTransport ¶
func NewCustomTransport(T http.RoundTripper) *CustomTransport
type Filter ¶
type Filter struct {
// contains filtered or unexported fields
}
func FilterFromFiles ¶
FilterFromFiles creates a Filter using the rules in the provided include and exclude files.
type FilterRuleSet ¶
func FilterRulesFromFile ¶
func FilterRulesFromFile(source string) (*FilterRuleSet, error)
FilterRulesFromFile loads the list of regular expression filter rules in `source` and creates a FilterRuleSet.
func (*FilterRuleSet) Matches ¶
func (rules *FilterRuleSet) Matches(object string) bool
Matches will return true if any of the regular expressions in the FilterRuleSet match the pattern.
Click to show internal directories.
Click to hide internal directories.