data

package
v0.0.0-...-99b6106 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

Collect collects all the items in the given stream and returns an slice containing them.

ErrEnd is the error returned by a stream when there are no more items.

Map creates a stream that contains the result of transforming the objects of the given stream with a mapper. Note that the actual calls to the mapper will not happen when this function is called, they will happen only when the stream is eventually consumed.

Null is an empty stream of objects.

Pour creates a stream that contains the objects in the given slice.

Repeat creates a stream that repeats the same object multiple times.

Select creates a new stream that only contains the items of the source stream that return true for the given selector. Note that the actual calls to the select will not happen when this function is called, they will happen only when the stream is eventually consumed.

Functions

func GetArray

func GetArray(o Object, path string) (result []any, err error)

func GetString

func GetString(o Object, path string) (result string, err error)

func JQString

func JQString(o Object, source string) (result string, err error)

Types

type Array

type Array = []any

Array represents a list of objecs.

type Object

type Object = map[string]any

Object represents an object containing a list of fields, each with a name and a value.

func GetExtensions

func GetExtensions(input Object, extensions []string, jqTool *jq.Tool) (output Object, err error)

func GetLabelsMap

func GetLabelsMap(labels string) (labelsMap Object)

func GetObj

func GetObj(o Object, path string) (result Object, err error)

type Stream

type Stream = streaming.Stream[Object]

Stream is a stream of objects.

type StreamFunc

type StreamFunc = streaming.StreamFunc[Object]

StreamFunc creates an string using the given function.

Jump to

Keyboard shortcuts

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