data

package
v0.0.5 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const DummyKey = "BamBoozle"

Variables

This section is empty.

Functions

func DeleteBlockStoreEntry added in v0.0.3

func DeleteBlockStoreEntry(ctx context.Context, storeInstance store.Storer[BlockData], blockName string, rn *yaml.RNode) error

Delete the block

func GetBlockStoreEntry added in v0.0.3

func GetBlockStoreEntry(ctx context.Context, storeInstance store.Storer[BlockData], blockName string, rn *yaml.RNode) *yaml.RNode

func UpdateBlockStoreEntry added in v0.0.3

func UpdateBlockStoreEntry(ctx context.Context, storeInstance store.Storer[BlockData], blockName string, rn *yaml.RNode, 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

func UpdateVarStore added in v0.0.3

func UpdateVarStore(ctx context.Context, varStore store.Storer[VarData], 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

Types

type BlockData

type BlockData []*yaml.RNode

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

func (BlockData) Add

func (r BlockData) Add(data *yaml.RNode) BlockData

func (BlockData) Delete added in v0.0.3

func (r BlockData) Delete(rnode *yaml.RNode) (BlockData, error)

Insert inserts data in the blockdata if you know the position

func (BlockData) Get added in v0.0.3

func (r BlockData) Get() []*yaml.RNode

func (BlockData) GetItem added in v0.0.3

func (r BlockData) GetItem(rnode *yaml.RNode) *yaml.RNode

func (BlockData) GetVarData added in v0.0.3

func (r BlockData) GetVarData() (VarData, error)

func (BlockData) Insert

func (r BlockData) Insert(total, pos int, rn *yaml.RNode) (BlockData, error)

Insert inserts data in the blockdata if you know the position

func (BlockData) Len added in v0.0.3

func (r BlockData) Len() int

type VarData added in v0.0.3

type VarData map[string][]any

VarData contains the data of the heap or variable stack For blockType package/module/mixin 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

func (VarData) Insert added in v0.0.3

func (r VarData) Insert(key string, total, pos int, data any) error

Jump to

Keyboard shortcuts

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