data

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Jan 19, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const DummyKey = "BamBoozle"

Variables

This section is empty.

Functions

This section is empty.

Types

type BlockData

type BlockData struct {
	// Data contains the data of the block.
	// For blockType package output we can have multiple key entries, so we store them using a key in the map
	// For all other blockTypes we use a dummy key
	Data map[string][]any
}

BlockData contains the data of a block -> can be pre-processed or post-processed

func NewBlockData

func NewBlockData() *BlockData

func (*BlockData) Add

func (r *BlockData) Add(key string, data any)

func (*BlockData) Insert

func (r *BlockData) Insert(key string, total, pos int, data any)

Insert inserts data in the blockdata if you know the position

type DataStore

type DataStore struct {
	store.Storer[*BlockData]
}

func (DataStore) ListKeys

func (r DataStore) ListKeys(ctx context.Context) []string

func (*DataStore) UpdateData

func (r *DataStore) UpdateData(ctx context.Context, blockName string, data any, localVars map[string]any) error

Updates the results in the store; for loop vars it uses the index of the loop var to store the result since we store the results of a given blockName in a slice []any

Jump to

Keyboard shortcuts

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