Source is an interface inherited by each passive source
| 46 | |
| 47 | // Source is an interface inherited by each passive source |
| 48 | type Source interface { |
| 49 | // Run takes a domain as argument and a session object |
| 50 | // which contains the extractor for subdomains, http client |
| 51 | // and other stuff. |
| 52 | Run(context.Context, string, *Session) <-chan Result |
| 53 | |
| 54 | // Name returns the name of the source. It is preferred to use lower case names. |
| 55 | Name() string |
| 56 | |
| 57 | // IsDefault returns true if the current source should be |
| 58 | // used as part of the default execution. |
| 59 | IsDefault() bool |
| 60 | |
| 61 | // HasRecursiveSupport returns true if the current source |
| 62 | // accepts subdomains (e.g. subdomain.domain.tld), |
| 63 | // not just root domains. |
| 64 | HasRecursiveSupport() bool |
| 65 | |
| 66 | // KeyRequirement returns the API key requirement level for this source |
| 67 | KeyRequirement() KeyRequirement |
| 68 | |
| 69 | // NeedsKey returns true if the source requires an API key. |
| 70 | // Deprecated: Use KeyRequirement() instead for more granular control. |
| 71 | NeedsKey() bool |
| 72 | |
| 73 | AddApiKeys([]string) |
| 74 | |
| 75 | // Statistics returns the scrapping statistics for the source |
| 76 | Statistics() Statistics |
| 77 | } |
| 78 | |
| 79 | // SubdomainExtractor is an interface that defines the contract for subdomain extraction. |
| 80 | type SubdomainExtractor interface { |
no outgoing calls
no test coverage detected