chromedb

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Sep 14, 2023 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Overview

Package chromedb supports reading and modifying a Chrome cookies database.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cookie struct {
	cookies.C
	// contains filtered or unexported fields
}

A Cookie represents a single cookie from a Chrome database.

Values are automatically encrypted and decrypted if the store has an encryption key. If no decryption key is provided, encrypted values are represented by a Value with string "[ENCRYPTED]"; if an invalid decryption key is given, an error is reported.

func (*Cookie) Get

func (c *Cookie) Get() cookies.C

Get satisfies part of the cookies.Editor interface.

func (*Cookie) Set

func (c *Cookie) Set(o cookies.C) error

Set satisfies part of the cookies.Editor interface.

type Options

type Options struct {
	Passphrase string // the passphrase for encrypted values

	// The number of PBKDF2 iterations to use when converting the passphrase
	// into an encryption key. If ≤ 0, use a default based on runtime.GOOS.
	Iterations int
}

Options provide optional settings for opening a Chrome cookie database. A nil *Options is ready for use, and provides empty values.

type Store

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

A Store connects to a collection of cookies stored in an SQLite database using the Google Chrome cookie schema.

func Open

func Open(path string, opts *Options) (*Store, error)

Open opens the Chrome cookie database at the specified path.

func (*Store) Commit

func (s *Store) Commit() error

Commit satisfies part of the cookies.Store interface. In this implementation it is a no-op without error.

func (*Store) Scan

func (s *Store) Scan(f cookies.ScanFunc) error

Scan satisfies part of the cookies.Store interface.

Jump to

Keyboard shortcuts

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