Documentation ¶
Index ¶
- func CreatePage(url string, title string, statusCode int, body string, headers PropertyMap) (uint, error)
- func CreatePhoneNumber(webPageID int, interNum, natNum string, code string) error
- func GetDB() *gorm.DB
- func SetupDatabase(dbUrl string) *gorm.DB
- type Crypto
- type Email
- type Model
- type PageData
- type PhoneNumber
- type PropertyMap
- type WebPage
- type WordpressFootPrint
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreatePage ¶
func CreatePhoneNumber ¶
func SetupDatabase ¶
SetupDatabase also auto migrates the models if there are any changes
Types ¶
type Crypto ¶
type Crypto struct { Model //WebPageID is the serves as a foreign key to web_pages WebPageID int `json:"pageId"` PGPKeys pq.StringArray `json:"PGPKey" gorm:"type:text[]"` Certificates pq.StringArray `json:"Certificates" gorm:"type:text[]"` Wallets pq.StringArray `json:"Wallets" gorm:"type:text[]"` }
Crypto stores various cryptographic findings, such as
func CryptoCreate ¶
type Email ¶
type Email struct { Model //WebPageID is the serves as a foreign key to web_pages WebPageID int `json:"pageId"` Emails pq.StringArray `json:"emails" gorm:"type:text[]"` }
Email stores processed emails that are found within a web page.
func CreateEmails ¶
type PageData ¶
type PageData struct { URL string `json:"url" gorm:"uniqueIndex;not null"` Title string `json:"title" gorm:"Index"` StatusCode int `json:"statusCode" gorm:"Index;not null"` Body string `json:"body" gorm:"type:text"` Headers PropertyMap `json:"headers" gorm:"type:jsonb"` }
PageData is embedded into the webPage model for structured data
type PhoneNumber ¶
type PropertyMap ¶
type PropertyMap map[string]interface{}
PropertyMap is the postgres implementation of jsonb in go.
func (*PropertyMap) Scan ¶
func (p *PropertyMap) Scan(src interface{}) error
Scan unmarshals a JSON-encoded byte slice into a PropertyMap. It assigns the result to the PropertyMap (p) or returns an error.
type WebPage ¶
type WebPage struct { Model PageData `json:"pageData"` //References are here for exporting structured data from the webPage model. Emails *Email `json:"email" gorm:"foreignKey:WebPageID;constraint:OnUpdate:CASCADE,OnDelete:CASCADE;"` PhoneNumbers *PhoneNumber `json:"phoneNumbers" gorm:"foreignKey:WebPageID;constraint:OnUpdate:CASCADE,OnDelete:CASCADE;"` Crypto *Crypto `json:"crypto" gorm:"foreignKey:WebPageID;constraint:OnUpdate:CASCADE,OnDelete:CASCADE;"` Wordpress *WordpressFootPrint `json:"wordpress" gorm:"foreignKey:WebPageID;constraint:OnUpdate:CASCADE,OnDelete:CASCADE;"` }
type WordpressFootPrint ¶
type WordpressFootPrint struct { Model //WebPageID is the serves as a foreign key to web_pages WebPageID int `json:"pageId"` WordpressHtml pq.StringArray `json:"wordpressHtml" gorm:"type:text[]"` }
func CreateWordPressFootPrint ¶
func CreateWordPressFootPrint(pageId int, html []string) *WordpressFootPrint
func (WordpressFootPrint) TableName ¶
func (WordpressFootPrint) TableName() string
Click to show internal directories.
Click to hide internal directories.