mandosvalueinterpreter

package
v0.4.5 Latest Latest
Warning

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

Go to latest
Published: Nov 6, 2020 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ValueInterpreter

type ValueInterpreter struct {
	FileResolver fr.FileResolver
}

ValueInterpreter provides context for computing Mandos values.

func (*ValueInterpreter) InterpretString

func (vi *ValueInterpreter) InterpretString(strRaw string) ([]byte, error)

InterpretString resolves a string to a byte slice according to the Mandos value format. Supported rules are: - numbers: decimal, hex, binary, signed/unsigned - fixed length numbers: "u32:5", "i8:-3", etc. - ascii strings as "str:...", "“...", "”..." - "true"/"false" - "address:..." - "file:..." - "keccak256:..." - concatenation using |

func (*ValueInterpreter) InterpretSubTree

func (vi *ValueInterpreter) InterpretSubTree(obj oj.OJsonObject) ([]byte, error)

InterpretSubTree attempts to produce a value based on a JSON subtree. Subtrees are composed of strings, lists and maps. The idea is to intuitively represent serialized objects. Lists are evaluated by concatenating their items' representations. Maps are evaluated by concatenating their values' representations (keys are ignored). See InterpretString on how strings are being interpreted.

Jump to

Keyboard shortcuts

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