resource

package
v0.7.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 16, 2024 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	DefaultTTL = 30 * 24 * time.Hour
)

Functions

func CleanURL

func CleanURL(url *nurl.URL) *nurl.URL

Types

type Feed

type Feed struct {
	gofeed.Feed
}
func (f Feed) ItemLinks() []string

type WebPage

type WebPage struct {
	trafilatura.Metadata
	OriginalURL  string         `json:"original_url,omitempty"` // The page that was requested by the caller
	RequestedURL *nurl.URL      `json:"-"`                      // The page that was actually fetched
	TTL          *time.Duration `json:"-"`
	FetchTime    *time.Time     `json:"fetch_time,omitempty"` // When the returned source was fetched
	StatusCode   int            `json:"status_code,omitempty"`
	Error        error          `json:"-"`
	ContentText  string         `json:"content_text,omitempty"`
	// contains filtered or unexported fields
}

func (*WebPage) AssertTimes added in v0.6.5

func (r *WebPage) AssertTimes()

func (WebPage) MarshalJSON

func (r WebPage) MarshalJSON() ([]byte, error)

func (WebPage) URL

func (r WebPage) URL() *nurl.URL

func (*WebPage) UnmarshalJSON added in v0.7.0

func (r *WebPage) UnmarshalJSON(b []byte) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL