cookies

package
v0.2.3 Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2024 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ReadCookiesClose added in v0.2.3

func ReadCookiesClose(store CookieStore, filters ...kooky.Filter) kooky.CookieSeq

func SingleRead added in v0.2.3

func SingleRead(jarCr JarCreator, filename string, filters ...kooky.Filter) kooky.CookieSeq

Types

type CookieJar

type CookieJar struct {
	*cookiejar.Jar

	CookieStore
	// contains filtered or unexported fields
}

func NewCookieJar added in v0.2.3

func NewCookieJar(st CookieStore, filters ...kooky.Filter) *CookieJar

func (*CookieJar) Cookies

func (s *CookieJar) Cookies(u *url.URL) []*http.Cookie

func (*CookieJar) InitJar

func (s *CookieJar) InitJar() error

func (*CookieJar) SubJar

func (s *CookieJar) SubJar(ctx context.Context, filters ...kooky.Filter) (http.CookieJar, error)

type CookieStore

type CookieStore interface {
	TraverseCookies(...kooky.Filter) kooky.CookieSeq
	Browser() string
	Profile() string
	IsDefaultProfile() bool
	FilePath() string
	Close() error
}

kooky.CookieStore without http.CookieJar and SubJar()

type DefaultCookieStore

type DefaultCookieStore struct {
	FileNameStr          string
	File                 *os.File
	BrowserStr           string
	ProfileStr           string
	OSStr                string
	IsDefaultProfileBool bool
}

DefaultCookieStore implements most of the kooky.CookieStore interface except for the TraverseCookies method func (s *DefaultCookieStore) TraverseCookies(filters ...kooky.Filter) kooky.CookieSeq

DefaultCookieStore also provides an Open() method

func (*DefaultCookieStore) Browser

func (s *DefaultCookieStore) Browser() string

func (*DefaultCookieStore) Close

func (s *DefaultCookieStore) Close() error

func (*DefaultCookieStore) FilePath

func (s *DefaultCookieStore) FilePath() string

func (*DefaultCookieStore) IsDefaultProfile

func (s *DefaultCookieStore) IsDefaultProfile() bool

func (*DefaultCookieStore) Open

func (s *DefaultCookieStore) Open() error

func (*DefaultCookieStore) Profile

func (s *DefaultCookieStore) Profile() string

type JarCreator added in v0.2.3

type JarCreator func(filename string, filters ...kooky.Filter) (*CookieJar, error)

Jump to

Keyboard shortcuts

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