readerprefs

package
v0.98.2 Latest Latest
Warning

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

Go to latest
Published: Oct 16, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package readerprefs carries guest preferences and the canonical kind/entity preference key. Preferences never grant access or weaken domain policy.

Index

Constants

View Source
const Default = "default"

Default prevents an old unscoped preference from returning after a reset.

View Source
const Header = "ContentKit-Reader-Preferences"
View Source
const Hide = "hide"
View Source
const Show = "show"

Variables

This section is empty.

Functions

func Key added in v0.98.0

func Key(kind, entity string) string

func Overrides

func Overrides(ctx context.Context, allowed map[string]map[string]bool) (map[string]string, error)

Overrides applies scoped choices and legacy fallback only to the current domain's permitted kind/entity pairs. Unknown and locked pairs are ignored.

func Stored added in v0.98.0

func Stored(values map[string]string, kind, entity string) (visible, overridden bool)

Stored reads an explicit scoped choice, then a legacy global choice. A scoped default marker intentionally suppresses the legacy fallback.

func WithHeader

func WithHeader(ctx context.Context, values []string) context.Context

Types

This section is empty.

Jump to

Keyboard shortcuts

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