Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( BaseURL = "https://web.archive.org" // Overrideable default package value. HTTPHost = "archive.org" // Overrideable default package value. UserAgent = "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/65.0.3325.162 Safari/537.36" // Overrideable default package value. DefaultRequestTimeout = 10 * time.Second // Overrideable default package value. MaxTries = 10 // Max number download retries before giving up. )
View Source
var (
MementoParseErr = errors.New("malformed input: memento parse failed")
)
View Source
var NoContentLocationErr = errors.New("missing 'content-lcation' header") // Returned when a malformed response is returned by archive.org.
Functions ¶
Types ¶
type Memento ¶
type Memento struct { URL string Rel string Type *string `json:,omitempty` From *time.Time `json:,omitempty` Time *time.Time `json:,omitempty` }
func ParseMemento ¶
ParseMemento parses a line containing a Memento entry.
type TimeMap ¶
func NewTimeMap ¶
func NewTimeMap() *TimeMap
func ParseTimeMap ¶
ParseTimeMap takes a reader and parses it as a complete TimeMap.
Click to show internal directories.
Click to hide internal directories.