Documentation ¶
Overview ¶
The api package serves two purposes
1. handle incoming requests via lambda 2. route requests to other backend functions to collect information on the submitted url (or file hash or ip)
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DnsRequest ¶
type DnsRequest struct { Errors string `json:"Errors"` Nameservers []*net.NS `json:"Nameservers"` IPs []net.IP `json:"IP addrs"` MX []*net.MX `json:"MX records"` }
func QueryNet ¶
func QueryNet(server string) DnsRequest
Runs through a query param from Lambda and looks up the
Will return some amount of information assuming the input item is not an invalid url
type Response ¶
type Response struct { Rep interface{} `json:"Reputation"` Url interface{} `json:"Url"` LastSubDate time.Time `json:"Last Submission Date"` DNS DnsRequest `json:"DNS Query"` }
func Ingest ¶
func Ingest(request events.APIGatewayProxyRequest) (Response, error)
Ingest takes a query param from AWS API Gateway and passes that along to
ValidateQuery(url)
func QueryVirusTotal ¶
Uses the Virus total sdk/client provided by VT themselves and returns some information
Click to show internal directories.
Click to hide internal directories.