mongo

package
v0.0.0-...-6dadfb4 Latest Latest
Warning

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

Go to latest
Published: May 28, 2022 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Storage

type Storage struct {
	Database          string
	URI               string
	VisitedCollection string "colly_visited"
	CookiesCollection string "colly_cookies"
	PagesCollection   string "colly_pages"
	// contains filtered or unexported fields
}

Storage implements a MongoDB storage backend for colly

func (*Storage) Cookies

func (s *Storage) Cookies(u *url.URL) string

Cookies implements colly/storage.Cookies()

func (*Storage) Init

func (s *Storage) Init() error

Init initializes the MongoDB storage

func (*Storage) IsVisited

func (s *Storage) IsVisited(requestID uint64) (bool, error)

IsVisited implements colly/storage.IsVisited()

func (*Storage) SavePage

func (s *Storage) SavePage(requestID uint64, u *url.URL, body []byte)

SavePage not part of colly

func (*Storage) SetCookies

func (s *Storage) SetCookies(u *url.URL, cookies string)

SetCookies implements colly/storage.SetCookies()

func (*Storage) Visited

func (s *Storage) Visited(requestID uint64) error

Visited implements colly/storage.Visited()

Jump to

Keyboard shortcuts

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