ccookies

package module
v0.4.7 Latest Latest
Warning

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

Go to latest
Published: Jan 7, 2024 License: MIT Imports: 10 Imported by: 0

README

ccookies

Package ccookies provides a quick way to decode Chrome browser cookies for use with Go's standard HTTP libraries.

Example

See _example/example.go for an example.

Documentation

Overview

Package ccookies provides a quick way to decode cookies from chromium based browsers.

Some functions cribbed from kooky.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Jar added in v0.4.0

func Jar(u *url.URL, cookies ...*http.Cookie) (http.CookieJar, error)

Jar builds a cookie jar for the url from provided cookies.

func Read

func Read(file, host string) ([]*http.Cookie, error)

Read reads the cookies from the provided sqlite3 file on disk.

func ReadContext added in v0.4.0

func ReadContext(ctx context.Context, file, host string) ([]*http.Cookie, error)

ReadContext reads the cookies from the provided sqlite3 file on disk.

func ReadJar added in v0.4.0

func ReadJar(file, urlstr string) (http.CookieJar, error)

ReadJar reads the cookies from the provided sqlite3 file for the provided url into a cookie jar usable with http.Client.

func ReadJarFiltered added in v0.4.0

func ReadJarFiltered(file, urlstr string, f func(*http.Cookie) bool) (http.CookieJar, error)

ReadJarFiltered reads the cookies from the provided sqlite3 file for the provided url into a cookie jar (usable with http.Client) consisting of of cookies passed through filter func f.

Types

This section is empty.

Directories

Path Synopsis
_example/example.go
_example/example.go
Package models contains generated code for schema 'Cookies'.
Package models contains generated code for schema 'Cookies'.

Jump to

Keyboard shortcuts

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