Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ERROR_404 = errors.New("Doc not found.")
View Source
var ErrorNoLatestVersion = errors.New("Not latest revision.")
Functions ¶
func IsItParsed ¶
IsItParsed checks if the given url is already parsed
func IsURLThere ¶
IsURLThere checks if the given url is already stored in the database
Types ¶
type CouchDoc ¶
type CouchDoc struct { ID string `json:"_id"` Rev string `json:"_rev"` URL string `json:"url"` HTML string `json:"html"` Text parse.PageStructure `json:"text"` Links []string `json:"links"` LinksToQueue []string `json:"-"` }
CouchDoc represents a response fron CouchDB
func GetURLData ¶
GetURLData gets the data stored in Couch, does a lookup by doc id
type CouchDocCreated ¶
CouchDocCreated represents a full document
func AddURLData ¶
func AddURLData(url string, data []byte) (CouchDocCreated, error)
AddURLData adds the url and data to the database. data is json encoded.
func SaveExtractedTextAndLinks ¶
func SaveExtractedTextAndLinks(id string, data []byte) (CouchDocCreated, error)
Click to show internal directories.
Click to hide internal directories.