resource

package
v0.6.5 Latest Latest
Warning

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

Go to latest
Published: Jan 24, 2024 License: GPL-3.0 Imports: 5 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
	// The page that was requested by the caller
	OriginalURL string         `json:",omitempty"`
	TTL         *time.Duration `json:"-"`
	// When the returned source was fetched
	FetchTime   *time.Time `json:",omitempty"`
	StatusCode  int        `json:",omitempty"`
	Error       error      `json:"-"`
	ContentText string     `json:",omitempty"`
	// The url that was requested by whatever locally was fetching: allows
	// for something downstream from OriginalURL to filter query params
	RequestedURL *nurl.URL `json:"-"`
	// 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

Jump to

Keyboard shortcuts

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