-
-
Save JonCooperWorks/ad0c8fd4e22303cb8a864dc4724f58d1 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Listener must be implemented by a plugin to users to hook the request - response transaction. | |
// The Listen method will be run in its own goroutine, so plugins cannot block the rest of the program, however panics can take down the entire process. | |
type Listener interface { | |
Listen(results <-chan *Result) | |
} | |
// InitializerFunc is a go function that should be exported by a function package. | |
// It should be named "New". | |
// Your InitializerFunc should return an instance of your Listener with a reference to httpfuzz's logger for consistent logging. | |
type InitializerFunc func(*log.Logger) (Listener, error) | |
// Result is the request, response and associated metadata to be processed by plugins. | |
type Result struct { | |
Request *Request | |
Response *Response | |
Payload string | |
Location string | |
FieldName string | |
TimeElapsed time.Duration | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment