mode

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2026 License: Apache-2.0 Imports: 2 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package mode names the configurations the gateway can play (flag --mode, variable EDIGATE_MODE). One binary plays every configuration of the benchmark with the same tool names, so a harness changes only the flag.

Input: the text of the flag. Output: a Mode and the answers to "which protection is on". Only the protections that the modes switch are asked here; the code of a protection that stays on does not look at the mode.

Index

Constants

This section is empty.

Variables

All lists the modes in the order of the protocol.

Functions

This section is empty.

Types

type Mode

type Mode string

Mode is one configuration of the gateway.

const (
	// Full is C3: every protection on.
	Full Mode = "full"
	// Plain is C0 (and C2 behind an agentgateway): tools with open arguments and synchronous
	// calls of the mocks, no protection of the gateway.
	Plain Mode = "plain"
	// ReqHash is C1: plain, plus a key of the tool and the arguments with a stored result.
	ReqHash Mode = "reqhash"
	// NoSanitize is C3-A1: full, but the partner text is shown and the effects take the raw values.
	NoSanitize Mode = "no-sanitize"
	// NoPolicy is C3-A2: full, but the policy allows every call.
	NoPolicy Mode = "no-policy"
	// NoBizKey is C3-A3: full, but the key is made of the raw arguments of the call.
	NoBizKey Mode = "no-bizkey"
	// NoContracts is C3-A4: full, but the effect tools take their values from the model.
	NoContracts Mode = "no-contracts"
)

func Parse

func Parse(s string) (Mode, error)

Parse reads the text of the flag. An empty text means Full; an unknown one is an error.

func (Mode) ModelValues

func (m Mode) ModelValues() bool

ModelValues reports whether the tools with an effect take their values from the arguments the model writes (the schemas of the open tools).

func (Mode) NoteTool

func (m Mode) NoteTool() bool

NoteTool reports whether edi.extract_note is registered.

func (Mode) Open

func (m Mode) Open() bool

Open reports whether the tools are the open tools of C0 and C1: no sanitizer, no taint label, no policy, no outbox, no sagas.

func (Mode) RawText

func (m Mode) RawText() bool

RawText reports whether edi.read_document shows the text of the partner as it is.

Jump to

Keyboard shortcuts

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