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

egress

package
v1.4.33 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrEgressBlocked = errors.New("model egress blocked")

Functions

This section is empty.

Types

type Guard

type Guard interface {
	Apply(context.Context, Request) (Result, error)
}

type Part

type Part struct {
	Kind PartKind
	Text string
}

type PartKind

type PartKind string
const (
	PartSystem     PartKind = "system"
	PartUser       PartKind = "user"
	PartAttachment PartKind = "attachment"
	PartHistory    PartKind = "history"
	PartSeed       PartKind = "seed"
	PartToolResult PartKind = "tool_result"
	PartToolArgs   PartKind = "tool_args"
	PartEmbedding  PartKind = "embedding"
	PartDecider    PartKind = "decider"
)

type RedactorGuard

type RedactorGuard struct {
	// contains filtered or unexported fields
}

func NewDefaultGuard

func NewDefaultGuard() *RedactorGuard

func NewRedactorGuard

func NewRedactorGuard(scrubber Scrubber) *RedactorGuard

func (*RedactorGuard) Apply

func (guard *RedactorGuard) Apply(ctx context.Context, request Request) (result Result, err error)

type Request

type Request struct {
	Org         string
	Destination string
	Parts       []Part
}

type Result

type Result struct {
	Parts      []Part
	Redactions int
}

func Apply

func Apply(ctx context.Context, guard Guard, request Request) (result Result, err error)

type Scrubber

type Scrubber interface {
	Scrub(string) string
}

Jump to

Keyboard shortcuts

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