storage

package
v1.4.1 Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ContainsCookie

func ContainsCookie(cookies []*http.Cookie, name string) bool

ContainsCookie checks if a cookie name is represented in cookies

func GetUrlHash

func GetUrlHash(u string) uint64

func StringifyCookies

func StringifyCookies(cookies []*http.Cookie) string

StringifyCookies serializes list of http.Cookies to string

func UnstringifyCookies

func UnstringifyCookies(s string) []*http.Cookie

UnstringifyCookies deserializes a cookie string to http.Cookies

Types

type BetterInMemoryStorage

type BetterInMemoryStorage struct {
	// contains filtered or unexported fields
}

func (*BetterInMemoryStorage) ClearVisited

func (s *BetterInMemoryStorage) ClearVisited(requestID uint64) error

func (*BetterInMemoryStorage) Close

func (s *BetterInMemoryStorage) Close() error

Close implements Storage.Close()

func (*BetterInMemoryStorage) Cookies

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

Cookies implements Storage.Cookies()

func (*BetterInMemoryStorage) Init

func (s *BetterInMemoryStorage) Init() error

Init initializes InMemoryStorage

func (*BetterInMemoryStorage) IsVisited

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

IsVisited implements Storage.IsVisited()

func (*BetterInMemoryStorage) SetCookies

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

SetCookies implements Storage.SetCookies()

func (*BetterInMemoryStorage) Visited

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

Visited implements Storage.Visited()

Jump to

Keyboard shortcuts

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