cookiejar

package
v1.4.1 Latest Latest
Warning

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

Go to latest
Published: Oct 5, 2026 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package cookiejar merges the cookie stores of the files a run processed and writes them as a Netscape cookie file (--cookie-jar).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Format

func Format(forFile string, cookies []engine.Cookie, redact func(string) string) []byte

Format renders cookies (already in the jar's final order) as a Netscape cookie file, each line passed through redact (the CLI masks the run's secrets; the desktop keeps values). forFile is the last input file the run processed, named in the file's header comment.

func Write

func Write(root *sandbox.Root, name, forFile string, cookies []engine.Cookie, redact func(string) string) error

Write writes the Format of cookies to name inside root, atomically with permission 0600 (the desktop's jar).

Types

type Accumulator

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

Accumulator merges the end-of-run cookie stores of every file a run processed into one ordered list: a cookie's first appearance fixes its position, later files' values for the same domain/path/name replace it in place, matching a Netscape cookie jar's own semantics.

func (*Accumulator) Add

func (a *Accumulator) Add(cs []engine.Cookie, redact func(string) string)

Add merges cs, their values redacted with redact.

func (*Accumulator) Cookies

func (a *Accumulator) Cookies() []engine.Cookie

Cookies returns the merged cookies in order.

Jump to

Keyboard shortcuts

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