29 lines
391 B
Go
29 lines
391 B
Go
package pollute
|
|
|
|
type CheckFrom = int
|
|
|
|
const (
|
|
Ce8 CheckFrom = iota
|
|
)
|
|
|
|
type CheckReq struct {
|
|
Domain string
|
|
Payload string
|
|
}
|
|
|
|
type CheckResult struct {
|
|
Domain string
|
|
Polled bool
|
|
Err error
|
|
Payload string
|
|
}
|
|
|
|
func Check(domains []CheckReq, checkFrom CheckFrom) ([]CheckResult, error) {
|
|
switch checkFrom {
|
|
case Ce8:
|
|
fallthrough
|
|
default:
|
|
return ce8PolluteCheck(domains)
|
|
}
|
|
}
|