parsers

package
v0.4.4 Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Parsers = map[string]func(io.Reader) (sdktypes.Value, error){
		"txt":         ParseText,
		"json":        ParseJSON,
		"yaml":        ParseYAML,
		"kitteh.yaml": ParseRawYAML,
		"kitteh.json": ParseRawJSON,
		"csv":         ParseCSV,
		"b64":         ParseBase64,
		"hex":         ParseHex,
		"xml":         ParseXML,
		"txtar":       ParseTxTar,
	}

	Extensions              = maps.Keys(Parsers)
	ExtensionsWithDotPrefix = kittehs.Transform(Extensions, func(s string) string { return "." + s })
)

Functions

func ParseBase64

func ParseBase64(r io.Reader) (sdktypes.Value, error)

func ParseCSV

func ParseCSV(r io.Reader) (sdktypes.Value, error)

func ParseHex

func ParseHex(r io.Reader) (sdktypes.Value, error)

func ParseJSON

func ParseJSON(r io.Reader) (sdktypes.Value, error)

func ParseRawJSON

func ParseRawJSON(r io.Reader) (sdktypes.Value, error)

func ParseRawYAML

func ParseRawYAML(r io.Reader) (sdktypes.Value, error)

func ParseText

func ParseText(r io.Reader) (sdktypes.Value, error)

func ParseTxTar

func ParseTxTar(r io.Reader) (sdktypes.Value, error)

func ParseXML

func ParseXML(r io.Reader) (sdktypes.Value, error)

func ParseYAML

func ParseYAML(r io.Reader) (sdktypes.Value, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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