store

package
v1.11.2 Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2026 License: MIT Imports: 18 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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) Env added in v1.11.0

func (s *Store) Env() map[string]string

Env returns the snapshot of the process environment.

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) MergeCookies added in v1.9.0

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

MergeCookies merges cookies into s.cookies by domain and cookie name.

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) RefreshEnv added in v1.11.0

func (s *Store) RefreshEnv()

RefreshEnv takes a new snapshot of the process environment.

func (*Store) RunNIndex

func (s *Store) RunNIndex() int

func (*Store) SetBindVar

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

func (*Store) SetEnv added in v1.11.0

func (s *Store) SetEnv(env map[string]string)

SetEnv sets the snapshot of the process environment.

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