parsers

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: May 15, 2024 License: GPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetSessionCookieInfo

func GetSessionCookieInfo(site string) *cookieInfo

Returns the cookie info for the specified site

Will panic if the site does not match any of the cases

func NewCookieInfoArgs

func NewCookieInfoArgs(name string, sameSite http.SameSite) *cookieInfoArgs

func NewCookieInfoArgsByWebsite added in v1.1.0

func NewCookieInfoArgsByWebsite(website string) *cookieInfoArgs

func ParseJsonCookie

func ParseJsonCookie(cookieBytes []byte, cookieArgs *cookieInfoArgs) ([]*http.Cookie, error)

func ParseJsonCookieFile

func ParseJsonCookieFile(f *os.File, filePath string, cookieArgs *cookieInfoArgs) ([]*http.Cookie, error)

func ParseTxtCookie

func ParseTxtCookie(txtContent string, cookieArgs *cookieInfoArgs) ([]*http.Cookie, error)

func ParseTxtCookieFile

func ParseTxtCookieFile(f *os.File, filePath string, cookieArgs *cookieInfoArgs) ([]*http.Cookie, error)

Types

type ExportedCookies

type ExportedCookies []struct {
	Domain   string  `json:"domain"`
	Expire   float64 `json:"expirationDate"`
	HttpOnly bool    `json:"httpOnly"`
	Name     string  `json:"name"`
	Path     string  `json:"path"`
	Secure   bool    `json:"secure"`
	Value    string  `json:"value"`
	Session  bool    `json:"session"`
}

For the exported cookies in JSON instead of Netscape format

Jump to

Keyboard shortcuts

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