Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SliceAsCSV ¶
SliceAsCSV converts slice to string separated by ,
Types ¶
type Domain ¶
type Domain struct { Name string // e.g. example.com IsFileFound bool IsFileValid bool Result SecTXTFile Complete bool StatusCode string Error string }
Domain struct shows whether a domain name has a security.txt file or not. If it does, include the Result struct too.
func (Domain) JSONExport ¶
JSONExport transforms SecTXTFile into JSON
func (Domain) PrettyPrint ¶
func (d Domain) PrettyPrint()
PrettyPrint is a method for calling on declared structs
type SecTXTFile ¶
type SecTXTFile struct { //Comments string // e.g. # This is a comment Acknowledgments string // e.g. https://example.com/halloffame Canonical string // e.g. https://example.com/.well-known/security.txt Contact []string // e.g. https://example.com/security or mailto:security@example.com Encryption string // e.g. https://example.com/publickey.txt Expires string // e.g. Expires: 2021-12-31T18:37:07z Hiring string // e.g. https://example.com/careers Policy string // e.g. https://example.com/disclosure.html PreferredLanguages []string // e.g. en, es, fr }
SecTXTFile struct for security.txt file
func ParseSecTXT ¶
func ParseSecTXT(r []byte) *SecTXTFile
ParseSecTXT using switch statement instead
Click to show internal directories.
Click to hide internal directories.