cookieaux

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: May 3, 2026 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

Package cookieaux holds provider-facing helpers for the browser fetch-proxy path. It's a thin layer over internal/cookies so cookie-gated providers (Claude extras, Cursor, Ollama) share consistent error messages without each one importing the low-level package.

Providers typically do:

ctx, cancel := context.WithTimeout(context.Background(), 20*time.Second)
defer cancel()
if !cookies.HostAvailable(ctx) {
    return snapshot_with_missing_message
}
err := cookies.FetchJSON(ctx, url, nil, &out)
// inspect err for *httputil.Error to distinguish stale auth

cookieaux.MissingMessage / StaleMessage give both places a single source of truth for the user-facing strings.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MissingMessage

func MissingMessage(providerLabel string) string

MissingMessage returns the Snapshot.Error text when the extension isn't connected. providerLabel is the site the user would sign in to (e.g. "cursor.com").

func StaleMessage

func StaleMessage(providerLabel string) string

StaleMessage returns the Snapshot.Error text when a request came back 401/403 — almost always "you're signed out of the provider in Chrome."

Types

This section is empty.

Jump to

Keyboard shortcuts

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