-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
/
interfaces.go
45 lines (40 loc) · 1.06 KB
/
interfaces.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
package ffuf
//FilterProvider is a generic interface for both Matchers and Filters
type FilterProvider interface {
Filter(response *Response) (bool, error)
Repr() string
}
//RunnerProvider is an interface for request executors
type RunnerProvider interface {
Prepare(input map[string][]byte) (Request, error)
Execute(req *Request) (Response, error)
}
//InputProvider interface handles the input data for RunnerProvider
type InputProvider interface {
AddProvider(InputProviderConfig) error
Next() bool
Position() int
Reset()
Value() map[string][]byte
Total() int
}
//InternalInputProvider interface handles providing input data to InputProvider
type InternalInputProvider interface {
Keyword() string
Next() bool
Position() int
ResetPosition()
IncrementPosition()
Value() []byte
Total() int
}
//OutputProvider is responsible of providing output from the RunnerProvider
type OutputProvider interface {
Banner() error
Finalize() error
Progress(status Progress)
Info(infostring string)
Error(errstring string)
Warning(warnstring string)
Result(resp Response)
}