invocationstate

package
v0.4.18 Latest Latest
Warning

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

Go to latest
Published: Sep 16, 2026 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Overview

Package invocationstate owns the private context key shared by the SDK's authenticated transport consumers and the public read-only invocation API.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Proof

func Proof(ctx context.Context) []byte

Proof returns an owned copy of the authenticated canonical invocation bytes. It is internal so a module cannot attach provenance from another request.

func Value

func Value(ctx context.Context) any

Value returns the value stored under the SDK-private invocation key.

func With

func With(ctx context.Context, value any) context.Context

With stores value under an SDK-private key. The internal package boundary is intentional: module code may read the platform-authored invocation through invocation.FromContext, but cannot install a forged one.

func WithBinding

func WithBinding(ctx context.Context, binding Binding) context.Context

WithBinding stores the running module identity before authentication.

func WithProof

func WithProof(ctx context.Context, value any, proof []byte) context.Context

WithProof stores value together with the exact canonical invocation bytes authenticated by the transport. The proof stays behind the internal package boundary: module code may read the typed projection, but cannot read, replace, or forward the platform signature itself.

Types

type Binding

type Binding struct {
	ModuleID   string
	ModuleSlug string
}

Binding is the module identity that authenticated middleware must match. It is internal so modules cannot weaken or replace the binding selected by core.Module construction.

func BindingFrom

func BindingFrom(ctx context.Context) (Binding, bool)

BindingFrom returns the running module identity, when core installed one.

Jump to

Keyboard shortcuts

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