attribution

package
v0.33.0-rc.3 Latest Latest
Warning

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

Go to latest
Published: Jun 12, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package attribution carries free-text caller attribution (who a request acts on behalf of) across panda's hops: CLI -> server -> proxy. Values are untrusted and audit-only — they must never influence authorization.

Index

Constants

View Source
const EnvVar = "PANDA_ON_BEHALF_OF"

EnvVar is the environment variable callers (e.g. chat agents acting for a human user) set per invocation to attribute their requests.

View Source
const Header = "X-Panda-On-Behalf-Of"

Header is the HTTP header that carries attribution between panda components.

Variables

This section is empty.

Functions

func FromContext

func FromContext(ctx context.Context) string

FromContext returns the attribution value carried by the context, or an empty string when none is set.

func WithValue

func WithValue(ctx context.Context, value string) context.Context

WithValue returns a context carrying the attribution value. Empty or whitespace-only values leave the context unchanged.

Types

This section is empty.

Jump to

Keyboard shortcuts

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