store

package
v0.129.0 Latest Latest
Warning

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

Go to latest
Published: Mar 17, 2025 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const (
	RootKeyVars           = "vars"
	RootKeySteps          = "steps"
	RootKeyParent         = "parent"
	RootKeyIncluded       = "included"
	RootKeyCurrent        = "current"
	RootKeyPrevious       = "previous"
	RootKeyEnv            = "env"
	RootKeyCookie         = "cookies"
	RootKeyNodes          = "nodes"
	RootKeyParams         = "params"
	RootKeyRunn           = "runn"
	RootKeyNeeds          = "needs"
	RootKeyLoopCountIndex = "i"
)
View Source
const (
	StepKeyOutcome = "outcome"
	FuncValue      = "[func]"
)
View Source
const (
	RunnKeyKV        = "kv"
	RunnKeyRunNIndex = "i"
	RunnKeyStdin     = "stdin"
)

`runn` is global store for runn.

Variables

Reserved store root keys.

Functions

func SetStdin

func SetStdin(f *os.File) error

SetStdin reads from stdin and sets the value to store.

Types

type Store

type Store struct {
	// contains filtered or unexported fields
}

func New

func New(vars, funcs map[string]any, secrets []string, stepKeys []string) *Store

func (*Store) ClearLoopIndex

func (s *Store) ClearLoopIndex()

func (*Store) ClearSteps

func (s *Store) ClearSteps()

func (*Store) Cookies

func (s *Store) Cookies() map[string]map[string]*http.Cookie

func (*Store) Funcs

func (s *Store) Funcs() map[string]any

func (*Store) KV

func (s *Store) KV() *kv.KV

func (*Store) Latest

func (s *Store) Latest() map[string]any

func (*Store) LoopIndex

func (s *Store) LoopIndex() *int

func (*Store) MaskRule

func (s *Store) MaskRule() *maskedio.Rule

func (*Store) Previous

func (s *Store) Previous() map[string]any

func (*Store) Record

func (s *Store) Record(idx int, v map[string]any)

func (*Store) RecordBindVar

func (s *Store) RecordBindVar(k string, v any, sm map[string]any) error

func (*Store) RecordCookie

func (s *Store) RecordCookie(cookies []*http.Cookie)

func (*Store) RecordTo

func (s *Store) RecordTo(idx int, key string, value any) error

func (*Store) RunNIndex

func (s *Store) RunNIndex() int

func (*Store) SetBindVar

func (s *Store) SetBindVar(k string, v any) error

func (*Store) SetKV

func (s *Store) SetKV(kv *kv.KV)

func (*Store) SetLoopIndex

func (s *Store) SetLoopIndex(i int)

func (*Store) SetMaskKeywords

func (s *Store) SetMaskKeywords(store map[string]any)

func (*Store) SetMaskRule

func (s *Store) SetMaskRule(mr *maskedio.Rule)

func (*Store) SetNeedsVar

func (s *Store) SetNeedsVar(k string, ns *Store)

func (*Store) SetParentVars

func (s *Store) SetParentVars(vars map[string]any)

func (*Store) SetRunNIndex

func (s *Store) SetRunNIndex(i int)

func (*Store) SetSecrets

func (s *Store) SetSecrets(secrets []string)

func (*Store) SetVar

func (s *Store) SetVar(k string, v any)

func (*Store) StepKeys

func (s *Store) StepKeys() []string

func (*Store) StepLen

func (s *Store) StepLen() int

func (*Store) ToMap

func (s *Store) ToMap() map[string]any

func (*Store) ToMapForDbg

func (s *Store) ToMapForDbg() map[string]any

ToMapForDbg - returns a map for dbg. toMap without s.funcs.

func (*Store) ToMapForIncludeRunner

func (s *Store) ToMapForIncludeRunner() map[string]any

ToMapForIncludeRunner - returns a map for include runner. toMap without s.parentVars s.needsVars and runn.* .

Jump to

Keyboard shortcuts

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