Help us shape the future of Go! Take the 2026 Go Developer Survey

readerprefs

package
v0.106.0 Latest Latest
Warning

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

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

Documentation

Overview

Package readerprefs carries shared app-scoped entity preferences. Preferences never grant access or weaken a domain's required, fixed or internal rules.

Index

Constants

View Source
const Default = "default"

Default follows the current domain while suppressing every legacy choice.

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(entity string) string

func Overrides

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

Overrides accepts only the current domain's public controls. Unknown or fixed entities are ignored, and account readers never consult this header.

func Stored added in v0.98.0

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

Stored reads a canonical shared choice first. For old per-kind data, hiding wins conflicting explicit choices; scoped defaults suppress the older global fallback. Reading never rewrites or discards the original account document.

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