Documentation
¶
Index ¶
- Constants
- Variables
- func AddModuleTreeToResourceGraph(m *Module, g *ResourceGraph, ctx *Context, ignoreBadImports bool) error
- func AddValidPathPrefix(s string) (string, error)
- func AppendTrailingSlashIfNotPresent[S ~string](s S) S
- func AreDefaultMaxRequestHandlerLimitsSet() bool
- func AreDefaultRequestHandlingLimitsSet() bool
- func AreDefaultScriptLimitsSet() bool
- func ChildLoggerForSource(logger zerolog.Logger, src string) zerolog.Logger
- func CombineParsingErrorValues(errs []Error, positions []parse.SourcePositionRange) error
- func ComputeProgramRiskScore(mod *Module, manifest *Manifest) (totalScore RiskScore, requiredPerms []Permission)
- func DeallocAll(h *ModuleHeap)
- func DoIO[T any](ctx *Context, fn func() T) T
- func DoIO2[T any](ctx *Context, fn func() (T, error)) (T, error)
- func FileStat(f billy.File, fls billy.Basic) (os.FileInfo, error)
- func FindGroupMatchesForRegex(ctx *Context, regexp *regexp.Regexp, s string, config GroupMatchesFindConfig) (groups [][]string, err error)
- func FmtErrInvalidArgument(v Value) error
- func FmtErrInvalidArgumentAtPos(v Value, pos int) error
- func FmtPropOfArgXShouldBeOfTypeY(propName string, argName string, typename string, value Value) error
- func FmtUnexpectedElementAtIndexOfArgShowVal(element Value, keyIndex int, argName string) error
- func FmtUnexpectedElementInPropIterableShowVal(element Value, propertyName string) error
- func FmtUnexpectedValueAtKeyofArgShowVal(val Value, key string, argName string) error
- func ForEachValueInIterable(ctx *Context, iterable Iterable, fn func(Value) error) error
- func FormatErrPropertyDoesNotExist(name string, v Value) error
- func FormatIndexableShouldHaveLen(length int) string
- func FormatInstructions(ctx *Context, b []byte, posOffset int, leftPadding string, constants []Value) []string
- func FormatRuntimeTypeCheckFailed(pattern Pattern, ctx *Context) error
- func GetColorizedChunk(chunk *parse.Chunk, code []rune, lightMode bool, fgColorSequence []byte) string
- func GetConcreteGoFuncFromSymbolic(fn *symbolic.GoFunction) (reflect.Value, bool)
- func GetFullColorSequence(color termenv.Color, bg bool) []byte
- func GetJSONRepresentation(v Serializable, ctx *Context, pattern Pattern) string
- func GetJSONRepresentationWithConfig(v Serializable, ctx *Context, config JSONSerializationConfig) (string, error)
- func GetPathPatternSensitivityMultiplier(patt PathPattern) int
- func GetPathSensitivityMultiplier(pth Path) int
- func GetStringifiedSymbolicValue(ctx *Context, v Value, wide bool) (string, error)
- func GetWalkEntries(fls afs.Filesystem, walkedDirPath Path) (entries [][]fs.DirEntry, paths [][]string)
- func HasIntegralRepresentation(q Quantity) bool
- func HeapAddressUintptr(addr HeapAddress) uintptr
- func InspectPrint[T any](w *bufio.Writer, v T)
- func IsAtomSensitive(v Value) bool
- func IsIndexKey(key string) bool
- func IsSensitiveProperty(ctx *Context, name string, value Value) bool
- func IsSharable(v Value, originState *GlobalState) (bool, string)
- func IsSharableOrClonable(v Value, originState *GlobalState) (bool, string)
- func IsShared(v Value) bool
- func IsSimpleInoxVal(v Value) bool
- func IsSimpleInoxValOrOption(v Value) bool
- func IsStaticallyCheckDBFunctionRegistered(scheme Scheme) bool
- func IsSymbolicEquivalentOfGoFunctionRegistered(fn any) bool
- func IterateAll(ctx *Context, it Iterator) [][2]Value
- func MakeInstruction(opcode Opcode, operands ...int) []byte
- func MapInstructions(b []byte, constants []Value, callbackFn InstructionCallbackFn) ([]byte, error)
- func MinMaxOf(ctx *Context, first Value, others ...Value) (Value, Value)
- func MustGetJSONRepresentationWithConfig(v Serializable, ctx *Context, config JSONSerializationConfig) string
- func NewCompiler(mod *Module, globals map[string]Value, symbolicData *symbolic.Data, ...) *compiler
- func NewStoppedWatcher(config WatcherConfiguration) stoppedWatcher
- func NoPatternOrAny(p Pattern) bool
- func ParseFileChunk(absoluteSourcePath string, fls afs.Filesystem) (*parse.ParsedChunkSource, error)
- func ParseLocalIncludedFiles(mod *Module, ctx *Context, fls afs.Filesystem, ...) (unrecoverableError error)
- func ParseOrValidateResourceContent(ctx *Context, resourceContent []byte, ctype Mimetype, ...) (res Value, contentType Mimetype, err error)
- func PrepareExtractionModeIncludableChunkfile(args IncludableChunkfilePreparationArgs) (state *GlobalState, _ *Module, _ *IncludedChunk, finalErr error)
- func PrepareLocalModule(args ModulePreparationArgs) (state *GlobalState, mod *Module, manif *Manifest, finalErr error)
- func PrettyPrint(v Value, w io.Writer, config *PrettyPrintConfig, depth, parentIndentCount int) (err error)
- func PrettyPrintList(list underlyingList, w *bufio.Writer, config *PrettyPrintConfig, depth int, ...)
- func PrintColorizedChunk(w io.Writer, chunk *parse.Chunk, code []rune, lightMode bool, ...)
- func PrintType[T any](w *bufio.Writer, v T)
- func Publish(ctx *Context, publisher Value, data Value) error
- func ReadFileInFS(fls billy.Basic, name string, maxSize int32) ([]byte, error)
- func ReadOperands(numOperands []int, instruction []byte) (operands []int, offset int)
- func RegisterAddressLessType(typ reflect.Type)
- func RegisterDefaultPattern(s string, m Pattern)
- func RegisterDefaultPatternNamespace(s string, ns *PatternNamespace)
- func RegisterEventSourceFactory(scheme Scheme, factory EventSourceFactory)
- func RegisterLimit(name string, kind LimitKind, minimumLimit int64)
- func RegisterLoadFreeEntityFn(patternType reflect.Type, fn LoadSelfManagedEntityFn)
- func RegisterOpenDbFn(scheme Scheme, fn OpenDBFn)
- func RegisterParser(mime Mimetype, p StatelessParser)
- func RegisterPatternDeserializer(patternTypePattern *TypePattern, deserializer PatternDeserializer)
- func RegisterPermissionTypesInGob()
- func RegisterRenderer(t reflect.Type, fn RenderingFn)
- func RegisterSimpleValueTypesInGob()
- func RegisterStaticallyCheckDbResolutionDataFn(scheme Scheme, fn StaticallyCheckDbResolutionDataFn)
- func RegisterStaticallyCheckHostDefinitionFn(scheme Scheme, fn StaticallyCheckHostDefinitionFn)
- func RegisterSymbolicGoFunction(fn any, symbolicFn any)
- func RegisterSymbolicGoFunctions(entries []any)
- func Render(ctx *Context, w io.Writer, renderable Renderable, config RenderingInput) (int, error)
- func Same(a, b Value) bool
- func SamePointer(a, b interface{}) bool
- func SendVal(ctx *Context, value Value, r MessageReceiver, sender Value) error
- func SetDefaultMaxRequestHandlerLimits(limits []Limit)
- func SetDefaultRequestHandlingLimits(limits []Limit)
- func SetDefaultScriptLimits(limits []Limit)
- func SetInitialWorkingDir(getWd func() (string, error))
- func SetNewDefaultContext(fn NewDefaultContextFn)
- func SetNewDefaultGlobalStateFn(fn NewDefaultGlobalStateFn)
- func Share[T PotentiallySharable](v T, originState *GlobalState) T
- func Sleep(ctx *Context, d Duration)
- func Stringify(v Value, ctx *Context) string
- func StringifyWithConfig(v Value, config *PrettyPrintConfig) string
- func Subscribe(ctx *Context, subscriber Subscriber, publisher Value, filter Pattern) error
- func ToJSONVal(ctx *Context, v Serializable) interface{}
- func ToSerializableValueMap(valMap map[string]Value) map[string]Serializable
- func ToSymbolicValue(ctx *Context, v Value, wide bool) (symbolic.Value, error)
- func Traverse(v Value, fn traverseVisitFn, config TraversalConfiguration) (terror error)
- func UnsetDefaultMaxRequestHandlerLimits()
- func UnsetDefaultRequestHandlingLimits()
- func UnsetDefaultScriptLimits()
- func UnsetNewDefaultContext()
- func UnsetNewDefaultGlobalStateFn()
- func WalkDir(fls afs.Filesystem, walkedDirPath Path, ...)
- func WalkDirLow(fls afs.Filesystem, root string, fn fs.WalkDirFunc) error
- func WithSecondaryContextIfPossible[T any](ctx *Context, arg T) T
- func WithoutSecondaryContextIfPossible[T any](arg T) T
- func WriteConcatenatedRepresentations(ctx *Context, values ...Serializable) ([]byte, [6]int32, error)
- func WriteSingleJSONRepresentation(ctx *Context, v Serializable) ([]byte, [6]int32, error)
- func WriteUntypedValueJSON(typeName string, fn func(w *jsoniter.Stream) error, w *jsoniter.Stream) error
- type API
- type AddressableContent
- type ApiIL
- func (api *ApiIL) Equal(ctx *Context, other Value, alreadyCompared map[uintptr]uintptr, depth int) bool
- func (api *ApiIL) GetGoMethod(name string) (*GoFunction, bool)
- func (*ApiIL) IsMutable() bool
- func (api *ApiIL) PrettyPrint(w *bufio.Writer, config *PrettyPrintConfig, depth int, parentIndentCount int)
- func (api *ApiIL) Prop(ctx *Context, name string) Value
- func (api *ApiIL) PropertyNames(ctx *Context) []string
- func (*ApiIL) SetProp(ctx *Context, name string, value Value) error
- func (api *ApiIL) ToSymbolicValue(ctx *Context, encountered map[uintptr]symbolic.Value) (symbolic.Value, error)
- type Array
- func (a *Array) At(ctx *Context, i int) Value
- func (a *Array) Clone(originState *GlobalState, sharableValues *[]PotentiallySharable, ...) (Value, error)
- func (a *Array) Equal(ctx *Context, other Value, alreadyCompared map[uintptr]uintptr, depth int) bool
- func (*Array) IsMutable() bool
- func (a *Array) Iterator(ctx *Context, config IteratorConfiguration) Iterator
- func (a *Array) Len() int
- func (a *Array) PrettyPrint(w *bufio.Writer, config *PrettyPrintConfig, depth int, parentIndentCount int)
- func (*Array) ToSymbolicValue(ctx *Context, encountered map[uintptr]symbolic.Value) (symbolic.Value, error)
- type ArrayIterator
- func (it *ArrayIterator) Equal(ctx *Context, other Value, alreadyCompared map[uintptr]uintptr, depth int) bool
- func (it ArrayIterator) HasNext(*Context) bool
- func (it *ArrayIterator) IsMutable() bool
- func (it *ArrayIterator) Key(ctx *Context) Value
- func (it *ArrayIterator) Next(ctx *Context) bool
- func (it *ArrayIterator) PrettyPrint(w *bufio.Writer, config *PrettyPrintConfig, depth int, parentIndentCount int)
- func (it *ArrayIterator) ToSymbolicValue(ctx *Context, encountered map[uintptr]symbolic.Value) (symbolic.Value, error)
- func (it *ArrayIterator) Value(*Context) Value
- type ArrayPool
- func (p *ArrayPool[T]) AvailableArrayCount() int
- func (p *ArrayPool[T]) GetArray() ([]T, error)
- func (p *ArrayPool[T]) InUseArrayCount() int
- func (p *ArrayPool[T]) IsEmpty() bool
- func (p *ArrayPool[T]) IsFull() bool
- func (p *ArrayPool[T]) ReleaseArray(s []T) error
- func (p *ArrayPool[T]) TotalArrayCount() int
- type AssertionData
- type AssertionError
- func (err AssertionError) Error() string
- func (err AssertionError) IsTestAssertion() bool
- func (err AssertionError) PrettyPrint(w *bufio.Writer, config *PrettyPrintConfig)
- func (err AssertionError) PrettySPrint(config *PrettyPrintConfig) string
- func (err *AssertionError) ShallowCopy() *AssertionError
- type AstNode
- func (n AstNode) Chunk() *parse.ParsedChunkSource
- func (n AstNode) Equal(ctx *Context, other Value, alreadyCompared map[uintptr]uintptr, depth int) bool
- func (n AstNode) IsMutable() bool
- func (node AstNode) IsRecursivelyRenderable(ctx *Context, input RenderingInput) bool
- func (n AstNode) PrettyPrint(w *bufio.Writer, config *PrettyPrintConfig, depth int, parentIndentCount int)
- func (n AstNode) Prop(ctx *Context, name string) Value
- func (AstNode) PropertyNames(ctx *Context) []string
- func (node AstNode) Render(ctx *Context, w io.Writer, config RenderingInput) (n int, finalErr error)
- func (AstNode) SetProp(ctx *Context, name string, value Value) error
- func (n AstNode) ToSymbolicValue(ctx *Context, encountered map[uintptr]symbolic.Value) (symbolic.Value, error)
- func (n AstNode) WriteJSONRepresentation(ctx *Context, w *jsoniter.Stream, config JSONSerializationConfig, depth int) error
- type AutoInvocationConfig
- type BasePermissionRiskScore
- type BitSetIterator
- func (it *BitSetIterator) Equal(ctx *Context, other Value, alreadyCompared map[uintptr]uintptr, depth int) bool
- func (it BitSetIterator) HasNext(*Context) bool
- func (it *BitSetIterator) IsMutable() bool
- func (it *BitSetIterator) Key(ctx *Context) Value
- func (it *BitSetIterator) Next(ctx *Context) bool
- func (it *BitSetIterator) PrettyPrint(w *bufio.Writer, config *PrettyPrintConfig, depth int, parentIndentCount int)
- func (it *BitSetIterator) ToSymbolicValue(ctx *Context, encountered map[uintptr]symbolic.Value) (symbolic.Value, error)
- func (it *BitSetIterator) Value(*Context) Value
- type Bool
- func (boolean Bool) Equal(ctx *Context, other Value, alreadyCompared map[uintptr]uintptr, depth int) bool
- func (boolean Bool) IsMutable() bool
- func (b Bool) IsRecursivelyRenderable(ctx *Context, input RenderingInput) bool
- func (boolean Bool) PrettyPrint(w *bufio.Writer, config *PrettyPrintConfig, depth int, parentIndentCount int)
- func (b Bool) Render(ctx *Context, w io.Writer, config RenderingInput) (int, error)
- func (b Bool) ToSymbolicValue(ctx *Context, encountered map[uintptr]symbolic.Value) (symbolic.Value, error)
- func (b Bool) WriteJSONRepresentation(ctx *Context, w *jsoniter.Stream, config JSONSerializationConfig, depth int) error
- type BoolList
- func (list *BoolList) At(ctx *Context, i int) Value
- func (list *BoolList) BoolAt(i int) bool
- func (list *BoolList) Clone(originState *GlobalState, sharableValues *[]PotentiallySharable, ...) (Serializable, error)
- func (list *BoolList) ConstraintId() ConstraintId
- func (list *BoolList) ContainsSimple(ctx *Context, v Serializable) bool
- func (list *BoolList) Equal(ctx *Context, other Value, alreadyCompared map[uintptr]uintptr, depth int) bool
- func (list *BoolList) IsMutable() bool
- func (list *BoolList) Iterator(ctx *Context, config IteratorConfiguration) Iterator
- func (list *BoolList) Len() int
- func (list *BoolList) PrettyPrint(w *bufio.Writer, config *PrettyPrintConfig, depth int, parentIndentCount int)
- func (list *BoolList) SetSlice(ctx *Context, start, end int, seq Sequence)
- func (l *BoolList) ToSymbolicValue(ctx *Context, encountered map[uintptr]symbolic.Value) (symbolic.Value, error)
- func (list *BoolList) WriteJSONRepresentation(ctx *Context, w *jsoniter.Stream, config JSONSerializationConfig, depth int) error
- type BooleanCoercible
- type BoundChildContextOptions
- type BreakpointInfo
- type BuiltinType
- type Byte
- func (b Byte) Compare(other Value) (result int, comparable bool)
- func (b Byte) Equal(ctx *Context, other Value, alreadyCompared map[uintptr]uintptr, depth int) bool
- func (b Byte) Int64() int64
- func (b Byte) IsMutable() bool
- func (b Byte) IsSigned() bool
- func (b Byte) PrettyPrint(w *bufio.Writer, config *PrettyPrintConfig, depth int, parentIndentCount int)
- func (b Byte) ToSymbolicValue(ctx *Context, encountered map[uintptr]symbolic.Value) (symbolic.Value, error)
- func (b Byte) WriteJSONRepresentation(ctx *Context, w *jsoniter.Stream, config JSONSerializationConfig, depth int) error
- type ByteCount
- func (c ByteCount) AsFloat64() (float64, bool)
- func (c ByteCount) AsInt64() (int64, bool)
- func (c ByteCount) Compare(other Value) (result int, comparable bool)
- func (count ByteCount) Equal(ctx *Context, other Value, alreadyCompared map[uintptr]uintptr, depth int) bool
- func (c ByteCount) Int64() int64
- func (count ByteCount) IsMutable() bool
- func (c ByteCount) IsSigned() bool
- func (c ByteCount) IsZeroQuantity() bool
- func (count ByteCount) PrettyPrint(w *bufio.Writer, config *PrettyPrintConfig, depth int, parentIndentCount int)
- func (c ByteCount) ToSymbolicValue(ctx *Context, encountered map[uintptr]symbolic.Value) (symbolic.Value, error)
- func (count ByteCount) Write(w io.Writer, _3digitGroupCount int) (int, error)
- func (count ByteCount) WriteJSONRepresentation(ctx *Context, w *jsoniter.Stream, config JSONSerializationConfig, depth int) error
- type ByteRate
- func (r ByteRate) Compare(other Value) (result int, comparable bool)
- func (rate ByteRate) Equal(ctx *Context, other Value, alreadyCompared map[uintptr]uintptr, depth int) bool
- func (rate ByteRate) IsMutable() bool
- func (r ByteRate) IsZeroRate() bool
- func (rate ByteRate) PrettyPrint(w *bufio.Writer, config *PrettyPrintConfig, depth int, parentIndentCount int)
- func (r ByteRate) QuantityPerSecond() Value
- func (r ByteRate) ToSymbolicValue(ctx *Context, encountered map[uintptr]symbolic.Value) (symbolic.Value, error)
- func (r ByteRate) Validate() error
- func (rate ByteRate) WriteJSONRepresentation(ctx *Context, w *jsoniter.Stream, config JSONSerializationConfig, depth int) error
- type ByteSlice
- func (slice *ByteSlice) At(ctx *Context, i int) Value
- func (slice *ByteSlice) Clone(originState *GlobalState, sharableValues *[]PotentiallySharable, ...) (Serializable, error)
- func (slice *ByteSlice) ContentType() Mimetype
- func (slice *ByteSlice) Equal(ctx *Context, other Value, alreadyCompared map[uintptr]uintptr, depth int) bool
- func (slice *ByteSlice) GetOrBuildBytes() *ByteSlice
- func (slice *ByteSlice) IsMutable() bool
- func (s *ByteSlice) Iterator(ctx *Context, config IteratorConfiguration) Iterator
- func (slice *ByteSlice) Len() int
- func (slice *ByteSlice) Mutable() bool
- func (s *ByteSlice) OnMutation(ctx *Context, microtask MutationCallbackMicrotask, ...) (CallbackHandle, error)
- func (slice *ByteSlice) PrettyPrint(w *bufio.Writer, config *PrettyPrintConfig, depth int, parentIndentCount int)
- func (slice *ByteSlice) Reader() *Reader
- func (s *ByteSlice) RemoveMutationCallback(ctx *Context, handle CallbackHandle)
- func (s *ByteSlice) RemoveMutationCallbackMicrotasks(ctx *Context)
- func (slice *ByteSlice) SetSlice(ctx *Context, start, end int, seq Sequence)
- func (s *ByteSlice) ToSymbolicValue(ctx *Context, encountered map[uintptr]symbolic.Value) (symbolic.Value, error)
- func (slice *ByteSlice) UnderlyingBytes() []byte
- func (slice *ByteSlice) UnsafeBytesAsString() string
- func (s *ByteSlice) Watcher(ctx *Context, config WatcherConfiguration) Watcher
- func (slice *ByteSlice) WriteJSONRepresentation(ctx *Context, w *jsoniter.Stream, config JSONSerializationConfig, depth int) error
- type Bytecode
- func (b *Bytecode) Constants() []Value
- func (b *Bytecode) Equal(ctx *Context, other Value, alreadyCompared map[uintptr]uintptr, depth int) bool
- func (b *Bytecode) Format(ctx *Context, leftPadding string) string
- func (b *Bytecode) FormatConstants(ctx *Context, leftPadding string) (output []string)
- func (b *Bytecode) FormatInstructions(ctx *Context, leftPadding string) []string
- func (b *Bytecode) IsMutable() bool
- func (b *Bytecode) PrettyPrint(w *bufio.Writer, config *PrettyPrintConfig, depth int, parentIndentCount int)
- func (b *Bytecode) ToSymbolicValue(ctx *Context, encountered map[uintptr]symbolic.Value) (symbolic.Value, error)
- func (b *Bytecode) WriteJSONRepresentation(ctx *Context, w *jsoniter.Stream, config JSONSerializationConfig, depth int) error
- type BytecodeEvaluationConfig
- type BytesConcatenation
- func (c *BytesConcatenation) At(ctx *Context, i int) Value
- func (c *BytesConcatenation) Clone(originState *GlobalState, sharableValues *[]PotentiallySharable, ...) (Serializable, error)
- func (c *BytesConcatenation) Equal(ctx *Context, other Value, alreadyCompared map[uintptr]uintptr, depth int) bool
- func (c *BytesConcatenation) GetOrBuildBytes() *ByteSlice
- func (c *BytesConcatenation) IsMutable() bool
- func (c *BytesConcatenation) Iterator(ctx *Context, config IteratorConfiguration) Iterator
- func (c *BytesConcatenation) Len() int
- func (c *BytesConcatenation) Mutable() bool
- func (c *BytesConcatenation) PrettyPrint(w *bufio.Writer, config *PrettyPrintConfig, depth int, parentIndentCount int)
- func (c *BytesConcatenation) SetSlice(ctx *Context, start, end int, seq Sequence)
- func (c *BytesConcatenation) ToSymbolicValue(ctx *Context, encountered map[uintptr]symbolic.Value) (symbolic.Value, error)
- func (c *BytesConcatenation) WriteJSONRepresentation(ctx *Context, w *jsoniter.Stream, config JSONSerializationConfig, depth int) error
- type BytesLike
- type CallbackHandle
- type Change
- type CheckedString
- func (str CheckedString) Equal(ctx *Context, other Value, alreadyCompared map[uintptr]uintptr, depth int) bool
- func (str CheckedString) IsMutable() bool
- func (str CheckedString) PrettyPrint(w *bufio.Writer, config *PrettyPrintConfig, depth int, parentIndentCount int)
- func (str CheckedString) Prop(ctx *Context, name string) Value
- func (str CheckedString) PropertyNames(ctx *Context) []string
- func (CheckedString) SetProp(ctx *Context, name string, value Value) error
- func (str CheckedString) String() string
- func (s CheckedString) ToSymbolicValue(ctx *Context, encountered map[uintptr]symbolic.Value) (symbolic.Value, error)
- func (str CheckedString) UnderlyingString() string
- func (str CheckedString) WriteJSONRepresentation(ctx *Context, w *jsoniter.Stream, config JSONSerializationConfig, depth int) error
- type Clonable
- type ClonableSerializable
- type Collection
- type Color
- func (c Color) Equal(ctx *Context, other Value, alreadyCompared map[uintptr]uintptr, depth int) bool
- func (c Color) GetAnsiEscapeSequence(background bool) []byte
- func (c Color) IsDarkBackgroundColor() bool
- func (Color) IsMutable() bool
- func (c Color) PrettyPrint(w *bufio.Writer, config *PrettyPrintConfig, depth int, parentIndentCount int)
- func (c Color) ToSymbolicValue(ctx *Context, encountered map[uintptr]symbolic.Value) (symbolic.Value, error)
- func (c Color) ToTermColor() termenv.Color
- func (c Color) WriteJSONRepresentation(ctx *Context, w *jsoniter.Stream, config JSONSerializationConfig, depth int) error
- type ColorizationInfo
- type CommandPermission
- type Comparable
- type CompilationInput
- type CompileError
- type CompileTimeType
- type CompiledFunction
- type ComplexPropertyConstraint
- type ConfluenceStream
- func (s *ConfluenceStream) ChunkDataType() Pattern
- func (s *ConfluenceStream) Equal(ctx *Context, other Value, alreadyCompared map[uintptr]uintptr, depth int) bool
- func (s *ConfluenceStream) IsMainlyChunked() bool
- func (*ConfluenceStream) IsMutable() bool
- func (s *ConfluenceStream) IsStopped() bool
- func (s *ConfluenceStream) PrettyPrint(w *bufio.Writer, config *PrettyPrintConfig, depth int, parentIndentCount int)
- func (s *ConfluenceStream) Stop()
- func (s *ConfluenceStream) Stream(ctx *Context, config *ReadableStreamConfiguration) ReadableStream
- func (s *ConfluenceStream) ToSymbolicValue(ctx *Context, encountered map[uintptr]symbolic.Value) (symbolic.Value, error)
- func (s *ConfluenceStream) WaitNext(ctx *Context, filter Pattern, timeout time.Duration) (Value, error)
- func (s *ConfluenceStream) WaitNextChunk(ctx *Context, filter Pattern, sizeRange IntRange, timeout time.Duration) (*DataChunk, error)
- type ConstraintId
- type Container
- type Context
- func (ctx *Context) AddHostAlias(alias string, host Host)
- func (ctx *Context) AddHostDefinition(h Host, data ResourceName)
- func (ctx *Context) AddNamedPattern(name string, pattern Pattern)
- func (ctx *Context) AddPatternNamespace(name string, namespace *PatternNamespace)
- func (ctx *Context) AddTypeExtension(extension *TypeExtension)
- func (ctx *Context) BoundChild() *Context
- func (ctx *Context) BoundChildWithOptions(opts BoundChildContextOptions) *Context
- func (ctx *Context) CancelGracefully()
- func (ctx *Context) CancelIfShortLived()
- func (ctx *Context) CancelUngracefully()
- func (ctx *Context) CheckHasPermission(perm Permission) error
- func (ctx *Context) DefinitelyStopCPUTimeDepletion() error
- func (ctx *Context) DefinitelyStopTokenDepletion(limitName string) error
- func (ctx *Context) DoIO(fn func() error) error
- func (ctx *Context) DropPermissions(droppedPermissions []Permission)
- func (ctx *Context) ForEachHostAlias(fn func(name string, value Host) error) error
- func (ctx *Context) ForEachNamedPattern(fn func(name string, pattern Pattern) error) error
- func (ctx *Context) ForEachPatternNamespace(fn func(name string, namespace *PatternNamespace) error) error
- func (ctx *Context) GetAllHostDefinitions() map[Host]Value
- func (ctx *Context) GetByteRate(name string) (ByteRate, error)
- func (ctx *Context) GetClosestState() *GlobalState
- func (ctx *Context) GetFileSystem() afs.Filesystem
- func (ctx *Context) GetForbiddenPermissions() []Permission
- func (ctx *Context) GetGrantedPermissions() []Permission
- func (ctx *Context) GetHostAliases() map[string]Host
- func (ctx *Context) GetHostByDefinition(r ResourceName) (Host, bool)
- func (ctx *Context) GetHostDefinition(h Host) Value
- func (ctx *Context) GetNamedPatterns() map[string]Pattern
- func (ctx *Context) GetPatternNamespaces() map[string]*PatternNamespace
- func (ctx *Context) GetProtolClient(u URL) (ProtocolClient, error)
- func (ctx *Context) GetState() (*GlobalState, bool)
- func (ctx *Context) GetTempDir() Path
- func (ctx *Context) GetTotal(name string) (int64, error)
- func (ctx *Context) GetTx() *Transaction
- func (ctx *Context) GetTypeExtension(id string) *TypeExtension
- func (ctx *Context) GetWaitConfirmPrompt() WaitConfirmPrompt
- func (ctx *Context) GiveBack(limitName string, count int64) error
- func (ctx *Context) GracefulTearDownStatus() GracefulTeardownStatus
- func (ctx *Context) HasAPermissionWithKindAndType(kind permkind.PermissionKind, typename permkind.InternalPermissionTypename) bool
- func (ctx *Context) HasCurrentTx() bool
- func (ctx *Context) HasPermission(perm Permission) bool
- func (ctx *Context) HasPermissionUntyped(perm any) bool
- func (ctx *Context) InefficientlyWaitUntilTearedDown(timeout time.Duration) bool
- func (ctx *Context) InitialWorkingDirectory() Path
- func (ctx *Context) IsDone() bool
- func (ctx *Context) IsDoneSlowCheck() bool
- func (ctx *Context) IsLongLived() bool
- func (ctx *Context) IsTearedDown() bool
- func (ctx *Context) IsValueVisible(v Value) bool
- func (ctx *Context) Limits() []Limit
- func (ctx *Context) Logger() *zerolog.Logger
- func (ctx *Context) New() *Context
- func (ctx *Context) NewChildLoggerForInternalSource(src string) zerolog.Logger
- func (ctx *Context) Now() DateTime
- func (ctx *Context) OnDone(microtask ContextDoneMicrotaskFn)
- func (ctx *Context) OnGracefulTearDown(task GracefulTearDownTaskFn)
- func (ctx *Context) PauseCPUTimeDepletion() error
- func (ctx *Context) PauseCPUTimeDepletionIfNotPaused() error
- func (ctx *Context) PauseTokenDepletion(limitName string) error
- func (ctx *Context) PromoteToLongLived()
- func (ctx *Context) PutUserData(path Path, value Value)
- func (ctx *Context) ResolveHostAlias(alias string) Host
- func (ctx *Context) ResolveNamedPattern(name string) Pattern
- func (ctx *Context) ResolvePatternNamespace(name string) *PatternNamespace
- func (ctx *Context) ResolveUserData(path Path) Value
- func (ctx *Context) ResumeCPUTimeDepletion() error
- func (ctx *Context) ResumeDepletion(limitName string) error
- func (ctx *Context) SetClosestState(state *GlobalState)
- func (ctx *Context) SetProtocolClientForHost(h Host, client ProtocolClient) error
- func (ctx *Context) SetProtocolClientForURL(u URL, client ProtocolClient) error
- func (ctx *Context) SetWaitConfirmPrompt(fn WaitConfirmPrompt)
- func (ctx *Context) Sleep(duration time.Duration)
- func (ctx *Context) Take(limitName string, count int64) error
- func (ctx *Context) ToSymbolicValue() (*symbolic.Context, error)
- func (ctx *Context) Update(fn func(ctxData LockedContextData) error) error
- type ContextConfig
- type ContextDoneMicrotaskFn
- type ContextKind
- type CurrentTest
- func (t *CurrentTest) Equal(ctx *Context, other Value, alreadyCompared map[uintptr]uintptr, depth int) bool
- func (t *CurrentTest) GetGoMethod(name string) (*GoFunction, bool)
- func (*CurrentTest) IsMutable() bool
- func (t *CurrentTest) PrettyPrint(w *bufio.Writer, config *PrettyPrintConfig, depth int, parentIndentCount int)
- func (t *CurrentTest) Prop(ctx *Context, name string) Value
- func (*CurrentTest) PropertyNames(ctx *Context) []string
- func (*CurrentTest) SetProp(ctx *Context, name string, value Value) error
- func (t *CurrentTest) ToSymbolicValue(ctx *Context, encountered map[uintptr]symbolic.Value) (symbolic.Value, error)
- type CustomPermissionTypeHandler
- type DNSPermission
- type DataChunk
- func (c *DataChunk) Data(ctx *Context) (Value, error)
- func (c *DataChunk) Discard(ctx *Context) error
- func (c *DataChunk) ElemCount() int
- func (c *DataChunk) Equal(ctx *Context, other Value, alreadyCompared map[uintptr]uintptr, depth int) bool
- func (*DataChunk) GetGoMethod(name string) (*GoFunction, bool)
- func (*DataChunk) IsMutable() bool
- func (c *DataChunk) MergeWith(ctx *Context, other *DataChunk) error
- func (c *DataChunk) PrettyPrint(w *bufio.Writer, config *PrettyPrintConfig, depth int, parentIndentCount int)
- func (c *DataChunk) Prop(ctx *Context, name string) Value
- func (*DataChunk) PropertyNames(ctx *Context) []string
- func (*DataChunk) SetProp(ctx *Context, name string, value Value) error
- func (c *DataChunk) ToSymbolicValue(ctx *Context, encountered map[uintptr]symbolic.Value) (symbolic.Value, error)
- type DataStore
- type Database
- type DatabaseConfig
- type DatabaseConfigs
- type DatabaseIL
- func (db *DatabaseIL) AddOwnerStateTeardownCallback()
- func (db *DatabaseIL) Close(ctx *Context) error
- func (db *DatabaseIL) Equal(ctx *Context, other Value, alreadyCompared map[uintptr]uintptr, depth int) bool
- func (db *DatabaseIL) GetGoMethod(name string) (*GoFunction, bool)
- func (db *DatabaseIL) GetOrLoad(ctx *Context, path Path) (Serializable, error)
- func (*DatabaseIL) IsMutable() bool
- func (db *DatabaseIL) IsPermissionForThisDB(perm DatabasePermission) bool
- func (db *DatabaseIL) PrettyPrint(w *bufio.Writer, config *PrettyPrintConfig, depth int, parentIndentCount int)
- func (db *DatabaseIL) Prop(ctx *Context, name string) Value
- func (db *DatabaseIL) PropertyNames(ctx *Context) []string
- func (db *DatabaseIL) Resource() SchemeHolder
- func (db *DatabaseIL) SetOwnerStateOnceAndLoadIfNecessary(ctx *Context, state *GlobalState) error
- func (*DatabaseIL) SetProp(ctx *Context, name string, value Value) error
- func (db *DatabaseIL) ToSymbolicValue(ctx *Context, encountered map[uintptr]symbolic.Value) (symbolic.Value, error)
- func (db *DatabaseIL) TopLevelEntitiesLoaded() bool
- func (db *DatabaseIL) UpdateSchema(ctx *Context, nextSchema *ObjectPattern, migrations ...*Object)
- type DatabasePermission
- type DatabaseWrappingArgs
- type Date
- func (d Date) Compare(other Value) (result int, comparable bool)
- func (d Date) Equal(ctx *Context, other Value, alreadyCompared map[uintptr]uintptr, depth int) bool
- func (d Date) IsMutable() bool
- func (d Date) PrettyPrint(w *bufio.Writer, config *PrettyPrintConfig, depth int, parentIndentCount int)
- func (d Date) ToSymbolicValue(ctx *Context, encountered map[uintptr]symbolic.Value) (symbolic.Value, error)
- func (d Date) Validate() error
- func (d Date) WriteJSONRepresentation(ctx *Context, w *jsoniter.Stream, config JSONSerializationConfig, depth int) error
- type DateFormat
- func (f *DateFormat) Format(ctx *Context, v Value, w io.Writer) (int, error)
- func (f *DateFormat) ToSymbolicValue(ctx *Context, encountered map[uintptr]symbolic.Value) (symbolic.Value, error)
- func (patt DateFormat) WriteJSONRepresentation(ctx *Context, w *jsoniter.Stream, config JSONSerializationConfig, depth int) error
- type DateTime
- func (left DateTime) Add(right Value) (Value, error)
- func (t DateTime) AsGoTime() time.Time
- func (dt DateTime) Compare(other Value) (result int, comparable bool)
- func (d DateTime) Equal(ctx *Context, other Value, alreadyCompared map[uintptr]uintptr, depth int) bool
- func (d DateTime) IsMutable() bool
- func (d DateTime) IsRecursivelyRenderable(ctx *Context, input RenderingInput) bool
- func (d DateTime) PrettyPrint(w *bufio.Writer, config *PrettyPrintConfig, depth int, parentIndentCount int)
- func (d DateTime) Render(ctx *Context, w io.Writer, config RenderingInput) (int, error)
- func (left DateTime) Sub(right Value) (Value, error)
- func (d DateTime) ToSymbolicValue(ctx *Context, encountered map[uintptr]symbolic.Value) (symbolic.Value, error)
- func (d DateTime) WriteJSONRepresentation(ctx *Context, w *jsoniter.Stream, config JSONSerializationConfig, depth int) error
- type DbOpenConfiguration
- type DebugCommandCloseDebugger
- type DebugCommandContinue
- type DebugCommandGetScopes
- type DebugCommandGetStackTrace
- type DebugCommandInformAboutSecondaryEvent
- type DebugCommandNextStep
- type DebugCommandPause
- type DebugCommandSetBreakpoints
- type DebugCommandSetExceptionBreakpoints
- type DebugCommandStepIn
- type DebugCommandStepOut
- type Debugger
- func (d *Debugger) AttachAndStart(state evaluationState)
- func (d *Debugger) Closed() bool
- func (d *Debugger) ControlChan() chan any
- func (d *Debugger) ExceptionBreakpointsId() (_ int32, enabled bool)
- func (d *Debugger) NewChild() *Debugger
- func (d *Debugger) SecondaryEventsChan() chan SecondaryDebugEvent
- func (d *Debugger) StoppedChan() chan ProgramStoppedEvent
- func (d *Debugger) ThreadIfOfStackFrame(stackFrameId int32) (StateId, bool)
- func (d *Debugger) Threads() (threads []ThreadInfo)
- type DebuggerArgs
- type DefaultContextConfig
- type DefaultGlobalStateConfig
- type DefaultValuePattern
- type Dictionary
- func (dict *Dictionary) Clone(originState *GlobalState, sharableValues *[]PotentiallySharable, ...) (Serializable, error)
- func (dict *Dictionary) Equal(ctx *Context, other Value, alreadyCompared map[uintptr]uintptr, depth int) bool
- func (d *Dictionary) ForEachEntry(ctx *Context, fn func(keyRepr string, key Serializable, v Serializable) error) error
- func (dict *Dictionary) IsMutable() bool
- func (d *Dictionary) OnMutation(ctx *Context, microtask MutationCallbackMicrotask, ...) (CallbackHandle, error)
- func (dict *Dictionary) PrettyPrint(w *bufio.Writer, config *PrettyPrintConfig, depth int, parentIndentCount int)
- func (d *Dictionary) Prop(ctx *Context, name string) Value
- func (*Dictionary) PropertyNames(ctx *Context) []string
- func (d *Dictionary) RemoveMutationCallback(ctx *Context, handle CallbackHandle)
- func (d *Dictionary) RemoveMutationCallbackMicrotasks(ctx *Context)
- func (*Dictionary) SetProp(ctx *Context, name string, value Value) error
- func (d *Dictionary) SetValue(ctx *Context, key, value Serializable)
- func (dict *Dictionary) ToSymbolicValue(ctx *Context, encountered map[uintptr]symbolic.Value) (symbolic.Value, error)
- func (d *Dictionary) Value(ctx *Context, key Serializable) (Value, Bool)
- func (d *Dictionary) Watcher(ctx *Context, config WatcherConfiguration) Watcher
- func (d *Dictionary) WriteJSONRepresentation(ctx *Context, w *jsoniter.Stream, config JSONSerializationConfig, depth int) error
- type DifferencePattern
- func (pattern *DifferencePattern) Equal(ctx *Context, other Value, alreadyCompared map[uintptr]uintptr, depth int) bool
- func (pattern *DifferencePattern) IsMutable() bool
- func (patt *DifferencePattern) Iterator(ctx *Context, config IteratorConfiguration) Iterator
- func (pattern *DifferencePattern) PrettyPrint(w *bufio.Writer, config *PrettyPrintConfig, depth int, parentIndentCount int)
- func (patt *DifferencePattern) Random(ctx *Context, options ...Option) Value
- func (patt *DifferencePattern) StringPattern() (StringPattern, bool)
- func (patt *DifferencePattern) Test(ctx *Context, v Value) bool
- func (p *DifferencePattern) ToSymbolicValue(ctx *Context, encountered map[uintptr]symbolic.Value) (symbolic.Value, error)
- func (pattern *DifferencePattern) WriteJSONRepresentation(ctx *Context, w *jsoniter.Stream, config JSONSerializationConfig, depth int) error
- type DirWalker
- func (w *DirWalker) Equal(ctx *Context, other Value, alreadyCompared map[uintptr]uintptr, depth int) bool
- func (it *DirWalker) HasNext(ctx *Context) bool
- func (w *DirWalker) IsMutable() bool
- func (it *DirWalker) Key(*Context) Value
- func (it *DirWalker) Next(ctx *Context) bool
- func (it *DirWalker) NodeMeta(*Context) WalkableNodeMeta
- func (it *DirWalker) PrettyPrint(w *bufio.Writer, config *PrettyPrintConfig, depth int, parentIndentCount int)
- func (it *DirWalker) Prune(ctx *Context)
- func (it *DirWalker) ToSymbolicValue(ctx *Context, encountered map[uintptr]symbolic.Value) (symbolic.Value, error)
- func (it *DirWalker) Value(*Context) Value
- type DoneChan
- type Duration
- func (left Duration) Add(right Value) (Value, error)
- func (d Duration) Compare(other Value) (result int, comparable bool)
- func (d Duration) Equal(ctx *Context, other Value, alreadyCompared map[uintptr]uintptr, depth int) bool
- func (d Duration) IsMutable() bool
- func (d Duration) PrettyPrint(w *bufio.Writer, config *PrettyPrintConfig, depth int, parentIndentCount int)
- func (left Duration) Sub(right Value) (Value, error)
- func (d Duration) ToSymbolicValue(ctx *Context, encountered map[uintptr]symbolic.Value) (symbolic.Value, error)
- func (d Duration) Validate() error
- func (d Duration) WriteJSONRepresentation(ctx *Context, w *jsoniter.Stream, config JSONSerializationConfig, depth int) error
- type DynamicStringPatternElement
- func (patt DynamicStringPatternElement) Call(values []Serializable) (Pattern, error)
- func (patt DynamicStringPatternElement) CompiledRegex() *regexp.Regexp
- func (patt DynamicStringPatternElement) EffectiveLengthRange() IntRange
- func (patt DynamicStringPatternElement) Equal(ctx *Context, other Value, alreadyCompared map[uintptr]uintptr, depth int) bool
- func (patt DynamicStringPatternElement) FindMatches(ctx *Context, val Serializable, config MatchesFindConfig) (groups []Serializable, err error)
- func (patt DynamicStringPatternElement) HasRegex() bool
- func (patt DynamicStringPatternElement) IsMutable() bool
- func (patt *DynamicStringPatternElement) IsResolved() bool
- func (patt DynamicStringPatternElement) Iterator(ctx *Context, config IteratorConfiguration) Iterator
- func (patt DynamicStringPatternElement) LengthRange() IntRange
- func (patt DynamicStringPatternElement) MatchGroups(ctx *Context, v Serializable) (map[string]Serializable, bool, error)
- func (patt *DynamicStringPatternElement) Parse(ctx *Context, s string) (Serializable, error)
- func (patt *DynamicStringPatternElement) PatternNestingDepth(parentDepth int) int
- func (patt *DynamicStringPatternElement) PrettyPrint(w *bufio.Writer, config *PrettyPrintConfig, depth int, parentIndentCount int)
- func (patt DynamicStringPatternElement) Random(ctx *Context, options ...Option) Value
- func (patt DynamicStringPatternElement) Regex() string
- func (patt DynamicStringPatternElement) Resolve() (StringPattern, error)
- func (patt *DynamicStringPatternElement) StringPattern() (StringPattern, bool)
- func (patt DynamicStringPatternElement) Test(ctx *Context, v Value) bool
- func (p *DynamicStringPatternElement) ToSymbolicValue(ctx *Context, encountered map[uintptr]symbolic.Value) (symbolic.Value, error)
- func (patt DynamicStringPatternElement) WriteJSONRepresentation(ctx *Context, w *jsoniter.Stream, config JSONSerializationConfig, depth int) error
- type DynamicValue
- func NewDynamicCall(ctx *Context, callee Value, args ...Value) *DynamicValue
- func NewDynamicIf(ctx *Context, condition *DynamicValue, consequent Value, alternate Value) *DynamicValue
- func NewDynamicMapInvocation(ctx *Context, iterable Iterable, mapper Value) (*DynamicValue, error)
- func NewDynamicMemberValue(ctx *Context, object Value, memberName string) (*DynamicValue, error)
- func (c *DynamicValue) Equal(ctx *Context, other Value, alreadyCompared map[uintptr]uintptr, depth int) bool
- func (d *DynamicValue) IsFrozen() bool
- func (c *DynamicValue) IsMutable() bool
- func (dyn *DynamicValue) Iterator(ctx *Context, config IteratorConfiguration) Iterator
- func (dyn *DynamicValue) OnMutation(ctx *Context, microtask MutationCallbackMicrotask, ...) (CallbackHandle, error)
- func (d *DynamicValue) PrettyPrint(w *bufio.Writer, config *PrettyPrintConfig, depth int, parentIndentCount int)
- func (dyn *DynamicValue) Prop(ctx *Context, name string) Value
- func (dyn *DynamicValue) PropertyNames(ctx *Context) []string
- func (dyn *DynamicValue) RemoveMutationCallback(ctx *Context, handle CallbackHandle)
- func (dyn *DynamicValue) RemoveMutationCallbackMicrotasks(ctx *Context)
- func (dyn *DynamicValue) Resolve(ctx *Context) Value
- func (dyn *DynamicValue) SetProp(ctx *Context, name string, value Value) error
- func (d *DynamicValue) TakeInMemorySnapshot(ctx *Context) (*Snapshot, error)
- func (d *DynamicValue) ToSymbolicValue(ctx *Context, encountered map[uintptr]symbolic.Value) (symbolic.Value, error)
- func (d *DynamicValue) Unfreeze(ctx *Context) error
- func (dyn *DynamicValue) Watcher(ctx *Context, config WatcherConfiguration) Watcher
- func (v *DynamicValue) WriteJSONRepresentation(ctx *Context, w *jsoniter.Stream, config JSONSerializationConfig, depth int) error
- type Effect
- type ElementKey
- type ElementsStream
- func (s *ElementsStream) ChunkDataType() Pattern
- func (s *ElementsStream) Equal(ctx *Context, other Value, alreadyCompared map[uintptr]uintptr, depth int) bool
- func (s *ElementsStream) IsMainlyChunked() bool
- func (*ElementsStream) IsMutable() bool
- func (s *ElementsStream) IsStopped() bool
- func (s *ElementsStream) PrettyPrint(w *bufio.Writer, config *PrettyPrintConfig, depth int, parentIndentCount int)
- func (s *ElementsStream) Stop()
- func (s *ElementsStream) Stream(ctx *Context, config *ReadableStreamConfiguration) ReadableStream
- func (s *ElementsStream) ToSymbolicValue(ctx *Context, encountered map[uintptr]symbolic.Value) (symbolic.Value, error)
- func (s *ElementsStream) WaitNext(ctx *Context, filter Pattern, timeout time.Duration) (Value, error)
- func (s *ElementsStream) WaitNextChunk(ctx *Context, filter Pattern, sizeRange IntRange, timeout time.Duration) (*DataChunk, error)
- type EmailAddress
- func (addr EmailAddress) Equal(ctx *Context, other Value, alreadyCompared map[uintptr]uintptr, depth int) bool
- func (addr EmailAddress) IsMutable() bool
- func (addr EmailAddress) PrettyPrint(w *bufio.Writer, config *PrettyPrintConfig, depth int, parentIndentCount int)
- func (addr EmailAddress) Prop(ctx *Context, name string) Value
- func (addr EmailAddress) PropertyNames(ctx *Context) []string
- func (EmailAddress) SetProp(ctx *Context, name string, value Value) error
- func (addr EmailAddress) ToSymbolicValue(ctx *Context, encountered map[uintptr]symbolic.Value) (symbolic.Value, error)
- func (addr EmailAddress) UnderlyingString() string
- func (addr EmailAddress) WriteJSONRepresentation(ctx *Context, w *jsoniter.Stream, config JSONSerializationConfig, depth int) error
- type EntrySnapshotMetadata
- type EnvVarPermission
- type Error
- func (e Error) Data() Value
- func (err Error) Equal(ctx *Context, other Value, alreadyCompared map[uintptr]uintptr, depth int) bool
- func (e Error) Error() string
- func (err Error) IsMutable() bool
- func (err Error) PrettyPrint(w *bufio.Writer, config *PrettyPrintConfig, depth int, parentIndentCount int)
- func (e Error) Prop(ctx *Context, name string) Value
- func (Error) PropertyNames(ctx *Context) []string
- func (Error) SetProp(ctx *Context, name string, value Value) error
- func (e Error) Text() string
- func (e Error) ToSymbolicValue(ctx *Context, encountered map[uintptr]symbolic.Value) (symbolic.Value, error)
- func (v Error) WriteJSONRepresentation(ctx *Context, w *jsoniter.Stream, config JSONSerializationConfig, depth int) error
- type Event
- func (e *Event) Age() time.Duration
- func (e *Event) AgeWithCurrentTime(now time.Time) time.Duration
- func (e *Event) Equal(ctx *Context, other Value, alreadyCompared map[uintptr]uintptr, depth int) bool
- func (e *Event) IsMutable() bool
- func (e *Event) PrettyPrint(w *bufio.Writer, config *PrettyPrintConfig, depth int, parentIndentCount int)
- func (e *Event) Prop(ctx *Context, name string) Value
- func (e *Event) PropertyNames(ctx *Context) []string
- func (e *Event) SetProp(ctx *Context, name string, value Value) error
- func (e *Event) SourceValue() any
- func (e *Event) ToSymbolicValue(ctx *Context, encountered map[uintptr]symbolic.Value) (symbolic.Value, error)
- func (e *Event) Value() Value
- type EventHandler
- type EventPattern
- func (patt *EventPattern) Equal(ctx *Context, other Value, alreadyCompared map[uintptr]uintptr, depth int) bool
- func (patt *EventPattern) IsMutable() bool
- func (patt *EventPattern) Iterator(ctx *Context, config IteratorConfiguration) Iterator
- func (patt *EventPattern) PrettyPrint(w *bufio.Writer, config *PrettyPrintConfig, depth int, parentIndentCount int)
- func (patt *EventPattern) Random(ctx *Context, options ...Option) Value
- func (patt *EventPattern) StringPattern() (StringPattern, bool)
- func (patt *EventPattern) Test(ctx *Context, v Value) bool
- func (p *EventPattern) ToSymbolicValue(ctx *Context, encountered map[uintptr]symbolic.Value) (symbolic.Value, error)
- func (patt *EventPattern) WriteJSONRepresentation(ctx *Context, w *jsoniter.Stream, config JSONSerializationConfig, depth int) error
- type EventSource
- type EventSourceBase
- type EventSourceFactory
- type EventSourceIterator
- func (it *EventSourceIterator) Equal(ctx *Context, other Value, alreadyCompared map[uintptr]uintptr, depth int) bool
- func (it *EventSourceIterator) GetGoMethod(name string) (*GoFunction, bool)
- func (it *EventSourceIterator) HasNext(*Context) bool
- func (it *EventSourceIterator) IsMutable() bool
- func (it *EventSourceIterator) Key(ctx *Context) Value
- func (it *EventSourceIterator) Next(ctx *Context) bool
- func (it *EventSourceIterator) PrettyPrint(w *bufio.Writer, config *PrettyPrintConfig, depth int, parentIndentCount int)
- func (it *EventSourceIterator) Prop(ctx *Context, name string) Value
- func (it *EventSourceIterator) PropertyNames(ctx *Context) []string
- func (*EventSourceIterator) SetProp(ctx *Context, name string, value Value) error
- func (it *EventSourceIterator) ToSymbolicValue(ctx *Context, encountered map[uintptr]symbolic.Value) (symbolic.Value, error)
- func (it *EventSourceIterator) Value(*Context) Value
- type ExactStringPattern
- func (patt *ExactStringPattern) CompiledRegex() *regexp.Regexp
- func (pattern *ExactStringPattern) EffectiveLengthRange() IntRange
- func (pattern *ExactStringPattern) Equal(ctx *Context, other Value, alreadyCompared map[uintptr]uintptr, depth int) bool
- func (pattern *ExactStringPattern) FindMatches(ctx *Context, val Serializable, config MatchesFindConfig) (matches []Serializable, err error)
- func (pattern *ExactStringPattern) HasRegex() bool
- func (pattern *ExactStringPattern) IsMutable() bool
- func (patt *ExactStringPattern) IsResolved() bool
- func (patt ExactStringPattern) Iterator(ctx *Context, config IteratorConfiguration) Iterator
- func (pattern *ExactStringPattern) LengthRange() IntRange
- func (patt *ExactStringPattern) Parse(ctx *Context, s string) (Serializable, error)
- func (patt *ExactStringPattern) PatternNestingDepth(parentDepth int) int
- func (pattern ExactStringPattern) PrettyPrint(w *bufio.Writer, config *PrettyPrintConfig, depth int, parentIndentCount int)
- func (pattern ExactStringPattern) Random(ctx *Context, options ...Option) Value
- func (pattern *ExactStringPattern) Regex() string
- func (patt *ExactStringPattern) Resolve() (StringPattern, error)
- func (patt *ExactStringPattern) StringPattern() (StringPattern, bool)
- func (pattern *ExactStringPattern) Test(ctx *Context, v Value) bool
- func (p *ExactStringPattern) ToSymbolicValue(ctx *Context, encountered map[uintptr]symbolic.Value) (symbolic.Value, error)
- func (pattern ExactStringPattern) WriteJSONRepresentation(ctx *Context, w *jsoniter.Stream, config JSONSerializationConfig, depth int) error
- type ExactValuePattern
- func (pattern *ExactValuePattern) Equal(ctx *Context, other Value, alreadyCompared map[uintptr]uintptr, depth int) bool
- func (pattern *ExactValuePattern) IsMutable() bool
- func (patt ExactValuePattern) Iterator(ctx *Context, config IteratorConfiguration) Iterator
- func (pattern ExactValuePattern) PrettyPrint(w *bufio.Writer, config *PrettyPrintConfig, depth int, parentIndentCount int)
- func (pattern ExactValuePattern) Random(ctx *Context, options ...Option) Value
- func (patt *ExactValuePattern) StringPattern() (StringPattern, bool)
- func (pattern *ExactValuePattern) Test(ctx *Context, v Value) bool
- func (p *ExactValuePattern) ToSymbolicValue(ctx *Context, encountered map[uintptr]symbolic.Value) (symbolic.Value, error)
- func (pattern *ExactValuePattern) Value() Serializable
- func (pattern ExactValuePattern) WriteJSONRepresentation(ctx *Context, w *jsoniter.Stream, config JSONSerializationConfig, depth int) error
- type ExecutedStep
- func (s *ExecutedStep) Equal(ctx *Context, other Value, alreadyCompared map[uintptr]uintptr, depth int) bool
- func (s *ExecutedStep) GetGoMethod(name string) (*GoFunction, bool)
- func (e ExecutedStep) IsMutable() bool
- func (s *ExecutedStep) PrettyPrint(w *bufio.Writer, config *PrettyPrintConfig, depth int, parentIndentCount int)
- func (s *ExecutedStep) Prop(ctx *Context, name string) Value
- func (*ExecutedStep) PropertyNames(ctx *Context) []string
- func (*ExecutedStep) SetProp(ctx *Context, name string, value Value) error
- func (s *ExecutedStep) ToSymbolicValue(ctx *Context, encountered map[uintptr]symbolic.Value) (symbolic.Value, error)
- type ExtendedFileInfo
- type FailedToOpenDatabase
- func (db *FailedToOpenDatabase) Close(ctx *Context) error
- func (db *FailedToOpenDatabase) LoadTopLevelEntities(_ *Context) (map[string]Serializable, error)
- func (db *FailedToOpenDatabase) Resource() SchemeHolder
- func (db *FailedToOpenDatabase) Schema() *ObjectPattern
- func (db *FailedToOpenDatabase) UpdateSchema(ctx *Context, schema *ObjectPattern, handlers MigrationOpHandlers)
- type FieldRetrievalType
- type FileInfo
- func (fi FileInfo) CreationTime() (time.Time, bool)
- func (i FileInfo) Equal(ctx *Context, other Value, alreadyCompared map[uintptr]uintptr, depth int) bool
- func (i FileInfo) GetGoMethod(name string) (*GoFunction, bool)
- func (fi FileInfo) IsDir() bool
- func (i FileInfo) IsMutable() bool
- func (fi FileInfo) ModTime() time.Time
- func (fi FileInfo) Mode() fs.FileMode
- func (fi FileInfo) Name() string
- func (i FileInfo) PrettyPrint(w *bufio.Writer, config *PrettyPrintConfig, depth int, parentIndentCount int)
- func (i FileInfo) Prop(ctx *Context, name string) Value
- func (FileInfo) PropertyNames(ctx *Context) []string
- func (FileInfo) SetProp(ctx *Context, name string, value Value) error
- func (fi FileInfo) Size() int64
- func (fi FileInfo) Sys() any
- func (i FileInfo) ToSymbolicValue(ctx *Context, encountered map[uintptr]symbolic.Value) (symbolic.Value, error)
- func (i FileInfo) WriteJSONRepresentation(ctx *Context, w *jsoniter.Stream, config JSONSerializationConfig, depth int) error
- type FileMode
- func (m FileMode) Equal(ctx *Context, other Value, alreadyCompared map[uintptr]uintptr, depth int) bool
- func (m FileMode) Executable() bool
- func (m FileMode) FileMode() fs.FileMode
- func (m FileMode) IsMutable() bool
- func (m FileMode) PrettyPrint(w *bufio.Writer, config *PrettyPrintConfig, depth int, parentIndentCount int)
- func (m FileMode) ToSymbolicValue(ctx *Context, encountered map[uintptr]symbolic.Value) (symbolic.Value, error)
- func (m FileMode) WriteJSONRepresentation(ctx *Context, w *jsoniter.Stream, config JSONSerializationConfig, depth int) error
- type FilesystemPermission
- type FilesystemSnapshot
- type FilesystemSnapshotConfig
- type FilesystemSnapshotIL
- func (s *FilesystemSnapshotIL) Equal(ctx *Context, other Value, alreadyCompared map[uintptr]uintptr, depth int) bool
- func (*FilesystemSnapshotIL) IsMutable() bool
- func (s *FilesystemSnapshotIL) PrettyPrint(w *bufio.Writer, config *PrettyPrintConfig, depth int, parentIndentCount int)
- func (s *FilesystemSnapshotIL) ToSymbolicValue(ctx *Context, encountered map[uintptr]symbolic.Value) (symbolic.Value, error)
- func (s *FilesystemSnapshotIL) Underlying() FilesystemSnapshot
- func (s *FilesystemSnapshotIL) WriteJSONRepresentation(ctx *Context, w *jsoniter.Stream, config JSONSerializationConfig, depth int) error
- type Float
- func (f Float) Compare(other Value) (result int, comparable bool)
- func (f Float) Equal(ctx *Context, other Value, alreadyCompared map[uintptr]uintptr, depth int) bool
- func (f Float) IsMutable() bool
- func (f Float) PrettyPrint(w *bufio.Writer, config *PrettyPrintConfig, depth int, parentIndentCount int)
- func (f Float) ToSymbolicValue(ctx *Context, encountered map[uintptr]symbolic.Value) (symbolic.Value, error)
- func (f Float) WriteJSONRepresentation(ctx *Context, w *jsoniter.Stream, config JSONSerializationConfig, depth int) error
- type FloatList
- type FloatRange
- func (r FloatRange) Contains(ctx *Context, v Serializable) bool
- func (r FloatRange) Equal(ctx *Context, other Value, alreadyCompared map[uintptr]uintptr, depth int) bool
- func (r FloatRange) HasKnownStart() bool
- func (r FloatRange) Includes(ctx *Context, n Float) bool
- func (r FloatRange) InclusiveEnd() float64
- func (r FloatRange) IsEmpty(ctx *Context) bool
- func (r FloatRange) IsMutable() bool
- func (r FloatRange) Iterator(ctx *Context, config IteratorConfiguration) Iterator
- func (r FloatRange) KnownStart() float64
- func (r FloatRange) PrettyPrint(w *bufio.Writer, config *PrettyPrintConfig, depth int, parentIndentCount int)
- func (r FloatRange) Random(ctx *Context) Value
- func (r FloatRange) ToSymbolicValue(ctx *Context, encountered map[uintptr]symbolic.Value) (symbolic.Value, error)
- func (r FloatRange) WriteJSONRepresentation(ctx *Context, w *jsoniter.Stream, config JSONSerializationConfig, depth int) error
- type FloatRangeIterator
- func (it FloatRangeIterator) Equal(ctx *Context, other Value, alreadyCompared map[uintptr]uintptr, depth int) bool
- func (it *FloatRangeIterator) HasNext(*Context) bool
- func (it FloatRangeIterator) IsMutable() bool
- func (it *FloatRangeIterator) Key(ctx *Context) Value
- func (it *FloatRangeIterator) Next(ctx *Context) bool
- func (it FloatRangeIterator) PrettyPrint(w *bufio.Writer, config *PrettyPrintConfig, depth int, parentIndentCount int)
- func (it FloatRangeIterator) ToSymbolicValue(ctx *Context, encountered map[uintptr]symbolic.Value) (symbolic.Value, error)
- func (it *FloatRangeIterator) Value(*Context) Value
- type FloatRangePattern
- func (patt *FloatRangePattern) Equal(ctx *Context, other Value, alreadyCompared map[uintptr]uintptr, depth int) bool
- func (patt *FloatRangePattern) IsMutable() bool
- func (patt *FloatRangePattern) Iterator(ctx *Context, config IteratorConfiguration) Iterator
- func (patt *FloatRangePattern) PrettyPrint(w *bufio.Writer, config *PrettyPrintConfig, depth int, parentIndentCount int)
- func (patt *FloatRangePattern) Random(ctx *Context, options ...Option) Value
- func (patt *FloatRangePattern) Range() FloatRange
- func (patt *FloatRangePattern) StringPattern() (StringPattern, bool)
- func (patt *FloatRangePattern) Test(ctx *Context, v Value) bool
- func (p *FloatRangePattern) ToSymbolicValue(ctx *Context, encountered map[uintptr]symbolic.Value) (symbolic.Value, error)
- func (p FloatRangePattern) WriteJSONRepresentation(ctx *Context, w *jsoniter.Stream, config JSONSerializationConfig, depth int) error
- type FloatRangeStringPattern
- func (patt *FloatRangeStringPattern) CompiledRegex() *regexp.Regexp
- func (patt *FloatRangeStringPattern) EffectiveLengthRange() IntRange
- func (patt *FloatRangeStringPattern) Equal(ctx *Context, other Value, alreadyCompared map[uintptr]uintptr, depth int) bool
- func (patt *FloatRangeStringPattern) FindMatches(ctx *Context, val Serializable, config MatchesFindConfig) (groups []Serializable, err error)
- func (patt *FloatRangeStringPattern) HasRegex() bool
- func (patt *FloatRangeStringPattern) IsMutable() bool
- func (patt *FloatRangeStringPattern) IsResolved() bool
- func (patt *FloatRangeStringPattern) Iterator(ctx *Context, config IteratorConfiguration) Iterator
- func (patt *FloatRangeStringPattern) LengthRange() IntRange
- func (patt *FloatRangeStringPattern) Parse(ctx *Context, s string) (Serializable, error)
- func (patt *FloatRangeStringPattern) PatternNestingDepth(parentDepth int) int
- func (patt *FloatRangeStringPattern) PrettyPrint(w *bufio.Writer, config *PrettyPrintConfig, depth int, parentIndentCount int)
- func (pattern *FloatRangeStringPattern) Random(ctx *Context, options ...Option) Value
- func (patt *FloatRangeStringPattern) Regex() string
- func (patt *FloatRangeStringPattern) Resolve() (StringPattern, error)
- func (patt *FloatRangeStringPattern) StringFrom(ctx *Context, v Value) (string, error)
- func (patt *FloatRangeStringPattern) StringPattern() (StringPattern, bool)
- func (patt *FloatRangeStringPattern) Test(ctx *Context, v Value) bool
- func (p *FloatRangeStringPattern) ToSymbolicValue(ctx *Context, encountered map[uintptr]symbolic.Value) (symbolic.Value, error)
- func (patt *FloatRangeStringPattern) WriteJSONRepresentation(ctx *Context, w *jsoniter.Stream, config JSONSerializationConfig, depth int) error
- type Format
- type FreeEntityLoadingParams
- type FreeEntityMigrationArgs
- type Frequency
- func (f Frequency) Compare(other Value) (result int, comparable bool)
- func (f Frequency) Equal(ctx *Context, other Value, alreadyCompared map[uintptr]uintptr, depth int) bool
- func (f Frequency) IsMutable() bool
- func (f Frequency) IsZeroRate() bool
- func (f Frequency) PrettyPrint(w *bufio.Writer, config *PrettyPrintConfig, depth int, parentIndentCount int)
- func (f Frequency) QuantityPerSecond() Value
- func (f Frequency) ToSymbolicValue(ctx *Context, encountered map[uintptr]symbolic.Value) (symbolic.Value, error)
- func (f Frequency) Validate() error
- func (f Frequency) WriteJSONRepresentation(ctx *Context, w *jsoniter.Stream, config JSONSerializationConfig, depth int) error
- type FunctionPattern
- func (pattern *FunctionPattern) Equal(ctx *Context, other Value, alreadyCompared map[uintptr]uintptr, depth int) bool
- func (pattern *FunctionPattern) IsMutable() bool
- func (patt *FunctionPattern) Iterator(ctx *Context, config IteratorConfiguration) Iterator
- func (pattern *FunctionPattern) PrettyPrint(w *bufio.Writer, config *PrettyPrintConfig, depth int, parentIndentCount int)
- func (patt *FunctionPattern) Random(ctx *Context, options ...Option) Value
- func (patt *FunctionPattern) StringPattern() (StringPattern, bool)
- func (patt *FunctionPattern) Test(ctx *Context, v Value) bool
- func (p *FunctionPattern) ToSymbolicValue(ctx *Context, encountered map[uintptr]symbolic.Value) (symbolic.Value, error)
- func (patt *FunctionPattern) WriteJSONRepresentation(ctx *Context, w *jsoniter.Stream, config JSONSerializationConfig, depth int) error
- type FunctionStaticData
- type GenericWatcher
- func (w *GenericWatcher) Config() WatcherConfiguration
- func (w *GenericWatcher) Equal(ctx *Context, other Value, alreadyCompared map[uintptr]uintptr, depth int) bool
- func (w *GenericWatcher) InformAboutAsync(ctx *Context, v Value)
- func (w *GenericWatcher) IsMutable() bool
- func (w *GenericWatcher) IsStopped() bool
- func (watcher *GenericWatcher) PrettyPrint(w *bufio.Writer, config *PrettyPrintConfig, depth int, parentIndentCount int)
- func (w *GenericWatcher) Stop()
- func (w *GenericWatcher) Stream(ctx *Context, config *ReadableStreamConfiguration) ReadableStream
- func (w *GenericWatcher) ToSymbolicValue(ctx *Context, encountered map[uintptr]symbolic.Value) (symbolic.Value, error)
- func (w *GenericWatcher) WaitNext(ctx *Context, additionalFilter Pattern, timeout time.Duration) (Value, error)
- type GlobalConstness
- type GlobalState
- func (g *GlobalState) ComputePriority() ModulePriority
- func (s *GlobalState) Equal(ctx *Context, other Value, alreadyCompared map[uintptr]uintptr, depth int) bool
- func (g *GlobalState) GetGoMethod(name string) (*GoFunction, bool)
- func (g *GlobalState) InitSystemGraph()
- func (g *GlobalState) IsMain() bool
- func (*GlobalState) IsMutable() bool
- func (s *GlobalState) PrettyPrint(w *bufio.Writer, config *PrettyPrintConfig, depth int, parentIndentCount int)
- func (g *GlobalState) Prop(ctx *Context, name string) Value
- func (*GlobalState) PropertyNames(ctx *Context) []string
- func (g *GlobalState) ProposeSystemGraph(v SystemGraphNodeValue, optionalName string)
- func (g *GlobalState) SetDescendantState(src ResourceName, state *GlobalState)
- func (*GlobalState) SetProp(ctx *Context, name string, value Value) error
- func (s *GlobalState) ToSymbolicValue(ctx *Context, encountered map[uintptr]symbolic.Value) (symbolic.Value, error)
- type GlobalVarPermission
- type GlobalVariables
- func (g *GlobalVariables) CheckedGet(name string) (Value, bool)
- func (g *GlobalVariables) Constants() map[string]Value
- func (g *GlobalVariables) Entries() map[string]Value
- func (g *GlobalVariables) Foreach(fn func(name string, v Value, isStartConstant bool) error) error
- func (g *GlobalVariables) Get(name string) Value
- func (g *GlobalVariables) Has(name string) bool
- func (g *GlobalVariables) PopCapturedGlobals()
- func (g *GlobalVariables) PushCapturedGlobals(captured []capturedGlobal)
- func (g *GlobalVariables) Set(name string, value Value)
- func (g *GlobalVariables) SetCheck(name string, value Value, allow func(defined bool) error) error
- type GoFunction
- func (goFunc *GoFunction) Call(args []any, globalState, extState *GlobalState, isExt, must bool) (Value, error)
- func (goFunc *GoFunction) Equal(ctx *Context, other Value, alreadyCompared map[uintptr]uintptr, depth int) bool
- func (*GoFunction) GetGoMethod(name string) (*GoFunction, bool)
- func (fn *GoFunction) GoFunc() any
- func (goFunc *GoFunction) IsMutable() bool
- func (fn *GoFunction) IsSharable(originState *GlobalState) (bool, string)
- func (fn *GoFunction) IsShared() bool
- func (fn *GoFunction) Kind() GoFunctionKind
- func (v *GoFunction) PrettyPrint(w *bufio.Writer, config *PrettyPrintConfig, depth int, parentIndentCount int)
- func (fn *GoFunction) Prop(ctx *Context, name string) Value
- func (*GoFunction) PropertyNames(ctx *Context) []string
- func (*GoFunction) SetProp(ctx *Context, name string, value Value) error
- func (fn *GoFunction) Share(originState *GlobalState)
- func (fn *GoFunction) SmartLock(state *GlobalState)
- func (fn *GoFunction) SmartUnlock(state *GlobalState)
- func (f *GoFunction) ToSymbolicValue(ctx *Context, encountered map[uintptr]symbolic.Value) (symbolic.Value, error)
- type GoFunctionKind
- type GoValue
- type GracefulTearDownTaskFn
- type GracefulTeardownStatus
- type GroupMatchesFindConfig
- type GroupMatchesFindConfigKind
- type GroupPattern
- type HeapAddress
- type Host
- func (host Host) Equal(ctx *Context, other Value, alreadyCompared map[uintptr]uintptr, depth int) bool
- func (host Host) ExplicitPort() int
- func (host Host) HasHttpScheme() bool
- func (patt Host) HasScheme() bool
- func (host Host) HostWithoutPort() Host
- func (host Host) IsMutable() bool
- func (host Host) Name() string
- func (host Host) PrettyPrint(w *bufio.Writer, config *PrettyPrintConfig, depth int, parentIndentCount int)
- func (host Host) Prop(ctx *Context, name string) Value
- func (host Host) PropertyNames(ctx *Context) []string
- func (host Host) ResourceName() string
- func (host Host) Scheme() Scheme
- func (Host) SetProp(ctx *Context, name string, value Value) error
- func (h Host) ToSymbolicValue(ctx *Context, encountered map[uintptr]symbolic.Value) (symbolic.Value, error)
- func (host Host) URLWithPath(absPath Path) URL
- func (host Host) UnderlyingString() string
- func (host Host) Validate() error
- func (host Host) WithoutScheme() string
- func (host Host) WriteJSONRepresentation(ctx *Context, w *jsoniter.Stream, config JSONSerializationConfig, depth int) error
- type HostPattern
- func (HostPattern) Call(values []Serializable) (Pattern, error)
- func (patt HostPattern) Equal(ctx *Context, other Value, alreadyCompared map[uintptr]uintptr, depth int) bool
- func (patt HostPattern) HasScheme() bool
- func (patt HostPattern) Includes(ctx *Context, v Value) bool
- func (patt HostPattern) IsMutable() bool
- func (patt HostPattern) Iterator(ctx *Context, config IteratorConfiguration) Iterator
- func (patt HostPattern) PrettyPrint(w *bufio.Writer, config *PrettyPrintConfig, depth int, parentIndentCount int)
- func (patt HostPattern) Prop(ctx *Context, name string) Value
- func (patt HostPattern) PropertyNames(ctx *Context) []string
- func (pattern HostPattern) Random(ctx *Context, options ...Option) Value
- func (patt HostPattern) Scheme() Scheme
- func (HostPattern) SetProp(ctx *Context, name string, value Value) error
- func (HostPattern) StringPattern() (StringPattern, bool)
- func (patt HostPattern) Test(ctx *Context, v Value) bool
- func (p HostPattern) ToSymbolicValue(ctx *Context, encountered map[uintptr]symbolic.Value) (symbolic.Value, error)
- func (patt HostPattern) UnderlyingString() string
- func (host HostPattern) WithoutScheme() string
- func (patt HostPattern) WriteJSONRepresentation(ctx *Context, w *jsoniter.Stream, config JSONSerializationConfig, depth int) error
- type HttpPermission
- type IProps
- type IPropsPattern
- type IPseudoAdd
- type IPseudoSub
- type IWithSecondaryContext
- type Identifier
- func (i Identifier) Equal(ctx *Context, otherIdent Value, alreadyCompared map[uintptr]uintptr, depth int) bool
- func (i Identifier) IsMutable() bool
- func (i Identifier) PrettyPrint(w *bufio.Writer, config *PrettyPrintConfig, depth int, parentIndentCount int)
- func (i Identifier) ToSymbolicValue(ctx *Context, encountered map[uintptr]symbolic.Value) (symbolic.Value, error)
- func (i Identifier) UnderlyingString() string
- func (i Identifier) WriteJSONRepresentation(ctx *Context, w *jsoniter.Stream, config JSONSerializationConfig, depth int) error
- type IdleEventSourceHandler
- type Image
- type ImportConfig
- type InMemoryModuleParsingConfig
- type InMemorySnapshotable
- type IncludableChunkfilePreparationArgs
- type IncludedChunk
- type InclusionMigrationOp
- type IncomingMessageReceivedEvent
- type Indexable
- type InoxFunction
- func (fn *InoxFunction) Call(globalState *GlobalState, self Value, args []Value, disabledArgSharing []bool) (Value, error)
- func (fn *InoxFunction) Equal(ctx *Context, other Value, alreadyCompared map[uintptr]uintptr, depth int) bool
- func (fn *InoxFunction) FuncExpr() *parse.FunctionExpression
- func (fn *InoxFunction) IsMutable() bool
- func (fn *InoxFunction) IsSharable(originState *GlobalState) (bool, string)
- func (fn *InoxFunction) IsShared() bool
- func (f *InoxFunction) OnMutation(ctx *Context, microtask MutationCallbackMicrotask, ...) (CallbackHandle, error)
- func (g *InoxFunction) PrettyPrint(w *bufio.Writer, config *PrettyPrintConfig, depth int, parentIndentCount int)
- func (f *InoxFunction) RemoveMutationCallback(ctx *Context, handle CallbackHandle)
- func (f *InoxFunction) RemoveMutationCallbackMicrotasks(ctx *Context)
- func (fn *InoxFunction) Share(originState *GlobalState)
- func (fn *InoxFunction) SmartLock(state *GlobalState)
- func (fn *InoxFunction) SmartUnlock(state *GlobalState)
- func (fn *InoxFunction) ToSymbolicValue(ctx *Context, encountered map[uintptr]symbolic.Value) (symbolic.Value, error)
- func (f *InoxFunction) Watcher(ctx *Context, config WatcherConfiguration) Watcher
- func (f *InoxFunction) WriteJSONRepresentation(ctx *Context, w *jsoniter.Stream, config JSONSerializationConfig, depth int) error
- type InstructionCallbackFn
- type Int
- func (i Int) Compare(other Value) (result int, comparable bool)
- func (i Int) Equal(ctx *Context, other Value, alreadyCompared map[uintptr]uintptr, depth int) bool
- func (i Int) Int64() int64
- func (i Int) IsMutable() bool
- func (n Int) IsRecursivelyRenderable(ctx *Context, input RenderingInput) bool
- func (i Int) IsSigned() bool
- func (i Int) PrettyPrint(w *bufio.Writer, config *PrettyPrintConfig, depth int, parentIndentCount int)
- func (n Int) Render(ctx *Context, w io.Writer, config RenderingInput) (int, error)
- func (i Int) ToSymbolicValue(ctx *Context, encountered map[uintptr]symbolic.Value) (symbolic.Value, error)
- func (i Int) WriteJSONRepresentation(ctx *Context, w *jsoniter.Stream, config JSONSerializationConfig, depth int) error
- type IntList
- type IntRange
- func (r IntRange) At(ctx *Context, i int) Value
- func (r IntRange) Contains(ctx *Context, v Serializable) bool
- func (r IntRange) Equal(ctx *Context, other Value, alreadyCompared map[uintptr]uintptr, depth int) bool
- func (r IntRange) HasKnownStart() bool
- func (r IntRange) Includes(ctx *Context, i Int) bool
- func (r IntRange) InclusiveEnd() int64
- func (r IntRange) IsEmpty(ctx *Context) bool
- func (r IntRange) IsMutable() bool
- func (r IntRange) Iterator(ctx *Context, config IteratorConfiguration) Iterator
- func (r IntRange) KnownStart() int64
- func (r IntRange) Len() int
- func (r IntRange) PrettyPrint(w *bufio.Writer, config *PrettyPrintConfig, depth int, parentIndentCount int)
- func (r IntRange) Random(ctx *Context) Value
- func (r IntRange) ToSymbolicValue(ctx *Context, encountered map[uintptr]symbolic.Value) (symbolic.Value, error)
- func (r IntRange) WriteJSONRepresentation(ctx *Context, w *jsoniter.Stream, config JSONSerializationConfig, depth int) error
- type IntRangeIterator
- func (it IntRangeIterator) Equal(ctx *Context, other Value, alreadyCompared map[uintptr]uintptr, depth int) bool
- func (it *IntRangeIterator) HasNext(*Context) bool
- func (it IntRangeIterator) IsMutable() bool
- func (it *IntRangeIterator) Key(ctx *Context) Value
- func (it *IntRangeIterator) Next(ctx *Context) bool
- func (it IntRangeIterator) PrettyPrint(w *bufio.Writer, config *PrettyPrintConfig, depth int, parentIndentCount int)
- func (it IntRangeIterator) ToSymbolicValue(ctx *Context, encountered map[uintptr]symbolic.Value) (symbolic.Value, error)
- func (it *IntRangeIterator) Value(*Context) Value
- type IntRangePattern
- func NewIncludedEndIntRangePattern(start, end int64, multipleOf int64) *IntRangePattern
- func NewIntRangePattern(intRange IntRange, multipleOf int64) *IntRangePattern
- func NewIntRangePatternFloatMultiple(intRange IntRange, multipleOf Float) *IntRangePattern
- func NewSingleElementIntRangePattern(n int64) *IntRangePattern
- func (patt *IntRangePattern) Equal(ctx *Context, other Value, alreadyCompared map[uintptr]uintptr, depth int) bool
- func (patt *IntRangePattern) HasMultipleOfConstraint() bool
- func (patt *IntRangePattern) Includes(ctx *Context, n Int) bool
- func (patt *IntRangePattern) IsMutable() bool
- func (patt *IntRangePattern) Iterator(ctx *Context, config IteratorConfiguration) Iterator
- func (patt *IntRangePattern) PrettyPrint(w *bufio.Writer, config *PrettyPrintConfig, depth int, parentIndentCount int)
- func (patt *IntRangePattern) Random(ctx *Context, options ...Option) Value
- func (patt *IntRangePattern) Range() IntRange
- func (patt *IntRangePattern) StringPattern() (StringPattern, bool)
- func (patt *IntRangePattern) Test(ctx *Context, v Value) bool
- func (p *IntRangePattern) ToSymbolicValue(ctx *Context, encountered map[uintptr]symbolic.Value) (symbolic.Value, error)
- func (p IntRangePattern) WriteJSONRepresentation(ctx *Context, w *jsoniter.Stream, config JSONSerializationConfig, depth int) error
- type IntRangeStringPattern
- func (patt *IntRangeStringPattern) CompiledRegex() *regexp.Regexp
- func (patt *IntRangeStringPattern) EffectiveLengthRange() IntRange
- func (patt *IntRangeStringPattern) Equal(ctx *Context, other Value, alreadyCompared map[uintptr]uintptr, depth int) bool
- func (patt *IntRangeStringPattern) FindMatches(ctx *Context, val Serializable, config MatchesFindConfig) (groups []Serializable, err error)
- func (patt *IntRangeStringPattern) HasRegex() bool
- func (patt *IntRangeStringPattern) IsMutable() bool
- func (patt *IntRangeStringPattern) IsResolved() bool
- func (patt *IntRangeStringPattern) Iterator(ctx *Context, config IteratorConfiguration) Iterator
- func (patt *IntRangeStringPattern) LengthRange() IntRange
- func (patt *IntRangeStringPattern) Parse(ctx *Context, s string) (Serializable, error)
- func (patt *IntRangeStringPattern) PatternNestingDepth(parentDepth int) int
- func (patt *IntRangeStringPattern) PrettyPrint(w *bufio.Writer, config *PrettyPrintConfig, depth int, parentIndentCount int)
- func (pattern *IntRangeStringPattern) Random(ctx *Context, options ...Option) Value
- func (patt *IntRangeStringPattern) Regex() string
- func (patt *IntRangeStringPattern) Resolve() (StringPattern, error)
- func (patt *IntRangeStringPattern) StringFrom(ctx *Context, v Value) (string, error)
- func (patt *IntRangeStringPattern) StringPattern() (StringPattern, bool)
- func (patt *IntRangeStringPattern) Test(ctx *Context, v Value) bool
- func (p *IntRangeStringPattern) ToSymbolicValue(ctx *Context, encountered map[uintptr]symbolic.Value) (symbolic.Value, error)
- func (patt *IntRangeStringPattern) WriteJSONRepresentation(ctx *Context, w *jsoniter.Stream, config JSONSerializationConfig, depth int) error
- type Integral
- type InternalPublicationId
- type IntersectionPattern
- func (patt *IntersectionPattern) Equal(ctx *Context, other Value, alreadyCompared map[uintptr]uintptr, depth int) bool
- func (patt *IntersectionPattern) IsMutable() bool
- func (patt *IntersectionPattern) Iterator(ctx *Context, config IteratorConfiguration) Iterator
- func (patt *IntersectionPattern) PrettyPrint(w *bufio.Writer, config *PrettyPrintConfig, depth int, parentIndentCount int)
- func (patt *IntersectionPattern) Random(ctx *Context, options ...Option) Value
- func (patt *IntersectionPattern) StringPattern() (StringPattern, bool)
- func (patt *IntersectionPattern) Test(ctx *Context, v Value) bool
- func (p *IntersectionPattern) ToSymbolicValue(ctx *Context, encountered map[uintptr]symbolic.Value) (symbolic.Value, error)
- func (patt IntersectionPattern) WriteJSONRepresentation(ctx *Context, w *jsoniter.Stream, config JSONSerializationConfig, depth int) error
- type IpropsIterator
- func (it *IpropsIterator) Equal(ctx *Context, other Value, alreadyCompared map[uintptr]uintptr, depth int) bool
- func (it *IpropsIterator) HasNext(*Context) bool
- func (it *IpropsIterator) IsMutable() bool
- func (it *IpropsIterator) Key(*Context) Value
- func (it *IpropsIterator) Next(ctx *Context) bool
- func (it *IpropsIterator) PrettyPrint(w *bufio.Writer, config *PrettyPrintConfig, depth int, parentIndentCount int)
- func (it *IpropsIterator) ToSymbolicValue(ctx *Context, encountered map[uintptr]symbolic.Value) (symbolic.Value, error)
- func (it *IpropsIterator) Value(*Context) Value
- type Iterable
- type IterationChange
- type Iterator
- type IteratorConfiguration
- type JSONSerializationConfig
- type KeyFilteredIterator
- func (it *KeyFilteredIterator) Equal(ctx *Context, other Value, alreadyCompared map[uintptr]uintptr, depth int) bool
- func (it *KeyFilteredIterator) HasNext(ctx *Context) bool
- func (it *KeyFilteredIterator) IsMutable() bool
- func (it *KeyFilteredIterator) Key(ctx *Context) Value
- func (it *KeyFilteredIterator) Next(ctx *Context) bool
- func (it *KeyFilteredIterator) PrettyPrint(w *bufio.Writer, config *PrettyPrintConfig, depth int, parentIndentCount int)
- func (it *KeyFilteredIterator) ToSymbolicValue(ctx *Context, encountered map[uintptr]symbolic.Value) (symbolic.Value, error)
- func (it *KeyFilteredIterator) Value(ctx *Context) Value
- type KeyList
- func (l KeyList) At(ctx *Context, i int) Value
- func (list KeyList) Equal(ctx *Context, other Value, alreadyCompared map[uintptr]uintptr, depth int) bool
- func (list KeyList) IsMutable() bool
- func (l KeyList) Iterator(ctx *Context, config IteratorConfiguration) Iterator
- func (l KeyList) Len() int
- func (list KeyList) PrettyPrint(w *bufio.Writer, config *PrettyPrintConfig, depth int, parentIndentCount int)
- func (l KeyList) ToSymbolicValue(ctx *Context, encountered map[uintptr]symbolic.Value) (symbolic.Value, error)
- func (list KeyList) WriteJSONRepresentation(ctx *Context, w *jsoniter.Stream, config JSONSerializationConfig, depth int) error
- type KeyValueFilteredIterator
- func (it *KeyValueFilteredIterator) Equal(ctx *Context, other Value, alreadyCompared map[uintptr]uintptr, depth int) bool
- func (it *KeyValueFilteredIterator) HasNext(ctx *Context) bool
- func (it *KeyValueFilteredIterator) IsMutable() bool
- func (it *KeyValueFilteredIterator) Key(ctx *Context) Value
- func (it *KeyValueFilteredIterator) Next(ctx *Context) bool
- func (it *KeyValueFilteredIterator) PrettyPrint(w *bufio.Writer, config *PrettyPrintConfig, depth int, parentIndentCount int)
- func (it *KeyValueFilteredIterator) ToSymbolicValue(ctx *Context, encountered map[uintptr]symbolic.Value) (symbolic.Value, error)
- func (it *KeyValueFilteredIterator) Value(ctx *Context) Value
- type LThread
- func (lthread *LThread) Cancel(*Context)
- func (r *LThread) Equal(ctx *Context, other Value, alreadyCompared map[uintptr]uintptr, depth int) bool
- func (r *LThread) GetGoMethod(name string) (*GoFunction, bool)
- func (lthread *LThread) IsDone() bool
- func (r *LThread) IsMutable() bool
- func (lthread *LThread) IsPaused() bool
- func (r *LThread) PrettyPrint(w *bufio.Writer, config *PrettyPrintConfig, depth int, parentIndentCount int)
- func (r *LThread) Prop(ctx *Context, name string) Value
- func (*LThread) PropertyNames(ctx *Context) []string
- func (lthread *LThread) ResumeAsync() error
- func (*LThread) SetProp(ctx *Context, name string, value Value) error
- func (r *LThread) ToSymbolicValue(ctx *Context, encountered map[uintptr]symbolic.Value) (symbolic.Value, error)
- func (lthread *LThread) WaitResult(ctx *Context) (Value, error)
- type LThreadGroup
- func (group *LThreadGroup) Add(newRt *LThread)
- func (group *LThreadGroup) CancelAll(*Context)
- func (g *LThreadGroup) Equal(ctx *Context, other Value, alreadyCompared map[uintptr]uintptr, depth int) bool
- func (g *LThreadGroup) GetGoMethod(name string) (*GoFunction, bool)
- func (g *LThreadGroup) IsMutable() bool
- func (g *LThreadGroup) PrettyPrint(w *bufio.Writer, config *PrettyPrintConfig, depth int, parentIndentCount int)
- func (g *LThreadGroup) Prop(ctx *Context, name string) Value
- func (*LThreadGroup) PropertyNames(ctx *Context) []string
- func (*LThreadGroup) SetProp(ctx *Context, name string, value Value) error
- func (g *LThreadGroup) ToSymbolicValue(ctx *Context, encountered map[uintptr]symbolic.Value) (symbolic.Value, error)
- func (group *LThreadGroup) WaitAllResults(ctx *Context) (*Array, error)
- type LThreadPermission
- type LThreadSpawnedEvent
- type LengthCheckingStringPattern
- func (patt *LengthCheckingStringPattern) CompiledRegex() *regexp.Regexp
- func (patt *LengthCheckingStringPattern) EffectiveLengthRange() IntRange
- func (patt *LengthCheckingStringPattern) Equal(ctx *Context, other Value, alreadyCompared map[uintptr]uintptr, depth int) bool
- func (patt *LengthCheckingStringPattern) FindMatches(ctx *Context, val Serializable, config MatchesFindConfig) (groups []Serializable, err error)
- func (pattern *LengthCheckingStringPattern) HasRegex() bool
- func (patt *LengthCheckingStringPattern) IsMutable() bool
- func (pattern *LengthCheckingStringPattern) IsResolved() bool
- func (patt LengthCheckingStringPattern) Iterator(ctx *Context, config IteratorConfiguration) Iterator
- func (patt *LengthCheckingStringPattern) LengthRange() IntRange
- func (patt *LengthCheckingStringPattern) MatchGroups(ctx *Context, v Serializable) (map[string]Serializable, bool, error)
- func (patt *LengthCheckingStringPattern) Parse(ctx *Context, s string) (Serializable, error)
- func (patt *LengthCheckingStringPattern) PatternNestingDepth(parentDepth int) int
- func (patt *LengthCheckingStringPattern) PrettyPrint(w *bufio.Writer, config *PrettyPrintConfig, depth int, parentIndentCount int)
- func (patt LengthCheckingStringPattern) Random(ctx *Context, options ...Option) Value
- func (pattern *LengthCheckingStringPattern) Regex() string
- func (patt *LengthCheckingStringPattern) Resolve() (StringPattern, error)
- func (patt *LengthCheckingStringPattern) StringPattern() (StringPattern, bool)
- func (pattern *LengthCheckingStringPattern) Test(ctx *Context, v Value) bool
- func (p *LengthCheckingStringPattern) ToSymbolicValue(ctx *Context, encountered map[uintptr]symbolic.Value) (symbolic.Value, error)
- func (patt LengthCheckingStringPattern) WriteJSONRepresentation(ctx *Context, w *jsoniter.Stream, config JSONSerializationConfig, depth int) error
- type LifetimeJob
- func (j *LifetimeJob) Equal(ctx *Context, other Value, alreadyCompared map[uintptr]uintptr, depth int) bool
- func (j *LifetimeJob) GetGoMethod(name string) (*GoFunction, bool)
- func (j *LifetimeJob) Instantiate(ctx *Context, self Value) (*LifetimeJobInstance, error)
- func (*LifetimeJob) IsMutable() bool
- func (j *LifetimeJob) PrettyPrint(w *bufio.Writer, config *PrettyPrintConfig, depth int, parentIndentCount int)
- func (j *LifetimeJob) Prop(ctx *Context, name string) Value
- func (*LifetimeJob) PropertyNames(ctx *Context) []string
- func (*LifetimeJob) SetProp(ctx *Context, name string, value Value) error
- func (j *LifetimeJob) ToSymbolicValue(ctx *Context, encountered map[uintptr]symbolic.Value) (symbolic.Value, error)
- func (j *LifetimeJob) WriteJSONRepresentation(ctx *Context, w *jsoniter.Stream, config JSONSerializationConfig, depth int) error
- type LifetimeJobInstance
- type Limit
- func GetDefaultMaxRequestHandlerLimits() []Limit
- func GetDefaultRequestHandlingLimits() []Limit
- func GetDefaultScriptLimits() []Limit
- func GetLimit(ctx *Context, limitName string, limitValue Serializable) (_ Limit, resultErr error)
- func MustMakeNotAutoDepletingCountLimit(limitName string, value int64) Limit
- type LimitKind
- type LineCount
- func (c LineCount) AsFloat64() (float64, bool)
- func (c LineCount) AsInt64() (int64, bool)
- func (c LineCount) Compare(other Value) (result int, comparable bool)
- func (count LineCount) Equal(ctx *Context, other Value, alreadyCompared map[uintptr]uintptr, depth int) bool
- func (c LineCount) Int64() int64
- func (count LineCount) IsMutable() bool
- func (c LineCount) IsSigned() bool
- func (c LineCount) IsZeroQuantity() bool
- func (count LineCount) PrettyPrint(w *bufio.Writer, config *PrettyPrintConfig, depth int, parentIndentCount int)
- func (c LineCount) ToSymbolicValue(ctx *Context, encountered map[uintptr]symbolic.Value) (symbolic.Value, error)
- func (count LineCount) WriteJSONRepresentation(ctx *Context, w *jsoniter.Stream, config JSONSerializationConfig, depth int) error
- type List
- func Filter(ctx *Context, iterable Iterable, condition Value) *List
- func GetAtMost(ctx *Context, maxCount Int, iterable SerializableIterable) *List
- func MapIterable(ctx *Context, iterable Iterable, mapper Value) *List
- func NewWrappedBoolList(elements ...Bool) *List
- func NewWrappedFloatList(elements ...Float) *List
- func NewWrappedFloatListFrom(elements []Float) *List
- func NewWrappedIntList(elements ...Int) *List
- func NewWrappedIntListFrom(elements []Int) *List
- func NewWrappedStringList(elements ...StringLike) *List
- func NewWrappedStringListFrom(elements []StringLike) *List
- func NewWrappedValueList(elements ...Serializable) *List
- func NewWrappedValueListFrom(elements []Serializable) *List
- func WrapUnderlyingList(l underlyingList) *List
- func (list *List) Clone(originState *GlobalState, sharableValues *[]PotentiallySharable, ...) (Serializable, error)
- func (l *List) Contains(ctx *Context, value Serializable) bool
- func (l *List) Dequeue(ctx *Context) Serializable
- func (list *List) Equal(ctx *Context, other Value, alreadyCompared map[uintptr]uintptr, depth int) bool
- func (list *List) GetOrBuildElements(ctx *Context) []Serializable
- func (l *List) IsEmpty(ctx *Context) bool
- func (list *List) IsMutable() bool
- func (list *List) IsRecursivelyRenderable(ctx *Context, input RenderingInput) bool
- func (list *List) Iterator(ctx *Context, config IteratorConfiguration) Iterator
- func (list *List) Migrate(ctx *Context, key Path, migration *FreeEntityMigrationArgs) (Value, error)
- func (l *List) OnMutation(ctx *Context, microtask MutationCallbackMicrotask, ...) (CallbackHandle, error)
- func (l *List) Pop(ctx *Context) Serializable
- func (list *List) PrettyPrint(w *bufio.Writer, config *PrettyPrintConfig, depth int, parentIndentCount int)
- func (l *List) Prop(ctx *Context, name string) Value
- func (*List) PropertyNames(ctx *Context) []string
- func (l *List) RemoveMutationCallback(ctx *Context, handle CallbackHandle)
- func (l *List) RemoveMutationCallbackMicrotasks(ctx *Context)
- func (list *List) Render(ctx *Context, w io.Writer, config RenderingInput) (int, error)
- func (*List) SetProp(ctx *Context, name string, value Value) error
- func (l *List) SetSlice(ctx *Context, start, end int, seq Sequence)
- func (l *List) SortBy(ctx *Context, path ValuePath, orderIdent Identifier)
- func (l *List) Sorted(ctx *Context, orderIdent Identifier) *List
- func (l *List) ToSymbolicValue(ctx *Context, encountered map[uintptr]symbolic.Value) (symbolic.Value, error)
- func (list *List) Watcher(ctx *Context, config WatcherConfiguration) Watcher
- func (list *List) WriteJSONRepresentation(ctx *Context, w *jsoniter.Stream, config JSONSerializationConfig, depth int) error
- type ListPattern
- func (patt *ListPattern) DefaultValue(ctx *Context) (Value, error)
- func (patt *ListPattern) ElementPatternAt(i int) (Pattern, bool)
- func (patt *ListPattern) Equal(ctx *Context, other Value, alreadyCompared map[uintptr]uintptr, depth int) bool
- func (patt *ListPattern) ExactElementCount() (int, bool)
- func (patt *ListPattern) GetMigrationOperations(ctx *Context, next Pattern, pseudoPath string) (migrations []MigrationOp, _ error)
- func (patt *ListPattern) IsMutable() bool
- func (patt ListPattern) Iterator(ctx *Context, config IteratorConfiguration) Iterator
- func (patt *ListPattern) MaxElementCount() int
- func (patt *ListPattern) MinElementCount() int
- func (patt ListPattern) PrettyPrint(w *bufio.Writer, config *PrettyPrintConfig, depth int, parentIndentCount int)
- func (patt ListPattern) Random(ctx *Context, options ...Option) Value
- func (patt *ListPattern) StringPattern() (StringPattern, bool)
- func (patt ListPattern) Test(ctx *Context, v Value) bool
- func (p *ListPattern) ToSymbolicValue(ctx *Context, encountered map[uintptr]symbolic.Value) (symbolic.Value, error)
- func (patt *ListPattern) WithElement(element Pattern) *ListPattern
- func (patt *ListPattern) WithMinElements(minCount int) *ListPattern
- func (patt *ListPattern) WithMinMaxElements(minCount, maxCount int) *ListPattern
- func (patt ListPattern) WriteJSONRepresentation(ctx *Context, w *jsoniter.Stream, config JSONSerializationConfig, depth int) error
- type LiteTransactionIsolator
- type LoadSelfManagedEntityFn
- type LocalSecondaryChunkParsingConfig
- type LocatedEvalError
- type LockedContextData
- type LogLevels
- type LogLevelsInitialization
- type LongValuePath
- func (p *LongValuePath) Equal(ctx *Context, other Value, alreadyCompared map[uintptr]uintptr, depth int) bool
- func (p *LongValuePath) GetFrom(ctx *Context, v Value) Value
- func (p *LongValuePath) IsMutable() bool
- func (p *LongValuePath) PrettyPrint(w *bufio.Writer, config *PrettyPrintConfig, depth int, parentIndentCount int)
- func (p *LongValuePath) ToSymbolicValue(ctx *Context, encountered map[uintptr]symbolic.Value) (symbolic.Value, error)
- func (p *LongValuePath) Validate() error
- func (p *LongValuePath) WriteJSONRepresentation(ctx *Context, w *jsoniter.Stream, config JSONSerializationConfig, depth int) error
- type LoopKind
- type LthreadSpawnArgs
- type LthreadWithStateSpawnArgs
- type Manifest
- type Mapping
- func (m *Mapping) Compute(ctx *Context, key Serializable) Value
- func (m *Mapping) Equal(ctx *Context, other Value, alreadyCompared map[uintptr]uintptr, depth int) bool
- func (m *Mapping) GetGoMethod(name string) (*GoFunction, bool)
- func (m *Mapping) IsMutable() bool
- func (m *Mapping) IsSharable(originState *GlobalState) (bool, string)
- func (m *Mapping) IsShared() bool
- func (m *Mapping) PrettyPrint(w *bufio.Writer, config *PrettyPrintConfig, depth int, parentIndentCount int)
- func (m *Mapping) Prop(ctx *Context, name string) Value
- func (*Mapping) PropertyNames(ctx *Context) []string
- func (*Mapping) SetProp(ctx *Context, name string, value Value) error
- func (m *Mapping) Share(originState *GlobalState)
- func (*Mapping) SmartLock(state *GlobalState)
- func (*Mapping) SmartUnlock(state *GlobalState)
- func (m *Mapping) ToSymbolicValue(ctx *Context, encountered map[uintptr]symbolic.Value) (symbolic.Value, error)
- func (m *Mapping) WriteJSONRepresentation(ctx *Context, w *jsoniter.Stream, config JSONSerializationConfig, depth int) error
- type MappingStaticData
- type MatchesFindConfig
- type MatchesFindConfigKind
- type Message
- func (m Message) Data() Value
- func (msg Message) Equal(ctx *Context, other Value, alreadyCompared map[uintptr]uintptr, depth int) bool
- func (Message) IsMutable() bool
- func (m Message) PrettyPrint(w *bufio.Writer, config *PrettyPrintConfig, depth int, parentIndentCount int)
- func (m Message) Prop(ctx *Context, name string) Value
- func (Message) PropertyNames(ctx *Context) []string
- func (Message) SetProp(ctx *Context, name string, value Value) error
- func (m Message) ToSymbolicValue(ctx *Context, encountered map[uintptr]symbolic.Value) (symbolic.Value, error)
- type MessageReceiver
- type MigrationAwarePattern
- type MigrationCapable
- type MigrationMixin
- type MigrationOp
- type MigrationOpHandler
- type MigrationOpHandlers
- type MigrationOpKind
- type Mimetype
- func (mt Mimetype) Equal(ctx *Context, other Value, alreadyCompared map[uintptr]uintptr, depth int) bool
- func (mt Mimetype) IsMutable() bool
- func (mt Mimetype) PrettyPrint(w *bufio.Writer, config *PrettyPrintConfig, depth int, parentIndentCount int)
- func (t Mimetype) ToSymbolicValue(ctx *Context, encountered map[uintptr]symbolic.Value) (symbolic.Value, error)
- func (mt Mimetype) UnderlyingString() string
- func (mt Mimetype) WithoutParams() Mimetype
- func (mt Mimetype) WriteJSONRepresentation(ctx *Context, w *jsoniter.Stream, config JSONSerializationConfig, depth int) error
- type Module
- func (mod *Module) AbsoluteSource() (ResourceName, bool)
- func (m *Module) Equal(ctx *Context, other Value, alreadyCompared map[uintptr]uintptr, depth int) bool
- func (*Module) GetGoMethod(name string) (*GoFunction, bool)
- func (mod *Module) HasURLSource() bool
- func (mod *Module) ImportStatements() (imports []*parse.ImportStatement)
- func (*Module) IsMutable() bool
- func (mod *Module) Name() string
- func (mod *Module) ParameterNames() (names []string)
- func (m *Module) ParsingErrorTuple() *Tuple
- func (m *Module) PreInit(preinitArgs PreinitArgs) (_ *Manifest, usedRunningState *TreeWalkState, _ []*StaticCheckError, ...)
- func (m *Module) PrettyPrint(w *bufio.Writer, config *PrettyPrintConfig, depth int, parentIndentCount int)
- func (m *Module) Prop(ctx *Context, name string) Value
- func (*Module) PropertyNames(ctx *Context) []string
- func (*Module) SetProp(ctx *Context, name string, value Value) error
- func (mod *Module) ToSymbolic() *symbolic.Module
- func (m *Module) ToSymbolicValue(ctx *Context, encountered map[uintptr]symbolic.Value) (symbolic.Value, error)
- type ModuleArgs
- func (s *ModuleArgs) Clone(originState *GlobalState, sharableValues *[]PotentiallySharable, ...) (Value, error)
- func (s *ModuleArgs) Equal(ctx *Context, other Value, alreadyCompared map[uintptr]uintptr, depth int) bool
- func (s *ModuleArgs) ForEachField(fn func(fieldName string, fieldValue Value) error) error
- func (s *ModuleArgs) IsMutable() bool
- func (s *ModuleArgs) PrettyPrint(w *bufio.Writer, config *PrettyPrintConfig, depth int, parentIndentCount int)
- func (s *ModuleArgs) Prop(ctx *Context, name string) Value
- func (s *ModuleArgs) PropertyNames(*Context) []string
- func (s *ModuleArgs) SetProp(ctx *Context, name string, value Value) error
- func (args *ModuleArgs) ToSymbolicValue(ctx *Context, encountered map[uintptr]symbolic.Value) (symbolic.Value, error)
- func (s *ModuleArgs) ValueMap() map[string]Value
- type ModuleComptimeTypes
- type ModuleHeap
- type ModuleKind
- type ModuleParameter
- func (p ModuleParameter) CliArgNames() string
- func (p ModuleParameter) DefaultValue(ctx *Context) (Value, bool)
- func (p ModuleParameter) GetArgumentFromCliArg(ctx *Context, s string) (v Serializable, handled bool, err error)
- func (p ModuleParameter) GetRestArgumentFromCliArgs(ctx *Context, args []string) (v Value, err error)
- func (p ModuleParameter) Name() string
- func (p ModuleParameter) Pattern() Pattern
- func (p ModuleParameter) RequiredOnCLI(ctx *Context) bool
- func (p ModuleParameter) StringifiedPattern() string
- func (p ModuleParameter) StringifiedPatternNoPercent() string
- type ModuleParameters
- func (p *ModuleParameters) GetArgumentsFromCliArgs(ctx *Context, cliArgs []string) (*ModuleArgs, error)
- func (p *ModuleParameters) GetArgumentsFromObject(ctx *Context, argObj *Object) (*ModuleArgs, error)
- func (p *ModuleParameters) GetArgumentsFromStruct(ctx *Context, argStruct *ModuleArgs) (*ModuleArgs, error)
- func (p *ModuleParameters) GetSymbolicArguments(ctx *Context) *symbolic.ModuleArgs
- func (p ModuleParameters) NoParameters() bool
- func (p *ModuleParameters) NonPositionalParameters() []ModuleParameter
- func (p *ModuleParameters) PositionalParameters() []ModuleParameter
- type ModuleParamsPattern
- func (p *ModuleParamsPattern) Equal(ctx *Context, other Value, alreadyCompared map[uintptr]uintptr, depth int) bool
- func (*ModuleParamsPattern) IsMutable() bool
- func (patt *ModuleParamsPattern) Iterator(ctx *Context, config IteratorConfiguration) Iterator
- func (p *ModuleParamsPattern) PrettyPrint(w *bufio.Writer, config *PrettyPrintConfig, depth int, parentIndentCount int)
- func (patt *ModuleParamsPattern) Random(ctx *Context, options ...Option) Value
- func (*ModuleParamsPattern) StringPattern() (StringPattern, bool)
- func (p *ModuleParamsPattern) Test(ctx *Context, v Value) bool
- func (s *ModuleParamsPattern) ToSymbolicValue(ctx *Context, encountered map[uintptr]symbolic.Value) (symbolic.Value, error)
- func (p *ModuleParamsPattern) WriteJSONRepresentation(ctx *Context, w *jsoniter.Stream, config JSONSerializationConfig, depth int) error
- type ModuleParsingConfig
- type ModulePreparationArgs
- type ModulePriority
- type ModuleRetrievalError
- type MutableLengthSequence
- type MutableSequence
- type Mutation
- func NewAddEntryMutation(ctx *Context, key, value Serializable, depth WatchingDepth, path Path) Mutation
- func NewAddPropMutation(ctx *Context, name string, value Serializable, depth WatchingDepth, path Path) Mutation
- func NewInsertElemAtIndexMutation(ctx *Context, index int, elem Serializable, depth WatchingDepth, path Path) Mutation
- func NewInsertSequenceAtIndexMutation(ctx *Context, index int, seq Sequence, depth WatchingDepth, path Path) Mutation
- func NewRemovePositionMutation(ctx *Context, index int, depth WatchingDepth, path Path) Mutation
- func NewRemovePositionRangeMutation(ctx *Context, intRange IntRange, depth WatchingDepth, path Path) Mutation
- func NewSetElemAtIndexMutation(ctx *Context, index int, elem Serializable, depth WatchingDepth, path Path) Mutation
- func NewSetSliceAtRangeMutation(ctx *Context, intRange IntRange, slice Serializable, depth WatchingDepth, ...) Mutation
- func NewSpecificIncompleteNoDataMutation(meta SpecificMutationMetadata) Mutation
- func NewSpecificMutation(ctx *Context, meta SpecificMutationMetadata, values ...Serializable) Mutation
- func NewUnspecifiedMutation(depth WatchingDepth, path Path) Mutation
- func NewUpdateEntryMutation(ctx *Context, key, newValue Serializable, depth WatchingDepth, path Path) Mutation
- func NewUpdatePropMutation(ctx *Context, name string, newValue Serializable, depth WatchingDepth, ...) Mutation
- func (m Mutation) AffectedIndex(ctx *Context) Int
- func (m Mutation) AffectedProperty(ctx *Context) string
- func (m Mutation) AffectedRange(ctx *Context) IntRange
- func (m Mutation) ApplyTo(ctx *Context, v Value) error
- func (m Mutation) DataElem(ctx *Context, index int) Value
- func (m Mutation) Element(ctx *Context) Value
- func (m Mutation) Equal(ctx *Context, other Value, alreadyCompared map[uintptr]uintptr, depth int) bool
- func (m Mutation) IsMutable() bool
- func (m Mutation) PrettyPrint(w *bufio.Writer, config *PrettyPrintConfig, depth int, parentIndentCount int)
- func (m Mutation) PropValue(ctx *Context) Value
- func (m Mutation) Relocalized(parent Path) Mutation
- func (m Mutation) Sequence(ctx *Context) Sequence
- func (m Mutation) ToSymbolicValue(ctx *Context, encountered map[uintptr]symbolic.Value) (symbolic.Value, error)
- type MutationCallbackMicrotask
- type MutationCallbacks
- func (c *MutationCallbacks) AddMicrotask(m MutationCallbackMicrotask, config MutationWatchingConfiguration) (handle CallbackHandle)
- func (c *MutationCallbacks) CallMicrotasks(ctx *Context, m Mutation)
- func (c *MutationCallbacks) Functions() []mutationCallback
- func (c *MutationCallbacks) RemoveMicrotask(handle CallbackHandle)
- func (c *MutationCallbacks) RemoveMicrotasks()
- type MutationKind
- type MutationPattern
- func (patt *MutationPattern) Equal(ctx *Context, other Value, alreadyCompared map[uintptr]uintptr, depth int) bool
- func (patt *MutationPattern) IsMutable() bool
- func (patt *MutationPattern) Iterator(ctx *Context, config IteratorConfiguration) Iterator
- func (patt *MutationPattern) PrettyPrint(w *bufio.Writer, config *PrettyPrintConfig, depth int, parentIndentCount int)
- func (patt *MutationPattern) Random(ctx *Context, options ...Option) Value
- func (patt *MutationPattern) StringPattern() (StringPattern, bool)
- func (patt *MutationPattern) Test(ctx *Context, v Value) bool
- func (p *MutationPattern) ToSymbolicValue(ctx *Context, encountered map[uintptr]symbolic.Value) (symbolic.Value, error)
- func (patt *MutationPattern) WriteJSONRepresentation(ctx *Context, w *jsoniter.Stream, config JSONSerializationConfig, depth int) error
- type MutationWatchingConfiguration
- type NamedSegmentPathPattern
- func (patt *NamedSegmentPathPattern) Equal(ctx *Context, other Value, alreadyCompared map[uintptr]uintptr, depth int) bool
- func (patt *NamedSegmentPathPattern) FindGroupMatches(*Context, Serializable, GroupMatchesFindConfig) (groups []*Object, err error)
- func (patt *NamedSegmentPathPattern) IsMutable() bool
- func (patt *NamedSegmentPathPattern) Iterator(ctx *Context, config IteratorConfiguration) Iterator
- func (patt *NamedSegmentPathPattern) MatchGroups(ctx *Context, v Serializable) (map[string]Serializable, bool, error)
- func (patt *NamedSegmentPathPattern) PrettyPrint(w *bufio.Writer, config *PrettyPrintConfig, depth int, parentIndentCount int)
- func (patt *NamedSegmentPathPattern) Prop(ctx *Context, name string) Value
- func (patt *NamedSegmentPathPattern) PropertyNames(ctx *Context) []string
- func (pattern *NamedSegmentPathPattern) Random(ctx *Context, options ...Option) Value
- func (*NamedSegmentPathPattern) SetProp(ctx *Context, name string, value Value) error
- func (patt *NamedSegmentPathPattern) StringPattern() (StringPattern, bool)
- func (patt *NamedSegmentPathPattern) Test(ctx *Context, v Value) bool
- func (p NamedSegmentPathPattern) ToSymbolicValue(ctx *Context, encountered map[uintptr]symbolic.Value) (symbolic.Value, error)
- func (patt *NamedSegmentPathPattern) WriteJSONRepresentation(ctx *Context, w *jsoniter.Stream, config JSONSerializationConfig, depth int) error
- type Namespace
- func (ns *Namespace) Equal(ctx *Context, other Value, alreadyCompared map[uintptr]uintptr, depth int) bool
- func (ns *Namespace) IsMutable() bool
- func (ns *Namespace) PrettyPrint(w *bufio.Writer, config *PrettyPrintConfig, depth int, parentIndentCount int)
- func (ns *Namespace) Prop(ctx *Context, name string) Value
- func (ns *Namespace) PropertyNames(ctx *Context) []string
- func (*Namespace) SetProp(ctx *Context, name string, value Value) error
- func (ns *Namespace) ToSymbolicValue(ctx *Context, encountered map[uintptr]symbolic.Value) (symbolic.Value, error)
- type NamespaceMemberPatternReprMixin
- type NewDefaultContextFn
- type NewDefaultGlobalStateFn
- type NilT
- func (Nil NilT) Equal(ctx *Context, other Value, alreadyCompared map[uintptr]uintptr, depth int) bool
- func (Nil NilT) IsMutable() bool
- func (Nil NilT) PrettyPrint(w *bufio.Writer, config *PrettyPrintConfig, depth int, parentIndentCount int)
- func (n NilT) String() string
- func (n NilT) ToSymbolicValue(ctx *Context, encountered map[uintptr]symbolic.Value) (symbolic.Value, error)
- func (Nil NilT) WriteJSONRepresentation(ctx *Context, w *jsoniter.Stream, config JSONSerializationConfig, depth int) error
- type NillableInitializationMigrationOp
- type NotAllowedError
- type NotCallablePatternMixin
- type NotRenderableMixin
- type NumberList
- func (list *NumberList[T]) At(ctx *Context, i int) Value
- func (list *NumberList[T]) Clone(originState *GlobalState, sharableValues *[]PotentiallySharable, ...) (Serializable, error)
- func (list *NumberList[T]) ConstraintId() ConstraintId
- func (list *NumberList[T]) ContainsSimple(ctx *Context, v Serializable) bool
- func (list *NumberList[T]) Equal(ctx *Context, other Value, alreadyCompared map[uintptr]uintptr, depth int) bool
- func (list *NumberList[T]) IsMutable() bool
- func (list *NumberList[T]) Iterator(ctx *Context, config IteratorConfiguration) Iterator
- func (list *NumberList[T]) Len() int
- func (list *NumberList[T]) PrettyPrint(w *bufio.Writer, config *PrettyPrintConfig, depth int, parentIndentCount int)
- func (list *NumberList[T]) SetSlice(ctx *Context, start, end int, seq Sequence)
- func (l *NumberList[N]) ToSymbolicValue(ctx *Context, encountered map[uintptr]symbolic.Value) (symbolic.Value, error)
- func (list *NumberList[T]) WriteJSONRepresentation(ctx *Context, w *jsoniter.Stream, config JSONSerializationConfig, depth int) error
- type NumberListIterator
- func (it *NumberListIterator[T]) Equal(ctx *Context, other Value, alreadyCompared map[uintptr]uintptr, depth int) bool
- func (it NumberListIterator[T]) HasNext(*Context) bool
- func (it *NumberListIterator[T]) IsMutable() bool
- func (it *NumberListIterator[T]) Key(ctx *Context) Value
- func (it *NumberListIterator[T]) Next(ctx *Context) bool
- func (it *NumberListIterator[T]) PrettyPrint(w *bufio.Writer, config *PrettyPrintConfig, depth int, parentIndentCount int)
- func (it *NumberListIterator[T]) ToSymbolicValue(ctx *Context, encountered map[uintptr]symbolic.Value) (symbolic.Value, error)
- func (it *NumberListIterator[T]) Value(*Context) Value
- type Object
- func CreateDirEntry(path, walkedDirPath string, addDotSlashPrefix bool, d fs.DirEntry) *Object
- func EvaluatePermissionListingObjectNode(n *parse.ObjectLiteral, config PreinitArgs) (*Object, error)
- func NewObject() *Object
- func NewObjectFromMap(valMap ValMap, ctx *Context) *Object
- func NewObjectFromMapNoInit(valMap ValMap) *Object
- func ParseObjectJSONrepresentation(ctx *Context, it *jsoniter.Iterator, pattern *ObjectPattern, try bool) (_ *Object, finalErr error)
- func (obj *Object) AddSystemGraphEvent(ctx *Context, text string)
- func (obj *Object) Contains(ctx *Context, value Serializable) bool
- func (obj *Object) EntryMap(ctx *Context) map[string]Serializable
- func (obj *Object) Equal(ctx *Context, other Value, alreadyCompared map[uintptr]uintptr, depth int) bool
- func (obj *Object) ForEachElement(ctx *Context, fn func(index int, v Serializable) error) error
- func (obj *Object) ForEachEntry(fn func(k string, v Serializable) error) error
- func (obj *Object) HasProp(ctx *Context, name string) bool
- func (obj *Object) HasPropValue(ctx *Context, value Value) bool
- func (obj *Object) IsEmpty(ctx *Context) bool
- func (obj *Object) IsMutable() bool
- func (obj *Object) IsRecursivelyRenderable(ctx *Context, input RenderingInput) bool
- func (obj *Object) IsSharable(originState *GlobalState) (bool, string)
- func (obj *Object) IsShared() bool
- func (obj *Object) Iterator(ctx *Context, config IteratorConfiguration) Iterator
- func (obj *Object) Keys(ctx *Context) []string
- func (obj *Object) LifetimeJobs() *ValueLifetimeJobs
- func (o *Object) Migrate(ctx *Context, key Path, migration *FreeEntityMigrationArgs) (Value, error)
- func (obj *Object) OnMutation(ctx *Context, microtask MutationCallbackMicrotask, ...) (CallbackHandle, error)
- func (obj *Object) PrettyPrint(w *bufio.Writer, config *PrettyPrintConfig, depth int, parentIndentCount int)
- func (obj *Object) Prop(ctx *Context, name string) Value
- func (obj *Object) PropNotStored(ctx *Context, name string) Value
- func (obj *Object) PropertyNames(ctx *Context) []string
- func (obj *Object) ProposeSystemGraph(ctx *Context, g *SystemGraph, proposedName string, ...)
- func (obj *Object) ReceiveMessage(ctx *Context, msg Message) error
- func (obj *Object) RemoveMutationCallback(ctx *Context, handle CallbackHandle)
- func (obj *Object) RemoveMutationCallbackMicrotasks(ctx *Context)
- func (obj *Object) Render(ctx *Context, w io.Writer, config RenderingInput) (int, error)
- func (obj *Object) SetProp(ctx *Context, name string, value Value) error
- func (obj *Object) SetURLOnce(ctx *Context, u URL) error
- func (obj *Object) Share(originState *GlobalState)
- func (obj *Object) SmartLock(state *GlobalState)
- func (obj *Object) SmartUnlock(state *GlobalState)
- func (obj *Object) SystemGraph() *SystemGraph
- func (obj *Object) ToSymbolicValue(ctx *Context, encountered map[uintptr]symbolic.Value) (symbolic.Value, error)
- func (obj *Object) URL() (URL, bool)
- func (obj *Object) ValueEntryMap(ctx *Context) map[string]Value
- func (obj *Object) Watcher(ctx *Context, config WatcherConfiguration) Watcher
- func (obj *Object) WriteJSONRepresentation(ctx *Context, w *jsoniter.Stream, config JSONSerializationConfig, depth int) error
- type ObjectPattern
- func (patt *ObjectPattern) CompleteEntry(name string) (ObjectPatternEntry, bool)
- func (patt *ObjectPattern) Entry(name string) (pattern Pattern, optional bool, yes bool)
- func (patt *ObjectPattern) EntryCount() int
- func (patt *ObjectPattern) Equal(ctx *Context, other Value, alreadyCompared map[uintptr]uintptr, depth int) bool
- func (patt *ObjectPattern) ForEachEntry(fn func(entry ObjectPatternEntry) error) error
- func (patt *ObjectPattern) GetMigrationOperations(ctx *Context, next Pattern, pseudoPath string) (migrations []MigrationOp, _ error)
- func (patt *ObjectPattern) HasRequiredOrOptionalEntry(name string) bool
- func (patt *ObjectPattern) IsMutable() bool
- func (patt ObjectPattern) Iterator(ctx *Context, config IteratorConfiguration) Iterator
- func (patt ObjectPattern) PrettyPrint(w *bufio.Writer, config *PrettyPrintConfig, depth int, parentIndentCount int)
- func (patt *ObjectPattern) Random(ctx *Context, options ...Option) Value
- func (patt *ObjectPattern) StringPattern() (StringPattern, bool)
- func (patt *ObjectPattern) Test(ctx *Context, v Value) bool
- func (p *ObjectPattern) ToSymbolicValue(ctx *Context, encountered map[uintptr]symbolic.Value) (symbolic.Value, error)
- func (patt *ObjectPattern) ValuePropPattern(name string) (propPattern Pattern, isOptional bool, ok bool)
- func (patt *ObjectPattern) ValuePropertyNames() []string
- func (patt *ObjectPattern) WithConstraints(constraints []*ComplexPropertyConstraint) *ObjectPattern
- func (patt ObjectPattern) WriteJSONRepresentation(ctx *Context, w *jsoniter.Stream, config JSONSerializationConfig, depth int) error
- type ObjectPatternEntriesHelper
- type ObjectPatternEntry
- type Opcode
- type OpenDBFn
- type Option
- func (opt Option) Clone(originState *GlobalState, sharableValues *[]PotentiallySharable, ...) (Serializable, error)
- func (opt Option) Equal(ctx *Context, other Value, alreadyCompared map[uintptr]uintptr, depth int) bool
- func (opt Option) IsMutable() bool
- func (opt Option) PrettyPrint(w *bufio.Writer, config *PrettyPrintConfig, depth int, parentIndentCount int)
- func (opt Option) String() string
- func (o Option) ToSymbolicValue(ctx *Context, encountered map[uintptr]symbolic.Value) (symbolic.Value, error)
- func (opt Option) WriteJSONRepresentation(ctx *Context, w *jsoniter.Stream, config JSONSerializationConfig, depth int) error
- type OptionPattern
- func (patt *OptionPattern) Equal(ctx *Context, other Value, alreadyCompared map[uintptr]uintptr, depth int) bool
- func (patt *OptionPattern) IsMutable() bool
- func (patt OptionPattern) Iterator(ctx *Context, config IteratorConfiguration) Iterator
- func (patt OptionPattern) PrettyPrint(w *bufio.Writer, config *PrettyPrintConfig, depth int, parentIndentCount int)
- func (patt OptionPattern) Random(ctx *Context, options ...Option) Value
- func (patt *OptionPattern) StringPattern() (StringPattern, bool)
- func (patt OptionPattern) Test(ctx *Context, v Value) bool
- func (p *OptionPattern) ToSymbolicValue(ctx *Context, encountered map[uintptr]symbolic.Value) (symbolic.Value, error)
- func (patt OptionPattern) WriteJSONRepresentation(ctx *Context, w *jsoniter.Stream, config JSONSerializationConfig, depth int) error
- type OptionalParam
- type OptionalPattern
- func (pattern *OptionalPattern) Equal(ctx *Context, other Value, alreadyCompared map[uintptr]uintptr, depth int) bool
- func (pattern *OptionalPattern) IsMutable() bool
- func (patt *OptionalPattern) Iterator(ctx *Context, config IteratorConfiguration) Iterator
- func (pattern *OptionalPattern) PrettyPrint(w *bufio.Writer, config *PrettyPrintConfig, depth int, parentIndentCount int)
- func (patt *OptionalPattern) Random(ctx *Context, options ...Option) Value
- func (patt *OptionalPattern) StringPattern() (StringPattern, bool)
- func (patt *OptionalPattern) Test(ctx *Context, v Value) bool
- func (p *OptionalPattern) ToSymbolicValue(ctx *Context, encountered map[uintptr]symbolic.Value) (symbolic.Value, error)
- func (pattern *OptionalPattern) WriteJSONRepresentation(ctx *Context, w *jsoniter.Stream, config JSONSerializationConfig, depth int) error
- type Order
- type OrderedPair
- func (p *OrderedPair) At(ctx *Context, i int) Value
- func (p *OrderedPair) Equal(ctx *Context, other Value, alreadyCompared map[uintptr]uintptr, depth int) bool
- func (p *OrderedPair) GetOrBuildElements(ctx *Context) []Serializable
- func (tuple *OrderedPair) IsMutable() bool
- func (p *OrderedPair) Iterator(ctx *Context, config IteratorConfiguration) Iterator
- func (p *OrderedPair) Len() int
- func (p OrderedPair) PrettyPrint(w *bufio.Writer, config *PrettyPrintConfig, depth int, parentIndentCount int)
- func (p *OrderedPair) ToSymbolicValue(ctx *Context, encountered map[uintptr]symbolic.Value) (symbolic.Value, error)
- func (p *OrderedPair) WriteJSONRepresentation(ctx *Context, w *jsoniter.Stream, config JSONSerializationConfig, depth int) error
- type ParserBasedPseudoPattern
- func (patt *ParserBasedPseudoPattern) CompiledRegex() *regexp.Regexp
- func (patt *ParserBasedPseudoPattern) EffectiveLengthRange() IntRange
- func (patt *ParserBasedPseudoPattern) Equal(ctx *Context, other Value, alreadyCompared map[uintptr]uintptr, depth int) bool
- func (patt *ParserBasedPseudoPattern) FindMatches(ctx *Context, val Serializable, config MatchesFindConfig) (groups []Serializable, err error)
- func (pattern *ParserBasedPseudoPattern) HasRegex() bool
- func (patt *ParserBasedPseudoPattern) IsMutable() bool
- func (patt *ParserBasedPseudoPattern) IsResolved() bool
- func (patt *ParserBasedPseudoPattern) Iterator(ctx *Context, config IteratorConfiguration) Iterator
- func (patt *ParserBasedPseudoPattern) LengthRange() IntRange
- func (patt *ParserBasedPseudoPattern) Parse(ctx *Context, s string) (Serializable, error)
- func (patt *ParserBasedPseudoPattern) PatternNestingDepth(parentDepth int) int
- func (patt *ParserBasedPseudoPattern) PrettyPrint(w *bufio.Writer, config *PrettyPrintConfig, depth int, parentIndentCount int)
- func (pattern *ParserBasedPseudoPattern) Random(ctx *Context, options ...Option) Value
- func (pattern *ParserBasedPseudoPattern) Regex() string
- func (patt *ParserBasedPseudoPattern) Resolve() (StringPattern, error)
- func (patt *ParserBasedPseudoPattern) StringPattern() (StringPattern, bool)
- func (patt *ParserBasedPseudoPattern) Test(ctx *Context, v Value) bool
- func (p *ParserBasedPseudoPattern) ToSymbolicValue(ctx *Context, encountered map[uintptr]symbolic.Value) (symbolic.Value, error)
- func (patt ParserBasedPseudoPattern) WriteJSONRepresentation(ctx *Context, w *jsoniter.Stream, config JSONSerializationConfig, depth int) error
- type Path
- func (pth Path) Basename() String
- func (pth Path) CanBeDirOfEntry(absPath Path) bool
- func (pth Path) DirPath() Path
- func (pth Path) Equal(ctx *Context, other Value, alreadyCompared map[uintptr]uintptr, depth int) bool
- func (pth Path) Extension() string
- func (pth Path) IsAbsolute() bool
- func (pth Path) IsDirPath() bool
- func (pth Path) IsMutable() bool
- func (pth Path) IsRelative() bool
- func (pth Path) Join(relativePath Path, fls afs.Filesystem) Path
- func (pth Path) JoinAbsolute(absPath Path, fls afs.Filesystem) Path
- func (pth Path) JoinEntry(name string) Path
- func (pth Path) PrettyPrint(w *bufio.Writer, config *PrettyPrintConfig, depth int, parentIndentCount int)
- func (pth Path) Prop(ctx *Context, name string) Value
- func (pth Path) PropertyNames(ctx *Context) []string
- func (pth Path) RelativeEquiv() Path
- func (pth Path) ResourceName() string
- func (Path) SetProp(ctx *Context, name string, value Value) error
- func (pth Path) ToAbs(fls afs.Filesystem) (Path, error)
- func (pth Path) ToGlobbingPattern() PathPattern
- func (pth Path) ToPrefixPattern() PathPattern
- func (p Path) ToSymbolicValue(ctx *Context, encountered map[uintptr]symbolic.Value) (symbolic.Value, error)
- func (pth Path) UnderlyingString() string
- func (pth Path) Validate() error
- func (p Path) Walker(ctx *Context) (Walker, error)
- func (pth Path) WriteJSONRepresentation(ctx *Context, w *jsoniter.Stream, config JSONSerializationConfig, depth int) error
- type PathPattern
- func (PathPattern) Call(values []Serializable) (Pattern, error)
- func (patt PathPattern) Equal(ctx *Context, other Value, alreadyCompared map[uintptr]uintptr, depth int) bool
- func (patt PathPattern) Includes(ctx *Context, v Value) bool
- func (patt PathPattern) IsAbsolute() bool
- func (patt PathPattern) IsDirGlobbingPattern() bool
- func (patt PathPattern) IsGlobbingPattern() bool
- func (patt PathPattern) IsMutable() bool
- func (patt PathPattern) IsPrefixPattern() bool
- func (patt PathPattern) Iterator(ctx *Context, config IteratorConfiguration) Iterator
- func (patt PathPattern) Prefix() string
- func (patt PathPattern) PrettyPrint(w *bufio.Writer, config *PrettyPrintConfig, depth int, parentIndentCount int)
- func (patt PathPattern) Prop(ctx *Context, name string) Value
- func (patt PathPattern) PropertyNames(ctx *Context) []string
- func (pattern PathPattern) Random(ctx *Context, options ...Option) Value
- func (PathPattern) SetProp(ctx *Context, name string, value Value) error
- func (patt PathPattern) StringPattern() (StringPattern, bool)
- func (patt PathPattern) Test(ctx *Context, v Value) bool
- func (patt PathPattern) ToAbs(fls afs.Filesystem) PathPattern
- func (patt PathPattern) ToGlobbingPattern() PathPattern
- func (p PathPattern) ToSymbolicValue(ctx *Context, encountered map[uintptr]symbolic.Value) (symbolic.Value, error)
- func (patt PathPattern) UnderlyingString() string
- func (patt PathPattern) WriteJSONRepresentation(ctx *Context, w *jsoniter.Stream, config JSONSerializationConfig, depth int) error
- type PathStringPattern
- func (patt *PathStringPattern) Call(values []Serializable) (Pattern, error)
- func (patt *PathStringPattern) CompiledRegex() *regexp.Regexp
- func (patt *PathStringPattern) EffectiveLengthRange() IntRange
- func (patt *PathStringPattern) Equal(ctx *Context, other Value, alreadyCompared map[uintptr]uintptr, depth int) bool
- func (patt *PathStringPattern) FindMatches(ctx *Context, val Serializable, config MatchesFindConfig) (groups []Serializable, err error)
- func (pattern *PathStringPattern) HasRegex() bool
- func (patt *PathStringPattern) IsMutable() bool
- func (patt *PathStringPattern) IsResolved() bool
- func (patt *PathStringPattern) Iterator(ctx *Context, config IteratorConfiguration) Iterator
- func (patt *PathStringPattern) LengthRange() IntRange
- func (patt *PathStringPattern) MatchGroups(ctx *Context, v Serializable) (map[string]Serializable, bool, error)
- func (patt *PathStringPattern) Parse(ctx *Context, s string) (Serializable, error)
- func (patt *PathStringPattern) PatternNestingDepth(parentDepth int) int
- func (patt *PathStringPattern) PrettyPrint(w *bufio.Writer, config *PrettyPrintConfig, depth int, parentIndentCount int)
- func (pattern *PathStringPattern) Random(ctx *Context, options ...Option) Value
- func (pattern *PathStringPattern) Regex() string
- func (patt *PathStringPattern) Resolve() (StringPattern, error)
- func (patt *PathStringPattern) StringPattern() (StringPattern, bool)
- func (pattern *PathStringPattern) Test(ctx *Context, v Value) bool
- func (p *PathStringPattern) ToSymbolicValue(ctx *Context, encountered map[uintptr]symbolic.Value) (symbolic.Value, error)
- func (patt *PathStringPattern) WriteJSONRepresentation(ctx *Context, w *jsoniter.Stream, config JSONSerializationConfig, depth int) error
- type Pattern
- type PatternDeserializer
- type PatternIterator
- func (it *PatternIterator) Equal(ctx *Context, other Value, alreadyCompared map[uintptr]uintptr, depth int) bool
- func (it *PatternIterator) HasNext(ctx *Context) bool
- func (it *PatternIterator) IsMutable() bool
- func (it *PatternIterator) Key(ctx *Context) Value
- func (it *PatternIterator) Next(ctx *Context) bool
- func (it *PatternIterator) PrettyPrint(w *bufio.Writer, config *PrettyPrintConfig, depth int, parentIndentCount int)
- func (it PatternIterator) ToSymbolicValue(ctx *Context, encountered map[uintptr]symbolic.Value) (symbolic.Value, error)
- func (it *PatternIterator) Value(ctx *Context) Value
- type PatternNamespace
- func (ns *PatternNamespace) Equal(ctx *Context, other Value, alreadyCompared map[uintptr]uintptr, depth int) bool
- func (ns *PatternNamespace) IsMutable() bool
- func (ns *PatternNamespace) PrettyPrint(w *bufio.Writer, config *PrettyPrintConfig, depth int, parentIndentCount int)
- func (ns *PatternNamespace) ToSymbolicValue(ctx *Context, encountered map[uintptr]symbolic.Value) (symbolic.Value, error)
- type PeriodicWatcher
- func (w *PeriodicWatcher) Config() WatcherConfiguration
- func (w *PeriodicWatcher) Equal(ctx *Context, other Value, alreadyCompared map[uintptr]uintptr, depth int) bool
- func (w *PeriodicWatcher) InformAboutAsync(ctx *Context, v Value)
- func (w *PeriodicWatcher) IsMutable() bool
- func (w *PeriodicWatcher) IsStopped() bool
- func (watcher *PeriodicWatcher) PrettyPrint(w *bufio.Writer, config *PrettyPrintConfig, depth int, parentIndentCount int)
- func (w *PeriodicWatcher) Stop()
- func (w *PeriodicWatcher) Stream(ctx *Context, config *ReadableStreamConfiguration) ReadableStream
- func (w *PeriodicWatcher) ToSymbolicValue(ctx *Context, encountered map[uintptr]symbolic.Value) (symbolic.Value, error)
- func (w *PeriodicWatcher) WaitNext(ctx *Context, additionalFilter Pattern, timeout time.Duration) (Value, error)
- type Permission
- type PermissionKind
- type PointerType
- func (t *PointerType) GetValueAllocParams() (size int, alignment int)
- func (t *PointerType) GoType() reflect.Type
- func (t *PointerType) New(heap *ModuleHeap) HeapAddress
- func (t *PointerType) StructFieldRetrieval(name string) fieldRetrievalInfo
- func (t *PointerType) Symbolic() symbolic.CompileTimeType
- func (t *PointerType) ValueSize() uintptr
- func (t *PointerType) ValueType() CompileTimeType
- type Port
- func (p Port) Compare(other Value) (result int, comparable bool)
- func (port Port) Equal(ctx *Context, other Value, alreadyCompared map[uintptr]uintptr, depth int) bool
- func (port Port) IsMutable() bool
- func (port Port) PrettyPrint(w *bufio.Writer, config *PrettyPrintConfig, depth int, parentIndentCount int)
- func (port Port) ToSymbolicValue(ctx *Context, encountered map[uintptr]symbolic.Value) (symbolic.Value, error)
- func (port Port) WriteJSONRepresentation(ctx *Context, w *jsoniter.Stream, config JSONSerializationConfig, depth int) error
- type PotentiallySharable
- type PreinitArgs
- type PreinitFile
- type PreinitFiles
- type PrettyPrintColors
- type PrettyPrintConfig
- type ProgramStopReason
- type ProgramStoppedEvent
- type Project
- type ProjectConfiguration
- type ProjectID
- type ProjectSecret
- type ProjectSecretInfo
- type PropertyDependencies
- type PropertyName
- func (n PropertyName) Equal(ctx *Context, otherName Value, alreadyCompared map[uintptr]uintptr, depth int) bool
- func (n PropertyName) GetFrom(ctx *Context, v Value) Value
- func (n PropertyName) IsMutable() bool
- func (n PropertyName) PrettyPrint(w *bufio.Writer, config *PrettyPrintConfig, depth int, parentIndentCount int)
- func (n PropertyName) SegmentGetFrom(ctx *Context, v Value) Value
- func (p PropertyName) ToSymbolicValue(ctx *Context, encountered map[uintptr]symbolic.Value) (symbolic.Value, error)
- func (n PropertyName) UnderlyingString() string
- func (n PropertyName) Validate() error
- func (p PropertyName) WriteJSONRepresentation(ctx *Context, w *jsoniter.Stream, config JSONSerializationConfig, depth int) error
- type ProtocolClient
- type Publication
- func (p *Publication) Data() Value
- func (p *Publication) Equal(ctx *Context, other Value, alreadyCompared map[uintptr]uintptr, depth int) bool
- func (Publication) IsMutable() bool
- func (p *Publication) PrettyPrint(w *bufio.Writer, config *PrettyPrintConfig, depth int, parentIndentCount int)
- func (p *Publication) PublicationDate() DateTime
- func (p *Publication) Publisher() Value
- func (p *Publication) ToSymbolicValue(ctx *Context, encountered map[uintptr]symbolic.Value) (symbolic.Value, error)
- type PublicationCallbackConfiguration
- type PublicationCallbackMicrotask
- type Quantity
- type QuantityRange
- func (r QuantityRange) Contains(ctx *Context, v Serializable) bool
- func (r QuantityRange) Equal(ctx *Context, other Value, alreadyCompared map[uintptr]uintptr, depth int) bool
- func (r QuantityRange) InclusiveEnd() Serializable
- func (r QuantityRange) IsEmpty(ctx *Context) bool
- func (r QuantityRange) IsMutable() bool
- func (r QuantityRange) Iterator(ctx *Context, config IteratorConfiguration) Iterator
- func (r QuantityRange) KnownStart() Serializable
- func (r QuantityRange) PrettyPrint(w *bufio.Writer, config *PrettyPrintConfig, depth int, parentIndentCount int)
- func (r QuantityRange) ToSymbolicValue(ctx *Context, encountered map[uintptr]symbolic.Value) (symbolic.Value, error)
- func (r QuantityRange) WriteJSONRepresentation(ctx *Context, w *jsoniter.Stream, config JSONSerializationConfig, depth int) error
- type QuantityRangeIterator
- func (it QuantityRangeIterator) Equal(ctx *Context, other Value, alreadyCompared map[uintptr]uintptr, depth int) bool
- func (it *QuantityRangeIterator) HasNext(*Context) bool
- func (it QuantityRangeIterator) IsMutable() bool
- func (it *QuantityRangeIterator) Key(ctx *Context) Value
- func (it *QuantityRangeIterator) Next(ctx *Context) bool
- func (it QuantityRangeIterator) PrettyPrint(w *bufio.Writer, config *PrettyPrintConfig, depth int, parentIndentCount int)
- func (it QuantityRangeIterator) ToSymbolicValue(ctx *Context, encountered map[uintptr]symbolic.Value) (symbolic.Value, error)
- func (it *QuantityRangeIterator) Value(*Context) Value
- type RandomnessSource
- func (r *RandomnessSource) Equal(ctx *Context, other Value, alreadyCompared map[uintptr]uintptr, depth int) bool
- func (r *RandomnessSource) Int64() int64
- func (r *RandomnessSource) IsMutable() bool
- func (r *RandomnessSource) PrettyPrint(w *bufio.Writer, config *PrettyPrintConfig, depth int, parentIndentCount int)
- func (r *RandomnessSource) RandBit() bool
- func (r *RandomnessSource) RandInt64Range(start, end int64) int64
- func (r *RandomnessSource) RandUint64Range(start, end uint64) uint64
- func (s *RandomnessSource) Read(bytes []byte) (int, error)
- func (s *RandomnessSource) ReadNBytesAsBase64Unpadded(n int) string
- func (s *RandomnessSource) ReadNBytesAsHex(n int) string
- func (r *RandomnessSource) ToSymbolicValue(ctx *Context, encountered map[uintptr]symbolic.Value) (symbolic.Value, error)
- func (r *RandomnessSource) Uint64() uint64
- type Rate
- type RawTcpPermission
- type Readable
- type ReadableByteStream
- func (s *ReadableByteStream) ChunkDataType() Pattern
- func (s *ReadableByteStream) Equal(ctx *Context, other Value, alreadyCompared map[uintptr]uintptr, depth int) bool
- func (s *ReadableByteStream) IsMainlyChunked() bool
- func (*ReadableByteStream) IsMutable() bool
- func (s *ReadableByteStream) IsStopped() bool
- func (s *ReadableByteStream) PrettyPrint(w *bufio.Writer, config *PrettyPrintConfig, depth int, parentIndentCount int)
- func (s *ReadableByteStream) Stop()
- func (s *ReadableByteStream) Stream(ctx *Context, config *ReadableStreamConfiguration) ReadableStream
- func (s *ReadableByteStream) ToSymbolicValue(ctx *Context, encountered map[uintptr]symbolic.Value) (symbolic.Value, error)
- func (s *ReadableByteStream) WaitNext(ctx *Context, filter Pattern, timeout time.Duration) (Value, error)
- func (s *ReadableByteStream) WaitNextChunk(ctx *Context, filter Pattern, sizeRange IntRange, timeout time.Duration) (*DataChunk, error)
- type ReadableStream
- type ReadableStreamConfiguration
- type Reader
- func (reader *Reader) AlreadyHasAllData() bool
- func (reader *Reader) Equal(ctx *Context, other Value, alreadyCompared map[uintptr]uintptr, depth int) bool
- func (reader *Reader) GetBytesDataToNotModify() []byte
- func (reader *Reader) GetGoMethod(name string) (*GoFunction, bool)
- func (*Reader) IsMutable() bool
- func (reader *Reader) PrettyPrint(w *bufio.Writer, config *PrettyPrintConfig, depth int, parentIndentCount int)
- func (reader *Reader) Prop(ctx *Context, name string) Value
- func (Reader) PropertyNames(ctx *Context) []string
- func (r *Reader) Read(p []byte) (n int, err error)
- func (r *Reader) ReadAll() (*ByteSlice, error)
- func (r *Reader) ReadAllBytes() ([]byte, error)
- func (r *Reader) ReadCtx(ctx *Context, p *ByteSlice) (*ByteSlice, error)
- func (reader *Reader) Reader() *Reader
- func (*Reader) SetProp(ctx *Context, name string, value Value) error
- func (r *Reader) ToSymbolicValue(ctx *Context, encountered map[uintptr]symbolic.Value) (symbolic.Value, error)
- type Record
- func (rec *Record) Contains(ctx *Context, value Serializable) bool
- func (rec *Record) EntryMap() map[string]Serializable
- func (rec *Record) Equal(ctx *Context, other Value, alreadyCompared map[uintptr]uintptr, depth int) bool
- func (rec *Record) ForEachElement(ctx *Context, fn func(index int, v Serializable) error) error
- func (rec *Record) ForEachEntry(fn func(k string, v Value) error) error
- func (rec *Record) HasProp(ctx *Context, name string) bool
- func (rec *Record) IsEmpty(ctx *Context) bool
- func (rec Record) IsMutable() bool
- func (rec *Record) Iterator(ctx *Context, config IteratorConfiguration) Iterator
- func (rec *Record) Keys() []string
- func (o *Record) Migrate(ctx *Context, key Path, migration *FreeEntityMigrationArgs) (Value, error)
- func (rec Record) PrettyPrint(w *bufio.Writer, config *PrettyPrintConfig, depth int, parentIndentCount int)
- func (rec *Record) Prop(ctx *Context, name string) Value
- func (rec Record) PropertyNames(ctx *Context) []string
- func (rec Record) SetProp(ctx *Context, name string, value Value) error
- func (rec *Record) ToSymbolicValue(ctx *Context, encountered map[uintptr]symbolic.Value) (symbolic.Value, error)
- func (rec *Record) ValueEntryMap() map[string]Value
- func (rec *Record) WriteJSONRepresentation(ctx *Context, w *jsoniter.Stream, config JSONSerializationConfig, depth int) error
- type RecordPattern
- func (patt *RecordPattern) CompleteEntry(name string) (RecordPatternEntry, bool)
- func (patt *RecordPattern) Entry(name string) (pattern Pattern, optional bool, yes bool)
- func (patt *RecordPattern) Equal(ctx *Context, other Value, alreadyCompared map[uintptr]uintptr, depth int) bool
- func (patt *RecordPattern) ForEachEntry(fn func(entry RecordPatternEntry) error) error
- func (patt *RecordPattern) GetMigrationOperations(ctx *Context, next Pattern, pseudoPath string) (migrations []MigrationOp, _ error)
- func (patt *RecordPattern) HasRequiredOrOptionalEntry(name string) bool
- func (patt *RecordPattern) IsMutable() bool
- func (patt *RecordPattern) Iterator(ctx *Context, config IteratorConfiguration) Iterator
- func (patt *RecordPattern) PrettyPrint(w *bufio.Writer, config *PrettyPrintConfig, depth int, parentIndentCount int)
- func (patt *RecordPattern) Random(ctx *Context, options ...Option) Value
- func (patt *RecordPattern) StringPattern() (StringPattern, bool)
- func (patt *RecordPattern) Test(ctx *Context, v Value) bool
- func (p *RecordPattern) ToSymbolicValue(ctx *Context, encountered map[uintptr]symbolic.Value) (symbolic.Value, error)
- func (patt *RecordPattern) ValuePropPattern(name string) (propPattern Pattern, isOptional bool, ok bool)
- func (patt *RecordPattern) ValuePropertyNames() []string
- func (patt RecordPattern) WriteJSONRepresentation(ctx *Context, w *jsoniter.Stream, config JSONSerializationConfig, depth int) error
- type RecordPatternEntry
- type RegexPattern
- func (patt *RegexPattern) Call(values []Serializable) (Pattern, error)
- func (patt *RegexPattern) CompiledRegex() *regexp.Regexp
- func (patt *RegexPattern) EffectiveLengthRange() IntRange
- func (patt *RegexPattern) Equal(ctx *Context, other Value, alreadyCompared map[uintptr]uintptr, depth int) bool
- func (patt *RegexPattern) FindMatches(ctx *Context, val Serializable, config MatchesFindConfig) (groups []Serializable, err error)
- func (pattern *RegexPattern) HasRegex() bool
- func (patt *RegexPattern) IsMutable() bool
- func (patt *RegexPattern) IsResolved() bool
- func (patt RegexPattern) Iterator(ctx *Context, config IteratorConfiguration) Iterator
- func (patt *RegexPattern) LengthRange() IntRange
- func (patt *RegexPattern) MatchGroups(ctx *Context, v Serializable) (map[string]Serializable, bool, error)
- func (patt *RegexPattern) Parse(ctx *Context, s string) (Serializable, error)
- func (patt *RegexPattern) PatternNestingDepth(parentDepth int) int
- func (patt *RegexPattern) PrettyPrint(w *bufio.Writer, config *PrettyPrintConfig, depth int, parentIndentCount int)
- func (pattern RegexPattern) Random(ctx *Context, options ...Option) Value
- func (pattern *RegexPattern) Regex() string
- func (patt *RegexPattern) Resolve() (StringPattern, error)
- func (patt *RegexPattern) StringPattern() (StringPattern, bool)
- func (pattern *RegexPattern) Test(ctx *Context, v Value) bool
- func (p *RegexPattern) ToSymbolicValue(ctx *Context, encountered map[uintptr]symbolic.Value) (symbolic.Value, error)
- func (patt *RegexPattern) WithLengthRange(lenRange IntRange) *RegexPattern
- func (patt RegexPattern) WriteJSONRepresentation(ctx *Context, w *jsoniter.Stream, config JSONSerializationConfig, depth int) error
- type RelativeTimeInstant64
- type RemovalMigrationOp
- type Renderable
- type RenderingFn
- type RenderingInput
- type RepeatedPatternElement
- func (patt *RepeatedPatternElement) CompiledRegex() *regexp.Regexp
- func (patt *RepeatedPatternElement) EffectiveLengthRange() IntRange
- func (patt *RepeatedPatternElement) Equal(ctx *Context, other Value, alreadyCompared map[uintptr]uintptr, depth int) bool
- func (patt *RepeatedPatternElement) FindMatches(ctx *Context, val Serializable, config MatchesFindConfig) (groups []Serializable, err error)
- func (patt *RepeatedPatternElement) HasRegex() bool
- func (patt *RepeatedPatternElement) IsMutable() bool
- func (patt *RepeatedPatternElement) IsResolved() bool
- func (patt *RepeatedPatternElement) Iterator(ctx *Context, config IteratorConfiguration) Iterator
- func (patt *RepeatedPatternElement) LengthRange() IntRange
- func (patt *RepeatedPatternElement) MatchGroups(ctx *Context, v Serializable) (map[string]Serializable, bool, error)
- func (patt *RepeatedPatternElement) MinMaxCounts(maxRandOcurrence int) (int, int)
- func (patt *RepeatedPatternElement) Parse(ctx *Context, s string) (Serializable, error)
- func (patt *RepeatedPatternElement) PatternNestingDepth(parentDepth int) int
- func (patt *RepeatedPatternElement) PrettyPrint(w *bufio.Writer, config *PrettyPrintConfig, depth int, parentIndentCount int)
- func (patt *RepeatedPatternElement) Random(ctx *Context, options ...Option) Value
- func (patt *RepeatedPatternElement) Regex() string
- func (patt *RepeatedPatternElement) Resolve() (StringPattern, error)
- func (patt *RepeatedPatternElement) StringPattern() (StringPattern, bool)
- func (patt *RepeatedPatternElement) Test(ctx *Context, v Value) bool
- func (p *RepeatedPatternElement) ToSymbolicValue(ctx *Context, encountered map[uintptr]symbolic.Value) (symbolic.Value, error)
- func (patt *RepeatedPatternElement) WriteJSONRepresentation(ctx *Context, w *jsoniter.Stream, config JSONSerializationConfig, depth int) error
- type ReplacementMigrationOp
- type ReprConfig
- type ResourceGraph
- func (g *ResourceGraph) AddEdge(from, to ResourceName, rel ResourceRelationKind)
- func (g *ResourceGraph) AddResource(r ResourceName, kind string)
- func (g *ResourceGraph) GetEdge(from, to ResourceName) (memds.GraphEdge[ResourceRelationKind], bool)
- func (g *ResourceGraph) GetNode(r ResourceName) (*ResourceNode, bool)
- func (g *ResourceGraph) Roots() (roots []*ResourceNode)
- type ResourceName
- type ResourceNode
- type ResourceRelationKind
- type Reversability
- type RingBuffer
- func (r *RingBuffer) Capacity() int
- func (r *RingBuffer) Equal(ctx *Context, other Value, alreadyCompared map[uintptr]uintptr, depth int) bool
- func (r *RingBuffer) Free() ByteCount
- func (r *RingBuffer) GetGoMethod(name string) (*GoFunction, bool)
- func (r *RingBuffer) IsEmpty() bool
- func (r *RingBuffer) IsFull() bool
- func (*RingBuffer) IsMutable() bool
- func (r *RingBuffer) IsSharable(originState *GlobalState) (bool, string)
- func (r *RingBuffer) IsShared() bool
- func (r *RingBuffer) PrettyPrint(w *bufio.Writer, config *PrettyPrintConfig, depth int, parentIndentCount int)
- func (r *RingBuffer) Prop(ctx *Context, propName string) Value
- func (r *RingBuffer) PropertyNames(ctx *Context) []string
- func (r *RingBuffer) Read(p []byte) (n int, err error)
- func (r *RingBuffer) ReadByte() (b byte, err error)
- func (r *RingBuffer) ReadableBytesCopy() []byte
- func (r *RingBuffer) ReadableCount(ctx *Context) ByteCount
- func (r *RingBuffer) Reset()
- func (*RingBuffer) SetProp(ctx *Context, name string, value Value) error
- func (r *RingBuffer) Share(originState *GlobalState)
- func (r *RingBuffer) SmartLock(state *GlobalState)
- func (r *RingBuffer) SmartUnlock(state *GlobalState)
- func (r *RingBuffer) Stream(ctx *Context, config *ReadableStreamConfiguration) ReadableStream
- func (r *RingBuffer) ToSymbolicValue(ctx *Context, encountered map[uintptr]symbolic.Value) (symbolic.Value, error)
- func (r *RingBuffer) WritableStream(ctx *Context, config *WritableStreamConfiguration) WritableStream
- func (r *RingBuffer) Write(p []byte) (n int, err error)
- func (r *RingBuffer) WriteString(s string) (n int, err error)
- func (r *RingBuffer) Writer() *Writer
- type RiskScore
- type Rune
- func (r Rune) Compare(other Value) (result int, comparable bool)
- func (r Rune) Equal(ctx *Context, other Value, alreadyCompared map[uintptr]uintptr, depth int) bool
- func (r Rune) IsMutable() bool
- func (r Rune) PrettyPrint(w *bufio.Writer, config *PrettyPrintConfig, depth int, parentIndentCount int)
- func (r Rune) Prop(ctx *Context, name string) Value
- func (r Rune) PropertyNames(ctx *Context) []string
- func (Rune) SetProp(ctx *Context, name string, value Value) error
- func (r Rune) ToSymbolicValue(ctx *Context, encountered map[uintptr]symbolic.Value) (symbolic.Value, error)
- func (r Rune) WriteJSONRepresentation(ctx *Context, w *jsoniter.Stream, config JSONSerializationConfig, depth int) error
- type RuneCount
- func (c RuneCount) AsFloat64() (float64, bool)
- func (c RuneCount) AsInt64() (int64, bool)
- func (c RuneCount) Compare(other Value) (result int, comparable bool)
- func (count RuneCount) Equal(ctx *Context, other Value, alreadyCompared map[uintptr]uintptr, depth int) bool
- func (c RuneCount) Int64() int64
- func (count RuneCount) IsMutable() bool
- func (c RuneCount) IsSigned() bool
- func (c RuneCount) IsZeroQuantity() bool
- func (count RuneCount) PrettyPrint(w *bufio.Writer, config *PrettyPrintConfig, depth int, parentIndentCount int)
- func (c RuneCount) ToSymbolicValue(ctx *Context, encountered map[uintptr]symbolic.Value) (symbolic.Value, error)
- func (count RuneCount) WriteJSONRepresentation(ctx *Context, w *jsoniter.Stream, config JSONSerializationConfig, depth int) error
- type RuneRange
- func (r RuneRange) At(ctx *Context, i int) Value
- func (r RuneRange) Contains(ctx *Context, v Serializable) bool
- func (r RuneRange) Equal(ctx *Context, other Value, alreadyCompared map[uintptr]uintptr, depth int) bool
- func (r RuneRange) Includes(ctx *Context, i Rune) bool
- func (r RuneRange) IsEmpty(ctx *Context) bool
- func (r RuneRange) IsMutable() bool
- func (r RuneRange) Iterator(ctx *Context, config IteratorConfiguration) Iterator
- func (r RuneRange) Len() int
- func (r RuneRange) PrettyPrint(w *bufio.Writer, config *PrettyPrintConfig, depth int, parentIndentCount int)
- func (r RuneRange) Random(ctx *Context) interface{}
- func (r RuneRange) RandomRune() rune
- func (r RuneRange) ToSymbolicValue(ctx *Context, encountered map[uintptr]symbolic.Value) (symbolic.Value, error)
- func (r RuneRange) WriteJSONRepresentation(ctx *Context, w *jsoniter.Stream, config JSONSerializationConfig, depth int) error
- type RuneRangeIterator
- func (it RuneRangeIterator) Equal(ctx *Context, other Value, alreadyCompared map[uintptr]uintptr, depth int) bool
- func (it *RuneRangeIterator) HasNext(*Context) bool
- func (it RuneRangeIterator) IsMutable() bool
- func (it *RuneRangeIterator) Key(ctx *Context) Value
- func (it *RuneRangeIterator) Next(ctx *Context) bool
- func (it RuneRangeIterator) PrettyPrint(w *bufio.Writer, config *PrettyPrintConfig, depth int, parentIndentCount int)
- func (it RuneRangeIterator) ToSymbolicValue(ctx *Context, encountered map[uintptr]symbolic.Value) (symbolic.Value, error)
- func (it *RuneRangeIterator) Value(*Context) Value
- type RuneRangeStringPattern
- func (patt *RuneRangeStringPattern) CompiledRegex() *regexp.Regexp
- func (patt *RuneRangeStringPattern) EffectiveLengthRange() IntRange
- func (patt *RuneRangeStringPattern) Equal(ctx *Context, other Value, alreadyCompared map[uintptr]uintptr, depth int) bool
- func (patt *RuneRangeStringPattern) FindMatches(ctx *Context, val Serializable, config MatchesFindConfig) (groups []Serializable, err error)
- func (patt *RuneRangeStringPattern) HasRegex() bool
- func (patt *RuneRangeStringPattern) IsMutable() bool
- func (patt *RuneRangeStringPattern) IsResolved() bool
- func (patt RuneRangeStringPattern) Iterator(ctx *Context, config IteratorConfiguration) Iterator
- func (patt *RuneRangeStringPattern) LengthRange() IntRange
- func (patt *RuneRangeStringPattern) Parse(ctx *Context, s string) (Serializable, error)
- func (patt *RuneRangeStringPattern) PatternNestingDepth(parentDepth int) int
- func (patt *RuneRangeStringPattern) PrettyPrint(w *bufio.Writer, config *PrettyPrintConfig, depth int, parentIndentCount int)
- func (patt *RuneRangeStringPattern) Random(ctx *Context, options ...Option) Value
- func (patt *RuneRangeStringPattern) Regex() string
- func (patt *RuneRangeStringPattern) Resolve() (StringPattern, error)
- func (patt *RuneRangeStringPattern) StringPattern() (StringPattern, bool)
- func (patt *RuneRangeStringPattern) Test(ctx *Context, v Value) bool
- func (p *RuneRangeStringPattern) ToSymbolicValue(ctx *Context, encountered map[uintptr]symbolic.Value) (symbolic.Value, error)
- func (patt RuneRangeStringPattern) WriteJSONRepresentation(ctx *Context, w *jsoniter.Stream, config JSONSerializationConfig, depth int) error
- type RuneSlice
- func (slice *RuneSlice) At(ctx *Context, i int) Value
- func (slice *RuneSlice) Clone(originState *GlobalState, sharableValues *[]PotentiallySharable, ...) (Serializable, error)
- func (slice *RuneSlice) ElementsDoNotModify() []rune
- func (slice *RuneSlice) Equal(ctx *Context, other Value, alreadyCompared map[uintptr]uintptr, depth int) bool
- func (s *RuneSlice) Insert(ctx *Context, v Value, i Int)
- func (r *RuneSlice) IsFrozen() bool
- func (slice *RuneSlice) IsMutable() bool
- func (s *RuneSlice) IsRecursivelyRenderable(ctx *Context, input RenderingInput) bool
- func (s *RuneSlice) Iterator(ctx *Context, config IteratorConfiguration) Iterator
- func (slice *RuneSlice) Len() int
- func (s *RuneSlice) OnMutation(ctx *Context, microtask MutationCallbackMicrotask, ...) (CallbackHandle, error)
- func (slice *RuneSlice) PrettyPrint(w *bufio.Writer, config *PrettyPrintConfig, depth int, parentIndentCount int)
- func (s *RuneSlice) Prop(ctx *Context, name string) Value
- func (s *RuneSlice) PropertyNames(ctx *Context) []string
- func (s *RuneSlice) RemoveMutationCallback(ctx *Context, handle CallbackHandle)
- func (s *RuneSlice) RemoveMutationCallbackMicrotasks(ctx *Context)
- func (s *RuneSlice) Render(ctx *Context, w io.Writer, config RenderingInput) (int, error)
- func (*RuneSlice) SetProp(ctx *Context, name string, value Value) error
- func (slice *RuneSlice) SetSlice(ctx *Context, start, end int, seq Sequence)
- func (r *RuneSlice) TakeInMemorySnapshot(ctx *Context) (*Snapshot, error)
- func (s *RuneSlice) ToSymbolicValue(ctx *Context, encountered map[uintptr]symbolic.Value) (symbolic.Value, error)
- func (r *RuneSlice) Unfreeze(ctx *Context) error
- func (s *RuneSlice) Watcher(ctx *Context, config WatcherConfiguration) Watcher
- func (slice *RuneSlice) WriteJSONRepresentation(ctx *Context, w *jsoniter.Stream, config JSONSerializationConfig, depth int) error
- type ScaledTokenCount
- type Scheme
- func (scheme Scheme) Equal(ctx *Context, other Value, alreadyCompared map[uintptr]uintptr, depth int) bool
- func (s Scheme) IsDatabaseScheme() bool
- func (scheme Scheme) IsMutable() bool
- func (scheme Scheme) PrettyPrint(w *bufio.Writer, config *PrettyPrintConfig, depth int, parentIndentCount int)
- func (s Scheme) ToSymbolicValue(ctx *Context, encountered map[uintptr]symbolic.Value) (symbolic.Value, error)
- func (s Scheme) UnderlyingString() string
- func (s Scheme) Validate() error
- func (scheme Scheme) WriteJSONRepresentation(ctx *Context, w *jsoniter.Stream, config JSONSerializationConfig, depth int) error
- type SchemeHolder
- type SecondaryDebugEvent
- type SecondaryDebugEventType
- type Secret
- func (s *Secret) AssertIsPattern(secret *SecretPattern)
- func (s *Secret) DecodedPEM() (*pem.Block, error)
- func (s *Secret) Equal(ctx *Context, other Value, alreadyCompared map[uintptr]uintptr, depth int) bool
- func (s *Secret) Format(f fmt.State, verb rune)
- func (*Secret) IsMutable() bool
- func (s *Secret) PrettyPrint(w *bufio.Writer, config *PrettyPrintConfig, depth int, parentIndentCount int)
- func (s *Secret) String() string
- func (s *Secret) StringValue() StringLike
- func (s *Secret) ToSymbolicValue(ctx *Context, encountered map[uintptr]symbolic.Value) (symbolic.Value, error)
- func (m *Secret) WriteJSONRepresentation(ctx *Context, w *jsoniter.Stream, config JSONSerializationConfig, depth int) error
- func (m *Secret) WriteRepresentation(ctx *Context, w io.Writer, config *ReprConfig, depth int) error
- type SecretName
- type SecretPattern
- func (s *SecretPattern) Equal(ctx *Context, other Value, alreadyCompared map[uintptr]uintptr, depth int) bool
- func (*SecretPattern) IsMutable() bool
- func (patt *SecretPattern) Iterator(ctx *Context, config IteratorConfiguration) Iterator
- func (pattern *SecretPattern) NewSecret(ctx *Context, s string) (*Secret, error)
- func (s *SecretPattern) PrettyPrint(w *bufio.Writer, config *PrettyPrintConfig, depth int, parentIndentCount int)
- func (pattern *SecretPattern) Random(ctx *Context, options ...Option) Value
- func (pattern *SecretPattern) StringPattern() (StringPattern, bool)
- func (p *SecretPattern) Test(ctx *Context, v Value) bool
- func (p *SecretPattern) ToSymbolicValue(ctx *Context, encountered map[uintptr]symbolic.Value) (symbolic.Value, error)
- func (patt *SecretPattern) WriteJSONRepresentation(ctx *Context, w *jsoniter.Stream, config JSONSerializationConfig, depth int) error
- type Sequence
- type SequenceStringPattern
- func (patt *SequenceStringPattern) Call(values []Serializable) (Pattern, error)
- func (patt *SequenceStringPattern) CompiledRegex() *regexp.Regexp
- func (patt *SequenceStringPattern) EffectiveLengthRange() IntRange
- func (patt *SequenceStringPattern) Equal(ctx *Context, other Value, alreadyCompared map[uintptr]uintptr, depth int) bool
- func (patt *SequenceStringPattern) FindGroupMatches(ctx *Context, v Serializable, config GroupMatchesFindConfig) (groups []*Object, err error)
- func (patt *SequenceStringPattern) FindMatches(ctx *Context, val Serializable, config MatchesFindConfig) (groups []Serializable, err error)
- func (patt *SequenceStringPattern) HasRegex() bool
- func (patt *SequenceStringPattern) IsMutable() bool
- func (patt *SequenceStringPattern) IsResolved() bool
- func (patt SequenceStringPattern) Iterator(ctx *Context, config IteratorConfiguration) Iterator
- func (patt *SequenceStringPattern) LengthRange() IntRange
- func (patt *SequenceStringPattern) MatchGroups(ctx *Context, v Serializable) (map[string]Serializable, bool, error)
- func (patt *SequenceStringPattern) Parse(ctx *Context, s string) (Serializable, error)
- func (patt *SequenceStringPattern) PatternNestingDepth(parentDepth int) int
- func (patt *SequenceStringPattern) PrettyPrint(w *bufio.Writer, config *PrettyPrintConfig, depth int, parentIndentCount int)
- func (patt SequenceStringPattern) Random(ctx *Context, options ...Option) Value
- func (patt *SequenceStringPattern) Regex() string
- func (patt *SequenceStringPattern) Resolve() (StringPattern, error)
- func (patt *SequenceStringPattern) StringPattern() (StringPattern, bool)
- func (patt *SequenceStringPattern) Test(ctx *Context, v Value) bool
- func (p *SequenceStringPattern) ToSymbolicValue(ctx *Context, encountered map[uintptr]symbolic.Value) (symbolic.Value, error)
- func (patt SequenceStringPattern) WriteJSONRepresentation(ctx *Context, w *jsoniter.Stream, config JSONSerializationConfig, depth int) error
- type Serializable
- func ConvertJSONValToInoxVal(v any, immutable bool) Serializable
- func ConvertYamlNodeToInoxVal(ctx *Context, n yaml.Node, immutable bool) Serializable
- func ConvertYamlParsedFileToInoxVal(ctx *Context, f *yaml.File, immutable bool) Serializable
- func EvalSimpleValueLiteral(n parse.SimpleValueLiteral, global *GlobalState) (Serializable, error)
- func FindMatchesForRegex(ctx *Context, regexp *regexp.Regexp, s string, config MatchesFindConfig) (matches []Serializable, err error)
- func FindMatchesForStringPattern(ctx *Context, patt StringPattern, val Serializable, config MatchesFindConfig) (matches []Serializable, err error)
- func GetOrLoadValueAtURL(ctx *Context, u URL, state *GlobalState) (Serializable, error)
- func ParseJSONRepresentation(ctx *Context, s string, pattern Pattern) (Serializable, error)
- func ParseNextJSONRepresentation(ctx *Context, it *jsoniter.Iterator, pattern Pattern, try bool) (res Serializable, finalErr error)
- func RepresentationBasedClone(ctx *Context, val Serializable) (Serializable, error)
- func ToSerializableAsserted(v any) Serializable
- func ToSerializableSlice(values []Value) []Serializable
- type SerializableIterable
- type SmartLock
- func (lock *SmartLock) AssertValueShared()
- func (lock *SmartLock) IsHeld() bool
- func (lock *SmartLock) IsValueShared() bool
- func (lock *SmartLock) Lock(state *GlobalState, embedder PotentiallySharable, ignoreLockedValues ...bool)
- func (lock *SmartLock) Share(originState *GlobalState, fn func())
- func (lock *SmartLock) Unlock(state *GlobalState, embedder PotentiallySharable, ignoreLockedValues ...bool)
- type Snapshot
- type SnapshotWriteToFilesystem
- type SnapshotableFilesystem
- type SortableByNestedValue
- type SpecificMutationAcceptor
- type SpecificMutationKind
- type SpecificMutationMetadata
- type SpecificMutationVersion
- type StackFrameInfo
- type StatDirEntry
- type StateId
- type StatelessParser
- type StaticCheckData
- func (d *StaticCheckData) Equal(ctx *Context, other Value, alreadyCompared map[uintptr]uintptr, depth int) bool
- func (d *StaticCheckData) ErrorTuple() *Tuple
- func (d *StaticCheckData) Errors() []*StaticCheckError
- func (data *StaticCheckData) GetFnData(fnExpr *parse.FunctionExpression) *FunctionStaticData
- func (d *StaticCheckData) GetGoMethod(name string) (*GoFunction, bool)
- func (data *StaticCheckData) GetMappingData(expr *parse.MappingExpression) *MappingStaticData
- func (*StaticCheckData) IsMutable() bool
- func (d *StaticCheckData) PrettyPrint(w *bufio.Writer, config *PrettyPrintConfig, depth int, parentIndentCount int)
- func (d *StaticCheckData) Prop(ctx *Context, name string) Value
- func (*StaticCheckData) PropertyNames(ctx *Context) []string
- func (*StaticCheckData) SetProp(ctx *Context, name string, value Value) error
- func (d *StaticCheckData) ToSymbolicValue(ctx *Context, encountered map[uintptr]symbolic.Value) (symbolic.Value, error)
- func (d *StaticCheckData) WarningTuple() *Tuple
- func (d *StaticCheckData) Warnings() []*StaticCheckWarning
- type StaticCheckError
- type StaticCheckInput
- type StaticCheckWarning
- type StaticallyCheckDbResolutionDataFn
- type StaticallyCheckHostDefinitionFn
- type StrListIterator
- func (it *StrListIterator) Equal(ctx *Context, other Value, alreadyCompared map[uintptr]uintptr, depth int) bool
- func (it StrListIterator) HasNext(*Context) bool
- func (it *StrListIterator) IsMutable() bool
- func (it *StrListIterator) Key(ctx *Context) Value
- func (it *StrListIterator) Next(ctx *Context) bool
- func (it *StrListIterator) PrettyPrint(w *bufio.Writer, config *PrettyPrintConfig, depth int, parentIndentCount int)
- func (it *StrListIterator) ToSymbolicValue(ctx *Context, encountered map[uintptr]symbolic.Value) (symbolic.Value, error)
- func (it *StrListIterator) Value(*Context) Value
- type StreamSink
- type StreamSource
- type String
- func NewStringFromSlices(slices []Value, node *parse.StringTemplateLiteral, ctx *Context) (String, error)
- func ToJSON(ctx *Context, v Serializable, pattern *OptionalParam[Pattern]) String
- func ToJSONWithConfig(ctx *Context, v Serializable, config JSONSerializationConfig) String
- func ToPrettyJSON(ctx *Context, v Serializable, pattern *OptionalParam[Pattern]) String
- func (s String) At(ctx *Context, i int) Value
- func (s String) ByteLen() int
- func (s String) ByteLike() []byte
- func (s String) Compare(other Value) (result int, comparable bool)
- func (s String) Equal(ctx *Context, other Value, alreadyCompared map[uintptr]uintptr, depth int) bool
- func (s String) GetOrBuildString() string
- func (s String) HasPrefix(ctx *Context, prefix StringLike) Bool
- func (s String) HasSuffix(ctx *Context, prefix StringLike) Bool
- func (s String) IsMutable() bool
- func (s String) IsRecursivelyRenderable(ctx *Context, input RenderingInput) bool
- func (s String) Iterator(ctx *Context, config IteratorConfiguration) Iterator
- func (s String) Len() int
- func (s String) PrettyPrint(w *bufio.Writer, config *PrettyPrintConfig, depth int, parentIndentCount int)
- func (s String) Prop(ctx *Context, name string) Value
- func (s String) PropertyNames(ctx *Context) []string
- func (s String) Reader() *Reader
- func (s String) Render(ctx *Context, w io.Writer, config RenderingInput) (int, error)
- func (s String) Replace(ctx *Context, old, new StringLike) StringLike
- func (s String) RuneCount() int
- func (String) SetProp(ctx *Context, name string, value Value) error
- func (s String) ToSymbolicValue(ctx *Context, encountered map[uintptr]symbolic.Value) (symbolic.Value, error)
- func (s String) TrimSpace(ctx *Context) StringLike
- func (s String) UnderlyingString() string
- func (s String) WriteJSONRepresentation(ctx *Context, w *jsoniter.Stream, config JSONSerializationConfig, depth int) error
- type StringConcatenation
- func (c *StringConcatenation) At(ctx *Context, i int) Value
- func (c *StringConcatenation) ByteLen() int
- func (c *StringConcatenation) Equal(ctx *Context, other Value, alreadyCompared map[uintptr]uintptr, depth int) bool
- func (c *StringConcatenation) GetOrBuildString() string
- func (c *StringConcatenation) HasPrefix(ctx *Context, prefix StringLike) Bool
- func (c *StringConcatenation) HasSuffix(ctx *Context, prefix StringLike) Bool
- func (c *StringConcatenation) IsMutable() bool
- func (c *StringConcatenation) Iterator(ctx *Context, config IteratorConfiguration) Iterator
- func (c *StringConcatenation) Len() int
- func (c *StringConcatenation) PrettyPrint(w *bufio.Writer, config *PrettyPrintConfig, depth int, parentIndentCount int)
- func (c *StringConcatenation) Prop(ctx *Context, name string) Value
- func (c *StringConcatenation) PropertyNames(ctx *Context) []string
- func (c *StringConcatenation) Reader() *Reader
- func (c *StringConcatenation) Replace(ctx *Context, old, new StringLike) StringLike
- func (c *StringConcatenation) RuneCount() int
- func (*StringConcatenation) SetProp(ctx *Context, name string, value Value) error
- func (c *StringConcatenation) ToSymbolicValue(ctx *Context, encountered map[uintptr]symbolic.Value) (symbolic.Value, error)
- func (c *StringConcatenation) TrimSpace(ctx *Context) StringLike
- func (c *StringConcatenation) WriteJSONRepresentation(ctx *Context, w *jsoniter.Stream, config JSONSerializationConfig, depth int) error
- type StringFormat
- type StringLike
- type StringList
- func (list *StringList) At(ctx *Context, i int) Value
- func (list *StringList) Clone(originState *GlobalState, sharableValues *[]PotentiallySharable, ...) (Serializable, error)
- func (list *StringList) ConstraintId() ConstraintId
- func (list *StringList) ContainsSimple(ctx *Context, v Serializable) bool
- func (list *StringList) Equal(ctx *Context, other Value, alreadyCompared map[uintptr]uintptr, depth int) bool
- func (list *StringList) IsMutable() bool
- func (list *StringList) Iterator(ctx *Context, config IteratorConfiguration) Iterator
- func (list *StringList) Len() int
- func (list *StringList) PrettyPrint(w *bufio.Writer, config *PrettyPrintConfig, depth int, parentIndentCount int)
- func (list *StringList) SetSlice(ctx *Context, start, end int, seq Sequence)
- func (l *StringList) ToSymbolicValue(ctx *Context, encountered map[uintptr]symbolic.Value) (symbolic.Value, error)
- func (list *StringList) WriteJSONRepresentation(ctx *Context, w *jsoniter.Stream, config JSONSerializationConfig, depth int) error
- type StringPattern
- type StrongTransactionIsolator
- type Struct
- func (ptr *Struct) Equal(ctx *Context, other Value, alreadyCompared map[uintptr]uintptr, depth int) bool
- func (Struct) IsMutable() bool
- func (Struct) PrettyPrint(w *bufio.Writer, config *PrettyPrintConfig, depth int, parentIndentCount int)
- func (Struct) ToSymbolicValue(ctx *Context, encountered map[uintptr]symbolic.Value) (symbolic.Value, error)
- type StructType
- type Subscriber
- type Subscription
- func (s *Subscription) Equal(ctx *Context, other Value, alreadyCompared map[uintptr]uintptr, depth int) bool
- func (*Subscription) IsMutable() bool
- func (s *Subscription) PrettyPrint(w *bufio.Writer, config *PrettyPrintConfig, depth int, parentIndentCount int)
- func (s *Subscription) ToSymbolicValue(ctx *Context, encountered map[uintptr]symbolic.Value) (symbolic.Value, error)
- type Subscriptions
- type SymbolicData
- func (d *SymbolicData) Equal(ctx *Context, other Value, alreadyCompared map[uintptr]uintptr, depth int) bool
- func (d *SymbolicData) ErrorTuple() *Tuple
- func (d *SymbolicData) GetGoMethod(name string) (*GoFunction, bool)
- func (*SymbolicData) IsMutable() bool
- func (d *SymbolicData) PrettyPrint(w *bufio.Writer, config *PrettyPrintConfig, depth int, parentIndentCount int)
- func (d *SymbolicData) Prop(ctx *Context, name string) Value
- func (*SymbolicData) PropertyNames(ctx *Context) []string
- func (*SymbolicData) SetProp(ctx *Context, name string, value Value) error
- func (d *SymbolicData) ToSymbolicValue(ctx *Context, encountered map[uintptr]symbolic.Value) (symbolic.Value, error)
- type SynchronousMessageHandler
- func (h *SynchronousMessageHandler) Equal(ctx *Context, other Value, alreadyCompared map[uintptr]uintptr, depth int) bool
- func (*SynchronousMessageHandler) IsMutable() bool
- func (h *SynchronousMessageHandler) OnMutation(ctx *Context, microtask MutationCallbackMicrotask, ...) (CallbackHandle, error)
- func (h *SynchronousMessageHandler) Pattern() Pattern
- func (h *SynchronousMessageHandler) PrettyPrint(w *bufio.Writer, config *PrettyPrintConfig, depth int, parentIndentCount int)
- func (h *SynchronousMessageHandler) Prop(ctx *Context, name string) Value
- func (*SynchronousMessageHandler) PropertyNames(ctx *Context) []string
- func (h *SynchronousMessageHandler) RemoveMutationCallback(ctx *Context, handle CallbackHandle)
- func (h *SynchronousMessageHandler) RemoveMutationCallbackMicrotasks(ctx *Context)
- func (*SynchronousMessageHandler) SetProp(ctx *Context, name string, value Value) error
- func (h *SynchronousMessageHandler) ToSymbolicValue(ctx *Context, encountered map[uintptr]symbolic.Value) (symbolic.Value, error)
- func (h *SynchronousMessageHandler) Watcher(ctx *Context, config WatcherConfiguration) Watcher
- func (h *SynchronousMessageHandler) WriteJSONRepresentation(ctx *Context, w *jsoniter.Stream, config JSONSerializationConfig, depth int) error
- type SynchronousMessageHandlers
- type SystemGraph
- func (g *SystemGraph) AddChildNode(ctx *Context, parent SystemGraphNodeValue, value SystemGraphNodeValue, ...)
- func (g *SystemGraph) AddEvent(ctx *Context, text string, v SystemGraphNodeValue)
- func (g *SystemGraph) AddNode(ctx *Context, value SystemGraphNodeValue, name string)
- func (g *SystemGraph) AddWatchedNode(ctx *Context, watchingVal SystemGraphNodeValue, ...)
- func (g *SystemGraph) ApplySpecificMutation(ctx *Context, m Mutation) error
- func (g *SystemGraph) Equal(ctx *Context, other Value, alreadyCompared map[uintptr]uintptr, depth int) bool
- func (g *SystemGraph) IsFrozen() bool
- func (*SystemGraph) IsMutable() bool
- func (g *SystemGraph) IsSharable(originState *GlobalState) (bool, string)
- func (g *SystemGraph) IsShared() bool
- func (g *SystemGraph) OnMutation(ctx *Context, microtask MutationCallbackMicrotask, ...) (CallbackHandle, error)
- func (g *SystemGraph) PrettyPrint(w *bufio.Writer, config *PrettyPrintConfig, depth int, parentIndentCount int)
- func (g *SystemGraph) Prop(ctx *Context, name string) Value
- func (*SystemGraph) PropertyNames(ctx *Context) []string
- func (g *SystemGraph) Ptr() SystemGraphPointer
- func (g *SystemGraph) RemoveMutationCallback(ctx *Context, handle CallbackHandle)
- func (g *SystemGraph) RemoveMutationCallbackMicrotasks(ctx *Context)
- func (*SystemGraph) SetProp(ctx *Context, name string, value Value) error
- func (g *SystemGraph) Share(originState *GlobalState)
- func (g *SystemGraph) SmartLock(state *GlobalState)
- func (g *SystemGraph) SmartUnlock(state *GlobalState)
- func (g *SystemGraph) TakeInMemorySnapshot(ctx *Context) (*Snapshot, error)
- func (g *SystemGraph) ToSymbolicValue(ctx *Context, encountered map[uintptr]symbolic.Value) (symbolic.Value, error)
- func (g *SystemGraph) Unfreeze(ctx *Context) error
- func (*SystemGraph) Watcher(ctx *Context, config WatcherConfiguration) Watcher
- func (g *SystemGraph) WriteJSONRepresentation(ctx *Context, w *jsoniter.Stream, config JSONSerializationConfig, depth int) error
- type SystemGraphAccessPermission
- type SystemGraphEdge
- func (e SystemGraphEdge) Equal(ctx *Context, other Value, alreadyCompared map[uintptr]uintptr, depth int) bool
- func (SystemGraphEdge) IsMutable() bool
- func (e SystemGraphEdge) IsSharable(originState *GlobalState) (bool, string)
- func (e SystemGraphEdge) PrettyPrint(w *bufio.Writer, config *PrettyPrintConfig, depth int, parentIndentCount int)
- func (e SystemGraphEdge) Prop(ctx *Context, name string) Value
- func (SystemGraphEdge) PropertyNames(ctx *Context) []string
- func (SystemGraphEdge) SetProp(ctx *Context, name string, value Value) error
- func (e SystemGraphEdge) ToSymbolicValue(ctx *Context, encountered map[uintptr]symbolic.Value) (symbolic.Value, error)
- func (e SystemGraphEdge) WriteJSONRepresentation(ctx *Context, w *jsoniter.Stream, config JSONSerializationConfig, depth int) error
- type SystemGraphEdgeKind
- type SystemGraphEvent
- func (e SystemGraphEvent) Equal(ctx *Context, other Value, alreadyCompared map[uintptr]uintptr, depth int) bool
- func (SystemGraphEvent) IsMutable() bool
- func (e SystemGraphEvent) PrettyPrint(w *bufio.Writer, config *PrettyPrintConfig, depth int, parentIndentCount int)
- func (e SystemGraphEvent) Prop(ctx *Context, name string) Value
- func (SystemGraphEvent) PropertyNames(ctx *Context) []string
- func (SystemGraphEvent) SetProp(ctx *Context, name string, value Value) error
- func (e SystemGraphEvent) ToSymbolicValue(ctx *Context, encountered map[uintptr]symbolic.Value) (symbolic.Value, error)
- func (e SystemGraphEvent) WriteJSONRepresentation(ctx *Context, w *jsoniter.Stream, config JSONSerializationConfig, depth int) error
- type SystemGraphNode
- func (g *SystemGraphNode) Equal(ctx *Context, other Value, alreadyCompared map[uintptr]uintptr, depth int) bool
- func (*SystemGraphNode) IsMutable() bool
- func (n *SystemGraphNode) IsSharable(originState *GlobalState) (bool, string)
- func (n *SystemGraphNode) IsShared() bool
- func (n *SystemGraphNode) PrettyPrint(w *bufio.Writer, config *PrettyPrintConfig, depth int, parentIndentCount int)
- func (n *SystemGraphNode) Prop(ctx *Context, name string) Value
- func (*SystemGraphNode) PropertyNames(ctx *Context) []string
- func (*SystemGraphNode) SetProp(ctx *Context, name string, value Value) error
- func (n *SystemGraphNode) Share(originState *GlobalState)
- func (n *SystemGraphNode) SmartLock(state *GlobalState)
- func (n *SystemGraphNode) SmartUnlock()
- func (n *SystemGraphNode) ToSymbolicValue(ctx *Context, encountered map[uintptr]symbolic.Value) (symbolic.Value, error)
- type SystemGraphNodeValue
- type SystemGraphNodes
- func (n *SystemGraphNodes) Equal(ctx *Context, other Value, alreadyCompared map[uintptr]uintptr, depth int) bool
- func (*SystemGraphNodes) IsMutable() bool
- func (n *SystemGraphNodes) IsSharable(originState *GlobalState) (bool, string)
- func (n *SystemGraphNodes) IsShared() bool
- func (n *SystemGraphNodes) Iterator(ctx *Context, config IteratorConfiguration) Iterator
- func (n *SystemGraphNodes) PrettyPrint(w *bufio.Writer, config *PrettyPrintConfig, depth int, parentIndentCount int)
- func (n *SystemGraphNodes) Share(originState *GlobalState)
- func (n *SystemGraphNodes) SmartLock(state *GlobalState)
- func (n *SystemGraphNodes) SmartUnlock(state *GlobalState)
- func (n *SystemGraphNodes) ToSymbolicValue(ctx *Context, encountered map[uintptr]symbolic.Value) (symbolic.Value, error)
- type SystemGraphPointer
- type TestCase
- func (c *TestCase) Equal(ctx *Context, other Value, alreadyCompared map[uintptr]uintptr, depth int) bool
- func (c *TestCase) FilesystemSnapshot() (FilesystemSnapshot, bool)
- func (s *TestCase) GetGoMethod(name string) (*GoFunction, bool)
- func (c *TestCase) IsMutable() bool
- func (c *TestCase) ItemName() (string, bool)
- func (c *TestCase) ParentChunk() *parse.ParsedChunkSource
- func (c *TestCase) ParentModule() *Module
- func (c *TestCase) PrettyPrint(w *bufio.Writer, config *PrettyPrintConfig, depth int, parentIndentCount int)
- func (s *TestCase) Prop(ctx *Context, name string) Value
- func (*TestCase) PropertyNames(ctx *Context) []string
- func (c *TestCase) Run(ctx *Context, options ...Option) (*LThread, error)
- func (*TestCase) SetProp(ctx *Context, name string, value Value) error
- func (c *TestCase) Statement() parse.Node
- func (c *TestCase) ToSymbolicValue(ctx *Context, encountered map[uintptr]symbolic.Value) (symbolic.Value, error)
- type TestCaseCreationInput
- type TestCaseResult
- func (r *TestCaseResult) Equal(ctx *Context, other Value, alreadyCompared map[uintptr]uintptr, depth int) bool
- func (c *TestCaseResult) IsMutable() bool
- func (r *TestCaseResult) PrettyPrint(w *bufio.Writer, config *PrettyPrintConfig, depth int, parentIndentCount int)
- func (r *TestCaseResult) ToSymbolicValue(ctx *Context, encountered map[uintptr]symbolic.Value) (symbolic.Value, error)
- type TestFilter
- type TestFilters
- type TestItem
- type TestSuite
- func (s *TestSuite) Equal(ctx *Context, other Value, alreadyCompared map[uintptr]uintptr, depth int) bool
- func (s *TestSuite) FilesystemSnapshot() (FilesystemSnapshot, bool)
- func (s *TestSuite) GetGoMethod(name string) (*GoFunction, bool)
- func (s *TestSuite) IsMutable() bool
- func (s *TestSuite) ItemName() (string, bool)
- func (s *TestSuite) ParentChunk() *parse.ParsedChunkSource
- func (s *TestSuite) ParentModule() *Module
- func (s *TestSuite) PrettyPrint(w *bufio.Writer, config *PrettyPrintConfig, depth int, parentIndentCount int)
- func (s *TestSuite) Prop(ctx *Context, name string) Value
- func (*TestSuite) PropertyNames(ctx *Context) []string
- func (s *TestSuite) Run(ctx *Context, options ...Option) (*LThread, error)
- func (*TestSuite) SetProp(ctx *Context, name string, value Value) error
- func (s *TestSuite) Statement() parse.Node
- func (s *TestSuite) ToSymbolicValue(ctx *Context, encountered map[uintptr]symbolic.Value) (symbolic.Value, error)
- type TestSuiteCreationInput
- type TestSuiteResult
- type TestValueStorage
- func (s *TestValueStorage) BaseURL() URL
- func (s *TestValueStorage) GetSerialized(ctx *Context, key Path) (string, bool)
- func (s *TestValueStorage) Has(ctx *Context, key Path) bool
- func (s *TestValueStorage) InsertSerialized(ctx *Context, key Path, serialized string)
- func (s *TestValueStorage) SetSerialized(ctx *Context, key Path, serialized string)
- type TestedProgram
- func (p *TestedProgram) Cancel(*Context)
- func (p *TestedProgram) Equal(ctx *Context, other Value, alreadyCompared map[uintptr]uintptr, depth int) bool
- func (p *TestedProgram) GetGoMethod(name string) (*GoFunction, bool)
- func (*TestedProgram) IsMutable() bool
- func (p *TestedProgram) PrettyPrint(w *bufio.Writer, config *PrettyPrintConfig, depth int, parentIndentCount int)
- func (p *TestedProgram) Prop(ctx *Context, name string) Value
- func (*TestedProgram) PropertyNames(ctx *Context) []string
- func (*TestedProgram) SetProp(ctx *Context, name string, value Value) error
- func (p *TestedProgram) ToSymbolicValue(ctx *Context, encountered map[uintptr]symbolic.Value) (symbolic.Value, error)
- type TestingState
- type ThreadInfo
- type ToStringConversionCapableStringPattern
- type Token
- func (t Token) Equal(ctx *Context, other Value, alreadyCompared map[uintptr]uintptr, depth int) bool
- func (t Token) IsMutable() bool
- func (t Token) PrettyPrint(w *bufio.Writer, config *PrettyPrintConfig, depth int, parentIndentCount int)
- func (t Token) Prop(ctx *Context, name string) Value
- func (Token) PropertyNames(ctx *Context) []string
- func (Token) SetProp(ctx *Context, name string, value Value) error
- func (t Token) ToSymbolicValue(ctx *Context, encountered map[uintptr]symbolic.Value) (symbolic.Value, error)
- type TokenDepletionFn
- type Transaction
- func (tx *Transaction) AddEffect(ctx *Context, effect Effect) error
- func (tx *Transaction) Commit(ctx *Context) error
- func (tx *Transaction) Equal(ctx *Context, other Value, alreadyCompared map[uintptr]uintptr, depth int) bool
- func (tx *Transaction) Finished() DoneChan
- func (tx *Transaction) GetGoMethod(name string) (*GoFunction, bool)
- func (tx *Transaction) ID() ULID
- func (tx *Transaction) IsFinished() bool
- func (tx *Transaction) IsFinishing() bool
- func (tx *Transaction) IsMutable() bool
- func (tx *Transaction) IsReadonly() bool
- func (tx *Transaction) OnEnd(k any, fn TransactionEndCallbackFn) error
- func (tx *Transaction) PrettyPrint(w *bufio.Writer, config *PrettyPrintConfig, depth int, parentIndentCount int)
- func (tx *Transaction) Prop(ctx *Context, name string) Value
- func (tx *Transaction) PropertyNames(ctx *Context) []string
- func (tx *Transaction) Rollback(ctx *Context) error
- func (*Transaction) SetProp(ctx *Context, name string, value Value) error
- func (tx *Transaction) Start(ctx *Context) error
- func (tx *Transaction) ToSymbolicValue(ctx *Context, encountered map[uintptr]symbolic.Value) (symbolic.Value, error)
- type TransactionEndCallbackFn
- type TransientID
- type TraversalConfiguration
- type TreeWalkCall
- type TreeWalkState
- func (state *TreeWalkState) AttachDebugger(debugger *Debugger)
- func (state *TreeWalkState) CurrentLocalScope() map[string]Value
- func (state *TreeWalkState) DetachDebugger()
- func (state *TreeWalkState) Get(name string) (Value, bool)
- func (state *TreeWalkState) GetGlobalState() *GlobalState
- func (state *TreeWalkState) HasGlobal(name string) bool
- func (state *TreeWalkState) PopScope()
- func (state *TreeWalkState) PushScope()
- func (state *TreeWalkState) Reset(global *GlobalState)
- func (state *TreeWalkState) SetGlobal(name string, value Value, constness GlobalConstness) (ok bool)
- type Treedata
- func (u *Treedata) Equal(ctx *Context, other Value, alreadyCompared map[uintptr]uintptr, depth int) bool
- func (u *Treedata) IsMutable() bool
- func (u *Treedata) PrettyPrint(w *bufio.Writer, config *PrettyPrintConfig, depth int, parentIndentCount int)
- func (u *Treedata) ToSymbolicValue(ctx *Context, encountered map[uintptr]symbolic.Value) (symbolic.Value, error)
- func (d *Treedata) WalkEntriesDF(...) error
- func (d *Treedata) Walker(*Context) (Walker, error)
- func (u *Treedata) WriteJSONRepresentation(ctx *Context, w *jsoniter.Stream, config JSONSerializationConfig, depth int) error
- type TreedataHiearchyEntry
- func (e TreedataHiearchyEntry) Equal(ctx *Context, other Value, alreadyCompared map[uintptr]uintptr, depth int) bool
- func (e TreedataHiearchyEntry) IsMutable() bool
- func (e TreedataHiearchyEntry) PrettyPrint(w *bufio.Writer, config *PrettyPrintConfig, depth int, parentIndentCount int)
- func (e TreedataHiearchyEntry) ToSymbolicValue(ctx *Context, encountered map[uintptr]symbolic.Value) (symbolic.Value, error)
- func (u *TreedataHiearchyEntry) WriteJSONRepresentation(ctx *Context, w *jsoniter.Stream, config JSONSerializationConfig, depth int) error
- type TreedataWalker
- func (w *TreedataWalker) Equal(ctx *Context, other Value, alreadyCompared map[uintptr]uintptr, depth int) bool
- func (it *TreedataWalker) HasNext(ctx *Context) bool
- func (w *TreedataWalker) IsMutable() bool
- func (it *TreedataWalker) Key(*Context) Value
- func (it *TreedataWalker) Next(ctx *Context) bool
- func (it *TreedataWalker) NodeMeta(*Context) WalkableNodeMeta
- func (it *TreedataWalker) PrettyPrint(w *bufio.Writer, config *PrettyPrintConfig, depth int, parentIndentCount int)
- func (it *TreedataWalker) Prune(ctx *Context)
- func (it *TreedataWalker) ToSymbolicValue(ctx *Context, encountered map[uintptr]symbolic.Value) (symbolic.Value, error)
- func (it *TreedataWalker) Value(*Context) Value
- type Tuple
- func (tuple *Tuple) At(ctx *Context, i int) Value
- func (tuple *Tuple) Concat(other *Tuple) *Tuple
- func (t *Tuple) Contains(ctx *Context, value Serializable) bool
- func (tuple *Tuple) Equal(ctx *Context, other Value, alreadyCompared map[uintptr]uintptr, depth int) bool
- func (tuple *Tuple) GetOrBuildElements(ctx *Context) []Serializable
- func (t *Tuple) IsEmpty(ctx *Context) bool
- func (tuple *Tuple) IsMutable() bool
- func (tuple Tuple) Iterator(ctx *Context, config IteratorConfiguration) Iterator
- func (tuple *Tuple) Len() int
- func (tuple *Tuple) Migrate(ctx *Context, key Path, migration *FreeEntityMigrationArgs) (Value, error)
- func (tuple Tuple) PrettyPrint(w *bufio.Writer, config *PrettyPrintConfig, depth int, parentIndentCount int)
- func (t Tuple) ToSymbolicValue(ctx *Context, encountered map[uintptr]symbolic.Value) (symbolic.Value, error)
- func (tuple *Tuple) WriteJSONRepresentation(ctx *Context, w *jsoniter.Stream, config JSONSerializationConfig, depth int) error
- type TupleIterator
- func (it *TupleIterator) Equal(ctx *Context, other Value, alreadyCompared map[uintptr]uintptr, depth int) bool
- func (it TupleIterator) HasNext(*Context) bool
- func (it *TupleIterator) IsMutable() bool
- func (it *TupleIterator) Key(ctx *Context) Value
- func (it *TupleIterator) Next(ctx *Context) bool
- func (it *TupleIterator) PrettyPrint(w *bufio.Writer, config *PrettyPrintConfig, depth int, parentIndentCount int)
- func (it *TupleIterator) ToSymbolicValue(ctx *Context, encountered map[uintptr]symbolic.Value) (symbolic.Value, error)
- func (it *TupleIterator) Value(*Context) Value
- type TuplePattern
- func (patt *TuplePattern) DefaultValue(ctx *Context) (Value, error)
- func (patt *TuplePattern) ElementPatternAt(i int) (Pattern, bool)
- func (patt *TuplePattern) Equal(ctx *Context, other Value, alreadyCompared map[uintptr]uintptr, depth int) bool
- func (patt *TuplePattern) ExactElementCount() (int, bool)
- func (patt *TuplePattern) IsMutable() bool
- func (patt TuplePattern) Iterator(ctx *Context, config IteratorConfiguration) Iterator
- func (patt TuplePattern) PrettyPrint(w *bufio.Writer, config *PrettyPrintConfig, depth int, parentIndentCount int)
- func (patt TuplePattern) Random(ctx *Context, options ...Option) Value
- func (patt *TuplePattern) StringPattern() (StringPattern, bool)
- func (patt *TuplePattern) Test(ctx *Context, v Value) bool
- func (p *TuplePattern) ToSymbolicValue(ctx *Context, encountered map[uintptr]symbolic.Value) (symbolic.Value, error)
- func (patt TuplePattern) WriteJSONRepresentation(ctx *Context, w *jsoniter.Stream, config JSONSerializationConfig, depth int) error
- type Type
- func (t Type) Equal(ctx *Context, other Value, alreadyCompared map[uintptr]uintptr, depth int) bool
- func (t Type) IsMutable() bool
- func (t Type) PrettyPrint(w *bufio.Writer, config *PrettyPrintConfig, depth int, parentIndentCount int)
- func (t Type) ToSymbolicValue(ctx *Context, encountered map[uintptr]symbolic.Value) (symbolic.Value, error)
- type TypeExtension
- type TypePattern
- func (patt *TypePattern) Call(values []Serializable) (Pattern, error)
- func (pattern *TypePattern) Equal(ctx *Context, other Value, alreadyCompared map[uintptr]uintptr, depth int) bool
- func (pattern *TypePattern) IsMutable() bool
- func (patt TypePattern) Iterator(ctx *Context, config IteratorConfiguration) Iterator
- func (pattern TypePattern) PrettyPrint(w *bufio.Writer, config *PrettyPrintConfig, depth int, parentIndentCount int)
- func (pattern TypePattern) Random(ctx *Context, options ...Option) Value
- func (patt *TypePattern) StringPattern() (StringPattern, bool)
- func (pattern *TypePattern) Test(ctx *Context, v Value) bool
- func (p *TypePattern) ToSymbolicVal() symbolic.Pattern
- func (p *TypePattern) ToSymbolicValue(ctx *Context, encountered map[uintptr]symbolic.Value) (symbolic.Value, error)
- func (pattern TypePattern) WriteJSONRepresentation(ctx *Context, w *jsoniter.Stream, config JSONSerializationConfig, depth int) error
- type ULID
- func (id ULID) After(other ULID) bool
- func (id ULID) Before(other ULID) bool
- func (id ULID) Compare(other Value) (result int, comparable bool)
- func (id ULID) Equal(ctx *Context, other Value, alreadyCompared map[uintptr]uintptr, depth int) bool
- func (id ULID) GoTime() time.Time
- func (ULID) IsMutable() bool
- func (id ULID) PrettyPrint(w *bufio.Writer, config *PrettyPrintConfig, depth int, parentIndentCount int)
- func (id ULID) String() string
- func (id ULID) Time() DateTime
- func (id ULID) ToSymbolicValue(ctx *Context, encountered map[uintptr]symbolic.Value) (symbolic.Value, error)
- func (id ULID) WriteJSONRepresentation(ctx *Context, w *jsoniter.Stream, config JSONSerializationConfig, depth int) error
- type URL
- func (u URL) AppendAbsolutePath(absPath Path) URL
- func (u URL) AppendRelativePath(relPath Path) URL
- func (u URL) DirURL() (URL, bool)
- func (u URL) Equal(ctx *Context, other Value, alreadyCompared map[uintptr]uintptr, depth int) bool
- func (u URL) GetLastPathSegment() string
- func (u URL) HasQueryOrFragment() bool
- func (u URL) Host() Host
- func (u URL) IsDir() bool
- func (u URL) IsDirOf(other URL) (bool, error)
- func (u URL) IsMutable() bool
- func (u URL) Path() Path
- func (u URL) PrettyPrint(w *bufio.Writer, config *PrettyPrintConfig, depth int, parentIndentCount int)
- func (u URL) Prop(ctx *Context, name string) Value
- func (u URL) PropertyNames(ctx *Context) []string
- func (u URL) RawQuery() String
- func (u URL) ResourceName() string
- func (u URL) Scheme() Scheme
- func (URL) SetProp(ctx *Context, name string, value Value) error
- func (u URL) ToDirURL() URL
- func (u URL) ToSymbolicValue(ctx *Context, encountered map[uintptr]symbolic.Value) (symbolic.Value, error)
- func (u URL) TruncatedBeforeQuery() URL
- func (u URL) UnderlyingString() string
- func (u URL) Validate() error
- func (u URL) WithScheme(scheme Scheme) URL
- func (u URL) WithoutQueryNorFragment() URL
- func (u URL) WriteJSONRepresentation(ctx *Context, w *jsoniter.Stream, config JSONSerializationConfig, depth int) error
- type URLPattern
- func (URLPattern) Call(values []Serializable) (Pattern, error)
- func (patt URLPattern) Equal(ctx *Context, other Value, alreadyCompared map[uintptr]uintptr, depth int) bool
- func (patt URLPattern) Host() Host
- func (patt URLPattern) Includes(ctx *Context, v Value) bool
- func (patt URLPattern) IncludesURL(ctx *Context, u URL) bool
- func (patt URLPattern) IsMutable() bool
- func (patt URLPattern) IsPrefixPattern() bool
- func (patt URLPattern) Iterator(ctx *Context, config IteratorConfiguration) Iterator
- func (patt URLPattern) Prefix() string
- func (patt URLPattern) PrettyPrint(w *bufio.Writer, config *PrettyPrintConfig, depth int, parentIndentCount int)
- func (patt URLPattern) Prop(ctx *Context, name string) Value
- func (patt URLPattern) PropertyNames(ctx *Context) []string
- func (patt URLPattern) PseudoPath() (string, bool)
- func (pattern URLPattern) Random(ctx *Context, options ...Option) Value
- func (patt URLPattern) Scheme() Scheme
- func (URLPattern) SetProp(ctx *Context, name string, value Value) error
- func (URLPattern) StringPattern() (StringPattern, bool)
- func (patt URLPattern) Test(ctx *Context, v Value) bool
- func (p URLPattern) ToSymbolicValue(ctx *Context, encountered map[uintptr]symbolic.Value) (symbolic.Value, error)
- func (patt URLPattern) UnderlyingString() string
- func (patt URLPattern) WriteJSONRepresentation(ctx *Context, w *jsoniter.Stream, config JSONSerializationConfig, depth int) error
- type UUIDv4
- func (id UUIDv4) Equal(ctx *Context, other Value, alreadyCompared map[uintptr]uintptr, depth int) bool
- func (UUIDv4) IsMutable() bool
- func (id UUIDv4) PrettyPrint(w *bufio.Writer, config *PrettyPrintConfig, depth int, parentIndentCount int)
- func (id UUIDv4) ToSymbolicValue(ctx *Context, encountered map[uintptr]symbolic.Value) (symbolic.Value, error)
- func (id UUIDv4) WriteJSONRepresentation(ctx *Context, w *jsoniter.Stream, config JSONSerializationConfig, depth int) error
- type UnionPattern
- func (patt *UnionPattern) Cases() []Pattern
- func (patt *UnionPattern) Equal(ctx *Context, other Value, alreadyCompared map[uintptr]uintptr, depth int) bool
- func (patt *UnionPattern) IsMutable() bool
- func (patt UnionPattern) Iterator(ctx *Context, config IteratorConfiguration) Iterator
- func (patt *UnionPattern) PrettyPrint(w *bufio.Writer, config *PrettyPrintConfig, depth int, parentIndentCount int)
- func (patt *UnionPattern) Random(ctx *Context, options ...Option) Value
- func (patt *UnionPattern) StringPattern() (StringPattern, bool)
- func (patt *UnionPattern) Test(ctx *Context, v Value) bool
- func (p *UnionPattern) ToSymbolicValue(ctx *Context, encountered map[uintptr]symbolic.Value) (symbolic.Value, error)
- func (patt UnionPattern) WriteJSONRepresentation(ctx *Context, w *jsoniter.Stream, config JSONSerializationConfig, depth int) error
- type UnionStringPattern
- func (patt *UnionStringPattern) CompiledRegex() *regexp.Regexp
- func (patt *UnionStringPattern) EffectiveLengthRange() IntRange
- func (patt *UnionStringPattern) Equal(ctx *Context, other Value, alreadyCompared map[uintptr]uintptr, depth int) bool
- func (patt *UnionStringPattern) FindMatches(ctx *Context, val Serializable, config MatchesFindConfig) (groups []Serializable, err error)
- func (patt *UnionStringPattern) HasRegex() bool
- func (patt *UnionStringPattern) IsMutable() bool
- func (patt *UnionStringPattern) IsResolved() bool
- func (patt UnionStringPattern) Iterator(ctx *Context, config IteratorConfiguration) Iterator
- func (patt *UnionStringPattern) LengthRange() IntRange
- func (patt *UnionStringPattern) MatchGroups(ctx *Context, v Serializable) (map[string]Serializable, bool, error)
- func (patt *UnionStringPattern) Parse(ctx *Context, s string) (Serializable, error)
- func (patt *UnionStringPattern) PatternNestingDepth(parentDepth int) int
- func (patt *UnionStringPattern) PrettyPrint(w *bufio.Writer, config *PrettyPrintConfig, depth int, parentIndentCount int)
- func (patt UnionStringPattern) Random(ctx *Context, options ...Option) Value
- func (patt *UnionStringPattern) Regex() string
- func (patt *UnionStringPattern) Resolve() (StringPattern, error)
- func (patt *UnionStringPattern) StringPattern() (StringPattern, bool)
- func (patt *UnionStringPattern) Test(ctx *Context, v Value) bool
- func (p *UnionStringPattern) ToSymbolicValue(ctx *Context, encountered map[uintptr]symbolic.Value) (symbolic.Value, error)
- func (patt UnionStringPattern) WriteJSONRepresentation(ctx *Context, w *jsoniter.Stream, config JSONSerializationConfig, depth int) error
- type UrlHolder
- type VM
- type VMConfig
- type ValMap
- type Value
- func CheckSharedOrClone(v Value, clones map[uintptr]Clonable, depth int) (Value, error)
- func ConvertReturnValue(rval reflect.Value) Value
- func EvalBytecode(bytecode *Bytecode, state *GlobalState, self Value) (Value, error)
- func EvalVM(mod *Module, state *GlobalState, config BytecodeEvaluationConfig) (Value, error)
- func Fmt(ctx *Context, format Format, arg Value) (Value, error)
- func GetGoMethodOrPanic(name string, v GoValue) Value
- func ImportWaitModule(config ImportConfig) (Value, error)
- func IterateAllValuesOnly(ctx *Context, it Iterator) []Value
- func MaxOf(ctx *Context, first Value, others ...Value) Value
- func MinOf(ctx *Context, first Value, others ...Value) Value
- func NewHost(hostnamePort Value, scheme string) (Value, error)
- func NewPath(slices []Value, isStaticPathSliceList []bool) (Value, error)
- func NewPathPattern(slices []Value, isStaticPathSliceList []bool) (Value, error)
- func NewURL(host Value, pathSlices []Value, isStaticPathSliceList []bool, ...) (Value, error)
- func RandBool(options ...Option) Value
- func RandFloat(options ...Option) Value
- func RandInt(options ...Option) Value
- func RandULID(options ...Option) Value
- func RandUUIDv4(options ...Option) Value
- func ShareOrClone(v Value, originState *GlobalState) (Value, error)
- func ShareOrCloneDepth(v Value, originState *GlobalState, sharableValues *[]PotentiallySharable, ...) (Value, error)
- func SumOptions(ctx *Context, config *Object, options ...Option) (Value, error)
- func ToValueAsserted(v any) Value
- func ToValueList[T Value](arg []T) []Value
- func TreeWalkCallFunc(call TreeWalkCall) (Value, error)
- func TreeWalkEval(node parse.Node, state *TreeWalkState) (result Value, err error)
- func Unwrap(ctx *Context, v Value) Value
- func ValOf(v interface{}) Value
- type ValueFilteredIterator
- func (it *ValueFilteredIterator) Equal(ctx *Context, other Value, alreadyCompared map[uintptr]uintptr, depth int) bool
- func (it *ValueFilteredIterator) HasNext(ctx *Context) bool
- func (it *ValueFilteredIterator) IsMutable() bool
- func (it *ValueFilteredIterator) Key(ctx *Context) Value
- func (it *ValueFilteredIterator) Next(ctx *Context) bool
- func (it *ValueFilteredIterator) PrettyPrint(w *bufio.Writer, config *PrettyPrintConfig, depth int, parentIndentCount int)
- func (it *ValueFilteredIterator) ToSymbolicValue(ctx *Context, encountered map[uintptr]symbolic.Value) (symbolic.Value, error)
- func (it *ValueFilteredIterator) Value(ctx *Context) Value
- type ValueHistory
- func (h *ValueHistory) AddChange(ctx *Context, c Change)
- func (h *ValueHistory) Equal(ctx *Context, other Value, alreadyCompared map[uintptr]uintptr, depth int) bool
- func (h *ValueHistory) ForgetChangesBeforeDate(ctx *Context, d DateTime)
- func (h *ValueHistory) ForgetLast(ctx *Context)
- func (h *ValueHistory) GetGoMethod(name string) (*GoFunction, bool)
- func (*ValueHistory) IsMutable() bool
- func (h *ValueHistory) IsRecursivelyRenderable(ctx *Context, input RenderingInput) bool
- func (h *ValueHistory) IsSharable(originState *GlobalState) (bool, string)
- func (h *ValueHistory) IsShared() bool
- func (h *ValueHistory) LastValue(ctx *Context) Value
- func (h *ValueHistory) PrettyPrint(w *bufio.Writer, config *PrettyPrintConfig, depth int, parentIndentCount int)
- func (h *ValueHistory) Prop(ctx *Context, name string) Value
- func (*ValueHistory) PropertyNames(ctx *Context) []string
- func (h *ValueHistory) Render(ctx *Context, w io.Writer, config RenderingInput) (int, error)
- func (h *ValueHistory) RenderCurrentToHTMLFn() *InoxFunction
- func (h *ValueHistory) SelectDate(ctx *Context, d DateTime)
- func (h *ValueHistory) SetProp(ctx *Context, name string, value Value) error
- func (h *ValueHistory) Share(originState *GlobalState)
- func (h *ValueHistory) SmartLock(state *GlobalState)
- func (h *ValueHistory) SmartUnlock(state *GlobalState)
- func (h *ValueHistory) ToSymbolicValue(ctx *Context, encountered map[uintptr]symbolic.Value) (symbolic.Value, error)
- func (h *ValueHistory) ValueAt(ctx *Context, d DateTime) Value
- func (h *ValueHistory) ValueAtSelection(ctx *Context) Value
- type ValueLifetimeJobs
- type ValueList
- func (list *ValueList) At(ctx *Context, i int) Value
- func (list *ValueList) Clone(originState *GlobalState, sharableValues *[]PotentiallySharable, ...) (Serializable, error)
- func (list *ValueList) ConstraintId() ConstraintId
- func (list *ValueList) ContainsSimple(ctx *Context, v Serializable) bool
- func (list *ValueList) Equal(ctx *Context, other Value, alreadyCompared map[uintptr]uintptr, depth int) bool
- func (list *ValueList) IsMutable() bool
- func (list *ValueList) Iterator(ctx *Context, config IteratorConfiguration) Iterator
- func (list *ValueList) Len() int
- func (list *ValueList) PrettyPrint(w *bufio.Writer, config *PrettyPrintConfig, depth int, parentIndentCount int)
- func (list *ValueList) SetSlice(ctx *Context, start, end int, seq Sequence)
- func (l *ValueList) SortByNestedValue(ctx *Context, path ValuePath, order Order) error
- func (l *ValueList) ToSymbolicValue(ctx *Context, encountered map[uintptr]symbolic.Value) (symbolic.Value, error)
- func (list *ValueList) WriteJSONRepresentation(ctx *Context, w *jsoniter.Stream, config JSONSerializationConfig, depth int) error
- type ValueListIterator
- func (it *ValueListIterator) Equal(ctx *Context, other Value, alreadyCompared map[uintptr]uintptr, depth int) bool
- func (it ValueListIterator) HasNext(*Context) bool
- func (it *ValueListIterator) IsMutable() bool
- func (it *ValueListIterator) Key(ctx *Context) Value
- func (it *ValueListIterator) Next(ctx *Context) bool
- func (it *ValueListIterator) PrettyPrint(w *bufio.Writer, config *PrettyPrintConfig, depth int, parentIndentCount int)
- func (it *ValueListIterator) ToSymbolicValue(ctx *Context, encountered map[uintptr]symbolic.Value) (symbolic.Value, error)
- func (it *ValueListIterator) Value(*Context) Value
- type ValuePath
- type ValuePathSegment
- type ValueVisibility
- type ValueVisibilityPermission
- type ValueWatchers
- type VisibilityId
- type WaitConfirmPrompt
- type Walkable
- type WalkableNodeMeta
- type Walker
- type Watchable
- type WatchableSubscriber
- type Watcher
- type WatcherConfiguration
- type WatchingDepth
- type WebsocketPermission
- type WrappedBytes
- type WrappedString
- type Writable
- type WritableByteStream
- func (s *WritableByteStream) Equal(ctx *Context, other Value, alreadyCompared map[uintptr]uintptr, depth int) bool
- func (*WritableByteStream) IsMutable() bool
- func (s *WritableByteStream) IsStopped() bool
- func (s *WritableByteStream) PrettyPrint(w *bufio.Writer, config *PrettyPrintConfig, depth int, parentIndentCount int)
- func (s *WritableByteStream) Stop()
- func (s *WritableByteStream) ToSymbolicValue(ctx *Context, encountered map[uintptr]symbolic.Value) (symbolic.Value, error)
- func (s *WritableByteStream) WritableStream(ctx *Context, config *WritableStreamConfiguration) WritableStream
- func (s *WritableByteStream) Write(ctx *Context, v Value) error
- func (s *WritableByteStream) WriteBytes(ctx *Context, p []byte) error
- func (s *WritableByteStream) WriteChunk(ctx *Context, chunk *DataChunk) error
- type WritableStream
- type WritableStreamConfiguration
- type Writer
- func (w *Writer) Equal(ctx *Context, other Value, alreadyCompared map[uintptr]uintptr, depth int) bool
- func (w *Writer) Flush(ctx *Context) error
- func (w *Writer) GetGoMethod(name string) (*GoFunction, bool)
- func (*Writer) IsMutable() bool
- func (writer *Writer) PrettyPrint(w *bufio.Writer, config *PrettyPrintConfig, depth int, parentIndentCount int)
- func (w *Writer) Prop(ctx *Context, name string) Value
- func (Writer) PropertyNames(ctx *Context) []string
- func (*Writer) SetProp(ctx *Context, name string, value Value) error
- func (writer *Writer) ToSymbolicValue(ctx *Context, encountered map[uintptr]symbolic.Value) (symbolic.Value, error)
- func (w *Writer) TotalWritten() Int
- func (w *Writer) Write(p []byte) (n int, err error)
- func (w *Writer) WriteString(s string) (n int, err error)
- func (w *Writer) WriteStrings(s ...string) (n int, err error)
- func (w *Writer) Writer() *Writer
- type XMLAttribute
- type XMLElement
- func (e *XMLElement) Attributes() []XMLAttribute
- func (e *XMLElement) Children() []Value
- func (e *XMLElement) Equal(ctx *Context, other Value, alreadyCompared map[uintptr]uintptr, depth int) bool
- func (*XMLElement) IsMutable() bool
- func (e *XMLElement) Name() string
- func (s *XMLElement) PrettyPrint(w *bufio.Writer, config *PrettyPrintConfig, depth int, parentIndentCount int)
- func (e *XMLElement) RawContent() string
- func (p *XMLElement) ToSymbolicValue(ctx *Context, encountered map[uintptr]symbolic.Value) (symbolic.Value, error)
- type Year
- func (y Year) Compare(other Value) (result int, comparable bool)
- func (y Year) Equal(ctx *Context, other Value, alreadyCompared map[uintptr]uintptr, depth int) bool
- func (d Year) IsMutable() bool
- func (y Year) PrettyPrint(w *bufio.Writer, config *PrettyPrintConfig, depth int, parentIndentCount int)
- func (y Year) ToSymbolicValue(ctx *Context, encountered map[uintptr]symbolic.Value) (symbolic.Value, error)
- func (y Year) Validate() error
- func (y Year) WriteJSONRepresentation(ctx *Context, w *jsoniter.Stream, config JSONSerializationConfig, depth int) error
Constants ¶
const ( True = Bool(true) False = Bool(false) )
const ( CTX_DONE_MICROTASK_CALLS_TIMEOUT = 5 * time.Millisecond DEFAULT_IWD = Path("/") )
const ( FUNCTION_FRAME_PREFIX = "(fn) " //starts at 1 for compatibility with the Debug Adapter Protocol INITIAL_BREAKPOINT_ID = 1 SECONDARY_EVENT_CHAN_CAP = 1000 )
const ( IncomingMessageReceivedEventType = iota + 1 LThreadSpawnedEventType )
const ( STREAM_ITERATION_WAIT_TIMEOUT = 5 * time.Millisecond DEFAULT_MIN_STREAM_CHUNK_SIZE = 2 DEFAULT_MAX_STREAM_CHUNK_SIZE = 10 )
const ( S_PATH_EXPR_PATH_LIMITATION = "path should not contain the substring '..'" S_PATH_SLICE_VALUE_LIMITATION = "path slices should have a string or path value" S_PATH_INTERP_RESULT_LIMITATION = "result of a path interpolation should not contain any of the following substrings: '..', '\\', '*', '?'" S_URL_PATH_INTERP_RESULT_LIMITATION = "result of a URL path interpolation should not contain any of the following substrings: '..', '\\', '*', '?', '#'" S_QUERY_PARAM_VALUE_LIMITATION = "value of query parameter should not contain '&' nor '#'" S_URL_EXPR_PATH_START_LIMITATION = "path should not start with ':'" S_URL_EXPR_PATH_LIMITATION = "path should not contain any of the following substrings '..', '#', '?" S_URL_EXPR_UNEXPECTED_HOST_IN_PARSED_URL_AFTER_EVAL = "unexpected host in parsed URL after evaluation" S_INVALID_URL_ENCODED_STRING = "invalid URL encoded string" S_INVALID_URL_ENCODED_PATH = "invalid URL encoded path" )
const ( HARD_MINIMUM_LAST_EVENT_AGE = 25 * time.Millisecond MAX_MINIMUM_LAST_EVENT_AGE = 10 * time.Second IDLE_EVENT_SOURCE_HANDLING_TICK_INTERVAL = 25 * time.Millisecond )
const ( MINIMAL_STATE_ID = 1 INITIAL_MODULE_HEAP_CAPACITY = 1000 MINIMUM_MOD_PRIORITY = ModulePriority(10) READ_TX_PRIORITY = ModulePriority(50) READ_WRITE_TX_PRIORITY = ModulePriority(150) )
const ( MAX_JOB_IDLE_DURATION = 10 * time.Millisecond JOB_SCHEDULING_TICK_INTERVAL = 50 * time.Microsecond )
const ( THREADS_SIMULTANEOUS_INSTANCES_LIMIT_NAME = "threads/simul-instances" EXECUTION_TOTAL_LIMIT_NAME = "execution/total-time" // Note: // This limit represents a pseudo CPU time because it's not possible to accurately detect when // the goroutine executing a module is waiting for IO. // // Implementation note: // CPU time token depletion should not be paused during lockings that are both shorts & often successful on the first try // because it would introduce overhead. Pausing the depletion involves an atomic write. EXECUTION_CPU_TIME_LIMIT_NAME = "execution/cpu-time" MAX_LIMIT_VALUE = math.MaxInt64 / TOKEN_BUCKET_CAPACITY_SCALE //Token count should be scaled by this value when calling .Take() for a frequency limit. //This is not related to the internal scaling of token buckets. FREQ_LIMIT_SCALE = 1000 )
const ( FrequencyLimit = LimitKind(iota) ByteRateLimit TotalLimit )
const ( SOURCE_LOG_FIELD_NAME = "src" QUOTED_SOURCE_LOG_FIELD_NAME = `"src"` )
const ( //section names MANIFEST_KIND_SECTION_NAME = "kind" MANIFEST_ENV_SECTION_NAME = "env" MANIFEST_PARAMS_SECTION_NAME = "parameters" MANIFEST_PERMS_SECTION_NAME = "permissions" MANIFEST_LIMITS_SECTION_NAME = "limits" MANIFEST_HOST_DEFINITIONS_SECTION_NAME = "host-definitions" MANIFEST_PREINIT_FILES_SECTION_NAME = "preinit-files" MANIFEST_INVOCATION_SECTION_NAME = "invocation" //preinit-files section MANIFEST_PREINIT_FILE__PATTERN_PROP_NAME = "pattern" MANIFEST_PREINIT_FILE__PATH_PROP_NAME = "path" //databases section MANIFEST_DATABASES_SECTION_NAME = "databases" //database description in databases section MANIFEST_DATABASE__RESOURCE_PROP_NAME = "resource" MANIFEST_DATABASE__RESOLUTION_DATA_PROP_NAME = "resolution-data" MANIFEST_DATABASE__EXPECTED_SCHEMA_UPDATE_PROP_NAME = "expected-schema-update" MANIFEST_DATABASE__ASSERT_SCHEMA_UPDATE_PROP_NAME = "assert-schema" //invocation section MANIFEST_INVOCATION__ON_ADDED_ELEM_PROP_NAME = "on-added-element" MANIFEST_INVOCATION__ASYNC_PROP_NAME = "async" //permissions section INVALID_COMMANDS_PREFIX = "invalid manifest, use: commands: " ERR = INVALID_COMMANDS_PREFIX + "a command (or subcommand) name should be followed by object literals with the next subcommands as keys (or empty)" //parameters MANIFEST_PARAM__PATTERN_PROPNAME = "pattern" MANIFEST_PARAM__DESCRIPTION_PROPNAME = "description" MANIFEST_POSITIONAL_PARAM__REST_PROPNAME = "rest" MANIFEST_NON_POSITIONAL_PARAM__NAME_PROPNAME = "name" MANIFEST_NON_POSITIONAL_PARAM__DEFAULT_PROPNAME = "default" MANIFEST_NON_POSITIONAL_PARAM__CHAR_NAME_PROPNAME = "char-name" // -------------------------------- INITIAL_WORKING_DIR_VARNAME = "IWD" INITIAL_WORKING_DIR_PREFIX_VARNAME = "IWD_PREFIX" )
const ( MEM_HOSTNAME = "localproc" LOCAL_PROC_HOST = "mem://localproc" )
const ( URL_METADATA_KEY = "_url_" MIME_METADATA_KEY = "_mime_" )
const ( INCLUDED_FILE_PATH_SHOULD_NOT_CONTAIN_X = "included file path should not contain '..'" MOD_ARGS_VARNAME = "mod-args" MAX_PREINIT_FILE_SIZE = int32(100_000) DEFAULT_MAX_READ_FILE_SIZE = int32(100_000_000) MOD_IMPORT_FETCH_TIMEOUT = 5 * time.Second )
const ( INOX_MIMETYPE = "application/inox" DEFAULT_FETCH_TIMEOUT = 10 * time.Second DEFAULT_IMPORT_TIMEOUT = 10 * time.Second DEFAULT_MAX_MOD_GRAPH_PATH_LEN = 5 IMPORT_CONFIG__ALLOW_PROPNAME = "allow" IMPORT_CONFIG__ARGUMENTS_PROPNAME = "arguments" IMPORT_CONFIG__VALIDATION_PROPNAME = "validation" )
const ( MOD_PREP_LOG_SRC = "mod-prep" LDB_MAIN_HOST = Host("ldb://main") )
const ( MAX_UNION_PATTERN_FLATTENING_DEPTH = 5 OBJECT_CONSTRAINTS_VERIFICATION_TIMEOUT = 10 * time.Millisecond //Default max element count if the number of elements is not exact. DEFAULT_LIST_PATTERN_MAX_ELEM_COUNT = math.MaxInt32 )
const ( LINE_COUNT_UNIT = "ln" RUNE_COUNT_UNIT = "rn" BYTE_COUNT_UNIT = "B" SIMPLE_RATE_PER_SECOND_SUFFIX = "x/s" )
const ( DEFAULT_MAX_RAND_LEN = 10 DEFAULT_MAX_OCCURRENCE = 20 )
const ( BYTE_STREAM_BUFF_GROWTH_FACTOR = 2 BYTE_STREAM_MINIMUM_MICRO_WAIT_DURATION = 100 * time.Microsecond NOT_STARTED_CONFLUENCE_STREAM = 0 STARTED_CONFLUENCE_STREAM = 1 STOPPED_CONFLUENCE_STREAM = 2 )
const ( ANY_HTTPS_HOST_PATTERN = HostPattern("https://**") NO_SCHEME_SCHEME_NAME = Scheme("noscheme") NO_SCHEME_SCHEME = string(NO_SCHEME_SCHEME_NAME + "://") LDB_SCHEME = Scheme(inoxconsts.LDB_SCHEME_NAME) ODB_SCHEME = Scheme(inoxconsts.ODB_SCHEME_NAME) // PATH_MAX on linux MAX_TESTED_PATH_BYTE_LENGTH = 4095 MAX_TESTED_URL_BYTE_LENGTH = 8000 //TODO: change value MAX_TESTED_HOST_PATTERN_BYTE_LENGTH = 100 PREFIX_PATH_PATTERN_SUFFIX = "/..." ROOT_PREFIX_PATH_PATTERN = PathPattern("/...") )
const ( INOX_MODULE_RES_KIND = "inox/module" INOX_INCLUDED_CHUNK_RES_KIND = "inox/included-chunk" CHUNK_IMPORT_MOD_REL = ResourceRelationKind("inox/import-module") CHUNK_INCLUDE_REL = ResourceRelationKind("inox/include-chunk") )
const ( MAXIMUM_RISK_SCORE = RiskScore(10_000) MEDIUM_RISK_SCORE_LEVEL = 300 HIGH_RISK_SCORE_LEVEL = 500 UNKNOWN_PERM_RISK_SCORE = RiskScore(30) HOST_PATTERN_RISK_MULTIPLIER = RiskScore(4) HOST_RISK_MULTIPLIER = RiskScore(3) URL_PATTERN_RISK_MULTIPLIER = RiskScore(2) URL_RISK_MULTIPLIER = RiskScore(1) UNKNOW_FILE_SENSITIVITY_MULTIPLIER = 2 UNKNOW_FILE_PATTERN_SENSITIVITY_MUTLIPLIER = 3 HTTP_READ_PERM_RISK_SCORE = 10 HTTP_WRITE_PERM_RISK_SCORE = 20 HTTP_PROVIDE_PERM_RISK_SCORE = 20 WS_READ_PERM_RISK_SCORE = 10 WS_WRITE_PERM_RISK_SCORE = 20 WS_PROVIDE_PERM_RISK_SCORE = 20 FS_READ_PERM_RISK_SCORE = 10 FS_WRITE_PERM_RISK_SCORE = 20 LTHREAD_PERM_RISK_SCORE = 2 //the creation of lthread is not risky, it's the number of goroutines that can be an issue CMD_PERM_RISK_SCORE = 30 )
The following risk score constants are intended to be a starting point, they may be adjusted based on additional research and feedback.
const ( CHECK_ERR_PREFIX = "check: " MAX_NAME_BYTE_LEN = 64 )
const ( MODULE_IMPORTS_NOT_ALLOWED_IN_INCLUDED_CHUNK = "modules imports are not allowed in included chunks" //global constant declarations VAR_CONST_NOT_DECLARED_IF_YOU_MEANT_TO_DECLARE_CONSTANTS_GLOBAL_CONST_DECLS_ONLY_SUPPORTED_AT_THE_START_OF_THE_MODULE = "" /* 170-byte string literal not displayed */ //manifest NO_SPREAD_IN_MANIFEST = "objects & lists in the manifest cannot contain spread elements" ELEMENTS_NOT_ALLOWED_IN_MANIFEST = "elements (valus without a key) are not allowed in the manifest object" //kind section KIND_SECTION_SHOULD_BE_A_STRING_LITERAL = "the '" + MANIFEST_KIND_SECTION_NAME + "' section of the manifest should have a string value (string literal)" INVALID_KIND_SECTION_EMBEDDED_MOD_KINDS_NOT_ALLOWED = "invalid '" + MANIFEST_KIND_SECTION_NAME + "' section: embedded module kinds are not allowed" //permissions section PERMS_SECTION_SHOULD_BE_AN_OBJECT = "the '" + MANIFEST_PERMS_SECTION_NAME + "' section of the manifest should be an object" ELEMENTS_NOT_ALLOWED_IN_PERMS_SECTION = "elements are not allowed in the 'permissions' section" //limits section LIMITS_SECTION_SHOULD_BE_AN_OBJECT = "the '" + MANIFEST_LIMITS_SECTION_NAME + "' section of the manifest should be an object" //env section ENV_SECTION_SHOULD_BE_AN_OBJECT_PATTERN = "the '" + MANIFEST_ENV_SECTION_NAME + "' section of the manifest should be an object pattern literal" ENV_SECTION_NOT_AVAILABLE_IN_EMBEDDED_MODULE_MANIFESTS = "the '" + MANIFEST_ENV_SECTION_NAME + "' section is not available in embedded module manifests" //params section PARAMS_SECTION_SHOULD_BE_AN_OBJECT = "the '" + MANIFEST_PARAMS_SECTION_NAME + "' section of the manifest should be an object literal" PARAMS_SECTION_NOT_AVAILABLE_IN_EMBEDDED_MODULE_MANIFESTS = "the '" + MANIFEST_PARAMS_SECTION_NAME + "' section is not available in embedded module manifests" FORBIDDEN_NODE_TYPE_IN_INCLUDABLE_CHUNK_IMPORTED_BY_PREINIT = "forbidden node type in includable chunk imported by preinit" //permissions NO_PERM_DESCRIBED_BY_THIS_TYPE_OF_VALUE = "there is no permission described by this type of value" NO_PERM_DESCRIBED_BY_STRINGS = "there is no permission described by strings" MAYBE_YOU_MEANT_TO_WRITE_A_PATH_LITERAL = "maybe you meant to write a path literal such as /dir/ or /data.json (always unquoted)" MAYBE_YOU_MEANT_TO_WRITE_A_PATH_PATTERN_LITERAL = "maybe you meant to write a path pattern literal such as %/... or %/*.json (always unquoted)" MAYBE_YOU_MEANT_TO_WRITE_A_URL_LITERAL = "maybe you meant to write a url literal such as https://example.com/ (always unquoted)" MAYBE_YOU_MEANT_TO_WRITE_A_URL_PATTERN_LITERAL = "maybe you meant to write a url pattern literal such as %https://example.com/... (always unquoted)" //preinit-files section PREINIT_FILES_SECTION_SHOULD_BE_AN_OBJECT = "the '" + MANIFEST_PREINIT_FILES_SECTION_NAME + "' section of the manifest should be an object literal" PREINIT_FILES__FILE_CONFIG_SHOULD_BE_AN_OBJECT = "the description of each file in the '" + MANIFEST_PREINIT_FILES_SECTION_NAME + "' section of the manifest should be an object literal" PREINIT_FILES__FILE_CONFIG_PATH_SHOULD_BE_ABS_PATH = "the ." + MANIFEST_PREINIT_FILE__PATH_PROP_NAME + " of each file in the '" + MANIFEST_PREINIT_FILES_SECTION_NAME + "' section (manifest) should be an absolute path" PREINIT_FILES_SECTION_NOT_AVAILABLE_IN_EMBEDDED_MODULE_MANIFESTS = "the '" + MANIFEST_PREINIT_FILES_SECTION_NAME + "' section is not available in embedded module manifests" //databases section DATABASES_SECTION_SHOULD_BE_AN_OBJECT_OR_ABS_PATH = "the '" + MANIFEST_DATABASES_SECTION_NAME + "' section of the manifest should be an object literal or an absolute path literal" DATABASES__DB_CONFIG_SHOULD_BE_AN_OBJECT = "the description of each database in the '" + MANIFEST_DATABASES_SECTION_NAME + "' section of the manifest should be an object literal" DATABASES__DB_RESOURCE_SHOULD_BE_HOST_OR_URL = "the ." + MANIFEST_DATABASE__RESOURCE_PROP_NAME + " property of database descriptions in the '" + MANIFEST_DATABASES_SECTION_NAME + "' section (manifest) should be a Host or a URL" DATABASES__DB_EXPECTED_SCHEMA_UPDATE_SHOULD_BE_BOOL_LIT = "the ." + MANIFEST_DATABASE__EXPECTED_SCHEMA_UPDATE_PROP_NAME + " property of database descriptions in the '" + MANIFEST_DATABASES_SECTION_NAME + "' section (manifest) should be a boolean literal (the property is optional)" DATABASES__DB_ASSERT_SCHEMA_SHOULD_BE_PATT_IDENT_OR_OBJ_PATT = "the ." + MANIFEST_DATABASE__ASSERT_SCHEMA_UPDATE_PROP_NAME + " property of database descriptions in the '" + MANIFEST_DATABASES_SECTION_NAME + "' section (manifest) should be a pattern identifier or an object pattern literal (the property is optional)" DATABASES_SECTION_NOT_AVAILABLE_IN_EMBEDDED_MODULE_MANIFESTS = "the '" + MANIFEST_DATABASES_SECTION_NAME + "' section is not available in embedded module manifests" DATABASES__DB_RESOLUTION_DATA_ONLY_NIL_AND_PATHS_SUPPORTED = "nil and paths are the only supported values for ." + MANIFEST_DATABASE__RESOLUTION_DATA_PROP_NAME + " in a database description" //invocation section INVOCATION_SECTION_SHOULD_BE_AN_OBJECT = "the '" + MANIFEST_INVOCATION_SECTION_NAME + "' section of the manifest should be an object literal" INVOCATION_SECTION_NOT_AVAILABLE_IN_EMBEDDED_MODULE_MANIFESTS = "the '" + MANIFEST_INVOCATION_SECTION_NAME + "' section is not available in embedded module manifests" ONLY_URL_LITS_ARE_SUPPORTED_FOR_NOW = "only URL literals are supported for now" A_BOOL_LIT_IS_EXPECTED = "a boolean literal is expected" SCHEME_NOT_DB_SCHEME_OR_IS_NOT_SUPPORTED = "this scheme is not a database scheme or is not supported" THE_DATABASES_SECTION_SHOULD_BE_PRESENT = "the databases section should be present because the auto invocation of the module depends on one or more database(s)" HOST_DEFS_SECTION_SHOULD_BE_A_DICT = "the '" + MANIFEST_HOST_DEFINITIONS_SECTION_NAME + "' section of the manifest should be a dictionary with host keys" HOST_SCHEME_NOT_SUPPORTED = "the host's scheme is not supported" //included chunk AN_INCLUDED_CHUNK_SHOULD_ONLY_CONTAIN_DEFINITIONS = "an included chunk should only contain definitions (functions, patterns, ...)" INVALID_RATE = "invalid rate" INVALID_QUANTITY = "invalid quantity" //spawn expression INVALID_SPAWN_EXPR_EXPR_SHOULD_BE_ONE_OF = "invalid spawn expression: the expression should be a simple function call or an embedded module (that can be global)" INVALID_SPAWN_GLOBALS_SHOULD_BE = "" /* 154-byte string literal not displayed */ INVALID_SPAWN_ONLY_OBJECT_LITERALS_WITH_NO_SPREAD_ELEMENTS_SUPPORTED = "" /* 129-byte string literal not displayed */ INVALID_ASSIGNMENT_ANONYMOUS_VAR_CANNOT_BE_ASSIGNED = "invalid assignment: anonymous variable '$' cannot be assigned" INVALID_ASSIGNMENT_EQUAL_ONLY_SUPPORTED_ASSIGNMENT_OPERATOR_FOR_SLICE_EXPRS = "invalid assignment: '=' is the only supported assignment operators for slice expressions" INVALID_FN_DECL_SHOULD_BE_TOP_LEVEL_STMT = "invalid function declaration: a function declaration should be a top level statement in a module (embedded or not)" INVALID_BREAK_OR_CONTINUE_STMT_SHOULD_BE_IN_A_FOR_OR_WALK_STMT = "invalid break/continue statement: should be in a for or walk statement" INVALID_PRUNE_STMT_SHOULD_BE_IN_WALK_STMT = "invalid prune statement: should be in a walk statement" SELF_ACCESSIBILITY_EXPLANATION = "'self' is only accessible within " + "extension methods, struct methods, metaproperty initialization blocks, and lifetime jobs" CANNOT_CHECK_OBJECT_PROP_WITHOUT_PARENT = "checking an ObjectProperty node requires the parent ObjectLiteral node" CANNOT_CHECK_OBJECT_METAPROP_WITHOUT_PARENT = "checking an ObjectMetaProperty node requires the parent ObjectLiteral node" OBJ_REC_LIT_CANNOT_HAVE_METAPROP_KEYS = "" /* 144-byte string literal not displayed */ CANNOT_CHECK_MANIFEST_WITHOUT_PARENT = "checking a Manifest node requires the parent node" CANNOT_CHECK_STRUCT_METHOD_DEF_WITHOUT_PARENT = "checking the definition of a struct method requires the parent node" //object literal ELEMENTS_NOT_ALLOWED_IF_EMPTY_PROP_NAME = "elements are not allowed if the empty property name is present" EMPTY_PROP_NAME_NOT_ALLOWED_IF_ELEMENTS = "the empty property name is not allowed if there are elements (values without a key)" //object pattern literals UNEXPECTED_OTHER_PROPS_EXPR_OTHERPROPS_NO_IS_PRESENT = "unexpected otherprops expression: no other properties are allowed since otherprops(no) is present" MISPLACED_SENDVAL_EXPR = "" /* 128-byte string literal not displayed */ MISPLACED_RECEPTION_HANDLER_EXPRESSION = "misplaced reception handler expression is misplaced, it should be an element (no key) of an object literal" INVALID_MAPPING_ENTRY_KEY_ONLY_SIMPL_LITS_AND_PATT_IDENTS = "invalid mapping entry key: only simple value literals and pattern identifiers are supported" ONLY_GLOBALS_ARE_ACCESSIBLE_FROM_RIGHT_SIDE_OF_MAPPING_ENTRIES = "only globals are accessible from the right side of mapping entries" MISPLACED_RUNTIME_TYPECHECK_EXPRESSION = "" /* 136-byte string literal not displayed */ MISPLACED_COMPUTE_EXPR_SHOULD_BE_IN_DYNAMIC_MAPPING_EXPR_ENTRY = "misplaced compute expression: compute expressions are only allowed on the right side of a dynamic Mapping entry" MISPLACE_YIELD_STATEMENT_ONLY_ALLOWED_IN_EMBEDDED_MODULES = "misplaced yield statement: yield statements are only allowed in embedded modules" MISPLACED_INCLUSION_IMPORT_STATEMENT_TOP_LEVEL_STMT = "misplaced inclusion import statement: it should be located at the module's top level or a the top level of the preinit block" MISPLACED_MOD_IMPORT_STATEMENT_TOP_LEVEL_STMT = "misplaced module import statement: it should be located at the top level" MISPLACED_PATTERN_DEF_STATEMENT_TOP_LEVEL_STMT = "misplaced pattern definition statement: it should be located at the top level" MISPLACED_PATTERN_NS_DEF_STATEMENT_TOP_LEVEL_STMT = "misplaced pattern namespace definition statement: it should be located at the top level" MISPLACED_HOST_ALIAS_DEF_STATEMENT_TOP_LEVEL_STMT = "misplaced host alias definition statement: it should be located at the top level" MISPLACED_READONLY_PATTERN_EXPRESSION = "misplaced readonly pattern expression: they are only allowed as the type of function parameters" MISPLACED_EXTEND_STATEMENT_TOP_LEVEL_STMT = "misplaced extend statement: it should be located at the top level" MISPLACED_STRUCT_DEF_TOP_LEVEL_STMT = "misplaced struct definition: it should be located at the top level" INVALID_MEM_HOST_ONLY_VALID_VALUE = "invalid mem:// host, only valid value is " + MEM_HOSTNAME LOWER_BOUND_OF_INT_RANGE_LIT_SHOULD_BE_SMALLER_THAN_UPPER_BOUND = "the lower bound of an integer range literal should be smaller than the upper bound" LOWER_BOUND_OF_FLOAT_RANGE_LIT_SHOULD_BE_SMALLER_THAN_UPPER_BOUND = "the lower bound of a float range literal should be smaller than the upper bound" //lifetime job MISSING_LIFETIMEJOB_SUBJECT_PATTERN_NOT_AN_IMPLICIT_OBJ_PROP = "missing subject pattern of lifetime job: subject can only be ommitted for lifetime jobs that are implicit object properties" //visibility INVALID_VISIB_INIT_BLOCK_SHOULD_CONT_OBJ = "invalid visibility initialization block: block should only contain an object literal" INVALID_VISIB_DESC_SHOULDNT_HAVE_METAPROPS = "invalid visibility initialization description: object should not have metaproperties" INVALID_VISIB_DESC_SHOULDNT_HAVE_ELEMENTS = "invalid visibility initialization description: object should not have elements (values without a key)" VAL_SHOULD_BE_KEYLIST_LIT = "value should be a key list literal" VAL_SHOULD_BE_DICT_LIT = "value should be a dictionary literal" INVALID_VISIBILITY_DESC_KEY = "invalid key for visibility description" OPTIONAL_DYN_MEMB_EXPR_NOT_SUPPORTED_YET = "optional dynamic member expression are not supported yet" VARS_NOT_ALLOWED_IN_PATTERN_AND_EXTENSION_OBJECT_PROPERTIES = "variables are not allowed in the extended pattern and " + "in the extension object's properties" VARS_CANNOT_BE_USED_IN_STRUCT_FIELD_DEFS = "variables cannot be used in struct field definitions" //struct types MISPLACED_STRUCT_TYPE_NAME = "misplaced struct type name, note that struct types are not patterns and are not allowed inside patterns" STRUCT_TYPES_NOT_ALLOWED_AS_PARAMETER_TYPES = "struct types are not allowed as parameter types, pointer types are allowed though" STRUCT_TYPES_NOT_ALLOWED_AS_RETURN_TYPES = "struct types are not allowed as return types, pointer types are allowed though" //pointer types A_STRUCT_TYPE_IS_EXPECTED_AFTER_THE_STAR = "a struct type is expected after '*'" MISPLACED_POINTER_TYPE = "misplaced pointer type, note that pointer types are not patterns and are not allowed inside patterns" //test suites & cases TEST_CASES_NOT_ALLOWED_IF_SUBSUITES_ARE_PRESENT = "test cases are not allowed if sub suites are presents" TEST_CASE_STMTS_NOT_ALLOWED_OUTSIDE_OF_TEST_SUITES = "test case statements are not allowed outside of test suites" TEST_SUITE_STMTS_NOT_ALLOWED_INSIDE_TEST_CASE_STMTS = "test suite statements are not allowed in test case statements" //new expressions A_STRUCT_TYPE_NAME_IS_EXPECTED = "a struct type name is expected" )
const ( MIN_LAZY_STR_CONCATENATION_SIZE = 200 //this constant can change in the future, it's a starting point. MAX_SMALL_STRING_SIZE_IN_LAZY_STR_CONCATENATION = 30 //this constant can change in the future, it's a starting point. )
const ( //maximum length of strings tested against regex patterns, sequence string patterns and parser patterns. DEFAULT_MAX_TESTED_STRING_BYTE_LENGTH = 10_000_000 UNSIGNED_DECIMAL_FLOAT_REGEX = "[0-9]+(?:\\.?[0-9]*)(?:[Ee][-+]?[0-9]*)?" UNSIGNED_ZERO_FLOAT_REGEX = "0+(?:\\.?0*)?(?:[Ee][-+]?[0-9]*)?" INFINITE_STRING_PATTERN_NESTING_DEPTH = 50 )
const ( GLOBAL_SCOPE symbolScope = iota + 1 LOCAL_SCOPE )
const ( DEFAULT_EDGE_TO_CHILD_TEXT = "parent of" DEFAULT_EDGE_TO_WATCHED_CHILD_TEXT = "watching" )
const ( TEST__MAX_FS_STORAGE_HINT = ByteCount(10_000_000) TEST_FULL_NAME_PART_SEP = "::" )
const ( ONE_HOUR = Duration(time.Hour) ONE_MINUTE = Duration(time.Minute) ONE_SECOND = Duration(time.Second) ONE_MILLISECOND = Duration(time.Millisecond) MAX_DURATION = Duration(1<<63 - 1) )
const ( TOKEN_BUCKET_MANAGEMENT_TICK_INTERVAL = time.Millisecond TOKEN_BUCKET_CAPACITY_SCALE = int64(time.Second / TOKEN_BUCKET_MANAGEMENT_TICK_INTERVAL) MAX_WAIT_CHAN_COUNT = 1000 )
const ( DEFAULT_TRANSACTION_TIMEOUT = Duration(20 * time.Second) TX_TIMEOUT_OPTION_NAME = "timeout" )
const ( MAX_SUBSEQUENT_WAIT_WRITE_TX_COUNT = 100 WAIT_FOR_READ_TXS_TIMEOUT = 2 * time.Second )
const ( INT_ADDRESS_LESS_TYPE_ID uintptr = iota + 1 FLOAT_ADDRESS_LESS_TYPE_ID BOOL_ADDRESS_LESS_TYPE_ID STR_ADDRESS_LESS_TYPE_ID URL_ADDRESS_LESS_TYPE_ID HOST_ADDRESS_LESS_TYPE_ID )
const ( LIST_SHRINK_DIVIDER = 2 MIN_SHRINKABLE_LIST_LENGTH = 10 * LIST_SHRINK_DIVIDER )
const ( VM_STACK_SIZE = 200 MAX_FRAMES = 20 )
const ( JSON_UNTYPED_VALUE_SUFFIX = "__value" MAX_JSON_REPR_WRITING_DEPTH = 20 JS_MIN_SAFE_INTEGER = -9007199254740991 JS_MAX_SAFE_INTEGER = 9007199254740991 SERIALIZED_INT_RANGE_START_KEY = "start" SERIALIZED_INT_RANGE_START_END_KEY = "end" SERIALIZED_FLOAT_RANGE_START_KEY = "start" SERIALIZED_FLOAT_RANGE_START_EXCL_END_KEY = "exclusiveEnd" SERIALIZED_FLOAT_RANGE_START_END_KEY = "end" SERIALIZED_INT_RANGE_PATTERN_RANGE_KEY = "range" SERIALIZED_INT_RANGE_PATTERN_MULT_OF = "multipleOf" SERIALIZED_FLOAT_RANGE_PATTERN_RANGE_KEY = "range" SERIALIZED_FLOAT_RANGE_PATTERN_MULT_OF = "multipleOf" SERIALIZED_INT_RANGE_STRING_PATTERN_RANGE_KEY = "range" SERIALIZED_FLOAT_RANGE_STRING_PATTERN_RANGE_KEY = "range" SERIALIZED_SECRET_PATTERN_VAL_PATTERN_KEY = "valuePattern" SERIALIZED_SECRET_PATTERN_VAL_PEM_ENCODED_KEY = "isPemEncoded" SERIALIZED_EVENT_PATTERN_VAL_PATTERN_KEY = "value" SERIALIZED_OBJECT_PATTERN_INEXACT_KEY = "inexact" SERIALIZED_OBJECT_PATTERN_ENTRIES_KEY = "entries" SERIALIZED_OBJECT_PATTERN_ENTRY_PATTERN_KEY = "pattern" SERIALIZED_OBJECT_PATTERN_ENTRY_IS_OPTIONAL_KEY = "isOptional" SERIALIZED_OBJECT_PATTERN_ENTRY_REQ_KEYS_KEY = "requiredKeys" SERIALIZED_OBJECT_PATTERN_ENTRY_REQ_PATTERN_KEY = "requiredPattern" SERIALIZED_RECORD_PATTERN_INEXACT_KEY = "inexact" SERIALIZED_RECORD_PATTERN_ENTRIES_KEY = "entries" SERIALIZED_RECORD_PATTERN_ENTRY_PATTERN_KEY = "pattern" SERIALIZED_RECORD_PATTERN_ENTRY_IS_OPTIONAL_KEY = "isOptional" SERIALIZED_LIST_PATTERN_ELEMENTS_KEY = "elements" SERIALIZED_LIST_PATTERN_ELEMENT_KEY = "element" SERIALIZED_LIST_PATTERN_MIN_COUNT_KEY = "minCount" SERIALIZED_LIST_PATTERN_MAX_COUNT_KEY = "maxCount" SERIALIZED_TUPLE_PATTERN_ELEMENTS_KEY = "elements" SERIALIZED_TUPLE_PATTERN_ELEMENT_KEY = "element" )
const ASSERTION_BUFF_WRITER_SIZE = 100
const (
CONSTRAINTS_KEY = "_constraints_"
)
const (
DATE_FORMAT_PATTERN_NAMESPACE = "date-format"
)
const (
DEFAULT_MAX_HISTORY_LEN = 5
)
const (
DEFAULT_MICROTASK_ARRAY_SIZE = 4
)
const DEFAULT_XML_ATTR_VALUE = String("")
const (
FIRST_VALID_CALLBACK_HANDLE = 1
)
const (
LAST_RESERVED_COLOR_ID = 10_000 // not definitive
)
const (
MAX_CLONING_DEPTH = 10
)
const (
MAX_COMPARISON_DEPTH = 200
)
const MAX_UNWRAPPING_DEPTH = 5
const (
MAX_VALUE_PRINT_DEPTH = 10
)
const Nil = NilT(0)
const (
ROUTINE_POST_YIELD_PAUSE = time.Microsecond
)
const (
SMART_LOCK_HOLD_TIMEOUT = 100 * time.Millisecond
)
const SYNC_CHAN_SIZE = 100
const (
VISIBILITY_KEY = "_visibility_"
)
Variables ¶
var ( ErrAttemptToMutateReadonlyByteSlice = errors.New("attempt to write a readonly byte slice") ErrAttemptToCreateMutableSpecificTypeByteSlice = errors.New("attempt to create a mutable byte slice with specific content type") )
var ( ErrNotClonable = errors.New("not clonable") ErrMaximumCloningDepthReached = errors.New("maximum cloning depth reached, there is probably a cycle") )
var ( BOOL_COMPTIME_TYPE = &BuiltinType{ name: patternnames.BOOL, symbolic: symbolic.BUILTIN_COMPTIME_TYPES[patternnames.BOOL], goType: BOOL_TYPE, } INT_COMPTIME_TYPE = &BuiltinType{ name: patternnames.INT, symbolic: symbolic.BUILTIN_COMPTIME_TYPES[patternnames.INT], goType: INT_TYPE, } FLOAT_COMPTIME_TYPE = &BuiltinType{ name: patternnames.FLOAT, symbolic: symbolic.BUILTIN_COMPTIME_TYPES[patternnames.FLOAT], goType: FLOAT64_TYPE, } STRING_COMPTIME_TYPE = &BuiltinType{ name: patternnames.STRING, symbolic: symbolic.BUILTIN_COMPTIME_TYPES[patternnames.STRING], goType: STRING_TYPE, } )
var ( NewDefaultGlobalState NewDefaultGlobalStateFn //default state factory NewDefaultContext NewDefaultContextFn //default context factory ErrNoFilesystemProvided = errors.New("no filesystem provided") )
var ( ErrBothCtxFilesystemArgsProvided = errors.New("invalid arguments: both .CreateFilesystem & .Filesystem provided") ErrBothParentCtxArgsProvided = errors.New("invalid arguments: both .ParentContext & .ParentStdLibContext provided") ErrInitialWorkingDirProvidedWithoutFS = errors.New("invalid arguments: .InitialWorkingDirectory is provided but no filesystem is provided") ErrImpossibleToDeterminateInitialWorkingDir = errors.New("impossible to determinate initial working directory") ErrNonExistingNamedPattern = errors.New("non existing named pattern") ErrNotUniqueAliasDefinition = errors.New("cannot register a host alias more than once") ErrNotUniquePatternDefinition = errors.New("cannot register a pattern more than once") ErrNotUniquePatternNamespaceDefinition = errors.New("cannot register a pattern namespace more than once") ErrNotUniqueHostDefinitionDefinition = errors.New("cannot set host definition data more than once") ErrNotUniqueProtocolClient = errors.New("client already defined") ErrCannotProvideLimitTokensForChildContext = errors.New("limit tokens cannot be set in new context's config if it is a child") ErrNoAssociatedState = errors.New("context has no associated state") ErrAlreadyAssociatedState = errors.New("context already has an associated state") ErrNotSharableNorClonableUserDataValue = errors.New("attempt to set a user data entry with a value that is not sharable nor clonable") ErrDoubleUserDataDefinition = errors.New("cannot define a user data entry more than once") ErrTypeExtensionAlreadyRegistered = errors.New("type extension is already registered") ErrLimitNotPresentInContext = errors.New("limit not present in context") ErrOnDoneMicrotasksNotAllowed = errors.New("'on done' microtasks are not allowed") )
var ( ErrDiscardedChunk = errors.New("chunk is discarded") CHUNK_PROPNAMES = []string{"data"} )
var ( ErrOwnerStateAlreadySet = errors.New("owner state already set") ErrOwnerStateNotSet = errors.New("owner state not set") ErrNameCollisionWithInitialDatabasePropertyName = errors.New("name collision with initial database property name") ErrTopLevelEntityNamesShouldBeValidInoxIdentifiers = errors.New("top-level entity names should be valid Inox identifiers (e.g., users, client-names)") ErrTopLevelEntitiesAlreadyLoaded = errors.New("top-level entities already loaded") ErrDatabaseSchemaOnlyUpdatableByOwnerState = errors.New("database schema can only be updated by owner state") ErrNoDatabaseSchemaUpdateExpected = errors.New("no database schema update is expected") ErrCurrentSchemaNotEqualToExpectedSchema = errors.New("current schema not equal to expected schema") ErrNewSchemaNotEqualToExpectedSchema = errors.New("new schema not equal to expected schema") ErrDatabaseSchemaAlreadyUpdatedOrNotAllowed = errors.New("database schema already updated or no longer allowed") ErrInvalidAccessSchemaNotUpdatedYet = errors.New("access to database is not allowed because schema is not updated yet") ErrSchemaCannotBeUpdatedInDevMode = errors.New("schema cannot be updated in dev mode") ErrInvalidDatabaseDirpath = errors.New("invalid database dir path") ErrDatabaseAlreadyOpen = errors.New("database is already open") ErrDatabaseClosed = errors.New("database is closed") ErrCannotResolveDatabase = errors.New("cannot resolve database") ErrCannotFindDatabaseHost = errors.New("cannot find corresponding host of database") ErrInvalidDatabaseHost = errors.New("host of database is invalid") ErrInvalidDBValuePropRetrieval = errors.New("invalid property retrieval: value should be serializablr and should not be that a method or dynamic value") DATABASE_PROPNAMES = []string{"update_schema", "close", "schema"} ElementKeyEncoding = base32.StdEncoding.WithPadding(base32.NoPadding) )
var ( ANYVAL_PATTERN = &TypePattern{ Type: VALUE_TYPE, Name: "any", SymbolicValue: symbolic.ANY, } SERIALIZABLE_PATTERN = &TypePattern{ Type: SERIALIZABLE_TYPE, Name: "serializable", SymbolicValue: symbolic.ANY_SERIALIZABLE, } NEVER_PATTERN = &TypePattern{ Type: reflect.TypeOf(struct{ __never int }{}), Name: patternnames.NEVER, SymbolicValue: symbolic.NEVER, } //TODO: improve (using a type pattern can create issues) VAL_PATTERN = &TypePattern{ Type: VALUE_TYPE, Name: __VAL_PATTERN_NAME, SymbolicValue: symbolic.NEVER, CallImpl: func(typePattern *TypePattern, values []Serializable) (Pattern, error) { if len(values) != 1 { return nil, commonfmt.FmtErrNArgumentsExpected("1") } return NewExactValuePattern(values[0]), nil }, SymbolicCallImpl: func(ctx *symbolic.Context, values []symbolic.Value) (symbolic.Pattern, error) { var recordPattern *symbolic.RecordPattern if len(values) != 1 { return nil, commonfmt.FmtErrNArgumentsExpected("1") } symbolic.NewExactValuePattern(values[0].(symbolic.Serializable)) return recordPattern, nil }, } NIL_PATTERN = &TypePattern{ Type: NIL_TYPE, Name: patternnames.NIL, SymbolicValue: symbolic.Nil, } STR_PATTERN_PATTERN = &TypePattern{ Name: patternnames.STRING_PATTERN, SymbolicValue: symbolic.NEVER, CallImpl: func(typePattern *TypePattern, values []Serializable) (Pattern, error) { if len(values) != 1 { return nil, commonfmt.FmtErrNArgumentsExpected("1") } pattern, ok := values[0].(Pattern) if !ok { return nil, fmt.Errorf("invalid argument") } stringPattern, ok := pattern.StringPattern() if !ok { return nil, fmt.Errorf("invalid argument") } return stringPattern, nil }, SymbolicCallImpl: func(ctx *symbolic.Context, values []symbolic.Value) (symbolic.Pattern, error) { if len(values) != 1 { return nil, commonfmt.FmtErrNArgumentsExpected("1") } pattern, ok := values[0].(symbolic.Pattern) if !ok { return nil, errors.New(symbolic.FmtInvalidArg(0, values[0], symbolic.ANY_PATTERN)) } stringPattern, ok := pattern.StringPattern() if !ok { return nil, commonfmt.FmtErrInvalidArgumentAtPos(0, symbolic.Stringify(pattern)+" given but a pattern having an associated string pattern is expected") } return stringPattern, nil }, } IDENT_PATTERN = &TypePattern{ Type: IDENTIFIER_TYPE, Name: patternnames.IDENT, SymbolicValue: symbolic.ANY_IDENTIFIER, } PROPNAME_PATTERN = &TypePattern{ Type: PROPNAME_TYPE, Name: patternnames.PROPNAME, SymbolicValue: symbolic.ANY_PROPNAME, } LONG_VALUEPATH_PATTERN = &TypePattern{ Type: LONG_VALUE_PATH_TYPE, Name: patternnames.LONG_VALUE_PATH, SymbolicValue: symbolic.ANY_LONG_VALUE_PATH, } VALUEPATH_PATTERN = &TypePattern{ Type: VALUE_PATH_INTERFACE__TYPE, Name: patternnames.VALUE_PATH, SymbolicValue: symbolic.ANY_VALUE_PATH, } RUNE_PATTERN = &TypePattern{ Type: RUNE_TYPE, Name: patternnames.RUNE, SymbolicValue: symbolic.ANY_RUNE, } BYTE_PATTERN = &TypePattern{ Type: BYTE_TYPE, Name: patternnames.BYTE, SymbolicValue: symbolic.ANY_BYTE, } ANY_PATH_STRING_PATTERN = NewStringPathPattern("") PATH_PATTERN = &TypePattern{ Type: PATH_TYPE, Name: patternnames.PATH, SymbolicValue: symbolic.ANY_PATH, stringPattern: func() (StringPattern, bool) { return ANY_PATH_STRING_PATTERN, true }, symbolicStringPattern: func() (symbolic.StringPattern, bool) { return symbolic.ANY_STR_PATTERN, true }, } STRING_PATTERN = &TypePattern{ Type: STRING_TYPE, Name: patternnames.STRING, SymbolicValue: symbolic.ANY_STRING, } STR_PATTERN = &TypePattern{ Type: STR_LIKE_INTERFACE_TYPE, Name: patternnames.STR, SymbolicValue: symbolic.ANY_STR_LIKE, } URL_PATTERN = &TypePattern{ Type: URL_TYPE, Name: patternnames.URL, SymbolicValue: symbolic.ANY_URL, } SCHEME_PATTERN = &TypePattern{ Type: SCHEME_TYPE, Name: patternnames.SCHEME, SymbolicValue: symbolic.ANY_SCHEME, } HOST_PATTERN = &TypePattern{ Type: HOST_TYPE, Name: patternnames.HOST, SymbolicValue: symbolic.ANY_HOST, } EMAIL_ADDR_PATTERN = &TypePattern{ Type: EMAIL_ADDR_TYPE, Name: patternnames.EMAILADDR, SymbolicValue: symbolic.ANY_EMAIL_ADDR, } EMPTY_INEXACT_OBJECT_PATTERN = NewInexactObjectPattern(nil) OBJECT_PATTERN = &TypePattern{ Type: OBJECT_TYPE, Name: patternnames.OBJECT, SymbolicValue: symbolic.NewAnyObject(), } EMPTY_INEXACT_RECORD_PATTERN = NewInexactRecordPattern(nil) RECORD_PATTERN = &TypePattern{ Type: RECORD_TYPE, Name: patternnames.RECORD, CallImpl: func(typePattern *TypePattern, values []Serializable) (Pattern, error) { var recordPattern *RecordPattern for _, val := range values { switch v := val.(type) { case *ObjectPattern: if recordPattern != nil { return nil, commonfmt.FmtErrArgumentProvidedAtLeastTwice("pattern") } recordPatternEntries := make([]RecordPatternEntry, len(v.entries)) for i, entry := range v.entries { if entry.Dependencies.Pattern != nil || len(entry.Dependencies.RequiredKeys) > 0 { return nil, fmt.Errorf("input object pattern should not have dependency relations") } recordPatternEntries[i] = RecordPatternEntry{ Name: entry.Name, Pattern: entry.Pattern, IsOptional: entry.IsOptional, } } recordPattern = &RecordPattern{ entries: recordPatternEntries, inexact: v.inexact, optionalEntryCount: v.optionalEntryCount, } case *RecordPattern: if recordPattern != nil { return nil, commonfmt.FmtErrArgumentProvidedAtLeastTwice("pattern") } recordPattern = v default: return nil, FmtErrInvalidArgument(v) } } return recordPattern, nil }, SymbolicCallImpl: func(ctx *symbolic.Context, values []symbolic.Value) (symbolic.Pattern, error) { var recordPattern *symbolic.RecordPattern for _, val := range values { switch v := val.(type) { case *symbolic.ObjectPattern: if recordPattern != nil { return nil, commonfmt.FmtErrArgumentProvidedAtLeastTwice("pattern") } recordPattern = v.ToRecordPattern() case *symbolic.RecordPattern: if recordPattern != nil { return nil, commonfmt.FmtErrArgumentProvidedAtLeastTwice("pattern") } recordPattern = v default: return nil, errors.New(symbolic.FmtInvalidArg(0, v, symbolic.NewAnyObjectPattern())) } } return recordPattern, nil }, SymbolicValue: symbolic.NewAnyrecord(), } ANY_ELEM_LIST_PATTERN = NewListPatternOf(SERIALIZABLE_PATTERN) LIST_PATTERN = &TypePattern{ Type: LIST_PTR_TYPE, Name: patternnames.LIST, SymbolicValue: symbolic.NewListOf(symbolic.ANY_SERIALIZABLE), } ANY_ELEM_TUPLE_PATTERN = NewTuplePatternOf(SERIALIZABLE_PATTERN) TUPLE_PATTERN = &TypePattern{ Type: TUPLE_TYPE, Name: patternnames.TUPLE, CallImpl: func(typePattern *TypePattern, values []Serializable) (Pattern, error) { var elemPattern Pattern for _, val := range values { switch v := val.(type) { case Pattern: if elemPattern != nil { return nil, commonfmt.FmtErrArgumentProvidedAtLeastTwice("pattern") } elemPattern = v default: return nil, FmtErrInvalidArgument(v) } } return NewTuplePatternOf(elemPattern), nil }, SymbolicCallImpl: func(ctx *symbolic.Context, values []symbolic.Value) (symbolic.Pattern, error) { var elemPattern symbolic.Pattern for _, val := range values { switch v := val.(type) { case symbolic.Pattern: if elemPattern != nil { return nil, commonfmt.FmtErrArgumentProvidedAtLeastTwice("pattern") } elemPattern = v default: return nil, errors.New(symbolic.FmtInvalidArg(0, v, symbolic.ANY_TUPLE)) } } return symbolic.NewTuplePatternOf(elemPattern), nil }, SymbolicValue: symbolic.ANY_TUPLE, } ORDERED_PAIR_PATTERN = &TypePattern{ Type: ORDERED_PAIR_TYPE, Name: patternnames.ORDERED_PAIR, SymbolicValue: symbolic.ANY_ORDERED_PAIR, } DICTIONARY_PATTERN = &TypePattern{ Type: DICT_TYPE, Name: patternnames.DICT, SymbolicValue: symbolic.ANY_DICT, } RUNESLICE_PATTERN = &TypePattern{ Type: RUNE_SLICE_TYPE, Name: patternnames.RUNES, SymbolicValue: symbolic.ANY_RUNE_SLICE, } BYTESLICE_PATTERN = &TypePattern{ Type: BYTE_SLICE_TYPE, Name: patternnames.BYTES, SymbolicValue: symbolic.ANY_BYTE_SLICE, } KEYLIST_PATTERN = &TypePattern{ Type: KEYLIST_TYPE, Name: patternnames.KEYLIST, SymbolicValue: symbolic.ANY_KEYLIST, } BOOL_PATTERN = &TypePattern{ Type: BOOL_TYPE, Name: patternnames.BOOL, RandomImpl: RandBool, SymbolicValue: symbolic.ANY_BOOL, } INT_PATTERN = &TypePattern{ Type: INT_TYPE, Name: patternnames.INT, RandomImpl: RandInt, SymbolicValue: symbolic.ANY_INT, CallImpl: func(typePattern *TypePattern, values []Serializable) (Pattern, error) { intRangeProvided := false var intRange IntRange for _, val := range values { switch v := val.(type) { case IntRange: if intRangeProvided { return nil, commonfmt.FmtErrArgumentProvidedAtLeastTwice("range") } intRange = v intRangeProvided = true if intRange.unknownStart { return nil, fmt.Errorf("provided int range should not have an unknown start") } default: return nil, FmtErrInvalidArgument(v) } } if !intRangeProvided { return nil, commonfmt.FmtMissingArgument("range") } return &IntRangePattern{ intRange: intRange, }, nil }, SymbolicCallImpl: func(ctx *symbolic.Context, values []symbolic.Value) (symbolic.Pattern, error) { if len(values) == 0 { return nil, errors.New("missing argument") } intRange, ok := values[0].(*symbolic.IntRange) if !ok { return nil, errors.New("argument should be an integer range") } return symbolic.NewIntRangePattern(intRange), nil }, stringPattern: func() (StringPattern, bool) { return NewIntRangeStringPattern(math.MinInt64, math.MaxInt64, nil), true }, symbolicStringPattern: func() (symbolic.StringPattern, bool) { return symbolic.ANY_STR_PATTERN, true }, } FLOAT_PATTERN = &TypePattern{ Type: FLOAT64_TYPE, Name: patternnames.FLOAT, SymbolicValue: symbolic.ANY_FLOAT, RandomImpl: RandFloat, CallImpl: func(typePattern *TypePattern, values []Serializable) (Pattern, error) { floatRangeProvided := false var floatRange FloatRange for _, val := range values { switch v := val.(type) { case FloatRange: if floatRangeProvided { return nil, commonfmt.FmtErrArgumentProvidedAtLeastTwice("range") } floatRange = v floatRangeProvided = true if floatRange.unknownStart { return nil, fmt.Errorf("provided float range should not have an unknown start") } default: return nil, FmtErrInvalidArgument(v) } } if !floatRangeProvided { return nil, commonfmt.FmtMissingArgument("range") } return &FloatRangePattern{ floatRange: floatRange, }, nil }, SymbolicCallImpl: func(ctx *symbolic.Context, values []symbolic.Value) (symbolic.Pattern, error) { if len(values) == 0 { return nil, errors.New("missing argument") } floatRange, ok := values[0].(*symbolic.FloatRange) if !ok { return nil, errors.New("argument should be a float range") } return symbolic.NewFloatRangePattern(floatRange), nil }, stringPattern: func() (StringPattern, bool) { return NewFloatRangeStringPattern(-math.MaxFloat64, math.MaxFloat64, nil), true }, symbolicStringPattern: func() (symbolic.StringPattern, bool) { return symbolic.ANY_STR_PATTERN, true }, } PORT_PATTERN = &TypePattern{ Type: PORT_TYPE, Name: patternnames.PORT, SymbolicValue: symbolic.ANY_PORT, } BYTECOUNT_PATTERN = &TypePattern{ Type: BYTECOUNT_TYPE, Name: patternnames.BYTE_COUNT, SymbolicValue: symbolic.ANY_BYTECOUNT, } LINECOUNT_PATTERN = &TypePattern{ Type: LINECOUNT_TYPE, Name: patternnames.LINE_COUNT, SymbolicValue: symbolic.ANY_LINECOUNT, } RUNECOUNT_PATTERN = &TypePattern{ Type: RUNECOUNT_TYPE, Name: patternnames.RUNE_COUNT, SymbolicValue: symbolic.ANY_RUNECOUNT, } BYTERATE_PATTERN = &TypePattern{ Type: BYTERATE_TYPE, Name: patternnames.BYTE_RATE, SymbolicValue: symbolic.ANY_BYTERATE, } FREQUENCY_PATTERN = &TypePattern{ Type: FREQUENCY_TYPE, Name: patternnames.FREQUENCY, SymbolicValue: symbolic.ANY_FREQUENCY, } DURATION_PATTERN = &TypePattern{ Type: DURATION_TYPE, Name: patternnames.DURATION, SymbolicValue: symbolic.ANY_DURATION, } ASTNODE_PATTERN = &TypePattern{ Type: NODE_TYPE, Name: patternnames.INOX_NODE, SymbolicValue: symbolic.ANY_AST_NODE, } MOD_PATTERN = &TypePattern{ Type: MODULE_TYPE, Name: patternnames.INOX_MODULE, SymbolicValue: symbolic.ANY_MODULE, } HOSTPATTERN_PATTERN = &TypePattern{ Type: HOST_PATT_TYPE, Name: patternnames.HOST_PATTERN, SymbolicValue: &symbolic.HostPattern{}, } PATHPATTERN_PATTERN = &TypePattern{ Type: PATH_PATT_TYPE, Name: patternnames.PATH_PATTERN, SymbolicValue: &symbolic.PathPattern{}, } URLPATTERN_PATTERN = &TypePattern{ Type: URL_PATT_TYPE, Name: patternnames.URL_PATTERN, SymbolicValue: &symbolic.URLPattern{}, } OPTION_PATTERN = &TypePattern{ Type: OPTION_TYPE, Name: patternnames.OPT, SymbolicValue: symbolic.ANY_OPTION, } FILE_MODE_PATTERN = &TypePattern{ Type: FILE_MODE_TYPE, Name: patternnames.FILEMODE, SymbolicValue: &symbolic.FileMode{}, } YEAR_PATTERN = &TypePattern{ Type: YEAR_TYPE, Name: patternnames.YEAR, SymbolicValue: symbolic.ANY_YEAR, } DATE_PATTERN = &TypePattern{ Type: DATE_TYPE, Name: patternnames.DATE, SymbolicValue: symbolic.ANY_DATE, } DATETIME_PATTERN = &TypePattern{ Type: DATETIME_TYPE, Name: patternnames.DATETIME, SymbolicValue: symbolic.ANY_DATETIME, } PATTERN_PATTERN = &TypePattern{ Type: PATTERN_INTERFACE_TYPE, Name: patternnames.PATTERN, SymbolicValue: symbolic.ANY_PATTERN, } READABLE_PATTERN = &TypePattern{ Type: READABLE_INTERFACE_TYPE, Name: patternnames.READABLE, SymbolicValue: symbolic.ANY_READABLE, } READER_PATTERN = &TypePattern{ Type: READER_INTERFACE_TYPE, Name: patternnames.READER, SymbolicValue: symbolic.ANY_READER, } ITERABLE_PATTERN = &TypePattern{ Type: ITERABLE_INTERFACE_TYPE, Name: patternnames.ITERABLE, SymbolicValue: symbolic.ANY_ITERABLE, } SERIALIZABLE_ITERABLE_PATTERN = &TypePattern{ Type: SERIALIZABLE_ITERABLE_INTERFACE_TYPE, Name: patternnames.SERIALIZABLE_ITERABLE, SymbolicValue: symbolic.ANY_SERIALIZABLE_ITERABLE, } INDEXABLE_PATTERN = &TypePattern{ Type: INDEXABLE_INTERFACE_TYPE, Name: patternnames.INDEXABLE, SymbolicValue: symbolic.ANY_INDEXABLE, } VALUE_RECEIVER_PATTERN = &TypePattern{ Type: VALUE_RECEIVER_INTERFACE_TYPE, Name: patternnames.VALUE_RECEIVER, SymbolicValue: symbolic.ANY_MSG_RECEIVER, } EVENT_PATTERN = &TypePattern{ Type: EVENT_TYPE, Name: patternnames.EVENT, CallImpl: func(typePattern *TypePattern, args []Serializable) (Pattern, error) { var valuePattern Pattern for _, arg := range args { switch a := arg.(type) { case Pattern: if valuePattern != nil { return nil, commonfmt.FmtErrArgumentProvidedAtLeastTwice("value pattern") } valuePattern = a default: if valuePattern != nil { return nil, commonfmt.FmtErrArgumentProvidedAtLeastTwice("value pattern") } valuePattern = &ExactValuePattern{value: a} } } return NewEventPattern(valuePattern), nil }, SymbolicCallImpl: func(ctx *symbolic.Context, args []symbolic.Value) (symbolic.Pattern, error) { var valuePattern symbolic.Pattern for _, arg := range args { switch a := arg.(type) { case symbolic.Pattern: if valuePattern != nil { return nil, commonfmt.FmtErrArgumentProvidedAtLeastTwice("value pattern") } valuePattern = a default: if valuePattern != nil { return nil, commonfmt.FmtErrArgumentProvidedAtLeastTwice("value pattern") } p, err := symbolic.NewExactValuePattern(a.(symbolic.Serializable)) if err != nil { return nil, fmt.Errorf("argument should be immutable") } valuePattern = p } } patt, err := symbolic.NewEventPattern(valuePattern) if err != nil { ctx.AddSymbolicGoFunctionError(err.Error()) return symbolic.NewEventPattern(symbolic.ANY_PATTERN) } return patt, nil }, SymbolicValue: utils.Must(symbolic.NewEvent(symbolic.ANY)), } MUTATION_PATTERN = &TypePattern{ Type: MUTATION_TYPE, Name: patternnames.MUTATION, SymbolicValue: symbolic.ANY_MUTATION, CallImpl: func(typePattern *TypePattern, args []Serializable) (Pattern, error) { switch len(args) { case 2: case 1: default: return nil, commonfmt.FmtErrNArgumentsExpected("1 or 2") } var kind MutationKind switch a := args[0].(type) { case Identifier: k, ok := mutationKindFromString(string(a)) if !ok { return nil, FmtErrInvalidArgumentAtPos(a, 0) } kind = k default: return nil, FmtErrInvalidArgumentAtPos(a, 0) } var data0Pattern Pattern = ANYVAL_PATTERN if len(args) > 1 { patt, ok := args[1].(Pattern) if !ok { patt = &ExactValuePattern{value: args[1]} } data0Pattern = patt } return NewMutationPattern(kind, data0Pattern), nil }, SymbolicCallImpl: func(ctx *symbolic.Context, args []symbolic.Value) (symbolic.Pattern, error) { switch len(args) { case 2: case 1: default: return nil, commonfmt.FmtErrNArgumentsExpected("1 or 2") } switch a := args[0].(type) { case *symbolic.Identifier: k, ok := mutationKindFromString(a.Name()) if !ok { return nil, fmt.Errorf("unknown mutation kind '%s'", k) } default: return nil, fmt.Errorf("mutation kind expected at position 0 but is a(n) '%s'", symbolic.Stringify(a)) } var data0Pattern symbolic.Pattern = symbolic.ANY_PATTERN //TODO: use symbolic any value if len(args) > 1 { patt, ok := args[1].(symbolic.Pattern) if !ok { p, err := symbolic.NewExactValuePattern(args[1].(symbolic.Serializable)) if err != nil { return nil, fmt.Errorf("second argument should be immutable") } patt = p } data0Pattern = patt } return symbolic.NewMutationPattern(&symbolic.Int{}, data0Pattern), nil }, } MSG_PATTERN = &TypePattern{ Type: MSG_TYPE, Name: patternnames.MSG, SymbolicValue: symbolic.ANY_MSG, } ERROR_PATTERN = &TypePattern{ Type: ERROR_TYPE, Name: patternnames.ERROR, SymbolicValue: symbolic.ANY_ERR, } SOURCE_POS_PATTERN = NewInexactRecordPattern([]RecordPatternEntry{ {Name: "source", Pattern: STR_PATTERN}, {Name: "line", Pattern: INT_PATTERN}, {Name: "column", Pattern: INT_PATTERN}, {Name: "start", Pattern: INT_PATTERN}, {Name: "end", Pattern: INT_PATTERN}, }) INT_RANGE_PATTERN = &TypePattern{ Type: INT_RANGE_TYPE, Name: patternnames.INT_RANGE, SymbolicValue: symbolic.ANY_INT_RANGE, } FLOAT_RANGE_PATTERN = &TypePattern{ Type: FLOAT_RANGE_TYPE, Name: patternnames.FLOAT_RANGE, SymbolicValue: symbolic.ANY_FLOAT_RANGE, } RUNE_RANGE_PATTERN = &TypePattern{ Type: RUNE_RANGE_TYPE, Name: patternnames.RUNE_RANGE, SymbolicValue: symbolic.ANY_RUNE_RANGE, } INT_RANGE_PATTERN_PATTERN = &TypePattern{ Type: INT_RANGE_PATTERN_TYPE, Name: patternnames.INT_RANGE_PATTERN, SymbolicValue: symbolic.ANY_INT_RANGE_PATTERN, } FLOAT_RANGE_PATTERN_PATTERN = &TypePattern{ Type: FLOAT_RANGE_PATTERN_TYPE, Name: patternnames.FLOAT_RANGE_PATTERN, SymbolicValue: symbolic.ANY_FLOAT_RANGE_PATTERN, } INT_RANGE_STRING_PATTERN_PATTERN = &TypePattern{ Type: INT_RANGE_STRING_PATTERN_TYPE, Name: patternnames.INT_RANGE_STRING_PATTERN, SymbolicValue: symbolic.ANY_INT_RANGE_STRING_PATTERN, } FLOAT_RANGE_STRING_PATTERN_PATTERN = &TypePattern{ Type: FLOAT_RANGE_STRING_PATTERN_TYPE, Name: patternnames.FLOAT_RANGE_STRING_PATTERN, SymbolicValue: symbolic.ANY_FLOAT_RANGE_STRING_PATTERN, } SECRET_PATTERN_PATTERN = &TypePattern{ Type: SECRET_PATTERN_TYPE, Name: patternnames.SECRET_PATTERN, SymbolicValue: symbolic.ANY_SECRET_PATTERN, } VALUE_HISTORY_PATTERN = &TypePattern{ Type: VALUE_HISTORY_TYPE, Name: patternnames.VALUE_HISTORY, SymbolicValue: symbolic.ANY_VALUE_HISTORY, } SYSGRAPH_PATTERN = &TypePattern{ Type: SYSGRAPH_TYPE, Name: patternnames.SYSGRAPH, SymbolicValue: symbolic.ANY_SYSTEM_GRAPH, } SYSGRAPH_NODE_PATTERN = &TypePattern{ Type: SYSGRAPH_NODE_TYPE, Name: patternnames.SYSGRAPH_NODE, SymbolicValue: symbolic.ANY_SYSTEM_GRAPH_NODE, } SECRET_PATTERN = &TypePattern{ Type: SECRET_TYPE, Name: patternnames.SECRET, CallImpl: func(typePattern *TypePattern, values []Serializable) (Pattern, error) { var stringPattern StringPattern if len(values) == 0 { return nil, commonfmt.FmtMissingArgument("pattern") } for _, val := range values { switch v := val.(type) { case StringPattern: if stringPattern != nil { return nil, commonfmt.FmtErrArgumentProvidedAtLeastTwice("pattern") } stringPattern = v default: return nil, FmtErrInvalidArgument(v) } } return &SecretPattern{ stringPattern: stringPattern, }, nil }, SymbolicCallImpl: func(ctx *symbolic.Context, values []symbolic.Value) (symbolic.Pattern, error) { var stringPattern symbolic.StringPattern if len(values) == 0 { return nil, commonfmt.FmtMissingArgument("pattern") } for _, val := range values { switch v := val.(type) { case symbolic.StringPattern: if stringPattern != nil { return nil, commonfmt.FmtErrArgumentProvidedAtLeastTwice("pattern") } stringPattern = v default: return nil, errors.New(symbolic.FmtInvalidArg(0, v, symbolic.ANY_STR_PATTERN)) } } return symbolic.NewSecretPattern(stringPattern), nil }, SymbolicValue: symbolic.ANY_SECRET, } SECRET_STRING_PATTERN = NewSecretPattern(NewRegexPattern(".*"), false) SECRET_PEM_STRING_PATTERN = NewSecretPattern(NewPEMRegexPattern(".*"), true) REGEX_PATTERN_PATTERN = &TypePattern{ Type: REGEX_PATTERN_TYPE, Name: patternnames.REGEX_PATTERN, SymbolicValue: symbolic.ANY_REGEX_PATTERN, } EVENT_PATTERN_PATTERN = &TypePattern{ Type: EVENT_PATTERN_TYPE, Name: patternnames.EVENT_PATTERN, SymbolicValue: symbolic.ANY_EVENT_PATTERN, } MUTATION_PATTERN_PATTERN = &TypePattern{ Type: MUTATION_PATTERN_TYPE, Name: patternnames.MUTATION_PATTERN, SymbolicValue: symbolic.ANY_MUTATION_PATTERN, } ULID_PATTERN = &TypePattern{ Type: ULID_TYPE, Name: patternnames.ULID, RandomImpl: RandULID, SymbolicValue: symbolic.ANY_ULID, stringPattern: func() (StringPattern, bool) { return ULID_STRING_PATTERN, true }, } UUIDv4_PATTERN = &TypePattern{ Type: UUIDv4_TYPE, Name: patternnames.UUIDv4, RandomImpl: RandUUIDv4, SymbolicValue: symbolic.ANY_UUIDv4, stringPattern: func() (StringPattern, bool) { return UUIDv4_STRING_PATTERN, true }, } ULID_STRING_PATTERN = NewParserBasePattern(&ulidParser{}) UUIDv4_STRING_PATTERN = NewParserBasePattern(&uuidv4Parser{}) NAMED_SEGMENT_PATH_PATTERN = &TypePattern{ Type: NAMED_SEGMENT_PATH_PATTERN_TYPE, Name: patternnames.NAMED_SEGMENT_PATH_PATTERN, SymbolicValue: symbolic.ANY_NAMED_SEGMENT_PATH_PATTERN, } TYPE_PATTERN_PATTERN = &TypePattern{ Type: TYPE_PATTERN_TYPE, Name: patternnames.TYPE_PATTERN, SymbolicValue: symbolic.ANY_TYPE_PATTERN, } EXACT_VALUE_PATTERN_PATTERN = &TypePattern{ Type: EXACT_VALUE_PATTERN_TYPE, Name: patternnames.EXACT_VALUE_PATTERN, SymbolicValue: symbolic.ANY_EXACT_VALUE_PATTERN, } EXACT_STRING_PATTERN_PATTERN = &TypePattern{ Type: EXACT_STRING_PATTERN_TYPE, Name: patternnames.EXACT_STRING_PATTERN, SymbolicValue: symbolic.ANY_EXACT_STR_PATTERN, } OBJECT_PATTERN_PATTERN = &TypePattern{ Type: OBJECT_PATTERN_TYPE, Name: patternnames.OBJECT_PATTERN, SymbolicValue: symbolic.ANY_OBJECT_PATTERN, } LIST_PATTERN_PATTERN = &TypePattern{ Type: LIST_PATTERN_TYPE, Name: patternnames.LIST_PATTERN, SymbolicValue: symbolic.ANY_LIST_PATTERN, } RECORD_PATTERN_PATTERN = &TypePattern{ Type: RECORD_PATTERN_TYPE, Name: patternnames.RECORD_PATTERN, SymbolicValue: symbolic.ANY_RECORD_PATTERN, } TUPLE_PATTERN_PATTERN = &TypePattern{ Type: TUPLE_PATTERN_TYPE, Name: patternnames.TUPLE_PATTERN, SymbolicValue: symbolic.ANY_TUPLE_PATTERN, } DEFAULT_NAMED_PATTERNS = map[string]Pattern{ NEVER_PATTERN.Name: NEVER_PATTERN, NIL_PATTERN.Name: NIL_PATTERN, IDENT_PATTERN.Name: IDENT_PATTERN, PROPNAME_PATTERN.Name: PROPNAME_PATTERN, LONG_VALUEPATH_PATTERN.Name: LONG_VALUEPATH_PATTERN, VALUEPATH_PATTERN.Name: VALUEPATH_PATTERN, RUNE_PATTERN.Name: RUNE_PATTERN, RUNE_PATTERN.Name: RUNE_PATTERN, BYTE_PATTERN.Name: BYTE_PATTERN, STRING_PATTERN.Name: STRING_PATTERN, STR_PATTERN.Name: STR_PATTERN, PATH_PATTERN.Name: PATH_PATTERN, URL_PATTERN.Name: URL_PATTERN, SCHEME_PATTERN.Name: SCHEME_PATTERN, HOST_PATTERN.Name: HOST_PATTERN, EMAIL_ADDR_PATTERN.Name: EMAIL_ADDR_PATTERN, SECRET_PATTERN.Name: SECRET_PATTERN, patternnames.SECRET_STRING: SECRET_STRING_PATTERN, OBJECT_PATTERN.Name: OBJECT_PATTERN, RECORD_PATTERN.Name: RECORD_PATTERN, TUPLE_PATTERN.Name: TUPLE_PATTERN, ORDERED_PAIR_PATTERN.Name: ORDERED_PAIR_PATTERN, LIST_PATTERN.Name: LIST_PATTERN, DICTIONARY_PATTERN.Name: DICTIONARY_PATTERN, RUNESLICE_PATTERN.Name: RUNESLICE_PATTERN, BYTESLICE_PATTERN.Name: BYTESLICE_PATTERN, KEYLIST_PATTERN.Name: KEYLIST_PATTERN, BOOL_PATTERN.Name: BOOL_PATTERN, INT_PATTERN.Name: INT_PATTERN, LINECOUNT_PATTERN.Name: LINECOUNT_PATTERN, RUNECOUNT_PATTERN.Name: RUNECOUNT_PATTERN, BYTECOUNT_PATTERN.Name: BYTECOUNT_PATTERN, FLOAT_PATTERN.Name: FLOAT_PATTERN, FILE_MODE_PATTERN.Name: FILE_MODE_PATTERN, FREQUENCY_PATTERN.Name: FREQUENCY_PATTERN, BYTERATE_PATTERN.Name: BYTERATE_PATTERN, DURATION_PATTERN.Name: DURATION_PATTERN, YEAR_PATTERN.Name: YEAR_PATTERN, DATE_PATTERN.Name: DATE_PATTERN, DATETIME_PATTERN.Name: DATETIME_PATTERN, PATTERN_PATTERN.Name: PATTERN_PATTERN, READABLE_PATTERN.Name: READABLE_PATTERN, READER_PATTERN.Name: READER_PATTERN, ITERABLE_PATTERN.Name: ITERABLE_PATTERN, SERIALIZABLE_ITERABLE_PATTERN.Name: SERIALIZABLE_ITERABLE_PATTERN, INDEXABLE_PATTERN.Name: INDEXABLE_PATTERN, VALUE_RECEIVER_PATTERN.Name: VALUE_RECEIVER_PATTERN, HOSTPATTERN_PATTERN.Name: HOSTPATTERN_PATTERN, PATHPATTERN_PATTERN.Name: PATHPATTERN_PATTERN, URLPATTERN_PATTERN.Name: URLPATTERN_PATTERN, OPTION_PATTERN.Name: OPTION_PATTERN, patternnames.DIR_ENTRY: NewInexactObjectPattern([]ObjectPatternEntry{ {Name: "abs-path", Pattern: PATH_PATTERN}, {Name: "is-dir", Pattern: BOOL_PATTERN}, {Name: "size", Pattern: INT_PATTERN}, {Name: "mode", Pattern: FILE_MODE_PATTERN}, {Name: "mod-time", Pattern: DATETIME_PATTERN}, {Name: "name", Pattern: STR_PATTERN}, }), EVENT_PATTERN.Name: EVENT_PATTERN, MUTATION_PATTERN.Name: MUTATION_PATTERN, MSG_PATTERN.Name: MSG_PATTERN, ERROR_PATTERN.Name: ERROR_PATTERN, INT_RANGE_PATTERN.Name: INT_RANGE_PATTERN, FLOAT_RANGE_PATTERN.Name: FLOAT_RANGE_PATTERN, VALUE_HISTORY_PATTERN.Name: VALUE_HISTORY_PATTERN, SYSGRAPH_PATTERN.Name: SYSGRAPH_PATTERN, VAL_PATTERN.Name: VAL_PATTERN, ULID_PATTERN.Name: ULID_PATTERN, UUIDv4_PATTERN.Name: UUIDv4_PATTERN, TYPE_PATTERN_PATTERN.Name: TYPE_PATTERN_PATTERN, OBJECT_PATTERN_PATTERN.Name: OBJECT_PATTERN_PATTERN, LIST_PATTERN_PATTERN.Name: LIST_PATTERN_PATTERN, RECORD_PATTERN_PATTERN.Name: RECORD_PATTERN_PATTERN, TUPLE_PATTERN_PATTERN.Name: TUPLE_PATTERN_PATTERN, NAMED_SEGMENT_PATH_PATTERN.Name: NAMED_SEGMENT_PATH_PATTERN, EXACT_VALUE_PATTERN_PATTERN.Name: EXACT_VALUE_PATTERN_PATTERN, EXACT_STRING_PATTERN_PATTERN.Name: EXACT_STRING_PATTERN_PATTERN, INT_RANGE_PATTERN_PATTERN.Name: INT_RANGE_PATTERN_PATTERN, FLOAT_RANGE_PATTERN_PATTERN.Name: FLOAT_RANGE_PATTERN_PATTERN, INT_RANGE_STRING_PATTERN_PATTERN.Name: INT_RANGE_STRING_PATTERN_PATTERN, FLOAT_RANGE_STRING_PATTERN_PATTERN.Name: FLOAT_RANGE_STRING_PATTERN_PATTERN, SECRET_PATTERN_PATTERN.Name: SECRET_PATTERN_PATTERN, REGEX_PATTERN_PATTERN.Name: REGEX_PATTERN_PATTERN, EVENT_PATTERN_PATTERN.Name: EVENT_PATTERN_PATTERN, MUTATION_PATTERN_PATTERN.Name: MUTATION_PATTERN_PATTERN, } DEFAULT_PATTERN_NAMESPACES = map[string]*PatternNamespace{ patternnames.INOX_NS: { Patterns: map[string]Pattern{ "node": ASTNODE_PATTERN, "module": MOD_PATTERN, "source_position": SOURCE_POS_PATTERN, }, }, patternnames.DATE_FORMAT_NS: { Patterns: map[string]Pattern{ "rfc822": NewDateFormat(time.RFC822, "rfc822"), "date-only": NewDateFormat(time.DateOnly, "date-only"), "time-only": NewDateFormat(time.TimeOnly, "time-only"), }, }, patternnames.SYSGRAPH_NS: { Patterns: map[string]Pattern{ "node": SYSGRAPH_NODE_PATTERN, }, }, } //TODO: complete NOT_ACCESSIBLE_PATTERNS = map[string]Pattern{ "any": ANYVAL_PATTERN, "serializable": SERIALIZABLE_PATTERN, } )
var ( ErrCannotCreateDynamicMemberMissingProperty = errors.New("cannot create dynamic member: property is missing") ErrCannotCreateDynamicMapInvocationValueInDynValNotIterable = errors.New("cannot create dynamic map invocation: value in passed dynamic value is not iterable") ErrCannotCreateIfCondNotBoolean = errors.New("cannot create dynamic if: condition value is not a boolean") ErrDynCallNonFunctionCalee = errors.New("callee in dynamic call value is not a function") ErrUnknownDynamicOp = errors.New("unknown dynamic operation") )
var ( ErrEffectAlreadyApplied = errors.New("effect is already applied") ErrIrreversible = errors.New("effect is irreversible") )
var ( EMPTY_INTERFACE_TYPE = reflect.TypeOf((*interface{})(nil)).Elem() CTX_PTR_TYPE = reflect.TypeOf((*Context)(nil)) VALUE_TYPE = reflect.TypeOf((*Value)(nil)).Elem() SERIALIZABLE_TYPE = reflect.TypeOf((*Serializable)(nil)).Elem() ERROR_INTERFACE_TYPE = reflect.TypeOf((*error)(nil)).Elem() READABLE_INTERFACE_TYPE = reflect.TypeOf((*Readable)(nil)).Elem() RESOURCE_NAME_INTERFACE_TYPE = reflect.TypeOf((*ResourceName)(nil)).Elem() PATTERN_INTERFACE_TYPE = reflect.TypeOf((*Pattern)(nil)).Elem() ITERABLE_INTERFACE_TYPE = reflect.TypeOf((*Iterable)(nil)).Elem() SERIALIZABLE_ITERABLE_INTERFACE_TYPE = reflect.TypeOf((*SerializableIterable)(nil)).Elem() INDEXABLE_INTERFACE_TYPE = reflect.TypeOf((*Indexable)(nil)).Elem() VALUE_RECEIVER_INTERFACE_TYPE = reflect.TypeOf((*MessageReceiver)(nil)).Elem() EVENT_SOURCE_INTERFACE_TYPE = reflect.TypeOf((*EventSource)(nil)).Elem() NIL_TYPE = reflect.TypeOf(Nil) BYTE_SLICE_TYPE = reflect.TypeOf((*ByteSlice)(nil)) RUNE_SLICE_TYPE = reflect.TypeOf((*RuneSlice)(nil)) FILE_INFO_TYPE = reflect.TypeOf(FileInfo{}) RUNE_TYPE = reflect.TypeOf(Rune('a')) BYTE_TYPE = reflect.TypeOf(Byte('a')) REGULAR_STR_TYPE = reflect.TypeOf("") STRING_TYPE = reflect.TypeOf(String("")) STR_LIKE_INTERFACE_TYPE = reflect.TypeOf((*StringLike)(nil)).Elem() CHECKED_STR_TYPE = reflect.TypeOf(CheckedString{}) BOOL_TYPE = reflect.TypeOf(Bool(true)) INT_TYPE = reflect.TypeOf(Int(1)) PORT_TYPE = reflect.TypeOf(Port{}) BYTERATE_TYPE = reflect.TypeOf(ByteRate(1)) FREQUENCY_TYPE = reflect.TypeOf(Frequency(1)) LINECOUNT_TYPE = reflect.TypeOf(LineCount(1)) RUNECOUNT_TYPE = reflect.TypeOf(RuneCount(1)) BYTECOUNT_TYPE = reflect.TypeOf(ByteCount(1)) DURATION_TYPE = reflect.TypeOf(Duration(1)) FLOAT64_TYPE = reflect.TypeOf(Float(0)) OBJECT_TYPE = reflect.TypeOf((*Object)(nil)) RECORD_TYPE = reflect.TypeOf((*Record)(nil)) TUPLE_TYPE = reflect.TypeOf((*Tuple)(nil)) LIST_PTR_TYPE = reflect.TypeOf((*List)(nil)) DICT_TYPE = reflect.TypeOf((*Dictionary)(nil)) KEYLIST_TYPE = reflect.TypeOf(KeyList{}) NODE_TYPE = reflect.TypeOf(AstNode{}) MODULE_TYPE = reflect.TypeOf((*Module)(nil)) OPTION_TYPE = reflect.TypeOf(Option{}) IDENTIFIER_TYPE = reflect.TypeOf(Identifier("a")) PROPNAME_TYPE = reflect.TypeOf(PropertyName("a")) LONG_VALUE_PATH_TYPE = reflect.TypeOf((*LongValuePath)(nil)) VALUE_PATH_INTERFACE__TYPE = reflect.TypeOf((*ValuePath)(nil)).Elem() PATH_TYPE = reflect.TypeOf(Path("/")) PATH_PATT_TYPE = reflect.TypeOf(PathPattern("/")) URL_TYPE = reflect.TypeOf(URL("")) SCHEME_TYPE = reflect.TypeOf(Scheme("")) HOST_TYPE = reflect.TypeOf(Host("")) HOST_PATT_TYPE = reflect.TypeOf(HostPattern("")) EMAIL_ADDR_TYPE = reflect.TypeOf(EmailAddress("")) URL_PATT_TYPE = reflect.TypeOf(URLPattern("")) FILE_MODE_TYPE = reflect.TypeOf(FileMode(0)) YEAR_TYPE = reflect.TypeOf(Year{}) DATE_TYPE = reflect.TypeOf(Date{}) DATETIME_TYPE = reflect.TypeOf(DateTime{}) EVENT_TYPE = reflect.TypeOf((*Event)(nil)) MUTATION_TYPE = reflect.TypeOf(Mutation{}) MSG_TYPE = reflect.TypeOf(Message{}) ERROR_TYPE = reflect.TypeOf(Error{}) INT_RANGE_TYPE = reflect.TypeOf(IntRange{}) FLOAT_RANGE_TYPE = reflect.TypeOf(FloatRange{}) RUNE_RANGE_TYPE = reflect.TypeOf(RuneRange{}) VALUE_HISTORY_TYPE = reflect.TypeOf((*ValueHistory)(nil)) SYSGRAPH_TYPE = reflect.TypeOf((*SystemGraph)(nil)) SYSGRAPH_NODE_TYPE = reflect.TypeOf((*SystemGraphNode)(nil)) SYSGRAPH_EDGE_TYPE = reflect.TypeOf(SystemGraphEdge{}) SECRET_TYPE = reflect.TypeOf((*Secret)(nil)) READER_INTERFACE_TYPE = reflect.TypeOf((*Reader)(nil)) OBJECT_PATTERN_TYPE = reflect.TypeOf((*ObjectPattern)(nil)) LIST_PATTERN_TYPE = reflect.TypeOf((*ListPattern)(nil)) RECORD_PATTERN_TYPE = reflect.TypeOf((*RecordPattern)(nil)) TUPLE_PATTERN_TYPE = reflect.TypeOf((*TuplePattern)(nil)) ULID_TYPE = reflect.TypeOf(ULID{}) UUIDv4_TYPE = reflect.TypeOf(UUIDv4{}) ORDERED_PAIR_TYPE = reflect.TypeOf((*OrderedPair)(nil)) NAMED_SEGMENT_PATH_PATTERN_TYPE = reflect.TypeOf((*NamedSegmentPathPattern)(nil)) TYPE_PATTERN_TYPE = reflect.TypeOf((*TypePattern)(nil)) EXACT_VALUE_PATTERN_TYPE = reflect.TypeOf((*ExactValuePattern)(nil)) EXACT_STRING_PATTERN_TYPE = reflect.TypeOf((*ExactStringPattern)(nil)) INT_RANGE_PATTERN_TYPE = reflect.TypeOf(&IntRangePattern{}) FLOAT_RANGE_PATTERN_TYPE = reflect.TypeOf(&FloatRangePattern{}) INT_RANGE_STRING_PATTERN_TYPE = reflect.TypeOf(&IntRangeStringPattern{}) FLOAT_RANGE_STRING_PATTERN_TYPE = reflect.TypeOf(&FloatRangeStringPattern{}) SECRET_PATTERN_TYPE = reflect.TypeOf(&SecretPattern{}) REGEX_PATTERN_TYPE = reflect.TypeOf(&RegexPattern{}) EVENT_PATTERN_TYPE = reflect.TypeOf((*EventPattern)(nil)) MUTATION_PATTERN_TYPE = reflect.TypeOf((*MutationPattern)(nil)) )
var ( ErrStackOverflow = errors.New("stack overflow") ErrIndexOutOfRange = errors.New("index out of range") ErrInsertionIndexOutOfRange = errors.New("insertion index out of range") ErrNegativeLowerIndex = errors.New("negative lower index") ErrUnreachable = errors.New("unreachable") ErrCannotSetValOfIndexKeyProp = errors.New("cannot set value of index key property") ErrCannotPopFromEmptyList = errors.New("cannot pop from an empty list") ErrCannotDequeueFromEmptyList = errors.New("cannot dequeue from an empty list") //integer ErrIntOverflow = errors.New("integer overflow") ErrIntUnderflow = errors.New("integer underflow") ErrNegationWithOverflow = errors.New("integer negation with overflow") ErrIntDivisionByZero = errors.New("integer division by zero") //floating point ErrFloatOverflow = errors.New("float overflow") ErrFloatUnderflow = errors.New("float underflow") ErrNaNinfinityOperand = errors.New("NaN or (+|-)infinity operand in floating point operation") ErrNaNinfinityResult = errors.New("result of floating point operation is NaN or (+|-)infinity") //quantty ErrNegQuantityNotSupported = errors.New("negative quantities are not supported") ErrCannotEvaluateCompiledFunctionInTreeWalkEval = errors.New("cannot evaluate compiled function in a tree walk evaluation") ErrInvalidQuantity = errors.New("invalid quantity") ErrQuantityLooLarge = errors.New("quantity is too large") ErrDirPathShouldEndInSlash = errors.New("directory's path should end with '/'") ErrFilePathShouldNotEndInSlash = errors.New("regular file's path should not end with '/'") ErrModifyImmutable = errors.New("cannot modify an immutable value") ErrCannotSetProp = errors.New("cannot set property") ErrCannotLockUnsharableValue = errors.New("cannot lock unsharable value") ErrAttemptToSetCaptureGlobal = errors.New("attempt to set a captured global") ErrNotImplemented = errors.New("not implemented and won't be implemented in the near future") ErrNotImplementedYet = errors.New("not implemented yet") ErrInvalidDirPath = errors.New("invalid dir path") ErrInvalidNonDirPath = errors.New("invalid non-dir path") ErrURLAlreadySet = errors.New("url already set") ErrLThreadIsDone = errors.New("lthread is done") ErrSelfNotDefined = errors.New("self not defined") ErrNotEnoughCliArgs = errors.New("not enough CLI arguments") ErrMissinggRuntimeTypecheckSymbData = errors.New("impossible to perform runtime typecheck because symbolic data is missing") ErrPrecisionLoss = errors.New("precision loss") ErrValueInExactPatternValueShouldBeImmutable = errors.New("the value in an exact value pattern should be immutable") ErrValueHasNoProperties = errors.New("value has no properties") ErrNotInDebugMode = errors.New("not in debug mode") ErrStepNonPausedProgram = errors.New("impossible to step in the execution of a non-paused program") )
var ( ErrNonUniqueEventSourceFactoryRegistration = errors.New("non unique event source factory registration") ErrHandlerAlreadyAdded = errors.New("handler already added to event source") ErrFileWatchingNotSupported = errors.New("file watching is not supported") )
var ( ErrSnapshotEntryPathMustBeAbsolute = errors.New("snapshot file path must be absolute") ErrSnapshotEntryNotAFile = errors.New("filesystem entry is not a file") ErrAlreadyBeingSnapshoted = errors.New("the filesystem is already being snapshoted") )
var ( ErrContextInUse = errors.New("cannot create a new global state with a context that already has an associated state") ErrOutAndLoggerAlreadySet = errors.New(".Out & .Logger are already definitely set") GLOBAL_STATE_PROPNAMES = []string{"module"} )
var ( ErrInvalidOrUnsupportedJsonSchema = errors.New("invalid or unsupported JSON Schema") ErrRecursiveJSONSchemaNotSupported = errors.New("recursive JSON schema are not supported") ErrJSONSchemaMixingIntFloatNotSupported = errors.New("JSON schemas mixing integers and floats are not supported") JSON_SCHEMA_TYPE_TO_PATTERN = map[string]Pattern{ "string": STR_PATTERN, "number": FLOAT_PATTERN, "integer": INT_PATTERN, "object": OBJECT_PATTERN, "array": LIST_PATTERN, "boolean": BOOL_PATTERN, "null": NIL_PATTERN, } )
var ( ErrTokenDepletionAlreadyPaused = errors.New("token depletion already paused") ErrTokenDepletionNotPaused = errors.New("token depletion is not paused") ErrStateIdNotSet = errors.New("state id not set") )
var ( ErrNonUniqueLoadFreeEntityFnRegistration = errors.New("non unique loading function registration") ErrNonUniqueGetSymbolicInitialFactoryRegistration = errors.New("non unique symbolic initial value factory registration") ErrNoLoadFreeEntityFnRegistered = errors.New("no loading function registered for given type") ErrLoadingRequireTransaction = errors.New("loading a value requires a transaction") ErrTransactionsNotSupportedYet = errors.New("transactions not supported yet") ErrFailedToLoadNonExistingValue = errors.New("failed to load non-existing value") ErrInvalidInitialValue = errors.New("invalid initial value") )
var ( ErrLockReEntry = errors.New("lock re-entry") ErrHeldLockWithoutHolder = errors.New("held lock without holder") )
var ( ROUTINE_PROPNAMES = []string{"wait_result", "cancel", "steps"} ROUTINE_GROUP_PROPNAMES = []string{"wait_results", "cancel_all"} EXECUTED_STEP_PROPNAMES = []string{"result", "end_time"} )
var ( //the initial working dir is the working dir at the start of the program execution. INITIAL_WORKING_DIR_PATH Path INITIAL_WORKING_DIR_PATH_PATTERN PathPattern MANIFEST_SECTION_NAMES = []string{ MANIFEST_KIND_SECTION_NAME, MANIFEST_ENV_SECTION_NAME, MANIFEST_PARAMS_SECTION_NAME, MANIFEST_PERMS_SECTION_NAME, MANIFEST_LIMITS_SECTION_NAME, MANIFEST_HOST_DEFINITIONS_SECTION_NAME, MANIFEST_PREINIT_FILES_SECTION_NAME, MANIFEST_DATABASES_SECTION_NAME, MANIFEST_INVOCATION_SECTION_NAME, } MODULE_KIND_TO_ALLOWED_SECTION_NAMES = map[ModuleKind][]string{ UnspecifiedModuleKind: MANIFEST_SECTION_NAMES, ApplicationModule: MANIFEST_SECTION_NAMES, SpecModule: {MANIFEST_KIND_SECTION_NAME, MANIFEST_PERMS_SECTION_NAME, MANIFEST_LIMITS_SECTION_NAME}, LifetimeJobModule: {MANIFEST_PERMS_SECTION_NAME, MANIFEST_LIMITS_SECTION_NAME}, TestSuiteModule: {MANIFEST_PERMS_SECTION_NAME, MANIFEST_LIMITS_SECTION_NAME}, TestCaseModule: {MANIFEST_PERMS_SECTION_NAME, MANIFEST_LIMITS_SECTION_NAME}, } MANIFEST_DATABASE_PROPNAMES = []string{ MANIFEST_DATABASE__RESOURCE_PROP_NAME, MANIFEST_DATABASE__RESOLUTION_DATA_PROP_NAME, MANIFEST_DATABASE__EXPECTED_SCHEMA_UPDATE_PROP_NAME, MANIFEST_DATABASE__ASSERT_SCHEMA_UPDATE_PROP_NAME, } ErrURLNotCorrespondingToDefinedDB = errors.New("URL does not correspond to a defined database") )
var ( ErrValueNoURL = errors.New("value has not an URL") ErrValueNoId = errors.New("value has not an identifier") ErrValueDoesNotAcceptURL = errors.New("value does not accept URL") )
var ( SOURCE_POS_RECORD_PROPNAMES = []string{"source", "line", "column", "start", "end"} MODULE_KIND_NAMES = [...]string{ UnspecifiedModuleKind: "unspecified", SpecModule: "spec", UserLThreadModule: "userlthread", TestSuiteModule: "testsuite", TestCaseModule: "testcase", LifetimeJobModule: "lifetimejob", ApplicationModule: "application", } ErrFileToIncludeDoesNotExist = errors.New("file to include does not exist") ErrFileToIncludeIsAFolder = errors.New("file to include is a folder") ErrMissingManifest = errors.New("missing manifest") ErrParsingErrorInManifestOrPreinit = errors.New("parsing error in manifest or preinit") ErrInvalidModuleKind = errors.New("invalid module kind") )
var ( ErrZeroOrNegAlignment = errors.New("zero or negative alignment") ErrZeroOrNegAllocationSize = errors.New("zero or negative allocation size") ErrInvalidInitialHeapCapacity = errors.New("invalid initial heap capacity") )
var ( ErrInvalidModuleSourceURL = errors.New("invalid module source URL") ErrAbsoluteModuleSourcePathUsedInURLImportedModule = errors.New("absolute module source path used in module imported from URL") ErrImportCycleDetected = errors.New("import cycle detected") ErrMaxModuleImportDepthExceeded = fmt.Errorf( "the module import depth has exceeded the maximum (%d)", DEFAULT_MAX_MOD_GRAPH_PATH_LEN) IMPORT_CONFIG_SECTION_NAMES = []string{ IMPORT_CONFIG__ALLOW_PROPNAME, IMPORT_CONFIG__ARGUMENTS_PROPNAME, IMPORT_CONFIG__VALIDATION_PROPNAME, } )
var ( ErrDatabaseOpenFunctionNotFound = errors.New("function to open database not found") ErrNonMatchingCachedModulePath = errors.New("the cached module's path is not the same as the absolute version of the provided path") )
var ( MUTATION_KIND_NAMES = [...]string{ UnspecifiedMutation: "unspecified-mutation", AddProp: "add-prop", UpdateProp: "update-prop", AddEntry: "add-entry", UpdateEntry: "update-entry", InsertElemAtIndex: "insert-elem-at-index", SetElemAtIndex: "set-elem-at-index", SetSliceAtRange: "set-slice-at-range", InsertSequenceAtIndex: "insert-seq-at-index", RemovePosition: "remove-pos", RemovePositionRange: "remove-pos-range", SpecificMutation: "specific-mutation", } ErrCannotApplyIncompleteMutation = errors.New("cannot apply an incomplete mutation") ErrNotSupportedSpecificMutation = errors.New("not supported specific mutation") ErrInvalidMutationPrefixSymbol = errors.New("invalid mutation prefix symbol") )
var ( ErrUnknownStartIntRange = errors.New("integer range has unknown start") ErrUnknownStartFloatRange = errors.New("float range has unknown start") )
var ( ErrJsonNotMatchingSchema = errors.New("JSON is not matching schema") ErrTriedToParseJSONRepr = errors.New("tried to parse json representation but failed") ErrNotMatchingSchemaIntFound = errors.New("integer was found but it does not match the schema") ErrNotMatchingSchemaFloatFound = errors.New("float was found but it does not match the schema") ErrJSONImpossibleToDetermineType = errors.New("impossible to determine type") ErrNonSupportedMetaProperty = errors.New("non-supported meta property") ErrInvalidRuneRepresentation = errors.New("invalid rune representation") )
var ( ErrPatternNotCallable = errors.New("pattern is not callable") ErrNoDefaultValue = errors.New("no default value") ErrTooDeepUnionPatternFlattening = errors.New("union pattern flattening is too deep") ErrInconsistentObjectPattern = errors.New("inconsistent object pattern") )
var ( ErrFullPool = errors.New("pool is full") ErrInvalidPoolConfig = errors.New("provided pool configuration is invalid") ErrNotOwnedPoolItem = errors.New("passed pool item is not owned by current pool") ErrDoublePoolItemRelease = errors.New("pool item is already released") )
var ( ANSI_RESET_SEQUENCE = []byte(termenv.CSI + termenv.ResetSeq + "m") ANSI_RESET_SEQUENCE_STRING = string(ANSI_RESET_SEQUENCE) DEFAULT_DARKMODE_DISCRETE_COLOR = pprint.DEFAULT_DARKMODE_PRINT_COLORS.DiscreteColor DEFAULT_LIGHMODE_DISCRETE_COLOR = pprint.DEFAULT_LIGHTMODE_PRINT_COLORS.DiscreteColor COMMA = []byte{','} LF_CR = []byte{'\n', '\r'} DASH_DASH = []byte{'-', '-'} SHARP_OPENING_PAREN = []byte{'#', '('} COLON_SPACE = []byte{':', ' '} COMMA_SPACE = []byte{',', ' '} CLOSING_BRACKET_CLOSING_PAREN = []byte{']', ')'} CLOSING_CURLY_BRACKET_CLOSING_PAREN = []byte{'}', ')'} THREE_DOTS = []byte{'.', '.', '.'} DOT_OPENING_CURLY_BRACKET = []byte{'.', '{'} DOT_DOT = []byte{'.', '.'} SLASH_SECOND_BYTES = []byte{'/', 's'} )
var ( ErrUnknownStartQtyRange = errors.New("quantity range has unknown start") ErrNegFrequency = errors.New("negative frequency") ErrInfFrequency = errors.New("infinite frequency") ErrNegByteRate = errors.New("negative byte rate") ErrQuantityOverflow = errors.New("quantity overflow") ErrQuantityUnderflow = errors.New("quantity underflow") )
var ( MAX_INT64 = big.NewInt(math.MaxInt64) MAX_UINT64 = big.NewInt(0) CryptoRandSource = &RandomnessSource{source: cryptoRandomnessSource{}} DefaultRandSource = CryptoRandSource )
var ( ErrEndOfStream = errors.New("end of stream") ErrStreamElemWaitTimeout = errors.New("stream element wait timeout") ErrStreamChunkWaitTimeout = errors.New("stream chunk wait timeout") ErrTempDriedUpSource = errors.New("temporarily dried up source") ErrDefDriedUpSource = errors.New("definitively dried up source") WRAPPED_WATCHER_STREAM_CHUNK_DATA_TYPE = &ListPattern{generalElementPattern: ANYVAL_PATTERN} ELEMENTS_STREAM_CHUNK_DATA_TYPE = &ListPattern{generalElementPattern: ANYVAL_PATTERN} BYTESTREAM_CHUNK_DATA_TYPE = BYTESLICE_PATTERN )
var ( ErrMutableMessageData = errors.New("impossible to create a Message with mutable data") MSG_PROPNAMES = []string{"data"} )
var ( ErrNotRenderable = errors.New("value is not renderable") ErrInvalidRenderingConfig = errors.New("invalid rendering configuration") ErrNotRenderableUseCustomRenderer = fmt.Errorf("%w: use a custom renderer", ErrNotRenderable) LIST_OPENING_TAG = []byte{'<', 'u', 'l', '>'} LIST_CLOSING_TAG = []byte{'<', '/', 'u', 'l', '>'} DIV_OPENING_TAG = []byte{'<', 'd', 'i', 'v', '>'} DIV_CLOSING_TAG = []byte{'<', '/', 'd', 'i', 'v', '>'} TIME_OPENING_TAG = []byte{'<', 't', 'i', 'm', 'e', '>'} TIME_CLOSING_TAG = []byte{'<', '/', 't', 'i', 'm', 'e', '>'} S_TRUE = []byte{'t', 'r', 'u', 'e'} S_FALSE = []byte{'f', 'a', 'l', 's', 'e'} )
var ( ErrNotResourceName = errors.New("not a resource name") ErrCannotReleaseUnregisteredResource = errors.New("cannot release unregistered resource") ErrFailedToAcquireResurce = errors.New("failed to acquire resource") ErrResourceHasHardcodedUrlMetaProperty = errors.New("resource has hardcoded _url_ metaproperty") ErrInvalidResourceContent = errors.New("invalid resource's content") ErrContentTypeParserNotFound = errors.New("parser not found for content type") ErrEmptyPath = errors.New("empty path") ErrPathWithInvalidStart = errors.New("path with invalid start") ErrTestedPathTooLarge = errors.New("tested path is too large") ErrEmptyURL = errors.New("empty URL") ErrInvalidURL = errors.New("invalid URL") ErrUnexpectedSpaceInURL = errors.New("unexpected space in URL") ErrMissingHostHostNameInHost = errors.New("missing hostname in host") ErrMissingURLHostName = errors.New("missing hostname in URL") ErrMissingURLSpecificFeature = errors.New("missing URL-specific feature in URL (path, query or fragment)") ErrTestedURLTooLarge = errors.New("tested URL is too large") ErrInvalidURLPattern = errors.New("invalid URL pattern") ErrTestedHostPatternTooLarge = errors.New("tested host pattern is too large") ErrEmptyHost = errors.New("empty host") ErrInvalidHost = errors.New("invalid host") ErrEmptyScheme = errors.New("empty scheme") ErrSchemeWithInvalidStart = errors.New("scheme with invalid start") ErrUnexpectedCharsInScheme = errors.New("unexpected char(s) in scheme") ErrInvalidEmailAdddres = errors.New("invalid email address per RFC 5322") )
var ( RING_BUFFER_PROPNAMES = []string{"write", "read", "full"} ErrEmptyRingBuffer = errors.New("ring buffer is empty") ErrFullRingBuffer = errors.New("ring buffer is full") ErrRingBufferTooMuchDataToWrite = errors.New("too much data to write to ring buffer") )
var ( HTTP_PERM_TYPE = reflect.TypeOf(HttpPermission{}) WS_PERM_TYPE = reflect.TypeOf(WebsocketPermission{}) FS_PERM_TYPE = reflect.TypeOf(FilesystemPermission{}) ROUTINE_PERM_TYPE = reflect.TypeOf(LThreadPermission{}) CMD_PERM_TYPE = reflect.TypeOf(CommandPermission{}) DEFAULT_PERM_RISK_SCORES = map[reflect.Type][]BasePermissionRiskScore{ HTTP_PERM_TYPE: { {HTTP_PERM_TYPE, permkind.Read, HTTP_READ_PERM_RISK_SCORE}, {HTTP_PERM_TYPE, permkind.Write, HTTP_WRITE_PERM_RISK_SCORE}, {HTTP_PERM_TYPE, permkind.Provide, HTTP_WRITE_PERM_RISK_SCORE}, }, WS_PERM_TYPE: { {WS_PERM_TYPE, permkind.Read, WS_READ_PERM_RISK_SCORE}, {WS_PERM_TYPE, permkind.Write, WS_WRITE_PERM_RISK_SCORE}, {WS_PERM_TYPE, permkind.Provide, WS_WRITE_PERM_RISK_SCORE}, }, FS_PERM_TYPE: { {FS_PERM_TYPE, permkind.Read, FS_READ_PERM_RISK_SCORE}, {FS_PERM_TYPE, permkind.Write, FS_WRITE_PERM_RISK_SCORE}, }, ROUTINE_PERM_TYPE: { {ROUTINE_PERM_TYPE, permkind.Create, LTHREAD_PERM_RISK_SCORE}, }, CMD_PERM_TYPE: { {CMD_PERM_TYPE, permkind.Use, CMD_PERM_RISK_SCORE}, }, } //TODO: move constants to an embedded file. //TODO: handle case where the a virtual system is used. FILE_SENSITIVITY_MULTIPLIERS = []struct { PathPattern Multiplier int }{ {"/home/*/.*", 3}, {"/home/*/.*/**/*", 3}, {"/etc/**/*", 3}, {"/usr/**/*", 4}, {"/bin/**/*", 4}, {"/sbin/**/*", 4}, {"/*", 4}, } )
var ( ErrValueNotSharableNorClonable = errors.New("value is not sharable nor clonable") )
var ( ErrFailedToSnapshot = errors.New("failed to snapshot value") ErrAttemptToMutateFrozenValue = errors.New("attempt to mutate a frozen value") )
var ( ErrUnsupportedNestedValue = errors.New("unsupported nested value") ErrUnsupportedOrder = errors.New("unsupported order") ErrNotSortableByNestedValue = errors.New("not sortable by nested value") ErrInvalidOrderIdentifier = errors.New("invalid order identifier") )
var ( STATIC_CHECK_DATA_PROP_NAMES = []string{"errors"} ErrForbiddenNodeinPreinit = errors.New("forbidden node type in preinit block") )
var ( STRING_LIKE_PSEUDOPROPS = []string{"replace", "trim_space", "has_prefix", "has_suffix"} RUNE_SLICE_PROPNAMES = []string{"insert", "remove_position", "remove_position_range"} )
var ( ErrStrGroupMatchingOnlySupportedForPatternWithRegex = errors.New("group matching is only supported by string patterns with a regex for now") ErrCannotParse = errors.New("cannot parse") ErrInvalidInputString = errors.New("invalid input string") ErrTestedStringTooLarge = errors.New("tested string is too large") ErrFailedToConvertValueToMatchingString = errors.New("failed to convert value to matching string") ErrIntNotInPatternRange = errors.New("integer is not in the pattern's range") ErrFloatNotInPatternRange = errors.New("float is not in the pattern's range") ErrFailedStringPatternResolution = errors.New("failed to resolve string pattern") MAX_CHAR_COUNT_MAXIMUM_FLOAT_64 = max( len(strconv.FormatFloat(math.MaxFloat64, 'f', -1, 64)), len(strconv.FormatFloat(math.MaxFloat64, 'e', -1, 64)), ) )
var ( ErrPublisherNotUniquelyIdentifiable = errors.New("publisher not uniquely identifiable") ErrSubscriberNotUniquelyIdentifiable = errors.New("subscriber not uniquely identifiable") )
var ( ErrValueAlreadyInSysGraph = errors.New("value already in a system graph") ErrValueNotInSysGraph = errors.New("value is not part of system graph") ErrValueNotPointer = errors.New("value is not a pointer") SYSTEM_GRAPH_PROPNAMES = []string{"nodes", "events"} SYSTEM_GRAPH_EVENT_PROPNAMES = []string{"text", "value0_id"} SYSTEM_GRAP_EDGE_PROPNAMES = []string{"to", "text"} SYSTEM_GRAPH_NODE_PROPNAMES = []string{"name", "type_name", "value_id", "edges"} )
var ( TEST_CASE_RESULT_DARK_MODE_PRETTY_PRINT_CONFIG = &PrettyPrintConfig{ PrettyPrintConfig: pprint.PrettyPrintConfig{ MaxDepth: 7, Colorize: true, Colors: &pprint.DEFAULT_DARKMODE_PRINT_COLORS, Compact: false, Indent: []byte{' ', ' '}, PrintDecodedTopLevelStrings: true, }, } TEST_CASE_RESULT_LIGTH_MODE_PRETTY_PRINT_CONFIG = &PrettyPrintConfig{ PrettyPrintConfig: pprint.PrettyPrintConfig{ MaxDepth: 7, Colorize: true, Colors: &pprint.DEFAULT_LIGHTMODE_PRINT_COLORS, Compact: false, Indent: []byte{' ', ' '}, PrintDecodedTopLevelStrings: true, }, } )
var ( PROCESS_BEGIN_TIME = time.Now().UTC() ErrNegDuration = errors.New("negative duration") ErrInvalidYear = errors.New("invalid year") ErrInvalidDate = errors.New("invalid date") )
var ( ErrTransactionAlreadyStarted = errors.New("transaction has already started") ErrTransactionShouldBeStartedBySameContext = errors.New("a transaction should be started by the same context that created it") ErrCannotAddIrreversibleEffect = errors.New("cannot add irreversible effect to transaction") ErrCtxAlreadyHasTransaction = errors.New("context already has a transaction") ErrFinishedTransaction = errors.New("transaction is finished") ErrFinishingTransaction = errors.New("transaction is finishing") ErrAlreadySetTransactionEndCallback = errors.New("transaction end callback is already set") ErrRunningTransactionExpected = errors.New("running transaction expected") ErrEffectsNotAllowedInReadonlyTransaction = errors.New("effects are not allowed in a readonly transaction") )
var ( ErrTooManyWriteTxsWaited = errors.New("transaction has waited for too many write transactions to finish") ErrWaitReadonlyTxsTimeout = errors.New("waiting for readonly txs timed out") )
var ( ErrEmptyPropertyName = errors.New("empty property name") ErrUnexpectedCharsInPropertyName = errors.New("unexpected char(s) in property name") ErrEmptyLongValuePath = errors.New("empty long value-path") ErrSingleSegmentLongValuePath = errors.New("single-segment value-path") )
var ( ErrArgsProvidedToModule = errors.New("cannot provide arguments when running module") ErrInvalidProvidedArgCount = errors.New("number of provided arguments is invalid") )
var ( PERIODIC_WATCHER_GOROUTINE_TICK_INTERVAL = 100 * time.Microsecond ErrManagedWatchersNotSupported = errors.New("managed watchers are not supported") ErrWatchTimeout = errors.New("watch timeout") ErrStoppedWatcher = errors.New("stopped watcher") ErrIntermediateDepthWatchingNotSupported = errors.New("intermediate (and deeper) watching is not supported by the watchable") ErrDeepWatchingNotSupported = errors.New("deep watching is not supported by the watchable") )
var ( ErrStoppedWritableStream = errors.New("writable stream is stopped") ErrInvalidStreamElement = errors.New("invalid stream element") ErrInvalidStreamChunkData = errors.New("invalid stream chunk data") )
var ( ErrMaximumJSONReprWritingDepthReached = errors.New("maximum JSON representation writing depth reached") ErrPatternDoesNotMatchValueToSerialize = errors.New("pattern does not match value to serialize") ErrPatternRequiredToSerialize = errors.New("pattern required to serialize") ALL_VISIBLE_REPR_CONFIG = &ReprConfig{AllVisible: true} )
var ( ErrUnsupportedYamlNodeType = errors.New("unsupported YAML node type") UnknownYamlNodeType = errors.New("unknown YAML node type") )
var (
DEFAULT_LOG_LEVELS = NewLogLevels(LogLevelsInitialization{DefaultLevel: zerolog.InfoLevel})
)
var (
EMPTY_MODULE_ARGS_PATTERN = NewModuleParamsPattern(nil, nil)
)
var (
ERR_PROPNAMES = []string{"text", "data"}
)
var (
)var (
ErrCannotReadWithNoCopy = errors.New("cannot read with no copy")
)
var (
ErrCollectionElemNotFound = errors.New("collection element not found")
)
var (
ErrConstraintViolation = errors.New("constraint violation")
)
var (
ErrDebuggerAlreadyAttached = errors.New("debugger already attached")
)
var (
ErrDestroyedTokenBucket = errors.New("token bucket is destroyed")
)
var (
ErrFileSizeExceedSpecifiedLimit = errors.New("file's size exceeds the specified limit")
)
var (
ErrImpossibleToVerifyPermissionForUrlHolderMutation = errors.New("impossible to verify permission for mutation of URL holder")
)
var (
ErrInvalidFormattingArgument = errors.New("invalid formatting argument")
)
var (
ErrInvalidMigrationPseudoPath = errors.New("invalid migration pseudo path")
)
var (
ErrLifetimeJobMetaValueShouldBeImmutable = errors.New("meta value of lifetime job should be immutable")
)
var (
ErrMutablePublicationData = errors.New("impossible to create a publication with mutable data")
)
var ErrNoRepresentation = errors.New("no representation")
var (
ErrNonUniqueDbOpenFnRegistration = errors.New("non unique open DB function registration")
)
var (
ErrNotComparable = errors.New("not comparable")
)
var (
ErrNotVisible = errors.New("not visible by context")
)
var (
ErrReprOfMutableValueCanChange = errors.New("the representation of a mutable value can change")
)
var (
ErrSecretIsNotPEMEncoded = errors.New("secret is not PEM encoded")
)
var (
ErrmaxUnwrappingDepthReached = errors.New("maximum unwrapping depth reached")
)
var (
FS_TREE_DATA_ITEM_PROPNAMES = []string{"path", "path_rel_to_parent"}
)
var IMPLICITLY_REMOVED_ROUTINE_PERMS = []Permission{ LThreadPermission{permkind.Create}, }
var (
OPTIONAL_PARAM_TYPE = reflect.TypeOf((*optionalParam)(nil)).Elem()
)
var OpcodeConstantIndexes = [...][]bool{}/* 150 elements not displayed */
OpcodeConstantIndexes stores for each opcode what arguments are indexes (positions) of constants.
var OpcodeNames = [...]string{}/* 150 elements not displayed */
OpcodeNames contains the string representation of each opcode. TODO: improve names
var OpcodeOperands = [...][]int{}/* 149 elements not displayed */
OpcodeOperands contains the number of operands of each opcode.
var ( SELF_SENSITIVE_DATA_NAMES = map[string]struct { patterns []Pattern }{ "password": { // contains filtered or unexported fields }, "passwordHash": { // contains filtered or unexported fields }, "email": { // contains filtered or unexported fields }, "emailAddress": { // contains filtered or unexported fields }, "address": { // contains filtered or unexported fields }, "age": {}, "gender": {}, "X-Api-Key": {}, } )
var (
SYMBOLIC_DATA_PROP_NAMES = []string{"errors"}
)
var (
VALUE_HISTORY_PROPNAMES = []string{"value_at", "forget_last", "last-value", "selected-datetime", "value-at-selection"}
)
Functions ¶
func AddModuleTreeToResourceGraph ¶
func AddModuleTreeToResourceGraph(m *Module, g *ResourceGraph, ctx *Context, ignoreBadImports bool) error
func AddValidPathPrefix ¶
AddValidPathPrefix adds the ./ prefix if necessary, AddValidPathPrefix does NOT check that its argument is a valid path.
func AppendTrailingSlashIfNotPresent ¶
func AppendTrailingSlashIfNotPresent[S ~string](s S) S
func AreDefaultMaxRequestHandlerLimitsSet ¶
func AreDefaultMaxRequestHandlerLimitsSet() bool
func AreDefaultRequestHandlingLimitsSet ¶
func AreDefaultRequestHandlingLimitsSet() bool
func AreDefaultScriptLimitsSet ¶
func AreDefaultScriptLimitsSet() bool
func ChildLoggerForSource ¶
func CombineParsingErrorValues ¶
func CombineParsingErrorValues(errs []Error, positions []parse.SourcePositionRange) error
CombineParsingErrorValues combines errors into a single error with a multiline message.
func ComputeProgramRiskScore ¶
func ComputeProgramRiskScore(mod *Module, manifest *Manifest) (totalScore RiskScore, requiredPerms []Permission)
ComputeProgramRiskScore computes the risk score for a prepared program. First the risk score for each permission is computed, then scores of permissions of the same type are summed and finally the remaining scores are multiplied together. The current logic is intended to be a starting point, it may be adjusted based on additional research and feedback.
func DeallocAll ¶
func DeallocAll(h *ModuleHeap)
DeallocAll de-allocates the heap content, the heap is no longer usable.
func FileStat ¶
FileStat tries to directly use the given file to get file information, if it fails and fls is not nil then fls.Stat(f) is used.
func FmtErrInvalidArgument ¶
func ForEachValueInIterable ¶
func FormatInstructions ¶
func FormatInstructions(ctx *Context, b []byte, posOffset int, leftPadding string, constants []Value) []string
FormatInstructions returns string representation of bytecode instructions.
func GetColorizedChunk ¶
func GetConcreteGoFuncFromSymbolic ¶
func GetConcreteGoFuncFromSymbolic(fn *symbolic.GoFunction) (reflect.Value, bool)
func GetJSONRepresentation ¶
func GetJSONRepresentation(v Serializable, ctx *Context, pattern Pattern) string
func GetJSONRepresentationWithConfig ¶
func GetJSONRepresentationWithConfig(v Serializable, ctx *Context, config JSONSerializationConfig) (string, error)
func GetPathPatternSensitivityMultiplier ¶
func GetPathPatternSensitivityMultiplier(patt PathPattern) int
func GetWalkEntries ¶
func GetWalkEntries(fls afs.Filesystem, walkedDirPath Path) (entries [][]fs.DirEntry, paths [][]string)
GetWalkEntries walks a directory and returns all encountered entries and their paths in two 2D arrays. There is one slice for each directory, the first element (fs.DirEntry or path) of each slice is the directory. The others elements are the non-dir files inside the directory. For example if the walked directory only has a singike file inside it the result will be: entries: [ [<dir entry>, <file entry>] ] paths: [ [<dir path>, <file path> ] ]
func HeapAddressUintptr ¶
func HeapAddressUintptr(addr HeapAddress) uintptr
func InspectPrint ¶
func IsAtomSensitive ¶
func IsIndexKey ¶
func IsSharable ¶
func IsSharable(v Value, originState *GlobalState) (bool, string)
IsSharable returns true if the given value can be shared between goroutines, a value is considered sharable if it is immutable or it implements PotentiallySharable and .IsSharable() returns true.
func IsSharableOrClonable ¶
func IsSharableOrClonable(v Value, originState *GlobalState) (bool, string)
func IsSimpleInoxVal ¶
func IsSimpleInoxValOrOption ¶
func IterateAll ¶
func MakeInstruction ¶
MakeInstruction returns a bytecode for an opcode and the operands.
func MapInstructions ¶
func MapInstructions(b []byte, constants []Value, callbackFn InstructionCallbackFn) ([]byte, error)
MapInstructions iterates instructions and calls callbackFn for each instruction.
func MustGetJSONRepresentationWithConfig ¶
func MustGetJSONRepresentationWithConfig(v Serializable, ctx *Context, config JSONSerializationConfig) string
func NewCompiler ¶
func NewStoppedWatcher ¶
func NewStoppedWatcher(config WatcherConfiguration) stoppedWatcher
func NoPatternOrAny ¶
func ParseFileChunk ¶
func ParseFileChunk(absoluteSourcePath string, fls afs.Filesystem) (*parse.ParsedChunkSource, error)
func ParseLocalIncludedFiles ¶
func PrepareExtractionModeIncludableChunkfile ¶
func PrepareExtractionModeIncludableChunkfile(args IncludableChunkfilePreparationArgs) (state *GlobalState, _ *Module, _ *IncludedChunk, finalErr error)
PrepareExtractionModeIncludableChunkfile parses & checks an includable-chunk file located in the filesystem and initializes its state.
func PrepareLocalModule ¶
func PrepareLocalModule(args ModulePreparationArgs) (state *GlobalState, mod *Module, manif *Manifest, finalErr error)
PrepareLocalModule parses & checks a module located in the filesystem and initializes its state.
func PrettyPrint ¶
func PrettyPrintList ¶
func PrettyPrintList(list underlyingList, w *bufio.Writer, config *PrettyPrintConfig, depth int, parentIndentCount int)
func PrintColorizedChunk ¶
func ReadFileInFS ¶
ReadFileInFS reads up to maxSize bytes from a file in the given filesystem. if maxSize is <=0 the max size is set to 100MB.
func ReadOperands ¶
ReadOperands reads the operands of an instruction in bytecode.
func RegisterAddressLessType ¶
RegisterAddressLessType registers an Inox value type in order to enable the computation of transient ids on its instances. Only address-less types such as types of kind reflect.Int, reflect.UInt should be registered.
func RegisterDefaultPattern ¶
func RegisterDefaultPatternNamespace ¶
func RegisterDefaultPatternNamespace(s string, ns *PatternNamespace)
func RegisterEventSourceFactory ¶
func RegisterEventSourceFactory(scheme Scheme, factory EventSourceFactory)
RegisterEventSourceFactory registers an event source factory for a given scheme (e.g. file).
func RegisterLimit ¶
func RegisterLoadFreeEntityFn ¶
func RegisterLoadFreeEntityFn(patternType reflect.Type, fn LoadSelfManagedEntityFn)
func RegisterOpenDbFn ¶
func RegisterParser ¶
func RegisterParser(mime Mimetype, p StatelessParser)
func RegisterPatternDeserializer ¶
func RegisterPatternDeserializer(patternTypePattern *TypePattern, deserializer PatternDeserializer)
func RegisterPermissionTypesInGob ¶
func RegisterPermissionTypesInGob()
func RegisterRenderer ¶
func RegisterRenderer(t reflect.Type, fn RenderingFn)
RegisterRenderer register a custom rendering function for a given type, this function should ONLY be called during the initialization phase (calls to init()) since it is not protected by a lock
func RegisterSimpleValueTypesInGob ¶
func RegisterSimpleValueTypesInGob()
func RegisterStaticallyCheckDbResolutionDataFn ¶
func RegisterStaticallyCheckDbResolutionDataFn(scheme Scheme, fn StaticallyCheckDbResolutionDataFn)
func RegisterStaticallyCheckHostDefinitionFn ¶
func RegisterStaticallyCheckHostDefinitionFn(scheme Scheme, fn StaticallyCheckHostDefinitionFn)
func RegisterSymbolicGoFunction ¶
RegisterSymbolicGoFunction registers the symbolic equivalent of fn, fn should not be a method or a closure. example: RegisterSymbolicGoFunction(func(ctx *Context){ }, func(ctx *symbolic.Context)) This function also registers information about the concrete Go function.
func RegisterSymbolicGoFunctions ¶
func RegisterSymbolicGoFunctions(entries []any)
[<fn1>, <symbolic fn1>, <fn2>, <symbolic fn2>, ...]., See RegisterSymbolicGoFunction.
func Render ¶
func Render(ctx *Context, w io.Writer, renderable Renderable, config RenderingInput) (int, error)
Renders renders the renderable with a custom renderer if registered, otherwise it calls renderable.Render.
func SamePointer ¶
func SamePointer(a, b interface{}) bool
func SetDefaultMaxRequestHandlerLimits ¶
func SetDefaultMaxRequestHandlerLimits(limits []Limit)
func SetDefaultRequestHandlingLimits ¶
func SetDefaultRequestHandlingLimits(limits []Limit)
func SetDefaultScriptLimits ¶
func SetDefaultScriptLimits(limits []Limit)
func SetInitialWorkingDir ¶
func SetNewDefaultContext ¶
func SetNewDefaultContext(fn NewDefaultContextFn)
func SetNewDefaultGlobalStateFn ¶
func SetNewDefaultGlobalStateFn(fn NewDefaultGlobalStateFn)
func Share ¶
func Share[T PotentiallySharable](v T, originState *GlobalState) T
func StringifyWithConfig ¶
func StringifyWithConfig(v Value, config *PrettyPrintConfig) string
Stringify calls PrettyPrint on the passed value
func Subscribe ¶
func Subscribe(ctx *Context, subscriber Subscriber, publisher Value, filter Pattern) error
func ToJSONVal ¶
func ToJSONVal(ctx *Context, v Serializable) interface{}
func ToSerializableValueMap ¶
func ToSerializableValueMap(valMap map[string]Value) map[string]Serializable
func ToSymbolicValue ¶
func Traverse ¶
func Traverse(v Value, fn traverseVisitFn, config TraversalConfiguration) (terror error)
Traverse traverses a graph of values starting from v. Only objects, records, dictionaries, lists, tuples and treedata are considered source nodes, the other ones are sinks (leaves). A list of encountered source nodes is used to prevent cycling.
func UnsetDefaultMaxRequestHandlerLimits ¶
func UnsetDefaultMaxRequestHandlerLimits()
func UnsetDefaultRequestHandlingLimits ¶
func UnsetDefaultRequestHandlingLimits()
func UnsetDefaultScriptLimits ¶
func UnsetDefaultScriptLimits()
func UnsetNewDefaultContext ¶
func UnsetNewDefaultContext()
func UnsetNewDefaultGlobalStateFn ¶
func UnsetNewDefaultGlobalStateFn()
func WalkDirLow ¶
func WalkDirLow(fls afs.Filesystem, root string, fn fs.WalkDirFunc) error
/adapted from stdlib path/filepath/path.go
func WithoutSecondaryContextIfPossible ¶
func WithoutSecondaryContextIfPossible[T any](arg T) T
func WriteConcatenatedRepresentations ¶
func WriteConcatenatedRepresentations(ctx *Context, values ...Serializable) ([]byte, [6]int32, error)
func WriteSingleJSONRepresentation ¶
func WriteSingleJSONRepresentation(ctx *Context, v Serializable) ([]byte, [6]int32, error)
Types ¶
type API ¶
type API interface { Version() string Schema() *ObjectPattern Data() *Object }
type AddressableContent ¶
type ApiIL ¶
type ApiIL struct {
// contains filtered or unexported fields
}
func (*ApiIL) GetGoMethod ¶
func (api *ApiIL) GetGoMethod(name string) (*GoFunction, bool)
func (*ApiIL) PrettyPrint ¶
func (*ApiIL) PropertyNames ¶
type Array ¶
type Array []Value
func NewArrayFrom ¶
func (*Array) Clone ¶
func (a *Array) Clone(originState *GlobalState, sharableValues *[]PotentiallySharable, clones map[uintptr]Clonable, depth int) (Value, error)
func (*Array) Iterator ¶
func (a *Array) Iterator(ctx *Context, config IteratorConfiguration) Iterator
func (*Array) PrettyPrint ¶
type ArrayIterator ¶
type ArrayIterator struct {
// contains filtered or unexported fields
}
func (ArrayIterator) HasNext ¶
func (it ArrayIterator) HasNext(*Context) bool
func (*ArrayIterator) IsMutable ¶
func (it *ArrayIterator) IsMutable() bool
func (*ArrayIterator) Key ¶
func (it *ArrayIterator) Key(ctx *Context) Value
func (*ArrayIterator) Next ¶
func (it *ArrayIterator) Next(ctx *Context) bool
func (*ArrayIterator) PrettyPrint ¶
func (it *ArrayIterator) PrettyPrint(w *bufio.Writer, config *PrettyPrintConfig, depth int, parentIndentCount int)
func (*ArrayIterator) ToSymbolicValue ¶
func (*ArrayIterator) Value ¶
func (it *ArrayIterator) Value(*Context) Value
type ArrayPool ¶
type ArrayPool[T any] struct { // contains filtered or unexported fields }
ArrayPool is a pool providing slices of fixed length, the returned slices ("arrays") should not be modified (expect setting elements).
func NewArrayPool ¶
func (*ArrayPool[T]) AvailableArrayCount ¶
func (*ArrayPool[T]) GetArray ¶
GetArray returns a slice that should not be modified (expect setting elements).
func (*ArrayPool[T]) InUseArrayCount ¶
func (*ArrayPool[T]) ReleaseArray ¶
func (*ArrayPool[T]) TotalArrayCount ¶
type AssertionData ¶
type AssertionData struct {
// contains filtered or unexported fields
}
AssertionData is the data recorded about an assertion.
type AssertionError ¶
type AssertionError struct {
// contains filtered or unexported fields
}
An AssertionError is raised when an assertion statement fails (false condition).
func (AssertionError) Error ¶
func (err AssertionError) Error() string
func (AssertionError) IsTestAssertion ¶
func (err AssertionError) IsTestAssertion() bool
func (AssertionError) PrettyPrint ¶
func (err AssertionError) PrettyPrint(w *bufio.Writer, config *PrettyPrintConfig)
func (AssertionError) PrettySPrint ¶
func (err AssertionError) PrettySPrint(config *PrettyPrintConfig) string
func (*AssertionError) ShallowCopy ¶
func (err *AssertionError) ShallowCopy() *AssertionError
type AstNode ¶
An AstNode is an immutable Value wrapping an AST node.
func (AstNode) Chunk ¶
func (n AstNode) Chunk() *parse.ParsedChunkSource
Chunk returns the parsed chunk the node is part of.
func (AstNode) IsRecursivelyRenderable ¶
func (node AstNode) IsRecursivelyRenderable(ctx *Context, input RenderingInput) bool
func (AstNode) PrettyPrint ¶
func (AstNode) PropertyNames ¶
func (AstNode) ToSymbolicValue ¶
func (AstNode) WriteJSONRepresentation ¶
type AutoInvocationConfig ¶
type BasePermissionRiskScore ¶
type BasePermissionRiskScore struct { Type reflect.Type Kind PermissionKind Score RiskScore }
type BitSetIterator ¶
type BitSetIterator struct {
// contains filtered or unexported fields
}
func (BitSetIterator) HasNext ¶
func (it BitSetIterator) HasNext(*Context) bool
func (*BitSetIterator) IsMutable ¶
func (it *BitSetIterator) IsMutable() bool
func (*BitSetIterator) Key ¶
func (it *BitSetIterator) Key(ctx *Context) Value
func (*BitSetIterator) Next ¶
func (it *BitSetIterator) Next(ctx *Context) bool
func (*BitSetIterator) PrettyPrint ¶
func (it *BitSetIterator) PrettyPrint(w *bufio.Writer, config *PrettyPrintConfig, depth int, parentIndentCount int)
func (*BitSetIterator) ToSymbolicValue ¶
func (*BitSetIterator) Value ¶
func (it *BitSetIterator) Value(*Context) Value
type Bool ¶
type Bool bool
Bool implements Value.
func (Bool) IsRecursivelyRenderable ¶
func (b Bool) IsRecursivelyRenderable(ctx *Context, input RenderingInput) bool
func (Bool) PrettyPrint ¶
func (Bool) ToSymbolicValue ¶
func (Bool) WriteJSONRepresentation ¶
type BoolList ¶
type BoolList struct {
// contains filtered or unexported fields
}
BoolList implements underlyingList
func (*BoolList) Clone ¶
func (list *BoolList) Clone(originState *GlobalState, sharableValues *[]PotentiallySharable, clones map[uintptr]Clonable, depth int) (Serializable, error)
func (*BoolList) ConstraintId ¶
func (list *BoolList) ConstraintId() ConstraintId
func (*BoolList) ContainsSimple ¶
func (list *BoolList) ContainsSimple(ctx *Context, v Serializable) bool
func (*BoolList) Iterator ¶
func (list *BoolList) Iterator(ctx *Context, config IteratorConfiguration) Iterator
func (*BoolList) PrettyPrint ¶
func (*BoolList) ToSymbolicValue ¶
func (*BoolList) WriteJSONRepresentation ¶
type BooleanCoercible ¶
type BooleanCoercible interface {
CoerceToBool() bool
}
type BoundChildContextOptions ¶
type BoundChildContextOptions struct {
Filesystem afs.Filesystem
}
type BreakpointInfo ¶
type BreakpointInfo struct { NodeSpan parse.NodeSpan //zero if the breakpoint is not set Chunk *parse.ParsedChunkSource Id int32 //unique for a given debugger StartLine int32 StartColumn int32 }
func GetBreakpointsFromLines ¶
func GetBreakpointsFromLines(lines []int, chunk *parse.ParsedChunkSource, nextBreakpointId *int32) ([]BreakpointInfo, error)
func (BreakpointInfo) Verified ¶
func (i BreakpointInfo) Verified() bool
type BuiltinType ¶
type BuiltinType struct {
// contains filtered or unexported fields
}
func (*BuiltinType) GoType ¶
func (t *BuiltinType) GoType() reflect.Type
func (*BuiltinType) Symbolic ¶
func (t *BuiltinType) Symbolic() symbolic.CompileTimeType
type Byte ¶
type Byte byte
Byte implements Value.
func (Byte) PrettyPrint ¶
func (Byte) ToSymbolicValue ¶
func (Byte) WriteJSONRepresentation ¶
type ByteCount ¶
type ByteCount int64
ByteCount implements Value.
func (ByteCount) IsZeroQuantity ¶
func (ByteCount) PrettyPrint ¶
func (ByteCount) ToSymbolicValue ¶
func (ByteCount) WriteJSONRepresentation ¶
type ByteRate ¶
type ByteRate int64
A ByteRate represents a number of bytes per second, it implements Value.
func (ByteRate) IsZeroRate ¶
func (ByteRate) PrettyPrint ¶
func (ByteRate) QuantityPerSecond ¶
func (ByteRate) ToSymbolicValue ¶
func (ByteRate) WriteJSONRepresentation ¶
type ByteSlice ¶
type ByteSlice struct {
// contains filtered or unexported fields
}
ByteSlice implements Value, its mutability is set at creation.
func NewImmutableByteSlice ¶
func NewMutableByteSlice ¶
func (*ByteSlice) Clone ¶
func (slice *ByteSlice) Clone(originState *GlobalState, sharableValues *[]PotentiallySharable, clones map[uintptr]Clonable, depth int) (Serializable, error)
func (*ByteSlice) ContentType ¶
ContentType returns the content type specified at creation. If no content type was specified mimeconsts.APP_OCTET_STREAM_CTYPE is returned instead.
func (*ByteSlice) GetOrBuildBytes ¶
func (*ByteSlice) Iterator ¶
func (s *ByteSlice) Iterator(ctx *Context, config IteratorConfiguration) Iterator
func (*ByteSlice) OnMutation ¶
func (s *ByteSlice) OnMutation(ctx *Context, microtask MutationCallbackMicrotask, config MutationWatchingConfiguration) (CallbackHandle, error)
func (*ByteSlice) PrettyPrint ¶
func (*ByteSlice) RemoveMutationCallback ¶
func (s *ByteSlice) RemoveMutationCallback(ctx *Context, handle CallbackHandle)
func (*ByteSlice) RemoveMutationCallbackMicrotasks ¶
func (*ByteSlice) ToSymbolicValue ¶
func (*ByteSlice) UnderlyingBytes ¶
func (*ByteSlice) UnsafeBytesAsString ¶
func (*ByteSlice) Watcher ¶
func (s *ByteSlice) Watcher(ctx *Context, config WatcherConfiguration) Watcher
func (*ByteSlice) WriteJSONRepresentation ¶
type Bytecode ¶
type Bytecode struct {
// contains filtered or unexported fields
}
A Bytecode contains the constants and a reference to a *CompiledFunction. The bytecode instructions are in the *CompiledFunction.
func Compile ¶
func Compile(input CompilationInput) (*Bytecode, error)
Compile compiles a module to bytecode.
func (*Bytecode) Constants ¶
Constants returns the constants used during bytecode interpretation, the slice should not be modified.
func (*Bytecode) FormatConstants ¶
FormatConstants returns a human readable representation of compiled constants.
func (*Bytecode) FormatInstructions ¶
func (*Bytecode) PrettyPrint ¶
func (*Bytecode) ToSymbolicValue ¶
func (*Bytecode) WriteJSONRepresentation ¶
type BytesConcatenation ¶
type BytesConcatenation struct {
// contains filtered or unexported fields
}
BytesConcatenation is a lazy concatenation of values that can form a byte slice, BytesConcatenation implements BytesLike.
func NewBytesConcatenation ¶
func NewBytesConcatenation(bytesLikes ...BytesLike) *BytesConcatenation
func (*BytesConcatenation) Clone ¶
func (c *BytesConcatenation) Clone(originState *GlobalState, sharableValues *[]PotentiallySharable, clones map[uintptr]Clonable, depth int) (Serializable, error)
func (*BytesConcatenation) GetOrBuildBytes ¶
func (c *BytesConcatenation) GetOrBuildBytes() *ByteSlice
func (*BytesConcatenation) IsMutable ¶
func (c *BytesConcatenation) IsMutable() bool
func (*BytesConcatenation) Iterator ¶
func (c *BytesConcatenation) Iterator(ctx *Context, config IteratorConfiguration) Iterator
func (*BytesConcatenation) Len ¶
func (c *BytesConcatenation) Len() int
func (*BytesConcatenation) Mutable ¶
func (c *BytesConcatenation) Mutable() bool
func (*BytesConcatenation) PrettyPrint ¶
func (c *BytesConcatenation) PrettyPrint(w *bufio.Writer, config *PrettyPrintConfig, depth int, parentIndentCount int)
func (*BytesConcatenation) SetSlice ¶
func (c *BytesConcatenation) SetSlice(ctx *Context, start, end int, seq Sequence)
func (*BytesConcatenation) ToSymbolicValue ¶
func (*BytesConcatenation) WriteJSONRepresentation ¶
func (c *BytesConcatenation) WriteJSONRepresentation(ctx *Context, w *jsoniter.Stream, config JSONSerializationConfig, depth int) error
type BytesLike ¶
type BytesLike interface { MutableSequence Iterable GetOrBuildBytes() *ByteSlice Mutable() bool }
A BytesLike represents an abstract byte slice, it should behave exactly like a regular ByteSlice and have the same pseudo properties.
func ConcatBytesLikes ¶
type CallbackHandle ¶
type CallbackHandle int
see FIRST_VALID_CALLBACK_HANDLE
func (CallbackHandle) Valid ¶
func (h CallbackHandle) Valid() bool
type Change ¶
type Change struct {
// contains filtered or unexported fields
}
A Change is an immutable Value that stores the data about a modification (Mutation) and some metadata such as the moment in time where the mutation happpened.
type CheckedString ¶
type CheckedString struct {
// contains filtered or unexported fields
}
func NewCheckedString ¶
func NewCheckedString(slices []Value, node *parse.StringTemplateLiteral, ctx *Context) (CheckedString, error)
NewCheckedString creates a CheckedString in a secure way.
func (CheckedString) IsMutable ¶
func (str CheckedString) IsMutable() bool
func (CheckedString) PrettyPrint ¶
func (str CheckedString) PrettyPrint(w *bufio.Writer, config *PrettyPrintConfig, depth int, parentIndentCount int)
func (CheckedString) PropertyNames ¶
func (str CheckedString) PropertyNames(ctx *Context) []string
func (CheckedString) SetProp ¶
func (CheckedString) SetProp(ctx *Context, name string, value Value) error
func (CheckedString) String ¶
func (str CheckedString) String() string
func (CheckedString) ToSymbolicValue ¶
func (CheckedString) UnderlyingString ¶
func (str CheckedString) UnderlyingString() string
func (CheckedString) WriteJSONRepresentation ¶
func (str CheckedString) WriteJSONRepresentation(ctx *Context, w *jsoniter.Stream, config JSONSerializationConfig, depth int) error
type Clonable ¶
type Clonable interface { Value //Clone clones the value, properties and elements are cloned by calling CheckSharedOrClone if both originState and sharableValues are nil. //ShareOrClone otherwise. Clone(originState *GlobalState, sharableValues *[]PotentiallySharable, clones map[uintptr]Clonable, depth int) (Value, error) }
Clonable is implemented by Values that can be at least shallow cloned.
type ClonableSerializable ¶
type ClonableSerializable interface { Serializable //Clone clones the value, properties and elements are cloned by calling CheckSharedOrClone if both originState and sharableValues are nil. //ShareOrClone otherwise. Clone(originState *GlobalState, sharableValues *[]PotentiallySharable, clones map[uintptr]Clonable, depth int) (Serializable, error) }
ClonableSerializable is implemented by Serializables that can be at least shallow cloned.
type Collection ¶
type Collection interface { Container //GetElementByKey should retrieve the element with the associated key. //ErrCollectionElemNotFound should be returned in the case of an error. //Implementation-specific errors are allowed. GetElementByKey(ctx *Context, key ElementKey) (Serializable, error) }
type Color ¶
type Color struct {
// contains filtered or unexported fields
}
A Color represents a color in a given encoding.
func ColorFromAnsi256Color ¶
func ColorFromAnsi256Color(c termenv.ANSI256Color) Color
func ColorFromAnsiColor ¶
func ColorFromRGB24 ¶
func ColorFromTermenvColor ¶
func (Color) GetAnsiEscapeSequence ¶
func (Color) IsDarkBackgroundColor ¶
func (Color) PrettyPrint ¶
func (Color) ToSymbolicValue ¶
func (Color) ToTermColor ¶
func (Color) WriteJSONRepresentation ¶
type ColorizationInfo ¶
func GetNodeColorizations ¶
func GetNodeColorizations(chunk *parse.Chunk, lightMode bool) []ColorizationInfo
type CommandPermission ¶
type CommandPermission struct { CommandName WrappedString //string or Path or PathPattern SubcommandNameChain []string //can be empty }
func (CommandPermission) Includes ¶
func (perm CommandPermission) Includes(otherPerm Permission) bool
func (CommandPermission) InternalPermTypename ¶
func (perm CommandPermission) InternalPermTypename() permkind.InternalPermissionTypename
func (CommandPermission) Kind ¶
func (perm CommandPermission) Kind() PermissionKind
func (CommandPermission) String ¶
func (perm CommandPermission) String() string
type Comparable ¶
type Comparable interface { Value //Compare should return (0, false) if the values are not comparable. Otherwise it sould return true and one of the following: // (-1) a < b // (0) a == b // (1) a > b // The Equal method of the implementations should be consistent with Compare. Compare(b Value) (result int, comparable bool) }
type CompilationInput ¶
type CompileError ¶
func (*CompileError) Error ¶
func (e *CompileError) Error() string
type CompileTimeType ¶
type CompileTimeType interface { Symbolic() symbolic.CompileTimeType GoType() reflect.Type }
type CompiledFunction ¶
type CompiledFunction struct { ParamCount int IsVariadic bool LocalCount int // includes parameters Instructions []byte SourceMap map[int]instructionSourcePosition Bytecode *Bytecode //bytecode containing the function SourceNodeSpan parse.NodeSpan IncludedChunk *parse.ParsedChunkSource //set if the function is defined in an included chunk }
A CompiledFunction contains the bytecode instructions of a module or a compiled Inox function. The compilation of a module produces a *CompiledFunction that is the "main" function.
func (*CompiledFunction) GetSourcePositionRange ¶
func (fn *CompiledFunction) GetSourcePositionRange(ip int) parse.SourcePositionRange
GetSourcePositionRange returns the position in source code of the instruction at the ip address, several subsequent instructions can have the same position.
type ComplexPropertyConstraint ¶
type ComplexPropertyConstraint struct { NotCallablePatternMixin Properties []string Expr parse.Node }
type ConfluenceStream ¶
type ConfluenceStream struct {
// contains filtered or unexported fields
}
A ConfluenceStream is a ReadableStream that results from the merger of 2 or more streams. ConfluenceStream was developped to combine the output & error output streams of the inox REPL but the current implementation is somewhat incorrect. TODO: change the way the data is read, one possibility is to make the streams PUSH their data in a buffer.
func NewConfluenceStream ¶
func NewConfluenceStream(ctx *Context, streams []ReadableStream) (*ConfluenceStream, error)
func (*ConfluenceStream) ChunkDataType ¶
func (s *ConfluenceStream) ChunkDataType() Pattern
func (*ConfluenceStream) IsMainlyChunked ¶
func (s *ConfluenceStream) IsMainlyChunked() bool
func (*ConfluenceStream) IsMutable ¶
func (*ConfluenceStream) IsMutable() bool
func (*ConfluenceStream) IsStopped ¶
func (s *ConfluenceStream) IsStopped() bool
func (*ConfluenceStream) PrettyPrint ¶
func (s *ConfluenceStream) PrettyPrint(w *bufio.Writer, config *PrettyPrintConfig, depth int, parentIndentCount int)
func (*ConfluenceStream) Stop ¶
func (s *ConfluenceStream) Stop()
func (*ConfluenceStream) Stream ¶
func (s *ConfluenceStream) Stream(ctx *Context, config *ReadableStreamConfiguration) ReadableStream
func (*ConfluenceStream) ToSymbolicValue ¶
func (*ConfluenceStream) WaitNextChunk ¶
type ConstraintId ¶
type ConstraintId uint64
A ConstraintId represents an id that is used to retrieve the constraints on a Value.
func (ConstraintId) HasConstraint ¶
func (id ConstraintId) HasConstraint() bool
type Container ¶
type Container interface { Serializable Iterable //Contains should return true: // - if the value has a URL AND there is an element such as Same(element, value) is true. // - if the value has not a URL AND there is an element equal to value. Contains(ctx *Context, value Serializable) bool IsEmpty(ctx *Context) bool }
The Container interface should be implemented by data structures able to tell if they contain a specific value. Implementations can contain an infinite number of values.
type Context ¶
A Context is analogous to contexts provided by the context package from Golang's stdlib: when the context is cancelled all descendant contexts are cancelled as well. All *GlobalState instances have a context. An Inox Context have several roles: - It stores named patterns, pattern namespaces, host aliases and other module's data. - It is called by the runtime and native functions to check permissions and enforce limits. - It has a reference to the current transaction. - During graceful teardown it calls functions registered with OnGracefulTearDown. - After cancellation it executes microtasks registered with OnDone.
func NewContexWithEmptyState ¶
func NewContexWithEmptyState(config ContextConfig, out io.Writer) *Context
NewContexWithEmptyState creates a context & an empty state, out is used as the state's output (or io.Discard if nil), OutputFieldsInitialized is set to true.
func NewContext ¶
func NewContext(config ContextConfig) *Context
NewContext creates a new context, if a parent context is provided the embedded context.Context will be context.WithCancel(parentContext), otherwise it will be context.WithCancel(context.Background()).
func (*Context) AddHostAlias ¶
AddHostAlias associates a Host with the passed alias name, if the alias is already defined the function will panic.
func (*Context) AddHostDefinition ¶
func (ctx *Context) AddHostDefinition(h Host, data ResourceName)
AddHostDefinition adds a host definition, redefining a host causes the function to panic with ErrNotUniqueHostDefinitionDefinition.
func (*Context) AddNamedPattern ¶
AddNamedPattern associates a Pattern with the passed pattern name, if the pattern is already defined the function will panic.
func (*Context) AddPatternNamespace ¶
func (ctx *Context) AddPatternNamespace(name string, namespace *PatternNamespace)
AddPatternNamespace associates a *PatternNamespace with the passed pattern name, if the pattern is already defined the function will panic.
func (*Context) AddTypeExtension ¶
func (ctx *Context) AddTypeExtension(extension *TypeExtension)
func (*Context) BoundChild ¶
BoundChild creates a child of the context that also inherits callbacks, named patterns, host aliases and protocol clients.
func (*Context) BoundChildWithOptions ¶
func (ctx *Context) BoundChildWithOptions(opts BoundChildContextOptions) *Context
func (*Context) CancelGracefully ¶
func (ctx *Context) CancelGracefully()
CancelGracefully calls the graceful teardown tasks one by one synchronously, then the context is truly cancelled. TODO: add cancellation cause
func (*Context) CancelIfShortLived ¶
func (ctx *Context) CancelIfShortLived()
func (*Context) CancelUngracefully ¶
func (ctx *Context) CancelUngracefully()
CancelUngracefully directly cancels the go context, CancelGracefully should always be called instead.
func (*Context) CheckHasPermission ¶
func (ctx *Context) CheckHasPermission(perm Permission) error
CheckHasPermission checks if the passed permission is present in the Context, if the permission is not present a NotAllowedError is returned.
func (*Context) DefinitelyStopCPUTimeDepletion ¶
func (*Context) DefinitelyStopTokenDepletion ¶
func (*Context) DropPermissions ¶
func (ctx *Context) DropPermissions(droppedPermissions []Permission)
DropPermissions removes all passed permissions from the context.
func (*Context) ForEachHostAlias ¶
func (*Context) ForEachNamedPattern ¶
func (*Context) ForEachPatternNamespace ¶
func (ctx *Context) ForEachPatternNamespace(fn func(name string, namespace *PatternNamespace) error) error
func (*Context) GetAllHostDefinitions ¶
func (*Context) GetByteRate ¶
GetByteRate returns the value (rate) of a byte rate limit.
func (*Context) GetClosestState ¶
func (ctx *Context) GetClosestState() *GlobalState
func (*Context) GetFileSystem ¶
func (ctx *Context) GetFileSystem() afs.Filesystem
func (*Context) GetForbiddenPermissions ¶
func (ctx *Context) GetForbiddenPermissions() []Permission
func (*Context) GetGrantedPermissions ¶
func (ctx *Context) GetGrantedPermissions() []Permission
func (*Context) GetHostAliases ¶
func (*Context) GetHostByDefinition ¶
func (ctx *Context) GetHostByDefinition(r ResourceName) (Host, bool)
func (*Context) GetHostDefinition ¶
func (*Context) GetNamedPatterns ¶
func (*Context) GetPatternNamespaces ¶
func (ctx *Context) GetPatternNamespaces() map[string]*PatternNamespace
func (*Context) GetProtolClient ¶
func (ctx *Context) GetProtolClient(u URL) (ProtocolClient, error)
func (*Context) GetState ¶
func (ctx *Context) GetState() (*GlobalState, bool)
GetState returns the state associated with the context, the boolean is false if the state is not set. To get the closest state GetClosestState() should be used.
func (*Context) GetTempDir ¶
func (*Context) GetTx ¶
func (ctx *Context) GetTx() *Transaction
func (*Context) GetTypeExtension ¶
func (ctx *Context) GetTypeExtension(id string) *TypeExtension
func (*Context) GetWaitConfirmPrompt ¶
func (ctx *Context) GetWaitConfirmPrompt() WaitConfirmPrompt
func (*Context) GiveBack ¶
GiveBack gives backs an amount of tokens from the bucket associated with a limit. The token count is scaled so the passed count is not the given back amount.
func (*Context) GracefulTearDownStatus ¶
func (ctx *Context) GracefulTearDownStatus() GracefulTeardownStatus
func (*Context) HasAPermissionWithKindAndType ¶
func (ctx *Context) HasAPermissionWithKindAndType(kind permkind.PermissionKind, typename permkind.InternalPermissionTypename) bool
THIS FUNCTION SHOULD NEVER BE USED apart from the symbolic package
func (*Context) HasCurrentTx ¶
func (*Context) HasPermission ¶
func (ctx *Context) HasPermission(perm Permission) bool
HasPermission checks if the passed permission is present in the Context. The passed permission is first checked against forbidden permissions: if it is included in one of them, false is returned.
func (*Context) HasPermissionUntyped ¶
THIS FUNCTION SHOULD NEVER BE USED apart from the symbolic package
func (*Context) InefficientlyWaitUntilTearedDown ¶
func (*Context) InitialWorkingDirectory ¶
func (*Context) IsDoneSlowCheck ¶
func (*Context) IsLongLived ¶
func (*Context) IsTearedDown ¶
IsTearedDown returns true if the context is done and the 'done' microtasks have been called.
func (*Context) IsValueVisible ¶
func (*Context) New ¶
New creates a new context with the same permissions, limits, host data, patterns, aliases & protocol clients, if the context has no parent the token counts are copied, the new context does not "share" data with the older context.
func (*Context) NewChildLoggerForInternalSource ¶
func (*Context) OnDone ¶
func (ctx *Context) OnDone(microtask ContextDoneMicrotaskFn)
func (*Context) OnGracefulTearDown ¶
func (ctx *Context) OnGracefulTearDown(task GracefulTearDownTaskFn)
func (*Context) PauseCPUTimeDepletion ¶
func (*Context) PauseCPUTimeDepletionIfNotPaused ¶
func (*Context) PauseTokenDepletion ¶
func (*Context) PromoteToLongLived ¶
func (ctx *Context) PromoteToLongLived()
func (*Context) PutUserData ¶
PutUserData associates $value with the passed name, if the entry is already defined the function will panic. $value must be sharable or clonable.
func (*Context) ResolveHostAlias ¶
ResolveHostAlias returns the Host associated with the passed alias name, if the alias does not exist nil is returned.
func (*Context) ResolveNamedPattern ¶
ResolveNamedPattern returns the pattern associated with the passed name, if the pattern does not exist nil is returned.
func (*Context) ResolvePatternNamespace ¶
func (ctx *Context) ResolvePatternNamespace(name string) *PatternNamespace
ResolvePatternNamespace returns the pattern namespace associated with the passed name, if the namespace does not exist nil is returned.
func (*Context) ResolveUserData ¶
ResolveUserData returns the user data associated with the passed identifier, if the data does not exist nil is returned.
func (*Context) ResumeCPUTimeDepletion ¶
func (*Context) ResumeDepletion ¶
func (*Context) SetClosestState ¶
func (ctx *Context) SetClosestState(state *GlobalState)
func (*Context) SetProtocolClientForHost ¶
func (ctx *Context) SetProtocolClientForHost(h Host, client ProtocolClient) error
func (*Context) SetProtocolClientForURL ¶
func (ctx *Context) SetProtocolClientForURL(u URL, client ProtocolClient) error
func (*Context) SetWaitConfirmPrompt ¶
func (ctx *Context) SetWaitConfirmPrompt(fn WaitConfirmPrompt)
type ContextConfig ¶
type ContextConfig struct { Kind ContextKind Permissions []Permission ForbiddenPermissions []Permission DoNotCheckDatabasePerms bool //if (cpu time limit is not present) AND (parent context has it) then the limit is inherited. //The depletion of total limits' tokens for the created context starts when the associated state is set. Limits []Limit HostDefinitions map[Host]Value TypeExtensions []*TypeExtension OwnedDatabases []DatabaseConfig ParentContext *Context ParentStdLibContext context.Context //should not be set if ParentContext is set LimitTokens map[string]int64 Filesystem afs.Filesystem CreateFilesystem func(ctx *Context) (afs.Filesystem, error) // if false the context's filesystem is the result of WithSecondaryContextIfPossible(ContextConfig.Filesystem), // else the context's filesystem is ContextConfig.Filesystem. DoNotSetFilesystemContext bool InitialWorkingDirectory Path //if not set defaults to '/' // if false a goroutine is created to tear down the context after it is done. // if true IsDone() will always return false until CancelGracefully is called. DoNotSpawnDoneGoroutine bool WaitConfirmPrompt WaitConfirmPrompt }
func (ContextConfig) Check ¶
func (c ContextConfig) Check() (firstErr error, ok bool)
If .ParentContext is set Check verifies that: - the parent have at least the permissions required by the child - the parent have less restrictive limits than the child - no host definition of the parent is overriden
type ContextDoneMicrotaskFn ¶
type ContextDoneMicrotaskFn func(timeoutCtx context.Context, teardownStatus GracefulTeardownStatus) error
A ContextDoneMicrotaskFn should run for a short time (less than 1ms), the calling context should not be access because it is locked.
type CurrentTest ¶
type CurrentTest struct {
// contains filtered or unexported fields
}
func (*CurrentTest) GetGoMethod ¶
func (t *CurrentTest) GetGoMethod(name string) (*GoFunction, bool)
func (*CurrentTest) IsMutable ¶
func (*CurrentTest) IsMutable() bool
func (*CurrentTest) PrettyPrint ¶
func (t *CurrentTest) PrettyPrint(w *bufio.Writer, config *PrettyPrintConfig, depth int, parentIndentCount int)
func (*CurrentTest) PropertyNames ¶
func (*CurrentTest) PropertyNames(ctx *Context) []string
func (*CurrentTest) SetProp ¶
func (*CurrentTest) SetProp(ctx *Context, name string, value Value) error
func (*CurrentTest) ToSymbolicValue ¶
type CustomPermissionTypeHandler ¶
type CustomPermissionTypeHandler func(kind PermissionKind, name string, value Value) (perms []Permission, handled bool, err error)
type DNSPermission ¶
type DNSPermission struct { Kind_ PermissionKind Domain WrappedString //Host | HostPattern }
func (DNSPermission) Includes ¶
func (perm DNSPermission) Includes(otherPerm Permission) bool
func (DNSPermission) InternalPermTypename ¶
func (perm DNSPermission) InternalPermTypename() permkind.InternalPermissionTypename
func (DNSPermission) Kind ¶
func (perm DNSPermission) Kind() PermissionKind
func (DNSPermission) String ¶
func (perm DNSPermission) String() string
type DataChunk ¶
type DataChunk struct {
// contains filtered or unexported fields
}
A DataChunk represents a chunk of any kind of data, DataChunk implements Value.
func (*DataChunk) GetGoMethod ¶
func (*DataChunk) GetGoMethod(name string) (*GoFunction, bool)
func (*DataChunk) PrettyPrint ¶
func (*DataChunk) PropertyNames ¶
type Database ¶
type Database interface { Resource() SchemeHolder Schema() *ObjectPattern //UpdateSchema updates the schema and validates the content of the database, //this method should return ErrTopLevelEntitiesAlreadyLoaded if it is called after .TopLevelEntities. //The caller should always pass a schema whose ALL entry patterns have a loading function. UpdateSchema(ctx *Context, schema *ObjectPattern, migrationHandlers MigrationOpHandlers) LoadTopLevelEntities(ctx *Context) (map[string]Serializable, error) Close(ctx *Context) error }
Database is a high-level interface for a database that stores Inox values. DatabaseIL wraps Database.
type DatabaseConfig ¶
type DatabaseConfig struct { Name string //declared name, this is NOT the basename. Resource SchemeHolder //URL or Host ResolutionData Value //ResourceName or Nil ExpectedSchemaUpdate bool ExpectedSchema *ObjectPattern //can be nil, not related to .ExpectedSchemaUpdate Owned bool Provided *DatabaseIL //optional (can be provided by another module instance) }
A DatabaseConfig represent the configuration of a database accessed by a module. The configurations of databases owned by a module are defined in the databases section of the manifest. When a module B needs a database owned (defined) by another module A, a DatabaseConfig with a set .Provided field is added to the manifest of B.
func (DatabaseConfig) IsPermissionForThisDB ¶
func (c DatabaseConfig) IsPermissionForThisDB(perm DatabasePermission) bool
type DatabaseConfigs ¶
type DatabaseConfigs []DatabaseConfig
type DatabaseIL ¶
type DatabaseIL struct {
// contains filtered or unexported fields
}
DatabaseIL (D.atabase I.nox L.and) is an Inox Value that wraps a Database, it exposes a 'update_schema' Inox property and has an Inox property for each top level entity in the database.
func WrapDatabase ¶
func WrapDatabase(ctx *Context, args DatabaseWrappingArgs) (*DatabaseIL, error)
WrapDatabase wraps a Database in a *DatabaseIL. In dev mode if the current schema does not match ExpectedSchema a DatbaseIL is returned alongside the error.
func (*DatabaseIL) AddOwnerStateTeardownCallback ¶
func (db *DatabaseIL) AddOwnerStateTeardownCallback()
func (*DatabaseIL) Close ¶
func (db *DatabaseIL) Close(ctx *Context) error
func (*DatabaseIL) GetGoMethod ¶
func (db *DatabaseIL) GetGoMethod(name string) (*GoFunction, bool)
func (*DatabaseIL) GetOrLoad ¶
func (db *DatabaseIL) GetOrLoad(ctx *Context, path Path) (Serializable, error)
GetOrLoad retrieves an entity or value stored inside the database.
func (*DatabaseIL) IsMutable ¶
func (*DatabaseIL) IsMutable() bool
func (*DatabaseIL) IsPermissionForThisDB ¶
func (db *DatabaseIL) IsPermissionForThisDB(perm DatabasePermission) bool
func (*DatabaseIL) PrettyPrint ¶
func (db *DatabaseIL) PrettyPrint(w *bufio.Writer, config *PrettyPrintConfig, depth int, parentIndentCount int)
func (*DatabaseIL) PropertyNames ¶
func (db *DatabaseIL) PropertyNames(ctx *Context) []string
func (*DatabaseIL) Resource ¶
func (db *DatabaseIL) Resource() SchemeHolder
func (*DatabaseIL) SetOwnerStateOnceAndLoadIfNecessary ¶
func (db *DatabaseIL) SetOwnerStateOnceAndLoadIfNecessary(ctx *Context, state *GlobalState) error
func (*DatabaseIL) SetProp ¶
func (*DatabaseIL) SetProp(ctx *Context, name string, value Value) error
func (*DatabaseIL) ToSymbolicValue ¶
func (*DatabaseIL) TopLevelEntitiesLoaded ¶
func (db *DatabaseIL) TopLevelEntitiesLoaded() bool
func (*DatabaseIL) UpdateSchema ¶
func (db *DatabaseIL) UpdateSchema(ctx *Context, nextSchema *ObjectPattern, migrations ...*Object)
type DatabasePermission ¶
type DatabasePermission struct { Kind_ PermissionKind Entity WrappedString }
func (DatabasePermission) Includes ¶
func (perm DatabasePermission) Includes(otherPerm Permission) bool
func (DatabasePermission) InternalPermTypename ¶
func (perm DatabasePermission) InternalPermTypename() permkind.InternalPermissionTypename
func (DatabasePermission) Kind ¶
func (perm DatabasePermission) Kind() PermissionKind
func (DatabasePermission) String ¶
func (perm DatabasePermission) String() string
type DatabaseWrappingArgs ¶
type DatabaseWrappingArgs struct { Name string Inner Database OwnerState *GlobalState //if nil the owner state should be set later by calling SetOwnerStateOnceAndLoadIfNecessary //If true the database is not loaded until the schema has been updated. //This field is unrelated to ExpectedSchema. ExpectedSchemaUpdate bool //If not nil the current schema is compared to the expected schema. //The comparison is performed after any schema update. //This field is unrelated to ExpectedSchemaUpdate. ExpectedSchema *ObjectPattern //Force the loading top level entities if there is not expected schema update. //This parameter has lower priority than DevMode. ForceLoadBeforeOwnerStateSet bool //In dev mode top level entities are never loaded, and a mismatch between //the current schema and the expected schema causes the expected schema to be used. DevMode bool }
type Date ¶
Date implements Value.
func (Date) PrettyPrint ¶
func (Date) ToSymbolicValue ¶
func (Date) WriteJSONRepresentation ¶
type DateFormat ¶
type DateFormat struct { *ParserBasedPseudoPattern NamespaceMemberPatternReprMixin // contains filtered or unexported fields }
func NewDateFormat ¶
func NewDateFormat(layout, namespaceMemberName string) *DateFormat
func (*DateFormat) ToSymbolicValue ¶
func (DateFormat) WriteJSONRepresentation ¶
func (patt DateFormat) WriteJSONRepresentation(ctx *Context, w *jsoniter.Stream, config JSONSerializationConfig, depth int) error
type DateTime ¶
See stdlib's time.Time, DateTime implements Value.
func (DateTime) IsRecursivelyRenderable ¶
func (d DateTime) IsRecursivelyRenderable(ctx *Context, input RenderingInput) bool
func (DateTime) PrettyPrint ¶
func (DateTime) ToSymbolicValue ¶
func (DateTime) WriteJSONRepresentation ¶
type DbOpenConfiguration ¶
type DbOpenConfiguration struct { Resource SchemeHolder ResolutionData Value FullAccess bool Project Project }
type DebugCommandCloseDebugger ¶
type DebugCommandCloseDebugger struct { CancelExecution bool Done func() }
type DebugCommandContinue ¶
type DebugCommandGetScopes ¶
type DebugCommandGetStackTrace ¶
type DebugCommandGetStackTrace struct { Get func(trace []StackFrameInfo) ThreadId StateId }
type DebugCommandInformAboutSecondaryEvent ¶
type DebugCommandInformAboutSecondaryEvent struct {
Event SecondaryDebugEvent
}
type DebugCommandNextStep ¶
type DebugCommandPause ¶
type DebugCommandPause struct {
ThreadId StateId
}
func (DebugCommandPause) GetThreadId ¶
func (c DebugCommandPause) GetThreadId() StateId
type DebugCommandSetBreakpoints ¶
type DebugCommandSetBreakpoints struct { //nodes where we want to set a breakpoint, this can be set independently from .BreakPointsByLine BreakpointsAtNode map[parse.Node]struct{} //lines where we want to set a breakpoint, this can be set independently from .BreakpointsAtNode. //GetBreakpointsSetByLine is invoked with the resulting breakpoints, some of them can be disabled. BreakPointsByLine []int Chunk *parse.ParsedChunkSource GetBreakpointsSetByLine func(breakpoints []BreakpointInfo) }
type DebugCommandStepIn ¶
type DebugCommandStepOut ¶
type Debugger ¶
type Debugger struct {
// contains filtered or unexported fields
}
A Debugger enables the debugging of a running Inox program by handling debug commands sent to its control channel (ControlChan()). Events should be continuously read from StoppedChan() and SecondaryEventsChan() by the user of Debugger.
Commands are handled in a separate goroutine that is created by the AttachAndStart method.
func NewDebugger ¶
func NewDebugger(args DebuggerArgs) *Debugger
func (*Debugger) AttachAndStart ¶
func (d *Debugger) AttachAndStart(state evaluationState)
AttachAndStart attaches the debugger to state & starts the debugging goroutine.
func (*Debugger) ControlChan ¶
ControlChan returns a channel to which debug commands should be sent.
func (*Debugger) ExceptionBreakpointsId ¶
func (*Debugger) SecondaryEventsChan ¶
func (d *Debugger) SecondaryEventsChan() chan SecondaryDebugEvent
SecondaryEventsChan returns a channel that sends secondary events received by the debugger.
func (*Debugger) StoppedChan ¶
func (d *Debugger) StoppedChan() chan ProgramStoppedEvent
StoppedChan returns a channel that sends an item each time the program stops.
func (*Debugger) ThreadIfOfStackFrame ¶
func (*Debugger) Threads ¶
func (d *Debugger) Threads() (threads []ThreadInfo)
type DebuggerArgs ¶
type DebuggerArgs struct { Logger zerolog.Logger //ok if not set InitialBreakpoints []BreakpointInfo //if not set exception breakpoints are not enabled, // this argument is ignored if parent is set ExceptionBreakpointId int32 //cancelling this context will cause the debugger to close. //the debugger uses this context's filesystem. Context *Context // contains filtered or unexported fields }
type DefaultContextConfig ¶
type DefaultContextConfig struct { Permissions []Permission ForbiddenPermissions []Permission DoNotCheckDatabasePerms bool //used for the configuration of the created context. Limits []Limit HostDefinitions map[Host]Value OwnedDatabases []DatabaseConfig ParentContext *Context //optional ParentStdLibContext context.Context //optional, should not be set if ParentContext is set //if nil the parent context's filesystem is used. Filesystem afs.Filesystem InitialWorkingDirectory Path //optional, should be passed without modification to NewContext. }
DefaultContextConfig is the configured passed to the default context factory.
type DefaultGlobalStateConfig ¶
type DefaultGlobalStateConfig struct { //if set MODULE_DIRPATH_GLOBAL_NAME & MODULE_FILEPATH_GLOBAL_NAME should be defined. AbsoluteModulePath string //if set APP_LISTENING_ADDR ApplicationListeningAddr Host EnvPattern *ObjectPattern PreinitFiles PreinitFiles AllowMissingEnvVars bool Out io.Writer LogOut io.Writer //ignore if .Logger is set Logger zerolog.Logger LogLevels *LogLevels }
DefaultGlobalStateConfig is the configured passed to the default state factory.
type DefaultValuePattern ¶
DefaultValuePattern is implemented by patterns that in most cases can provide a default value that matches them. ErrNoDefaultValue should be returned if it's not possible. If the default value is mutable a new instance of the default value should be returned each time (no reuse).
type Dictionary ¶
type Dictionary struct {
// contains filtered or unexported fields
}
A Dictionnary maps representable values (keys) to any values, Dictionar implements Value.
func NewDictionary ¶
func NewDictionary(entries ValMap) *Dictionary
func NewDictionaryFromKeyValueLists ¶
func NewDictionaryFromKeyValueLists(keys []Serializable, values []Serializable, ctx *Context) *Dictionary
func (*Dictionary) Clone ¶
func (dict *Dictionary) Clone(originState *GlobalState, sharableValues *[]PotentiallySharable, clones map[uintptr]Clonable, depth int) (Serializable, error)
func (*Dictionary) ForEachEntry ¶
func (d *Dictionary) ForEachEntry(ctx *Context, fn func(keyRepr string, key Serializable, v Serializable) error) error
func (*Dictionary) IsMutable ¶
func (dict *Dictionary) IsMutable() bool
func (*Dictionary) OnMutation ¶
func (d *Dictionary) OnMutation(ctx *Context, microtask MutationCallbackMicrotask, config MutationWatchingConfiguration) (CallbackHandle, error)
func (*Dictionary) PrettyPrint ¶
func (dict *Dictionary) PrettyPrint(w *bufio.Writer, config *PrettyPrintConfig, depth int, parentIndentCount int)
func (*Dictionary) PropertyNames ¶
func (*Dictionary) PropertyNames(ctx *Context) []string
func (*Dictionary) RemoveMutationCallback ¶
func (d *Dictionary) RemoveMutationCallback(ctx *Context, handle CallbackHandle)
func (*Dictionary) RemoveMutationCallbackMicrotasks ¶
func (d *Dictionary) RemoveMutationCallbackMicrotasks(ctx *Context)
func (*Dictionary) SetProp ¶
func (*Dictionary) SetProp(ctx *Context, name string, value Value) error
func (*Dictionary) SetValue ¶
func (d *Dictionary) SetValue(ctx *Context, key, value Serializable)
func (*Dictionary) ToSymbolicValue ¶
func (*Dictionary) Value ¶
func (d *Dictionary) Value(ctx *Context, key Serializable) (Value, Bool)
func (*Dictionary) Watcher ¶
func (d *Dictionary) Watcher(ctx *Context, config WatcherConfiguration) Watcher
func (*Dictionary) WriteJSONRepresentation ¶
func (d *Dictionary) WriteJSONRepresentation(ctx *Context, w *jsoniter.Stream, config JSONSerializationConfig, depth int) error
type DifferencePattern ¶
type DifferencePattern struct { NotCallablePatternMixin // contains filtered or unexported fields }
A DifferencePattern represents a pattern that matches the same values as a 'base' pattern except all values matched by a 'removed' pattern.
func NewDifferencePattern ¶
func NewDifferencePattern(base, removed Pattern) *DifferencePattern
func (*DifferencePattern) IsMutable ¶
func (pattern *DifferencePattern) IsMutable() bool
func (*DifferencePattern) Iterator ¶
func (patt *DifferencePattern) Iterator(ctx *Context, config IteratorConfiguration) Iterator
func (*DifferencePattern) PrettyPrint ¶
func (pattern *DifferencePattern) PrettyPrint(w *bufio.Writer, config *PrettyPrintConfig, depth int, parentIndentCount int)
func (*DifferencePattern) Random ¶
func (patt *DifferencePattern) Random(ctx *Context, options ...Option) Value
func (*DifferencePattern) StringPattern ¶
func (patt *DifferencePattern) StringPattern() (StringPattern, bool)
func (*DifferencePattern) ToSymbolicValue ¶
func (*DifferencePattern) WriteJSONRepresentation ¶
func (pattern *DifferencePattern) WriteJSONRepresentation(ctx *Context, w *jsoniter.Stream, config JSONSerializationConfig, depth int) error
type DirWalker ¶
type DirWalker struct {
// contains filtered or unexported fields
}
DirWalker is a Walker, it iterates over a list of known entries.
func NewDirWalker ¶
func NewDirWalker(fls afs.Filesystem, walkedDirPath Path) *DirWalker
NewDirWalker walks a directory and creates a DirWalker with the entries.
func (*DirWalker) NodeMeta ¶
func (it *DirWalker) NodeMeta(*Context) WalkableNodeMeta
func (*DirWalker) PrettyPrint ¶
func (*DirWalker) ToSymbolicValue ¶
type Duration ¶
See stdlib's time.Duration, Duration implements Value.
func (Duration) PrettyPrint ¶
func (Duration) ToSymbolicValue ¶
func (Duration) WriteJSONRepresentation ¶
type DynamicStringPatternElement ¶
type DynamicStringPatternElement struct {
// contains filtered or unexported fields
}
func (DynamicStringPatternElement) Call ¶
func (patt DynamicStringPatternElement) Call(values []Serializable) (Pattern, error)
func (DynamicStringPatternElement) CompiledRegex ¶
func (patt DynamicStringPatternElement) CompiledRegex() *regexp.Regexp
func (DynamicStringPatternElement) EffectiveLengthRange ¶
func (patt DynamicStringPatternElement) EffectiveLengthRange() IntRange
func (DynamicStringPatternElement) FindMatches ¶
func (patt DynamicStringPatternElement) FindMatches(ctx *Context, val Serializable, config MatchesFindConfig) (groups []Serializable, err error)
func (DynamicStringPatternElement) HasRegex ¶
func (patt DynamicStringPatternElement) HasRegex() bool
func (DynamicStringPatternElement) IsMutable ¶
func (patt DynamicStringPatternElement) IsMutable() bool
func (*DynamicStringPatternElement) IsResolved ¶
func (patt *DynamicStringPatternElement) IsResolved() bool
func (DynamicStringPatternElement) Iterator ¶
func (patt DynamicStringPatternElement) Iterator(ctx *Context, config IteratorConfiguration) Iterator
func (DynamicStringPatternElement) LengthRange ¶
func (patt DynamicStringPatternElement) LengthRange() IntRange
func (DynamicStringPatternElement) MatchGroups ¶
func (patt DynamicStringPatternElement) MatchGroups(ctx *Context, v Serializable) (map[string]Serializable, bool, error)
func (*DynamicStringPatternElement) Parse ¶
func (patt *DynamicStringPatternElement) Parse(ctx *Context, s string) (Serializable, error)
func (*DynamicStringPatternElement) PatternNestingDepth ¶
func (patt *DynamicStringPatternElement) PatternNestingDepth(parentDepth int) int
func (*DynamicStringPatternElement) PrettyPrint ¶
func (patt *DynamicStringPatternElement) PrettyPrint(w *bufio.Writer, config *PrettyPrintConfig, depth int, parentIndentCount int)
func (DynamicStringPatternElement) Random ¶
func (patt DynamicStringPatternElement) Random(ctx *Context, options ...Option) Value
func (DynamicStringPatternElement) Regex ¶
func (patt DynamicStringPatternElement) Regex() string
func (DynamicStringPatternElement) Resolve ¶
func (patt DynamicStringPatternElement) Resolve() (StringPattern, error)
func (*DynamicStringPatternElement) StringPattern ¶
func (patt *DynamicStringPatternElement) StringPattern() (StringPattern, bool)
func (DynamicStringPatternElement) Test ¶
func (patt DynamicStringPatternElement) Test(ctx *Context, v Value) bool
func (*DynamicStringPatternElement) ToSymbolicValue ¶
func (DynamicStringPatternElement) WriteJSONRepresentation ¶
func (patt DynamicStringPatternElement) WriteJSONRepresentation(ctx *Context, w *jsoniter.Stream, config JSONSerializationConfig, depth int) error
type DynamicValue ¶
type DynamicValue struct {
// contains filtered or unexported fields
}
A DynamicValue resolves to a Value by performing an operation on another value (getting a property, ...), DynamicValue implements Value
func NewDynamicCall ¶
func NewDynamicCall(ctx *Context, callee Value, args ...Value) *DynamicValue
TODO: restrict callee to functions without side effects
func NewDynamicIf ¶
func NewDynamicIf(ctx *Context, condition *DynamicValue, consequent Value, alternate Value) *DynamicValue
func NewDynamicMapInvocation ¶
func NewDynamicMapInvocation(ctx *Context, iterable Iterable, mapper Value) (*DynamicValue, error)
func NewDynamicMemberValue ¶
func NewDynamicMemberValue(ctx *Context, object Value, memberName string) (*DynamicValue, error)
func (*DynamicValue) IsFrozen ¶
func (d *DynamicValue) IsFrozen() bool
func (*DynamicValue) IsMutable ¶
func (c *DynamicValue) IsMutable() bool
func (*DynamicValue) Iterator ¶
func (dyn *DynamicValue) Iterator(ctx *Context, config IteratorConfiguration) Iterator
func (*DynamicValue) OnMutation ¶
func (dyn *DynamicValue) OnMutation(ctx *Context, microtask MutationCallbackMicrotask, config MutationWatchingConfiguration) (CallbackHandle, error)
func (*DynamicValue) PrettyPrint ¶
func (d *DynamicValue) PrettyPrint(w *bufio.Writer, config *PrettyPrintConfig, depth int, parentIndentCount int)
func (*DynamicValue) PropertyNames ¶
func (dyn *DynamicValue) PropertyNames(ctx *Context) []string
func (*DynamicValue) RemoveMutationCallback ¶
func (dyn *DynamicValue) RemoveMutationCallback(ctx *Context, handle CallbackHandle)
func (*DynamicValue) RemoveMutationCallbackMicrotasks ¶
func (dyn *DynamicValue) RemoveMutationCallbackMicrotasks(ctx *Context)
func (*DynamicValue) Resolve ¶
func (dyn *DynamicValue) Resolve(ctx *Context) Value
func (*DynamicValue) SetProp ¶
func (dyn *DynamicValue) SetProp(ctx *Context, name string, value Value) error
func (*DynamicValue) TakeInMemorySnapshot ¶
func (d *DynamicValue) TakeInMemorySnapshot(ctx *Context) (*Snapshot, error)
func (*DynamicValue) ToSymbolicValue ¶
func (*DynamicValue) Unfreeze ¶
func (d *DynamicValue) Unfreeze(ctx *Context) error
func (*DynamicValue) Watcher ¶
func (dyn *DynamicValue) Watcher(ctx *Context, config WatcherConfiguration) Watcher
Watcher creates a watcher that watches deeply by default, the watcher only watches mutations.
func (*DynamicValue) WriteJSONRepresentation ¶
func (v *DynamicValue) WriteJSONRepresentation(ctx *Context, w *jsoniter.Stream, config JSONSerializationConfig, depth int) error
type Effect ¶
type Effect interface { Resources() []ResourceName PermissionKind() PermissionKind Reversability(*Context) Reversability IsApplied() bool IsApplying() bool Apply(*Context) error Reverse(*Context) error }
type ElementKey ¶
type ElementKey string
An element key is a string with the following specifications: - at most 100 characters - not empty - can only contain identifier chars (parse.IsIdentChar)
func ElementKeyFrom ¶
func ElementKeyFrom(key string) (ElementKey, error)
func MustElementKeyFrom ¶
func MustElementKeyFrom(key string) ElementKey
type ElementsStream ¶
type ElementsStream struct {
// contains filtered or unexported fields
}
An ElementsStream represents a stream of known elements, ElementsStream implements Value.
func NewElementsStream ¶
func NewElementsStream(elements []Value, filter Pattern) *ElementsStream
func (*ElementsStream) ChunkDataType ¶
func (s *ElementsStream) ChunkDataType() Pattern
func (*ElementsStream) IsMainlyChunked ¶
func (s *ElementsStream) IsMainlyChunked() bool
func (*ElementsStream) IsMutable ¶
func (*ElementsStream) IsMutable() bool
func (*ElementsStream) IsStopped ¶
func (s *ElementsStream) IsStopped() bool
func (*ElementsStream) PrettyPrint ¶
func (s *ElementsStream) PrettyPrint(w *bufio.Writer, config *PrettyPrintConfig, depth int, parentIndentCount int)
func (*ElementsStream) Stop ¶
func (s *ElementsStream) Stop()
func (*ElementsStream) Stream ¶
func (s *ElementsStream) Stream(ctx *Context, config *ReadableStreamConfiguration) ReadableStream
func (*ElementsStream) ToSymbolicValue ¶
func (*ElementsStream) WaitNextChunk ¶
type EmailAddress ¶
type EmailAddress string
func NormalizeEmailAddress ¶
func NormalizeEmailAddress(s string) (EmailAddress, error)
NormalizeEmailAddress checks and normalize the provided address.
func (EmailAddress) IsMutable ¶
func (addr EmailAddress) IsMutable() bool
func (EmailAddress) PrettyPrint ¶
func (addr EmailAddress) PrettyPrint(w *bufio.Writer, config *PrettyPrintConfig, depth int, parentIndentCount int)
func (EmailAddress) PropertyNames ¶
func (addr EmailAddress) PropertyNames(ctx *Context) []string
func (EmailAddress) SetProp ¶
func (EmailAddress) SetProp(ctx *Context, name string, value Value) error
func (EmailAddress) ToSymbolicValue ¶
func (EmailAddress) UnderlyingString ¶
func (addr EmailAddress) UnderlyingString() string
func (EmailAddress) WriteJSONRepresentation ¶
func (addr EmailAddress) WriteJSONRepresentation(ctx *Context, w *jsoniter.Stream, config JSONSerializationConfig, depth int) error
type EntrySnapshotMetadata ¶
type EntrySnapshotMetadata struct { AbsolutePath Path Size ByteCount CreationTime DateTime ModificationTime DateTime Mode FileMode ChildNames []string ChecksumSHA256 [32]byte //zero if directory }
EntrySnapshotMetadata is the metadata about a single entry in a filesystem snapshot.
func (EntrySnapshotMetadata) IsDir ¶
func (m EntrySnapshotMetadata) IsDir() bool
func (EntrySnapshotMetadata) IsRegularFile ¶
func (m EntrySnapshotMetadata) IsRegularFile() bool
type EnvVarPermission ¶
type EnvVarPermission struct { Kind_ PermissionKind Name string //"*" means any }
func (EnvVarPermission) Includes ¶
func (perm EnvVarPermission) Includes(otherPerm Permission) bool
func (EnvVarPermission) InternalPermTypename ¶
func (perm EnvVarPermission) InternalPermTypename() permkind.InternalPermissionTypename
func (EnvVarPermission) Kind ¶
func (perm EnvVarPermission) Kind() PermissionKind
func (EnvVarPermission) String ¶
func (perm EnvVarPermission) String() string
type Error ¶
type Error struct {
// contains filtered or unexported fields
}
An Error represents an error with some immutable data, Error implements Value.
func NewError ¶
func NewError(err error, data Serializable) Error
func (Error) PrettyPrint ¶
func (Error) PropertyNames ¶
func (Error) ToSymbolicValue ¶
func (Error) WriteJSONRepresentation ¶
type Event ¶
type Event struct {
// contains filtered or unexported fields
}
An Event represents a generic event, Event implements Value.
func NewEvent ¶
func NewEvent(srcValue any, value Value, time DateTime, affectedResources ...ResourceName) *Event
func (*Event) AgeWithCurrentTime ¶
AgeWithCurrentTime returns the ellapsed time since the event happened but using $now as the current time.
func (*Event) PrettyPrint ¶
func (*Event) PropertyNames ¶
func (*Event) SourceValue ¶
SourceValue() returns the Golang value that was used to create the event, it can be nil.
func (*Event) ToSymbolicValue ¶
type EventHandler ¶
type EventHandler func(event *Event)
type EventPattern ¶
type EventPattern struct { NotCallablePatternMixin // contains filtered or unexported fields }
func NewEventPattern ¶
func NewEventPattern(valuePattern Pattern) *EventPattern
func (*EventPattern) IsMutable ¶
func (patt *EventPattern) IsMutable() bool
func (*EventPattern) Iterator ¶
func (patt *EventPattern) Iterator(ctx *Context, config IteratorConfiguration) Iterator
func (*EventPattern) PrettyPrint ¶
func (patt *EventPattern) PrettyPrint(w *bufio.Writer, config *PrettyPrintConfig, depth int, parentIndentCount int)
func (*EventPattern) Random ¶
func (patt *EventPattern) Random(ctx *Context, options ...Option) Value
func (*EventPattern) StringPattern ¶
func (patt *EventPattern) StringPattern() (StringPattern, bool)
func (*EventPattern) ToSymbolicValue ¶
func (*EventPattern) WriteJSONRepresentation ¶
func (patt *EventPattern) WriteJSONRepresentation(ctx *Context, w *jsoniter.Stream, config JSONSerializationConfig, depth int) error
type EventSource ¶
type EventSource interface { GoValue Iterable OnEvent(microtask EventHandler) error Close() IsClosed() bool }
TODO: rework An EventSource is a source of events created by a scheme-specific (e.g. file) factory. Implementations should embed EventSourceBase.
func NewEventSource ¶
func NewEventSource(ctx *Context, resourceNameOrPattern Value) (EventSource, error)
NewEventSource creates an EventSource by calling the factory registered for the scheme of $resourceNameOrPattern. For example for a path or path pattern the event source factory of the 'file' scheme is called.
type EventSourceBase ¶
type EventSourceBase struct {
// contains filtered or unexported fields
}
EventSourceBase provides handler registration for regular events and 'idle' handler registration. EventSource implementations should embed EventSourceBase and sould retrieve handlers by calling GetHandlers.
func (*EventSourceBase) GetHandlers ¶
func (evs *EventSourceBase) GetHandlers() []EventHandler
GetHandlers returns current event listeners (handlers), they are safe to call without recovering.
func (*EventSourceBase) OnEvent ¶
func (evs *EventSourceBase) OnEvent(handler EventHandler) error
OnEvent registers an handler for regular (non-idle) events. The execution of $handler should take less than a few milliseconds.
func (*EventSourceBase) OnIDLE ¶
func (evs *EventSourceBase) OnIDLE(handler IdleEventSourceHandler)
OnIDLE registers the provided handler to be called when the age of the last non-ignored event is >= .MinimumLastEventAge.
func (*EventSourceBase) RemoveAllHandlers ¶
func (evs *EventSourceBase) RemoveAllHandlers()
type EventSourceFactory ¶
type EventSourceFactory func(ctx *Context, resourceNameOrPattern Value) (EventSource, error)
func GetEventSourceFactory ¶
func GetEventSourceFactory(scheme Scheme) (EventSourceFactory, bool)
GetEventSourceFactory returns the event source factory function for $scheme or (nil, false) if no factory is registered for $scheme.
type EventSourceIterator ¶
type EventSourceIterator struct {
// contains filtered or unexported fields
}
func (*EventSourceIterator) GetGoMethod ¶
func (it *EventSourceIterator) GetGoMethod(name string) (*GoFunction, bool)
func (*EventSourceIterator) HasNext ¶
func (it *EventSourceIterator) HasNext(*Context) bool
func (*EventSourceIterator) IsMutable ¶
func (it *EventSourceIterator) IsMutable() bool
func (*EventSourceIterator) Key ¶
func (it *EventSourceIterator) Key(ctx *Context) Value
func (*EventSourceIterator) Next ¶
func (it *EventSourceIterator) Next(ctx *Context) bool
func (*EventSourceIterator) PrettyPrint ¶
func (it *EventSourceIterator) PrettyPrint(w *bufio.Writer, config *PrettyPrintConfig, depth int, parentIndentCount int)
func (*EventSourceIterator) Prop ¶
func (it *EventSourceIterator) Prop(ctx *Context, name string) Value
func (*EventSourceIterator) PropertyNames ¶
func (it *EventSourceIterator) PropertyNames(ctx *Context) []string
func (*EventSourceIterator) SetProp ¶
func (*EventSourceIterator) SetProp(ctx *Context, name string, value Value) error
func (*EventSourceIterator) ToSymbolicValue ¶
func (*EventSourceIterator) Value ¶
func (it *EventSourceIterator) Value(*Context) Value
type ExactStringPattern ¶
type ExactStringPattern struct { NotCallablePatternMixin // contains filtered or unexported fields }
ExactStringPattern matches values equal to .value: .value.Equal(...) returns true.
func NewExactStringPattern ¶
func NewExactStringPattern(value String) *ExactStringPattern
func (*ExactStringPattern) CompiledRegex ¶
func (patt *ExactStringPattern) CompiledRegex() *regexp.Regexp
func (*ExactStringPattern) EffectiveLengthRange ¶
func (pattern *ExactStringPattern) EffectiveLengthRange() IntRange
func (*ExactStringPattern) FindMatches ¶
func (pattern *ExactStringPattern) FindMatches(ctx *Context, val Serializable, config MatchesFindConfig) (matches []Serializable, err error)
func (*ExactStringPattern) HasRegex ¶
func (pattern *ExactStringPattern) HasRegex() bool
func (*ExactStringPattern) IsMutable ¶
func (pattern *ExactStringPattern) IsMutable() bool
func (*ExactStringPattern) IsResolved ¶
func (patt *ExactStringPattern) IsResolved() bool
func (ExactStringPattern) Iterator ¶
func (patt ExactStringPattern) Iterator(ctx *Context, config IteratorConfiguration) Iterator
func (*ExactStringPattern) LengthRange ¶
func (pattern *ExactStringPattern) LengthRange() IntRange
func (*ExactStringPattern) Parse ¶
func (patt *ExactStringPattern) Parse(ctx *Context, s string) (Serializable, error)
func (*ExactStringPattern) PatternNestingDepth ¶
func (patt *ExactStringPattern) PatternNestingDepth(parentDepth int) int
func (ExactStringPattern) PrettyPrint ¶
func (pattern ExactStringPattern) PrettyPrint(w *bufio.Writer, config *PrettyPrintConfig, depth int, parentIndentCount int)
func (ExactStringPattern) Random ¶
func (pattern ExactStringPattern) Random(ctx *Context, options ...Option) Value
func (*ExactStringPattern) Regex ¶
func (pattern *ExactStringPattern) Regex() string
func (*ExactStringPattern) Resolve ¶
func (patt *ExactStringPattern) Resolve() (StringPattern, error)
func (*ExactStringPattern) StringPattern ¶
func (patt *ExactStringPattern) StringPattern() (StringPattern, bool)
func (*ExactStringPattern) Test ¶
func (pattern *ExactStringPattern) Test(ctx *Context, v Value) bool
func (*ExactStringPattern) ToSymbolicValue ¶
func (ExactStringPattern) WriteJSONRepresentation ¶
func (pattern ExactStringPattern) WriteJSONRepresentation(ctx *Context, w *jsoniter.Stream, config JSONSerializationConfig, depth int) error
type ExactValuePattern ¶
type ExactValuePattern struct { NotCallablePatternMixin // contains filtered or unexported fields }
ExactValuePattern matches values equal to .value: .value.Equal(...) returns true.
func NewExactValuePattern ¶
func NewExactValuePattern(value Serializable) *ExactValuePattern
func (*ExactValuePattern) IsMutable ¶
func (pattern *ExactValuePattern) IsMutable() bool
func (ExactValuePattern) Iterator ¶
func (patt ExactValuePattern) Iterator(ctx *Context, config IteratorConfiguration) Iterator
func (ExactValuePattern) PrettyPrint ¶
func (pattern ExactValuePattern) PrettyPrint(w *bufio.Writer, config *PrettyPrintConfig, depth int, parentIndentCount int)
func (ExactValuePattern) Random ¶
func (pattern ExactValuePattern) Random(ctx *Context, options ...Option) Value
func (*ExactValuePattern) StringPattern ¶
func (patt *ExactValuePattern) StringPattern() (StringPattern, bool)
func (*ExactValuePattern) ToSymbolicValue ¶
func (*ExactValuePattern) Value ¶
func (pattern *ExactValuePattern) Value() Serializable
func (ExactValuePattern) WriteJSONRepresentation ¶
func (pattern ExactValuePattern) WriteJSONRepresentation(ctx *Context, w *jsoniter.Stream, config JSONSerializationConfig, depth int) error
type ExecutedStep ¶
type ExecutedStep struct {
// contains filtered or unexported fields
}
func (*ExecutedStep) GetGoMethod ¶
func (s *ExecutedStep) GetGoMethod(name string) (*GoFunction, bool)
func (ExecutedStep) IsMutable ¶
func (e ExecutedStep) IsMutable() bool
func (*ExecutedStep) PrettyPrint ¶
func (s *ExecutedStep) PrettyPrint(w *bufio.Writer, config *PrettyPrintConfig, depth int, parentIndentCount int)
func (*ExecutedStep) PropertyNames ¶
func (*ExecutedStep) PropertyNames(ctx *Context) []string
func (*ExecutedStep) SetProp ¶
func (*ExecutedStep) SetProp(ctx *Context, name string, value Value) error
func (*ExecutedStep) ToSymbolicValue ¶
type ExtendedFileInfo ¶
type FailedToOpenDatabase ¶
type FailedToOpenDatabase struct {
// contains filtered or unexported fields
}
func NewFailedToOpenDatabase ¶
func NewFailedToOpenDatabase(resource SchemeHolder) *FailedToOpenDatabase
func (*FailedToOpenDatabase) Close ¶
func (db *FailedToOpenDatabase) Close(ctx *Context) error
func (*FailedToOpenDatabase) LoadTopLevelEntities ¶
func (db *FailedToOpenDatabase) LoadTopLevelEntities(_ *Context) (map[string]Serializable, error)
func (*FailedToOpenDatabase) Resource ¶
func (db *FailedToOpenDatabase) Resource() SchemeHolder
func (*FailedToOpenDatabase) Schema ¶
func (db *FailedToOpenDatabase) Schema() *ObjectPattern
func (*FailedToOpenDatabase) UpdateSchema ¶
func (db *FailedToOpenDatabase) UpdateSchema(ctx *Context, schema *ObjectPattern, handlers MigrationOpHandlers)
type FieldRetrievalType ¶
type FieldRetrievalType int
const ( GetBoolField FieldRetrievalType = iota GetIntField GetFloatField GetStringField GetStructPointerField )
type FileInfo ¶
type FileInfo struct { BaseName_ string AbsPath_ Path Size_ ByteCount Mode_ FileMode ModTime_ DateTime CreationTime_ DateTime HasCreationTime bool }
A FileInfo is a Value that implements fs.FileInfo and ExtendedFileInfo.
func (FileInfo) GetGoMethod ¶
func (i FileInfo) GetGoMethod(name string) (*GoFunction, bool)
func (FileInfo) PrettyPrint ¶
func (FileInfo) PropertyNames ¶
func (FileInfo) ToSymbolicValue ¶
func (FileInfo) WriteJSONRepresentation ¶
type FileMode ¶
FileMode implements Value.
func FileModeFrom ¶
func (FileMode) Executable ¶
func (FileMode) PrettyPrint ¶
func (FileMode) ToSymbolicValue ¶
func (FileMode) WriteJSONRepresentation ¶
type FilesystemPermission ¶
type FilesystemPermission struct { Kind_ PermissionKind Entity WrappedString //Path, PathPattern ... }
func CreateFsReadPerm ¶
func CreateFsReadPerm(entity WrappedString) FilesystemPermission
func (FilesystemPermission) Includes ¶
func (perm FilesystemPermission) Includes(otherPerm Permission) bool
func (FilesystemPermission) InternalPermTypename ¶
func (perm FilesystemPermission) InternalPermTypename() permkind.InternalPermissionTypename
func (FilesystemPermission) Kind ¶
func (perm FilesystemPermission) Kind() PermissionKind
func (FilesystemPermission) String ¶
func (perm FilesystemPermission) String() string
type FilesystemSnapshot ¶
type FilesystemSnapshot interface { //Metadata returns the metadata of an entry inside the snapshot. //If the given path is not absolute ErrSnapshotEntryPathMustBeAbsolute should be returned. //If the file does not exist os.ErrNotExist should be returned. Metadata(path string) (EntrySnapshotMetadata, error) RootDirEntries() []string //names of root directory's entries ForEachEntry(func(m EntrySnapshotMetadata) error) error //Content returns an AddressableContent value that should be able to retrieve the content of a file inside the snapshot. //If the given path is not absolute ErrSnapshotFilePathMustBeAbsolute should be returned. //If the file does not exist os.ErrNotExist should be returned. //If the entry at the path is not a file ErrSnapshotEntryNotAFile should be returned. Content(path string) (AddressableContent, error) //IsStoredLocally should return true if all of the data & metadata is stored in memory and/or on disk. IsStoredLocally() bool //NewAdaptedFilesystem creates a filesystem from the snapshot, //it should be adapted to the FilesystemSnapshot implementation. NewAdaptedFilesystem(maxTotalStorageSizeHint ByteCount) (SnapshotableFilesystem, error) WriteTo(fls afs.Filesystem, params SnapshotWriteToFilesystem) error }
A FilesystemSnapshot represents an immutable snapshot of a filesystem, the data & metadata can be stored anywhere (memory, disk, object storage).
type FilesystemSnapshotConfig ¶
type FilesystemSnapshotConfig struct { GetContent func(ChecksumSHA256 [32]byte) AddressableContent InclusionFilters []PathPattern ExclusionFilters []PathPattern }
func (FilesystemSnapshotConfig) IsFileIncluded ¶
func (c FilesystemSnapshotConfig) IsFileIncluded(path Path) bool
type FilesystemSnapshotIL ¶
type FilesystemSnapshotIL struct {
// contains filtered or unexported fields
}
FilesystemSnapshotIL wraps a FilesystemSnapshot and implements Value.
func WrapFsSnapshot ¶
func WrapFsSnapshot(snapshot FilesystemSnapshot) *FilesystemSnapshotIL
func (*FilesystemSnapshotIL) IsMutable ¶
func (*FilesystemSnapshotIL) IsMutable() bool
func (*FilesystemSnapshotIL) PrettyPrint ¶
func (s *FilesystemSnapshotIL) PrettyPrint(w *bufio.Writer, config *PrettyPrintConfig, depth int, parentIndentCount int)
func (*FilesystemSnapshotIL) ToSymbolicValue ¶
func (*FilesystemSnapshotIL) Underlying ¶
func (s *FilesystemSnapshotIL) Underlying() FilesystemSnapshot
func (*FilesystemSnapshotIL) WriteJSONRepresentation ¶
func (s *FilesystemSnapshotIL) WriteJSONRepresentation(ctx *Context, w *jsoniter.Stream, config JSONSerializationConfig, depth int) error
type Float ¶
type Float float64
Float implements Value.
func (Float) PrettyPrint ¶
func (Float) ToSymbolicValue ¶
func (Float) WriteJSONRepresentation ¶
type FloatList ¶
type FloatList = NumberList[Float]
type FloatRange ¶
type FloatRange struct {
// contains filtered or unexported fields
}
A FloatRange represents a float64 range, FloatRange implements Value. Inox's float range literals (e.g. `1.0..2.0`) evaluate to a FloatRange.
func NewFloatRange ¶
func NewFloatRange(start, end float64, inclusiveEnd bool) FloatRange
func NewIncludedEndFloatRange ¶
func NewIncludedEndFloatRange(start, end float64) FloatRange
func NewUnknownStartFloatRange ¶
func NewUnknownStartFloatRange(end float64, inclusiveEnd bool) FloatRange
func (FloatRange) Contains ¶
func (r FloatRange) Contains(ctx *Context, v Serializable) bool
func (FloatRange) HasKnownStart ¶
func (r FloatRange) HasKnownStart() bool
func (FloatRange) InclusiveEnd ¶
func (r FloatRange) InclusiveEnd() float64
func (FloatRange) IsEmpty ¶
func (r FloatRange) IsEmpty(ctx *Context) bool
func (FloatRange) IsMutable ¶
func (r FloatRange) IsMutable() bool
func (FloatRange) Iterator ¶
func (r FloatRange) Iterator(ctx *Context, config IteratorConfiguration) Iterator
func (FloatRange) KnownStart ¶
func (r FloatRange) KnownStart() float64
func (FloatRange) PrettyPrint ¶
func (r FloatRange) PrettyPrint(w *bufio.Writer, config *PrettyPrintConfig, depth int, parentIndentCount int)
func (FloatRange) Random ¶
func (r FloatRange) Random(ctx *Context) Value
func (FloatRange) ToSymbolicValue ¶
func (FloatRange) WriteJSONRepresentation ¶
func (r FloatRange) WriteJSONRepresentation(ctx *Context, w *jsoniter.Stream, config JSONSerializationConfig, depth int) error
type FloatRangeIterator ¶
type FloatRangeIterator struct {
// contains filtered or unexported fields
}
func (*FloatRangeIterator) HasNext ¶
func (it *FloatRangeIterator) HasNext(*Context) bool
func (FloatRangeIterator) IsMutable ¶
func (it FloatRangeIterator) IsMutable() bool
func (*FloatRangeIterator) Key ¶
func (it *FloatRangeIterator) Key(ctx *Context) Value
func (*FloatRangeIterator) Next ¶
func (it *FloatRangeIterator) Next(ctx *Context) bool
func (FloatRangeIterator) PrettyPrint ¶
func (it FloatRangeIterator) PrettyPrint(w *bufio.Writer, config *PrettyPrintConfig, depth int, parentIndentCount int)
func (FloatRangeIterator) ToSymbolicValue ¶
func (*FloatRangeIterator) Value ¶
func (it *FloatRangeIterator) Value(*Context) Value
type FloatRangePattern ¶
type FloatRangePattern struct { NotCallablePatternMixin // contains filtered or unexported fields }
An FloatRangePattern represents a pattern matching floats in a given range.
func NewFloatRangePattern ¶
func NewFloatRangePattern(floatRange FloatRange, multipleOf float64) *FloatRangePattern
multipleOf is ignored if not greater than zero
func NewSingleElementFloatRangePattern ¶
func NewSingleElementFloatRangePattern(n float64) *FloatRangePattern
func (*FloatRangePattern) IsMutable ¶
func (patt *FloatRangePattern) IsMutable() bool
func (*FloatRangePattern) Iterator ¶
func (patt *FloatRangePattern) Iterator(ctx *Context, config IteratorConfiguration) Iterator
func (*FloatRangePattern) PrettyPrint ¶
func (patt *FloatRangePattern) PrettyPrint(w *bufio.Writer, config *PrettyPrintConfig, depth int, parentIndentCount int)
func (*FloatRangePattern) Random ¶
func (patt *FloatRangePattern) Random(ctx *Context, options ...Option) Value
func (*FloatRangePattern) Range ¶
func (patt *FloatRangePattern) Range() FloatRange
func (*FloatRangePattern) StringPattern ¶
func (patt *FloatRangePattern) StringPattern() (StringPattern, bool)
func (*FloatRangePattern) ToSymbolicValue ¶
func (FloatRangePattern) WriteJSONRepresentation ¶
func (p FloatRangePattern) WriteJSONRepresentation(ctx *Context, w *jsoniter.Stream, config JSONSerializationConfig, depth int) error
type FloatRangeStringPattern ¶
type FloatRangeStringPattern struct { NotCallablePatternMixin // contains filtered or unexported fields }
An FloatRangeStringPattern matches a string (or substring) representing a decimal floating point number in a given range. As of now only the following ranges are supported:
- [-math.MaxFloat64, math.MaxFloat64]
- [-math.MaxFloat64, 0]
- [0, math.MaxFloat64]
TODO: make sure all the methods are consistent.
func NewFloatRangeStringPattern ¶
func NewFloatRangeStringPattern(lower, upperIncluded float64, node parse.Node) *FloatRangeStringPattern
func (*FloatRangeStringPattern) CompiledRegex ¶
func (patt *FloatRangeStringPattern) CompiledRegex() *regexp.Regexp
func (*FloatRangeStringPattern) EffectiveLengthRange ¶
func (patt *FloatRangeStringPattern) EffectiveLengthRange() IntRange
func (*FloatRangeStringPattern) FindMatches ¶
func (patt *FloatRangeStringPattern) FindMatches(ctx *Context, val Serializable, config MatchesFindConfig) (groups []Serializable, err error)
func (*FloatRangeStringPattern) HasRegex ¶
func (patt *FloatRangeStringPattern) HasRegex() bool
func (*FloatRangeStringPattern) IsMutable ¶
func (patt *FloatRangeStringPattern) IsMutable() bool
func (*FloatRangeStringPattern) IsResolved ¶
func (patt *FloatRangeStringPattern) IsResolved() bool
func (*FloatRangeStringPattern) Iterator ¶
func (patt *FloatRangeStringPattern) Iterator(ctx *Context, config IteratorConfiguration) Iterator
func (*FloatRangeStringPattern) LengthRange ¶
func (patt *FloatRangeStringPattern) LengthRange() IntRange
func (*FloatRangeStringPattern) Parse ¶
func (patt *FloatRangeStringPattern) Parse(ctx *Context, s string) (Serializable, error)
func (*FloatRangeStringPattern) PatternNestingDepth ¶
func (patt *FloatRangeStringPattern) PatternNestingDepth(parentDepth int) int
func (*FloatRangeStringPattern) PrettyPrint ¶
func (patt *FloatRangeStringPattern) PrettyPrint(w *bufio.Writer, config *PrettyPrintConfig, depth int, parentIndentCount int)
func (*FloatRangeStringPattern) Random ¶
func (pattern *FloatRangeStringPattern) Random(ctx *Context, options ...Option) Value
func (*FloatRangeStringPattern) Regex ¶
func (patt *FloatRangeStringPattern) Regex() string
func (*FloatRangeStringPattern) Resolve ¶
func (patt *FloatRangeStringPattern) Resolve() (StringPattern, error)
func (*FloatRangeStringPattern) StringFrom ¶
func (patt *FloatRangeStringPattern) StringFrom(ctx *Context, v Value) (string, error)
func (*FloatRangeStringPattern) StringPattern ¶
func (patt *FloatRangeStringPattern) StringPattern() (StringPattern, bool)
func (*FloatRangeStringPattern) Test ¶
func (patt *FloatRangeStringPattern) Test(ctx *Context, v Value) bool
func (*FloatRangeStringPattern) ToSymbolicValue ¶
func (*FloatRangeStringPattern) WriteJSONRepresentation ¶
func (patt *FloatRangeStringPattern) WriteJSONRepresentation(ctx *Context, w *jsoniter.Stream, config JSONSerializationConfig, depth int) error
type FreeEntityLoadingParams ¶
type FreeEntityLoadingParams struct { Key Path Storage DataStore Pattern Pattern InitialValue Serializable AllowMissing bool //if true the loading function is allowed to return an empty/default value matching the pattern Migration *FreeEntityMigrationArgs }
func (FreeEntityLoadingParams) IsDeletion ¶
func (a FreeEntityLoadingParams) IsDeletion(ctx *Context) bool
type FreeEntityMigrationArgs ¶
type FreeEntityMigrationArgs struct { NextPattern Pattern //can be nil MigrationHandlers MigrationOpHandlers }
type Frequency ¶
type Frequency float64
A Frequency represents a number of actions per second, it implements Value.
func (Frequency) IsZeroRate ¶
func (Frequency) PrettyPrint ¶
func (Frequency) QuantityPerSecond ¶
func (Frequency) ToSymbolicValue ¶
func (Frequency) WriteJSONRepresentation ¶
type FunctionPattern ¶
type FunctionPattern struct { NotCallablePatternMixin // contains filtered or unexported fields }
A FunctionPattern represents a pattern that matches that either matches any function or functions with certain parameters and return types. Inox's function pattern literals (e.g. fn() int) evaluate to a function pattern.
func (*FunctionPattern) IsMutable ¶
func (pattern *FunctionPattern) IsMutable() bool
func (*FunctionPattern) Iterator ¶
func (patt *FunctionPattern) Iterator(ctx *Context, config IteratorConfiguration) Iterator
func (*FunctionPattern) PrettyPrint ¶
func (pattern *FunctionPattern) PrettyPrint(w *bufio.Writer, config *PrettyPrintConfig, depth int, parentIndentCount int)
func (*FunctionPattern) Random ¶
func (patt *FunctionPattern) Random(ctx *Context, options ...Option) Value
func (*FunctionPattern) StringPattern ¶
func (patt *FunctionPattern) StringPattern() (StringPattern, bool)
func (*FunctionPattern) ToSymbolicValue ¶
func (*FunctionPattern) WriteJSONRepresentation ¶
func (patt *FunctionPattern) WriteJSONRepresentation(ctx *Context, w *jsoniter.Stream, config JSONSerializationConfig, depth int) error
type FunctionStaticData ¶
type FunctionStaticData struct {
// contains filtered or unexported fields
}
type GenericWatcher ¶
type GenericWatcher struct {
// contains filtered or unexported fields
}
func NewGenericWatcher ¶
func NewGenericWatcher(config WatcherConfiguration) *GenericWatcher
func (*GenericWatcher) Config ¶
func (w *GenericWatcher) Config() WatcherConfiguration
func (*GenericWatcher) InformAboutAsync ¶
func (w *GenericWatcher) InformAboutAsync(ctx *Context, v Value)
InformAboutAsync adds a value to the channel of interesting values.
func (*GenericWatcher) IsMutable ¶
func (w *GenericWatcher) IsMutable() bool
func (*GenericWatcher) IsStopped ¶
func (w *GenericWatcher) IsStopped() bool
func (*GenericWatcher) PrettyPrint ¶
func (watcher *GenericWatcher) PrettyPrint(w *bufio.Writer, config *PrettyPrintConfig, depth int, parentIndentCount int)
func (*GenericWatcher) Stop ¶
func (w *GenericWatcher) Stop()
func (*GenericWatcher) Stream ¶
func (w *GenericWatcher) Stream(ctx *Context, config *ReadableStreamConfiguration) ReadableStream
func (*GenericWatcher) ToSymbolicValue ¶
type GlobalConstness ¶
type GlobalConstness = int
const ( GlobalVar GlobalConstness = iota GlobalConst )
type GlobalState ¶
type GlobalState struct { Module *Module //nil in some cases (e.g. shell, mapping entry's state), TODO: check for usage Out io.Writer //io.Discard by default Logger zerolog.Logger //zerolog.Nop() by default LogLevels *LogLevels //DEFAULT_LOG_LEVELS by default OutputFieldsInitialized atomic.Bool //should be set to true by the state's creator, even if the default values are kept. Ctx *Context Manifest *Manifest Project Project //can be nil Bytecode *Bytecode //can be nil Globals GlobalVariables //global variables LThread *LThread //not nil if running in a dedicated LThread Databases map[string]*DatabaseIL //the map should never change Heap *ModuleHeap SystemGraph *SystemGraph MainState *GlobalState //never nil except for parents of main states,this field should be set by user of GlobalState. GetBaseGlobalsForImportedModule func(ctx *Context, manifest *Manifest) (GlobalVariables, error) // ok if nil GetBasePatternsForImportedModule func() (map[string]Pattern, map[string]*PatternNamespace) // return nil maps by default SymbolicBaseGlobalsForImportedModule map[string]symbolic.Value // ok if nil, should not be modified Debugger atomic.Value //nil or (nillable) *Debugger TestingState TestingState PrenitStaticCheckErrors []*StaticCheckError MainPreinitError error FirstDatabaseOpeningError error StaticCheckData *StaticCheckData SymbolicData *SymbolicData // contains filtered or unexported fields }
A GlobalState represents the global state of a module (or the shell loop), most exported fields should be set once. Patterns, host aliases and host definition data are stored in the context.
func NewGlobalState ¶
func NewGlobalState(ctx *Context, constants ...map[string]Value) *GlobalState
NewGlobalState creates a state with the provided context and constants. The OutputFieldsInitialized field is not initialized and should be set by the caller.
func (*GlobalState) ComputePriority ¶
func (g *GlobalState) ComputePriority() ModulePriority
func (*GlobalState) GetGoMethod ¶
func (g *GlobalState) GetGoMethod(name string) (*GoFunction, bool)
func (*GlobalState) InitSystemGraph ¶
func (g *GlobalState) InitSystemGraph()
func (*GlobalState) IsMain ¶
func (g *GlobalState) IsMain() bool
IsMain returns true if g.MainState == g.
func (*GlobalState) IsMutable ¶
func (*GlobalState) IsMutable() bool
func (*GlobalState) PrettyPrint ¶
func (s *GlobalState) PrettyPrint(w *bufio.Writer, config *PrettyPrintConfig, depth int, parentIndentCount int)
func (*GlobalState) PropertyNames ¶
func (*GlobalState) PropertyNames(ctx *Context) []string
func (*GlobalState) ProposeSystemGraph ¶
func (g *GlobalState) ProposeSystemGraph(v SystemGraphNodeValue, optionalName string)
func (*GlobalState) SetDescendantState ¶
func (g *GlobalState) SetDescendantState(src ResourceName, state *GlobalState)
func (*GlobalState) SetProp ¶
func (*GlobalState) SetProp(ctx *Context, name string, value Value) error
func (*GlobalState) ToSymbolicValue ¶
type GlobalVarPermission ¶
type GlobalVarPermission struct { Kind_ PermissionKind Name string //"*" means any }
func (GlobalVarPermission) Includes ¶
func (perm GlobalVarPermission) Includes(otherPerm Permission) bool
func (GlobalVarPermission) InternalPermTypename ¶
func (perm GlobalVarPermission) InternalPermTypename() permkind.InternalPermissionTypename
func (GlobalVarPermission) Kind ¶
func (perm GlobalVarPermission) Kind() PermissionKind
func (GlobalVarPermission) String ¶
func (perm GlobalVarPermission) String() string
type GlobalVariables ¶
type GlobalVariables struct {
// contains filtered or unexported fields
}
A GlobalVariables represents the global scope of a module. Global variables captured by shared Inox functions are temporarily added during calls.
func GlobalVariablesFromMap ¶
func GlobalVariablesFromMap(m map[string]Value, startConstants []string) GlobalVariables
func (*GlobalVariables) CheckedGet ¶
func (g *GlobalVariables) CheckedGet(name string) (Value, bool)
func (*GlobalVariables) Constants ¶
func (g *GlobalVariables) Constants() map[string]Value
func (*GlobalVariables) Entries ¶
func (g *GlobalVariables) Entries() map[string]Value
func (*GlobalVariables) Get ¶
func (g *GlobalVariables) Get(name string) Value
func (*GlobalVariables) Has ¶
func (g *GlobalVariables) Has(name string) bool
func (*GlobalVariables) PopCapturedGlobals ¶
func (g *GlobalVariables) PopCapturedGlobals()
func (*GlobalVariables) PushCapturedGlobals ¶
func (g *GlobalVariables) PushCapturedGlobals(captured []capturedGlobal)
func (*GlobalVariables) Set ¶
func (g *GlobalVariables) Set(name string, value Value)
Set sets the value for a global variable (not constant)
type GoFunction ¶
type GoFunction struct {
// contains filtered or unexported fields
}
A GoFunction represents a native (Go) function.
func WrapGoClosure ¶
func WrapGoClosure(goFn any) *GoFunction
func WrapGoFunction ¶
func WrapGoFunction(goFn any) *GoFunction
func WrapGoMethod ¶
func WrapGoMethod(goFn any) *GoFunction
func (*GoFunction) Call ¶
func (goFunc *GoFunction) Call(args []any, globalState, extState *GlobalState, isExt, must bool) (Value, error)
Call calls the underlying native function using reflection, the global state .goCallArgPrepBuf and .goCallArgsBuf buffers are used. The reflect package makes 2 small allocations during the call.
func (*GoFunction) GetGoMethod ¶
func (*GoFunction) GetGoMethod(name string) (*GoFunction, bool)
func (*GoFunction) GoFunc ¶
func (fn *GoFunction) GoFunc() any
func (*GoFunction) IsMutable ¶
func (goFunc *GoFunction) IsMutable() bool
func (*GoFunction) IsSharable ¶
func (fn *GoFunction) IsSharable(originState *GlobalState) (bool, string)
func (*GoFunction) IsShared ¶
func (fn *GoFunction) IsShared() bool
func (*GoFunction) Kind ¶
func (fn *GoFunction) Kind() GoFunctionKind
func (*GoFunction) PrettyPrint ¶
func (v *GoFunction) PrettyPrint(w *bufio.Writer, config *PrettyPrintConfig, depth int, parentIndentCount int)
func (*GoFunction) PropertyNames ¶
func (*GoFunction) PropertyNames(ctx *Context) []string
func (*GoFunction) SetProp ¶
func (*GoFunction) SetProp(ctx *Context, name string, value Value) error
func (*GoFunction) Share ¶
func (fn *GoFunction) Share(originState *GlobalState)
func (*GoFunction) SmartLock ¶
func (fn *GoFunction) SmartLock(state *GlobalState)
func (*GoFunction) SmartUnlock ¶
func (fn *GoFunction) SmartUnlock(state *GlobalState)
func (*GoFunction) ToSymbolicValue ¶
type GoFunctionKind ¶
type GoFunctionKind int
const ( GoFunc GoFunctionKind = iota GoMethod GoClosure )
type GoValue ¶
type GoValue interface { Value IProps GetGoMethod(name string) (*GoFunction, bool) }
A GoValue represents a user defined Value or a core Value that is not deeply integrated with the evaluation logic.
type GracefulTearDownTaskFn ¶
A GracefulTearDownTaskFn should ideally run for a relative short time (less than 500ms), the passed context is the context the microtask was registered to.
type GracefulTeardownStatus ¶
type GracefulTeardownStatus int32
const ( NeverStartedGracefulTeardown GracefulTeardownStatus = iota GracefullyTearingDown GracefullyTearedDown GracefullyTearedDownWithErrors //errors during teardown GracefullyTearedDownWithCancellation //context cancellation before the end of the teardown )
type GroupMatchesFindConfig ¶
type GroupMatchesFindConfig struct {
Kind GroupMatchesFindConfigKind
}
type GroupMatchesFindConfigKind ¶
type GroupMatchesFindConfigKind int
const ( FindFirstGroupMatches GroupMatchesFindConfigKind = iota FindAllGroupMatches )
type GroupPattern ¶
type GroupPattern interface { Pattern MatchGroups(*Context, Serializable) (groups map[string]Serializable, ok bool, err error) FindGroupMatches(*Context, Serializable, GroupMatchesFindConfig) (groups []*Object, err error) }
GroupPattern is implemented by patterns that are able to decompose matched values into groups. A canonical implementation example would be RegexPattern.
type HeapAddress ¶
type HeapAddress *byte
func Alloc ¶
func Alloc[T any](h *ModuleHeap, size int, alignment int) HeapAddress
Alloc allocates $size bytes and returns the starting position of the allocated memory segment.
func HeapAddressFromUintptr ¶
func HeapAddressFromUintptr(ptr uintptr) HeapAddress
type Host ¶
type Host string
A Host is composed of the following parts: [<scheme>] '://' <hostname> [':' <port>].
func (Host) ExplicitPort ¶
func (Host) HasHttpScheme ¶
HasHttpScheme returns true if the scheme is "http" or "https".
func (Host) HostWithoutPort ¶
func (Host) PrettyPrint ¶
func (Host) PropertyNames ¶
func (Host) ResourceName ¶
func (Host) Scheme ¶
Scheme returns the scheme of the host (e.g. 'http') or $NO_SCHEME_SCHEME_NAME if the host has no scheme.
func (Host) ToSymbolicValue ¶
func (Host) URLWithPath ¶
func (Host) UnderlyingString ¶
func (Host) WithoutScheme ¶
WithoutScheme returns the part of the host after '://'.
func (Host) WriteJSONRepresentation ¶
type HostPattern ¶
type HostPattern string
func (HostPattern) Call ¶
func (HostPattern) Call(values []Serializable) (Pattern, error)
func (HostPattern) HasScheme ¶
func (patt HostPattern) HasScheme() bool
func (HostPattern) IsMutable ¶
func (patt HostPattern) IsMutable() bool
func (HostPattern) Iterator ¶
func (patt HostPattern) Iterator(ctx *Context, config IteratorConfiguration) Iterator
func (HostPattern) PrettyPrint ¶
func (patt HostPattern) PrettyPrint(w *bufio.Writer, config *PrettyPrintConfig, depth int, parentIndentCount int)
func (HostPattern) PropertyNames ¶
func (patt HostPattern) PropertyNames(ctx *Context) []string
func (HostPattern) Random ¶
func (pattern HostPattern) Random(ctx *Context, options ...Option) Value
func (HostPattern) Scheme ¶
func (patt HostPattern) Scheme() Scheme
Scheme returns the scheme of the host pattern (e.g. 'http') or $NO_SCHEME_SCHEME_NAME if the pattern has no scheme.
func (HostPattern) SetProp ¶
func (HostPattern) SetProp(ctx *Context, name string, value Value) error
func (HostPattern) StringPattern ¶
func (HostPattern) StringPattern() (StringPattern, bool)
func (HostPattern) ToSymbolicValue ¶
func (HostPattern) UnderlyingString ¶
func (patt HostPattern) UnderlyingString() string
func (HostPattern) WithoutScheme ¶
func (host HostPattern) WithoutScheme() string
WithoutScheme returns the part of the pattern after '://'.
func (HostPattern) WriteJSONRepresentation ¶
func (patt HostPattern) WriteJSONRepresentation(ctx *Context, w *jsoniter.Stream, config JSONSerializationConfig, depth int) error
type HttpPermission ¶
type HttpPermission struct { Kind_ PermissionKind Entity WrappedString //URL, URLPattern, HTTPHost, HTTPHostPattern .... AnyEntity bool }
func CreateHttpReadPerm ¶
func CreateHttpReadPerm(entity WrappedString) HttpPermission
func (HttpPermission) Includes ¶
func (perm HttpPermission) Includes(otherPerm Permission) bool
func (HttpPermission) InternalPermTypename ¶
func (perm HttpPermission) InternalPermTypename() permkind.InternalPermissionTypename
func (HttpPermission) Kind ¶
func (perm HttpPermission) Kind() PermissionKind
func (HttpPermission) String ¶
func (perm HttpPermission) String() string
type IPropsPattern ¶
type IPropsPattern interface { Value //ValuePropPattern should return the pattern of the property (name). ValuePropPattern(name string) (propPattern Pattern, isOptional bool, ok bool) //ValuePropertyNames should return the list of all property names (optional or not) of values matching the pattern. ValuePropertyNames() []string }
type IWithSecondaryContext ¶
type Identifier ¶
type Identifier string
func (Identifier) IsMutable ¶
func (i Identifier) IsMutable() bool
func (Identifier) PrettyPrint ¶
func (i Identifier) PrettyPrint(w *bufio.Writer, config *PrettyPrintConfig, depth int, parentIndentCount int)
func (Identifier) ToSymbolicValue ¶
func (Identifier) UnderlyingString ¶
func (i Identifier) UnderlyingString() string
func (Identifier) WriteJSONRepresentation ¶
func (i Identifier) WriteJSONRepresentation(ctx *Context, w *jsoniter.Stream, config JSONSerializationConfig, depth int) error
type IdleEventSourceHandler ¶
type IdleEventSourceHandler struct { //Should be >= HARD_MINIMUM_LAST_EVENT_AGE and <= MAX_MINIMUM_LAST_EVENT_AGE MinimumLastEventAge time.Duration //If nil defaults to a function always returning false. IsIgnoredEvent func(*Event) Bool //If false the handler is called after the next IDLE phase. DontWaitForFirstEvent bool //Microtask to execute, the execution should take less than a millisecond. Microtask func() // contains filtered or unexported fields }
type Image ¶
type Image interface {
FilesystemSnapshot() FilesystemSnapshot
}
An image represents a project image.
type ImportConfig ¶
type ImportConfig struct { Src ResourceName ValidationString String //hash of the imported module ArgObj *Object //arguments for the evaluation of the imported module GrantedPermListing *Object ParentState *GlobalState //the state of the module doing the import Insecure bool //if true certificate verification is ignored when making HTTP requests Timeout time.Duration //total timeout for combined fetching + evaluation of the imported module }
type InMemorySnapshotable ¶
type InMemorySnapshotable interface { Watchable Serializable TakeInMemorySnapshot(ctx *Context) (*Snapshot, error) IsFrozen() bool Unfreeze(ctx *Context) error }
implementations of InMemorySnapshotable are Watchables that can take an in-memory snapshot of themselves in a few milliseconds or less. the values in snapshots should be FROZEN and should NOT be connected to other live objects, they should be be able to be mutated again after being unfreezed.
type IncludableChunkfilePreparationArgs ¶
type IncludableChunkfilePreparationArgs struct { Fpath string //path of the file in the .ParsingCompilationContext's filesystem. ParsingContext *Context StdlibCtx context.Context //used as core.DefaultContextConfig.ParentStdLibContext Out io.Writer //defaults to os.Stdout LogOut io.Writer //defaults to Out //used to create the context IncludedChunkContextFileSystem afs.Filesystem }
type IncludedChunk ¶
type IncludedChunk struct { *parse.ParsedChunkSource IncludedChunkForest []*IncludedChunk OriginalErrors []*parse.ParsingError ParsingErrors []Error ParsingErrorPositions []parse.SourcePositionRange }
An IncludedChunk represents an Inox chunk that is included in another chunk, it does not hold any state and should NOT be modified.
func ParseLocalSecondaryChunk ¶
func ParseLocalSecondaryChunk(config LocalSecondaryChunkParsingConfig) (*IncludedChunk, error)
type InclusionMigrationOp ¶
type InclusionMigrationOp struct { Value Pattern Optional bool MigrationMixin }
func (InclusionMigrationOp) ToSymbolicValue ¶
func (op InclusionMigrationOp) ToSymbolicValue(ctx *Context, encountered map[uintptr]symbolic.Value) symbolic.MigrationOp
type IncomingMessageReceivedEvent ¶
type IncomingMessageReceivedEvent struct { MessageType string `json:"messageType"` // examples: http/request, websocket/message Url string `json:"url,omitempty"` }
func (IncomingMessageReceivedEvent) SecondaryDebugEventType ¶
func (e IncomingMessageReceivedEvent) SecondaryDebugEventType() SecondaryDebugEventType
type InoxFunction ¶
type InoxFunction struct { Node parse.Node Chunk *parse.ParsedChunkSource // contains filtered or unexported fields }
An InoxFunction is a Value that represents a function declared inside Inox code. Inox functions that are declared inside modules executed by the bytecode interpreter stores their bytecode and some other information.
func (*InoxFunction) Call ¶
func (fn *InoxFunction) Call(globalState *GlobalState, self Value, args []Value, disabledArgSharing []bool) (Value, error)
Call executes the function with the provided global state, `self` value and arguments. If the function is compiled the bytecode interpreter is used.
func (*InoxFunction) FuncExpr ¶
func (fn *InoxFunction) FuncExpr() *parse.FunctionExpression
func (*InoxFunction) IsMutable ¶
func (fn *InoxFunction) IsMutable() bool
func (*InoxFunction) IsSharable ¶
func (fn *InoxFunction) IsSharable(originState *GlobalState) (bool, string)
func (*InoxFunction) IsShared ¶
func (fn *InoxFunction) IsShared() bool
func (*InoxFunction) OnMutation ¶
func (f *InoxFunction) OnMutation(ctx *Context, microtask MutationCallbackMicrotask, config MutationWatchingConfiguration) (CallbackHandle, error)
func (*InoxFunction) PrettyPrint ¶
func (g *InoxFunction) PrettyPrint(w *bufio.Writer, config *PrettyPrintConfig, depth int, parentIndentCount int)
func (*InoxFunction) RemoveMutationCallback ¶
func (f *InoxFunction) RemoveMutationCallback(ctx *Context, handle CallbackHandle)
func (*InoxFunction) RemoveMutationCallbackMicrotasks ¶
func (f *InoxFunction) RemoveMutationCallbackMicrotasks(ctx *Context)
func (*InoxFunction) Share ¶
func (fn *InoxFunction) Share(originState *GlobalState)
func (*InoxFunction) SmartLock ¶
func (fn *InoxFunction) SmartLock(state *GlobalState)
func (*InoxFunction) SmartUnlock ¶
func (fn *InoxFunction) SmartUnlock(state *GlobalState)
func (*InoxFunction) ToSymbolicValue ¶
func (*InoxFunction) Watcher ¶
func (f *InoxFunction) Watcher(ctx *Context, config WatcherConfiguration) Watcher
func (*InoxFunction) WriteJSONRepresentation ¶
func (f *InoxFunction) WriteJSONRepresentation(ctx *Context, w *jsoniter.Stream, config JSONSerializationConfig, depth int) error
type InstructionCallbackFn ¶
type Int ¶
type Int int64
Int implements Value.
func (Int) IsRecursivelyRenderable ¶
func (n Int) IsRecursivelyRenderable(ctx *Context, input RenderingInput) bool
func (Int) PrettyPrint ¶
func (Int) ToSymbolicValue ¶
func (Int) WriteJSONRepresentation ¶
type IntList ¶
type IntList = NumberList[Int]
type IntRange ¶
type IntRange struct {
// contains filtered or unexported fields
}
An IntRange represents an int64 range, IntRange implements Value. Inox's integer range literals (e.g. `1..2`) evaluate to an IntRange.
func NewIntRange ¶
func NewUnknownStartIntRange ¶
func (IntRange) HasKnownStart ¶
func (IntRange) InclusiveEnd ¶
func (IntRange) Iterator ¶
func (r IntRange) Iterator(ctx *Context, config IteratorConfiguration) Iterator
func (IntRange) KnownStart ¶
func (IntRange) Len ¶
Len returns the number of integers in the range if the start (lower bound) is known. Len panics otherwise.
func (IntRange) PrettyPrint ¶
func (IntRange) ToSymbolicValue ¶
func (IntRange) WriteJSONRepresentation ¶
type IntRangeIterator ¶
type IntRangeIterator struct {
// contains filtered or unexported fields
}
func (*IntRangeIterator) HasNext ¶
func (it *IntRangeIterator) HasNext(*Context) bool
func (IntRangeIterator) IsMutable ¶
func (it IntRangeIterator) IsMutable() bool
func (*IntRangeIterator) Key ¶
func (it *IntRangeIterator) Key(ctx *Context) Value
func (*IntRangeIterator) Next ¶
func (it *IntRangeIterator) Next(ctx *Context) bool
func (IntRangeIterator) PrettyPrint ¶
func (it IntRangeIterator) PrettyPrint(w *bufio.Writer, config *PrettyPrintConfig, depth int, parentIndentCount int)
func (IntRangeIterator) ToSymbolicValue ¶
func (*IntRangeIterator) Value ¶
func (it *IntRangeIterator) Value(*Context) Value
type IntRangePattern ¶
type IntRangePattern struct { NotCallablePatternMixin // contains filtered or unexported fields }
An IntRangePattern represents a pattern matching integers in a given range.
func NewIncludedEndIntRangePattern ¶
func NewIncludedEndIntRangePattern(start, end int64, multipleOf int64) *IntRangePattern
multipleOf is ignored if not greater than zero
func NewIntRangePattern ¶
func NewIntRangePattern(intRange IntRange, multipleOf int64) *IntRangePattern
$multipleOf is ignored if not greater than zero.
func NewIntRangePatternFloatMultiple ¶
func NewIntRangePatternFloatMultiple(intRange IntRange, multipleOf Float) *IntRangePattern
$multipleOf is ignored if not greater than zero.
func NewSingleElementIntRangePattern ¶
func NewSingleElementIntRangePattern(n int64) *IntRangePattern
func (*IntRangePattern) HasMultipleOfConstraint ¶
func (patt *IntRangePattern) HasMultipleOfConstraint() bool
func (*IntRangePattern) IsMutable ¶
func (patt *IntRangePattern) IsMutable() bool
func (*IntRangePattern) Iterator ¶
func (patt *IntRangePattern) Iterator(ctx *Context, config IteratorConfiguration) Iterator
func (*IntRangePattern) PrettyPrint ¶
func (patt *IntRangePattern) PrettyPrint(w *bufio.Writer, config *PrettyPrintConfig, depth int, parentIndentCount int)
func (*IntRangePattern) Random ¶
func (patt *IntRangePattern) Random(ctx *Context, options ...Option) Value
func (*IntRangePattern) Range ¶
func (patt *IntRangePattern) Range() IntRange
func (*IntRangePattern) StringPattern ¶
func (patt *IntRangePattern) StringPattern() (StringPattern, bool)
func (*IntRangePattern) ToSymbolicValue ¶
func (IntRangePattern) WriteJSONRepresentation ¶
func (p IntRangePattern) WriteJSONRepresentation(ctx *Context, w *jsoniter.Stream, config JSONSerializationConfig, depth int) error
type IntRangeStringPattern ¶
type IntRangeStringPattern struct { NotCallablePatternMixin // contains filtered or unexported fields }
An IntRangeStringPattern matches a string (or substring) representing a decimal integer number in a given range. Example: for the range (-99,99) the found match substrings in the following strings are surrounded by parentheses. positive: (12) (12)- a12 123 12_ 12a a12
negative: (-12) (-12)- -(-12) a(-12) -123 -12_ -12a
func NewIntRangeStringPattern ¶
func NewIntRangeStringPattern(lower, upperIncluded int64, node parse.Node) *IntRangeStringPattern
func (*IntRangeStringPattern) CompiledRegex ¶
func (patt *IntRangeStringPattern) CompiledRegex() *regexp.Regexp
func (*IntRangeStringPattern) EffectiveLengthRange ¶
func (patt *IntRangeStringPattern) EffectiveLengthRange() IntRange
func (*IntRangeStringPattern) FindMatches ¶
func (patt *IntRangeStringPattern) FindMatches(ctx *Context, val Serializable, config MatchesFindConfig) (groups []Serializable, err error)
func (*IntRangeStringPattern) HasRegex ¶
func (patt *IntRangeStringPattern) HasRegex() bool
func (*IntRangeStringPattern) IsMutable ¶
func (patt *IntRangeStringPattern) IsMutable() bool
func (*IntRangeStringPattern) IsResolved ¶
func (patt *IntRangeStringPattern) IsResolved() bool
func (*IntRangeStringPattern) Iterator ¶
func (patt *IntRangeStringPattern) Iterator(ctx *Context, config IteratorConfiguration) Iterator
func (*IntRangeStringPattern) LengthRange ¶
func (patt *IntRangeStringPattern) LengthRange() IntRange
func (*IntRangeStringPattern) Parse ¶
func (patt *IntRangeStringPattern) Parse(ctx *Context, s string) (Serializable, error)
func (*IntRangeStringPattern) PatternNestingDepth ¶
func (patt *IntRangeStringPattern) PatternNestingDepth(parentDepth int) int
func (*IntRangeStringPattern) PrettyPrint ¶
func (patt *IntRangeStringPattern) PrettyPrint(w *bufio.Writer, config *PrettyPrintConfig, depth int, parentIndentCount int)
func (*IntRangeStringPattern) Random ¶
func (pattern *IntRangeStringPattern) Random(ctx *Context, options ...Option) Value
func (*IntRangeStringPattern) Regex ¶
func (patt *IntRangeStringPattern) Regex() string
func (*IntRangeStringPattern) Resolve ¶
func (patt *IntRangeStringPattern) Resolve() (StringPattern, error)
func (*IntRangeStringPattern) StringFrom ¶
func (patt *IntRangeStringPattern) StringFrom(ctx *Context, v Value) (string, error)
func (*IntRangeStringPattern) StringPattern ¶
func (patt *IntRangeStringPattern) StringPattern() (StringPattern, bool)
func (*IntRangeStringPattern) Test ¶
func (patt *IntRangeStringPattern) Test(ctx *Context, v Value) bool
func (*IntRangeStringPattern) ToSymbolicValue ¶
func (*IntRangeStringPattern) WriteJSONRepresentation ¶
func (patt *IntRangeStringPattern) WriteJSONRepresentation(ctx *Context, w *jsoniter.Stream, config JSONSerializationConfig, depth int) error
type Integral ¶
Integral should be implemented by values representing an integer (int, byte, quantities, ...). Implementations should be immutable.
type InternalPublicationId ¶
type InternalPublicationId int64
type IntersectionPattern ¶
type IntersectionPattern struct { NotCallablePatternMixin // contains filtered or unexported fields }
func NewIntersectionPattern ¶
func NewIntersectionPattern(cases []Pattern, node parse.Node) *IntersectionPattern
func (*IntersectionPattern) IsMutable ¶
func (patt *IntersectionPattern) IsMutable() bool
func (*IntersectionPattern) Iterator ¶
func (patt *IntersectionPattern) Iterator(ctx *Context, config IteratorConfiguration) Iterator
func (*IntersectionPattern) PrettyPrint ¶
func (patt *IntersectionPattern) PrettyPrint(w *bufio.Writer, config *PrettyPrintConfig, depth int, parentIndentCount int)
func (*IntersectionPattern) Random ¶
func (patt *IntersectionPattern) Random(ctx *Context, options ...Option) Value
func (*IntersectionPattern) StringPattern ¶
func (patt *IntersectionPattern) StringPattern() (StringPattern, bool)
func (*IntersectionPattern) Test ¶
func (patt *IntersectionPattern) Test(ctx *Context, v Value) bool
func (*IntersectionPattern) ToSymbolicValue ¶
func (IntersectionPattern) WriteJSONRepresentation ¶
func (patt IntersectionPattern) WriteJSONRepresentation(ctx *Context, w *jsoniter.Stream, config JSONSerializationConfig, depth int) error
type IpropsIterator ¶
type IpropsIterator struct {
// contains filtered or unexported fields
}
func (*IpropsIterator) HasNext ¶
func (it *IpropsIterator) HasNext(*Context) bool
func (*IpropsIterator) IsMutable ¶
func (it *IpropsIterator) IsMutable() bool
func (*IpropsIterator) Key ¶
func (it *IpropsIterator) Key(*Context) Value
func (*IpropsIterator) Next ¶
func (it *IpropsIterator) Next(ctx *Context) bool
func (*IpropsIterator) PrettyPrint ¶
func (it *IpropsIterator) PrettyPrint(w *bufio.Writer, config *PrettyPrintConfig, depth int, parentIndentCount int)
func (*IpropsIterator) ToSymbolicValue ¶
func (*IpropsIterator) Value ¶
func (it *IpropsIterator) Value(*Context) Value
type Iterable ¶
type Iterable interface { Value //Iterator should return a new iterator that is not affected by mutations of the iterable. //TODO: Update the implementations that currently do not meet this requirement (e.g. *Object). Iterator(*Context, IteratorConfiguration) Iterator }
An Iterable is a Value that provides an iterator. Patterns' implementations can either return an empty iterator or an iterator that loops over values matching the pattern.
type IterationChange ¶
type IterationChange int
const ( NoIterationChange IterationChange = iota BreakIteration ContinueIteration PruneWalk )
func (IterationChange) String ¶
func (change IterationChange) String() string
type Iterator ¶
type Iterator interface { Value HasNext(*Context) bool Next(*Context) bool Key(*Context) Value Value(*Context) Value }
func NewEventSourceIterator ¶
func NewEventSourceIterator(source EventSource, config IteratorConfiguration) Iterator
func NewIpropsIterator ¶
func NewIpropsIterator(ctx *Context, keys []string, values []Value, config IteratorConfiguration) Iterator
NewIpropsIterator creates an IpropsIterator, the provided keys slice and values slice should not be modified.
type IteratorConfiguration ¶
type IteratorConfiguration struct { KeyFilter Pattern ValueFilter Pattern KeysNeverRead bool //indicates that the Iterator.Key method will not be called. }
func (IteratorConfiguration) CreateIterator ¶
func (config IteratorConfiguration) CreateIterator(base Iterator) Iterator
CreateIterator wraps an iterator in a filtering iterator if necessary
type JSONSerializationConfig ¶
type JSONSerializationConfig struct { *ReprConfig Pattern Pattern //nillable Location string //location of the current value being serialized }
type KeyFilteredIterator ¶
type KeyFilteredIterator struct {
// contains filtered or unexported fields
}
func (*KeyFilteredIterator) HasNext ¶
func (it *KeyFilteredIterator) HasNext(ctx *Context) bool
func (*KeyFilteredIterator) IsMutable ¶
func (it *KeyFilteredIterator) IsMutable() bool
func (*KeyFilteredIterator) Key ¶
func (it *KeyFilteredIterator) Key(ctx *Context) Value
func (*KeyFilteredIterator) Next ¶
func (it *KeyFilteredIterator) Next(ctx *Context) bool
func (*KeyFilteredIterator) PrettyPrint ¶
func (it *KeyFilteredIterator) PrettyPrint(w *bufio.Writer, config *PrettyPrintConfig, depth int, parentIndentCount int)
func (*KeyFilteredIterator) ToSymbolicValue ¶
func (*KeyFilteredIterator) Value ¶
func (it *KeyFilteredIterator) Value(ctx *Context) Value
type KeyList ¶
type KeyList []string
func (KeyList) Iterator ¶
func (l KeyList) Iterator(ctx *Context, config IteratorConfiguration) Iterator
func (KeyList) PrettyPrint ¶
func (KeyList) ToSymbolicValue ¶
func (KeyList) WriteJSONRepresentation ¶
type KeyValueFilteredIterator ¶
type KeyValueFilteredIterator struct {
// contains filtered or unexported fields
}
func (*KeyValueFilteredIterator) HasNext ¶
func (it *KeyValueFilteredIterator) HasNext(ctx *Context) bool
func (*KeyValueFilteredIterator) IsMutable ¶
func (it *KeyValueFilteredIterator) IsMutable() bool
func (*KeyValueFilteredIterator) Key ¶
func (it *KeyValueFilteredIterator) Key(ctx *Context) Value
func (*KeyValueFilteredIterator) Next ¶
func (it *KeyValueFilteredIterator) Next(ctx *Context) bool
func (*KeyValueFilteredIterator) PrettyPrint ¶
func (it *KeyValueFilteredIterator) PrettyPrint(w *bufio.Writer, config *PrettyPrintConfig, depth int, parentIndentCount int)
func (*KeyValueFilteredIterator) ToSymbolicValue ¶
func (*KeyValueFilteredIterator) Value ¶
func (it *KeyValueFilteredIterator) Value(ctx *Context) Value
type LThread ¶
type LThread struct {
// contains filtered or unexported fields
}
A LThread is similar to a goroutine in Golang, it represents the execution of a single module and can be cancelled at any time. It pauses at each yield statement.
func ImportModule ¶
func ImportModule(config ImportConfig) (*LThread, error)
ImportModule imports a module and returned a spawned lthread running the module.
func SpawnLThread ¶
func SpawnLThread(args LthreadSpawnArgs) (*LThread, error)
SpawnLThread spawns a new lthread, if .LthreadCtx is nil a minimal context is created for the lthread. The provided globals that are not thread safe are wrapped in a SharedValue.
func SpawnLthreadWithState ¶
func SpawnLthreadWithState(args LthreadWithStateSpawnArgs) (*LThread, error)
func (*LThread) GetGoMethod ¶
func (r *LThread) GetGoMethod(name string) (*GoFunction, bool)
func (*LThread) PrettyPrint ¶
func (*LThread) PropertyNames ¶
func (*LThread) ResumeAsync ¶
func (*LThread) ToSymbolicValue ¶
type LThreadGroup ¶
type LThreadGroup struct {
// contains filtered or unexported fields
}
A LThreadGroup is a group of lthreads, it simplifies the interaction with the lthreads.
func NewLThreadGroup ¶
func NewLThreadGroup(ctx *Context) *LThreadGroup
func (*LThreadGroup) Add ¶
func (group *LThreadGroup) Add(newRt *LThread)
func (*LThreadGroup) CancelAll ¶
func (group *LThreadGroup) CancelAll(*Context)
CancelAll stops the execution of all threads in the group.
func (*LThreadGroup) GetGoMethod ¶
func (g *LThreadGroup) GetGoMethod(name string) (*GoFunction, bool)
func (*LThreadGroup) IsMutable ¶
func (g *LThreadGroup) IsMutable() bool
func (*LThreadGroup) PrettyPrint ¶
func (g *LThreadGroup) PrettyPrint(w *bufio.Writer, config *PrettyPrintConfig, depth int, parentIndentCount int)
func (*LThreadGroup) PropertyNames ¶
func (*LThreadGroup) PropertyNames(ctx *Context) []string
func (*LThreadGroup) SetProp ¶
func (*LThreadGroup) SetProp(ctx *Context, name string, value Value) error
func (*LThreadGroup) ToSymbolicValue ¶
func (*LThreadGroup) WaitAllResults ¶
func (group *LThreadGroup) WaitAllResults(ctx *Context) (*Array, error)
WaitAllResults waits for the results of all threads in the group and returns a list of results.
type LThreadPermission ¶
type LThreadPermission struct {
Kind_ PermissionKind
}
func (LThreadPermission) Includes ¶
func (perm LThreadPermission) Includes(otherPerm Permission) bool
func (LThreadPermission) InternalPermTypename ¶
func (perm LThreadPermission) InternalPermTypename() permkind.InternalPermissionTypename
func (LThreadPermission) Kind ¶
func (perm LThreadPermission) Kind() PermissionKind
func (LThreadPermission) String ¶
func (perm LThreadPermission) String() string
type LThreadSpawnedEvent ¶
type LThreadSpawnedEvent struct {
StateId StateId `json:"threadId,omitempty"`
}
func (LThreadSpawnedEvent) SecondaryDebugEventType ¶
func (e LThreadSpawnedEvent) SecondaryDebugEventType() SecondaryDebugEventType
type LengthCheckingStringPattern ¶
type LengthCheckingStringPattern struct { NotCallablePatternMixin // contains filtered or unexported fields }
LengthCheckingStringPattern matches any StringLikes with a length in a given range.
func NewLengthCheckingStringPattern ¶
func NewLengthCheckingStringPattern(minLength, maxLength int64) *LengthCheckingStringPattern
func (*LengthCheckingStringPattern) CompiledRegex ¶
func (patt *LengthCheckingStringPattern) CompiledRegex() *regexp.Regexp
func (*LengthCheckingStringPattern) EffectiveLengthRange ¶
func (patt *LengthCheckingStringPattern) EffectiveLengthRange() IntRange
func (*LengthCheckingStringPattern) FindMatches ¶
func (patt *LengthCheckingStringPattern) FindMatches(ctx *Context, val Serializable, config MatchesFindConfig) (groups []Serializable, err error)
func (*LengthCheckingStringPattern) HasRegex ¶
func (pattern *LengthCheckingStringPattern) HasRegex() bool
func (*LengthCheckingStringPattern) IsMutable ¶
func (patt *LengthCheckingStringPattern) IsMutable() bool
func (*LengthCheckingStringPattern) IsResolved ¶
func (pattern *LengthCheckingStringPattern) IsResolved() bool
func (LengthCheckingStringPattern) Iterator ¶
func (patt LengthCheckingStringPattern) Iterator(ctx *Context, config IteratorConfiguration) Iterator
func (*LengthCheckingStringPattern) LengthRange ¶
func (patt *LengthCheckingStringPattern) LengthRange() IntRange
func (*LengthCheckingStringPattern) MatchGroups ¶
func (patt *LengthCheckingStringPattern) MatchGroups(ctx *Context, v Serializable) (map[string]Serializable, bool, error)
func (*LengthCheckingStringPattern) Parse ¶
func (patt *LengthCheckingStringPattern) Parse(ctx *Context, s string) (Serializable, error)
func (*LengthCheckingStringPattern) PatternNestingDepth ¶
func (patt *LengthCheckingStringPattern) PatternNestingDepth(parentDepth int) int
func (*LengthCheckingStringPattern) PrettyPrint ¶
func (patt *LengthCheckingStringPattern) PrettyPrint(w *bufio.Writer, config *PrettyPrintConfig, depth int, parentIndentCount int)
func (LengthCheckingStringPattern) Random ¶
func (patt LengthCheckingStringPattern) Random(ctx *Context, options ...Option) Value
func (*LengthCheckingStringPattern) Regex ¶
func (pattern *LengthCheckingStringPattern) Regex() string
func (*LengthCheckingStringPattern) Resolve ¶
func (patt *LengthCheckingStringPattern) Resolve() (StringPattern, error)
func (*LengthCheckingStringPattern) StringPattern ¶
func (patt *LengthCheckingStringPattern) StringPattern() (StringPattern, bool)
func (*LengthCheckingStringPattern) Test ¶
func (pattern *LengthCheckingStringPattern) Test(ctx *Context, v Value) bool
func (*LengthCheckingStringPattern) ToSymbolicValue ¶
func (LengthCheckingStringPattern) WriteJSONRepresentation ¶
func (patt LengthCheckingStringPattern) WriteJSONRepresentation(ctx *Context, w *jsoniter.Stream, config JSONSerializationConfig, depth int) error
type LifetimeJob ¶
type LifetimeJob struct {
// contains filtered or unexported fields
}
A LifetimeJob represents a job associated with a value that runs while the value exists, this struct does not hold any state, see LifetimeJobInstance. LifetimeJob implements Value.
func NewLifetimeJob ¶
func NewLifetimeJob(meta Value, subjectPattern Pattern, mod *Module, bytecode *Bytecode, parentState *GlobalState) (*LifetimeJob, error)
func (*LifetimeJob) GetGoMethod ¶
func (j *LifetimeJob) GetGoMethod(name string) (*GoFunction, bool)
func (*LifetimeJob) Instantiate ¶
func (j *LifetimeJob) Instantiate(ctx *Context, self Value) (*LifetimeJobInstance, error)
Instantiate creates a instance of the job with a paused goroutine.
func (*LifetimeJob) IsMutable ¶
func (*LifetimeJob) IsMutable() bool
func (*LifetimeJob) PrettyPrint ¶
func (j *LifetimeJob) PrettyPrint(w *bufio.Writer, config *PrettyPrintConfig, depth int, parentIndentCount int)
func (*LifetimeJob) PropertyNames ¶
func (*LifetimeJob) PropertyNames(ctx *Context) []string
func (*LifetimeJob) SetProp ¶
func (*LifetimeJob) SetProp(ctx *Context, name string, value Value) error
func (*LifetimeJob) ToSymbolicValue ¶
func (*LifetimeJob) WriteJSONRepresentation ¶
func (j *LifetimeJob) WriteJSONRepresentation(ctx *Context, w *jsoniter.Stream, config JSONSerializationConfig, depth int) error
type LifetimeJobInstance ¶
type LifetimeJobInstance struct {
// contains filtered or unexported fields
}
type Limit ¶
type Limit struct { Name string Kind LimitKind Value int64 DecrementFn TokenDepletionFn //optional. Called on each tick of the associated bucket's timer. }
A Limit represents a limit for a running piece of code, for example: the maximum rate of http requests. A Context stores one token bucket for each provided limit. A Limit does not hold any state.
func GetDefaultMaxRequestHandlerLimits ¶
func GetDefaultMaxRequestHandlerLimits() []Limit
func GetDefaultRequestHandlingLimits ¶
func GetDefaultRequestHandlingLimits() []Limit
func GetDefaultScriptLimits ¶
func GetDefaultScriptLimits() []Limit
func GetLimit ¶
func GetLimit(ctx *Context, limitName string, limitValue Serializable) (_ Limit, resultErr error)
func (Limit) LessOrAsRestrictiveAs ¶
func (Limit) MoreRestrictiveThan ¶
type LineCount ¶
type LineCount int64
LineCount implements Value.
func (LineCount) IsZeroQuantity ¶
func (LineCount) PrettyPrint ¶
func (LineCount) ToSymbolicValue ¶
func (LineCount) WriteJSONRepresentation ¶
type List ¶
type List struct {
// contains filtered or unexported fields
}
A List represents a sequence of elements, List implements Value. The elements are stored in an underlyingList that is suited for the number and kind of elements, for example if the elements are all integers the underlying list will (ideally) be an *IntList.
func GetAtMost ¶
func GetAtMost(ctx *Context, maxCount Int, iterable SerializableIterable) *List
GetAtMost is the value of the 'get_at_most' global.
func MapIterable ¶
MapIterable is the value of the 'map' global.
func NewWrappedBoolList ¶
func NewWrappedFloatList ¶
func NewWrappedFloatListFrom ¶
func NewWrappedIntList ¶
func NewWrappedIntListFrom ¶
func NewWrappedStringList ¶
func NewWrappedStringList(elements ...StringLike) *List
func NewWrappedStringListFrom ¶
func NewWrappedStringListFrom(elements []StringLike) *List
func NewWrappedValueList ¶
func NewWrappedValueList(elements ...Serializable) *List
func NewWrappedValueListFrom ¶
func NewWrappedValueListFrom(elements []Serializable) *List
func WrapUnderlyingList ¶
func WrapUnderlyingList(l underlyingList) *List
func (*List) Clone ¶
func (list *List) Clone(originState *GlobalState, sharableValues *[]PotentiallySharable, clones map[uintptr]Clonable, depth int) (Serializable, error)
func (*List) Dequeue ¶
func (l *List) Dequeue(ctx *Context) Serializable
func (*List) GetOrBuildElements ¶
func (list *List) GetOrBuildElements(ctx *Context) []Serializable
the caller can modify the result.
func (*List) IsRecursivelyRenderable ¶
func (list *List) IsRecursivelyRenderable(ctx *Context, input RenderingInput) bool
func (*List) Iterator ¶
func (list *List) Iterator(ctx *Context, config IteratorConfiguration) Iterator
func (*List) OnMutation ¶
func (l *List) OnMutation(ctx *Context, microtask MutationCallbackMicrotask, config MutationWatchingConfiguration) (CallbackHandle, error)
func (*List) Pop ¶
func (l *List) Pop(ctx *Context) Serializable
func (*List) PrettyPrint ¶
func (*List) PropertyNames ¶
func (*List) RemoveMutationCallback ¶
func (l *List) RemoveMutationCallback(ctx *Context, handle CallbackHandle)
func (*List) RemoveMutationCallbackMicrotasks ¶
func (*List) ToSymbolicValue ¶
func (*List) WriteJSONRepresentation ¶
type ListPattern ¶
type ListPattern struct { NotCallablePatternMixin // contains filtered or unexported fields }
A ListPattern represents a pattern matching Inox lists (e.g. [1, 2]), ListPattern implements Value.
func NewListPattern ¶
func NewListPattern(elementPatterns []Pattern) *ListPattern
func NewListPatternOf ¶
func NewListPatternOf(generalElementPattern Pattern) *ListPattern
func NewListPatternVariadic ¶
func NewListPatternVariadic(elementPatterns ...Pattern) *ListPattern
func (*ListPattern) DefaultValue ¶
func (patt *ListPattern) DefaultValue(ctx *Context) (Value, error)
func (*ListPattern) ElementPatternAt ¶
func (patt *ListPattern) ElementPatternAt(i int) (Pattern, bool)
func (*ListPattern) ExactElementCount ¶
func (patt *ListPattern) ExactElementCount() (int, bool)
func (*ListPattern) GetMigrationOperations ¶
func (patt *ListPattern) GetMigrationOperations(ctx *Context, next Pattern, pseudoPath string) (migrations []MigrationOp, _ error)
func (*ListPattern) IsMutable ¶
func (patt *ListPattern) IsMutable() bool
func (ListPattern) Iterator ¶
func (patt ListPattern) Iterator(ctx *Context, config IteratorConfiguration) Iterator
func (*ListPattern) MaxElementCount ¶
func (patt *ListPattern) MaxElementCount() int
MaxElementCount returns the maximum number of elements if it is defined. The function panics otherwise. The maximum is not defined for most patterns with an exact number of elements.
func (*ListPattern) MinElementCount ¶
func (patt *ListPattern) MinElementCount() int
MinElementCount returns the minimum number of elements if it is defined. The function panics otherwise. The minimum is not defined for list patterns with an exact number of elements.
func (ListPattern) PrettyPrint ¶
func (patt ListPattern) PrettyPrint(w *bufio.Writer, config *PrettyPrintConfig, depth int, parentIndentCount int)
func (*ListPattern) StringPattern ¶
func (patt *ListPattern) StringPattern() (StringPattern, bool)
func (*ListPattern) ToSymbolicValue ¶
func (*ListPattern) WithElement ¶
func (patt *ListPattern) WithElement(element Pattern) *ListPattern
WithMinMaxElements return a new version of the pattern that expects at least one occurrence of element.
func (*ListPattern) WithMinElements ¶
func (patt *ListPattern) WithMinElements(minCount int) *ListPattern
WithMinMaxElements return a new version of the pattern with the given minimum count constraints.
func (*ListPattern) WithMinMaxElements ¶
func (patt *ListPattern) WithMinMaxElements(minCount, maxCount int) *ListPattern
WithMinMaxElements return a new version of the pattern with the given minimum & maximum element count constraints.
func (ListPattern) WriteJSONRepresentation ¶
func (patt ListPattern) WriteJSONRepresentation(ctx *Context, w *jsoniter.Stream, config JSONSerializationConfig, depth int) error
type LiteTransactionIsolator ¶
type LiteTransactionIsolator struct {
// contains filtered or unexported fields
}
func (*LiteTransactionIsolator) WaitForOtherReadWriteTxToTerminate ¶
func (isolator *LiteTransactionIsolator) WaitForOtherReadWriteTxToTerminate(ctx *Context, requireRunningTx bool) (currentTx *Transaction, _ error)
WaitForOtherReadWriteTxToTerminate waits for the currently tracked read-write transaction to terminate if the context's transaction is read-write. The function does not wait if no read-write transaction is tracked, or if the context's transaction is readonly. When the currently tracked read-write transaction terminates, a random transaction among all waiting transactions resumes. In other words the first transaction to start waiting is not necessarily the one to resume first. TODO: AVOID STARVATION.
type LoadSelfManagedEntityFn ¶
type LoadSelfManagedEntityFn func(ctx *Context, args FreeEntityLoadingParams) (UrlHolder, error)
LoadSelfManagedEntityFn should load a self-managed entity and should call the corresponding migration handlers. In the case of a deletion (nil, nil) should be returned. If the entity changes due to a migration this function should call LoadSelfManagedEntityFn with the new value passed in .InitialValue.
type LocatedEvalError ¶
type LocatedEvalError struct { Message string Location parse.SourcePositionStack // contains filtered or unexported fields }
func (LocatedEvalError) LocationStack ¶
func (err LocatedEvalError) LocationStack() parse.SourcePositionStack
func (LocatedEvalError) MessageWithoutLocation ¶
func (err LocatedEvalError) MessageWithoutLocation() string
func (LocatedEvalError) Unwrap ¶
func (e LocatedEvalError) Unwrap() error
type LockedContextData ¶
type LogLevels ¶
type LogLevels struct {
// contains filtered or unexported fields
}
func NewLogLevels ¶
func NewLogLevels(init LogLevelsInitialization) *LogLevels
func (*LogLevels) AreInternalDebugLogsEnabled ¶
type LogLevelsInitialization ¶
type LongValuePath ¶
type LongValuePath []ValuePathSegment
A LongValuePath represents a path (>= 2 segments) to a value in a structure, LongValuePath implements Value.
func NewLongValuePath ¶
func NewLongValuePath(segments []ValuePathSegment) *LongValuePath
func (*LongValuePath) IsMutable ¶
func (p *LongValuePath) IsMutable() bool
func (*LongValuePath) PrettyPrint ¶
func (p *LongValuePath) PrettyPrint(w *bufio.Writer, config *PrettyPrintConfig, depth int, parentIndentCount int)
func (*LongValuePath) ToSymbolicValue ¶
func (*LongValuePath) Validate ¶
func (p *LongValuePath) Validate() error
func (*LongValuePath) WriteJSONRepresentation ¶
func (p *LongValuePath) WriteJSONRepresentation(ctx *Context, w *jsoniter.Stream, config JSONSerializationConfig, depth int) error
type LthreadSpawnArgs ¶
type LthreadSpawnArgs struct { SpawnerState *GlobalState Globals GlobalVariables NewGlobals []string //listed globals are not shared nor cloned. Module *Module Manifest *Manifest LthreadCtx *Context Logger zerolog.Logger //defaults to spawner's logger IsTestingEnabled bool TestFilters TestFilters TestItem TestItem TestedProgram *Module //AbsScriptDir string Bytecode *Bytecode UseBytecode bool StartPaused bool Self Value Timeout time.Duration // Even if true a token is taken for the threads/simul-instances limit IgnoreCreateLThreadPermCheck bool PauseAfterYield bool }
type LthreadWithStateSpawnArgs ¶
type LthreadWithStateSpawnArgs struct { Timeout time.Duration SpawnerState *GlobalState State *GlobalState UseBytecode bool PauseAfterYield bool StartPaused bool Self Value }
type Manifest ¶
type Manifest struct { //note: permissions required for reading the preinit files are in .PreinitFiles. RequiredPermissions []Permission Limits []Limit HostDefinitions map[Host]Value EnvPattern *ObjectPattern Parameters ModuleParameters PreinitFiles PreinitFiles Databases DatabaseConfigs AutoInvocation *AutoInvocationConfig //can be nil InitialWorkingDirectory Path // contains filtered or unexported fields }
A Manifest contains most of the user-defined metadata about a Module.
func NewEmptyManifest ¶
func NewEmptyManifest() *Manifest
func (*Manifest) ArePermsGranted ¶
func (m *Manifest) ArePermsGranted(grantedPerms []Permission, forbiddenPermissions []Permission) (b bool, missingPermissions []Permission)
func (*Manifest) OwnedDatabases ¶
func (m *Manifest) OwnedDatabases() []DatabaseConfig
func (*Manifest) RequiresPermission ¶
func (m *Manifest) RequiresPermission(perm Permission) bool
type Mapping ¶
type Mapping struct {
// contains filtered or unexported fields
}
func NewMapping ¶
func NewMapping(expr *parse.MappingExpression, state *GlobalState) (*Mapping, error)
func (*Mapping) GetGoMethod ¶
func (m *Mapping) GetGoMethod(name string) (*GoFunction, bool)
func (*Mapping) IsSharable ¶
func (m *Mapping) IsSharable(originState *GlobalState) (bool, string)
func (*Mapping) PrettyPrint ¶
func (*Mapping) PropertyNames ¶
func (*Mapping) Share ¶
func (m *Mapping) Share(originState *GlobalState)
func (*Mapping) SmartLock ¶
func (*Mapping) SmartLock(state *GlobalState)
func (*Mapping) SmartUnlock ¶
func (*Mapping) SmartUnlock(state *GlobalState)
func (*Mapping) ToSymbolicValue ¶
func (*Mapping) WriteJSONRepresentation ¶
type MappingStaticData ¶
type MappingStaticData struct {
// contains filtered or unexported fields
}
type MatchesFindConfig ¶
type MatchesFindConfig struct {
Kind MatchesFindConfigKind
}
type MatchesFindConfigKind ¶
type MatchesFindConfigKind int
const ( FindFirstMatch MatchesFindConfigKind = iota FindAllMatches )
type Message ¶
type Message struct {
// contains filtered or unexported fields
}
A Message is an immutable package around an immutable piece of data sent by a sender to a MessageReceiver, Message implements Value.
func NewMessage ¶
func (Message) PrettyPrint ¶
func (Message) PropertyNames ¶
type MessageReceiver ¶
type MessageReceiver interface { SystemGraphNodeValue ReceiveMessage(ctx *Context, msg Message) error }
type MigrationAwarePattern ¶
type MigrationAwarePattern interface { Pattern GetMigrationOperations(ctx *Context, next Pattern, pseudoPath string) ([]MigrationOp, error) }
TODO: improve name
type MigrationCapable ¶
type MigrationCapable interface { Serializable //Migrate recursively perfoms a migration, it calls the passed handlers, //if a migration operation is a deletion of the MigrationCapable nil should be returned. //This method should be called before any change to the MigrationCapable. Migrate(ctx *Context, key Path, migration *FreeEntityMigrationArgs) (Value, error) }
type MigrationMixin ¶
type MigrationMixin struct {
PseudoPath string
}
func (MigrationMixin) GetPseudoPath ¶
func (m MigrationMixin) GetPseudoPath() string
type MigrationOp ¶
type MigrationOp interface { GetPseudoPath() string ToSymbolicValue(ctx *Context, encountered map[uintptr]symbolic.Value) symbolic.MigrationOp }
func GetMigrationOperations ¶
func GetMigrationOperations(ctx *Context, current, next Pattern, pseudoPath string) ([]MigrationOp, error)
func GetTopLevelEntitiesMigrationOperations ¶
func GetTopLevelEntitiesMigrationOperations(ctx *Context, current, next *ObjectPattern) ([]MigrationOp, error)
type MigrationOpHandler ¶
type MigrationOpHandler struct { //ignored if InitialValue is set Function *InoxFunction InitialValue Serializable }
func (MigrationOpHandler) GetResult ¶
func (h MigrationOpHandler) GetResult(ctx *Context, state *GlobalState) Value
type MigrationOpHandlers ¶
type MigrationOpHandlers struct { Deletions map[PathPattern]*MigrationOpHandler //handler can be nil Inclusions map[PathPattern]*MigrationOpHandler Replacements map[PathPattern]*MigrationOpHandler Initializations map[PathPattern]*MigrationOpHandler }
func (MigrationOpHandlers) FilterByPrefix ¶
func (handlers MigrationOpHandlers) FilterByPrefix(path Path) MigrationOpHandlers
func (MigrationOpHandlers) FilterTopLevel ¶
func (handlers MigrationOpHandlers) FilterTopLevel() MigrationOpHandlers
type MigrationOpKind ¶
type MigrationOpKind int
const ( RemovalMigrationOperation MigrationOpKind = iota + 1 ReplacementMigrationOperation InclusionMigrationOperation InitializationMigrationOperation )
type Mimetype ¶
type Mimetype string
A Mimetype represents a MIME type, it can include parameters. Mimetype implements Value.
func MimeTypeFrom ¶
MimeTypeFrom checks that s is a valid mime type and returns a normalized Mimetype.
func (Mimetype) PrettyPrint ¶
func (Mimetype) ToSymbolicValue ¶
func (Mimetype) UnderlyingString ¶
func (Mimetype) WithoutParams ¶
func (Mimetype) WriteJSONRepresentation ¶
type Module ¶
type Module struct { ModuleKind MainChunk *parse.ParsedChunkSource IncludedChunkForest []*IncludedChunk FlattenedIncludedChunkList []*IncludedChunk InclusionStatementMap map[*parse.InclusionImportStatement]*IncludedChunk IncludedChunkMap map[string]*IncludedChunk DirectlyImportedModules map[string]*Module DirectlyImportedModulesByStatement map[*parse.ImportStatement]*Module ManifestTemplate *parse.Manifest ParsingErrors []Error ParsingErrorPositions []parse.SourcePositionRange OriginalErrors []*parse.ParsingError //len(.OriginalErrors) <= len(.ParsingErrors) // contains filtered or unexported fields }
A Module represents an Inox module, it does not hold any state and should NOT be modified. Module implements Value.
func ParseInMemoryModule ¶
func ParseInMemoryModule(codeString String, config InMemoryModuleParsingConfig) (*Module, error)
func ParseLocalModule ¶
func ParseLocalModule(fpath string, config ModuleParsingConfig) (*Module, error)
func ParseModuleFromSource ¶
func ParseModuleFromSource(src parse.ChunkSource, resource ResourceName, config ModuleParsingConfig) (*Module, error)
func (*Module) AbsoluteSource ¶
func (mod *Module) AbsoluteSource() (ResourceName, bool)
AbsoluteSource returns the absolute resource name (URL or absolute path) of the module. If the module is embedded or has an in-memory source then (nil, false) is returned.
func (*Module) GetGoMethod ¶
func (*Module) GetGoMethod(name string) (*GoFunction, bool)
func (*Module) HasURLSource ¶
func (*Module) ImportStatements ¶
func (mod *Module) ImportStatements() (imports []*parse.ImportStatement)
ImportStatements returns the top-level import statements.
func (*Module) ParameterNames ¶
func (*Module) ParsingErrorTuple ¶
func (*Module) PreInit ¶
func (m *Module) PreInit(preinitArgs PreinitArgs) (_ *Manifest, usedRunningState *TreeWalkState, _ []*StaticCheckError, preinitErr error)
PreInit performs the pre-initialization of the module: 1) the pre-init block is statically checked (if present). 2) the manifest's object literal is statically checked. 3) if .RunningState is not nil go to 10) 4) else (.RunningState is nil) a temporary context & state are created. 5) pre-evaluate the env section of the manifest. 6) pre-evaluate the preinit-files section of the manifest. 7) read & parse the preinit-files using the provided .PreinitFilesystem. 8) evaluate & define the global constants (const ....). 9) evaluate the preinit block. 10) evaluate the manifest's object literal. 11) create the manifest.
If an error occurs at any step, the function returns.
func (*Module) PrettyPrint ¶
func (*Module) PropertyNames ¶
func (*Module) ToSymbolic ¶
type ModuleArgs ¶
type ModuleArgs struct {
// contains filtered or unexported fields
}
ModuleArgs contains the arguments passed to a module, ModuleArgs implements Value.
func NewEmptyModuleArgs ¶
func NewEmptyModuleArgs() *ModuleArgs
func NewModuleArgs ¶
func NewModuleArgs(fields map[string]Value) *ModuleArgs
func (*ModuleArgs) Clone ¶
func (s *ModuleArgs) Clone(originState *GlobalState, sharableValues *[]PotentiallySharable, clones map[uintptr]Clonable, depth int) (Value, error)
func (*ModuleArgs) ForEachField ¶
func (s *ModuleArgs) ForEachField(fn func(fieldName string, fieldValue Value) error) error
func (*ModuleArgs) IsMutable ¶
func (s *ModuleArgs) IsMutable() bool
func (*ModuleArgs) PrettyPrint ¶
func (s *ModuleArgs) PrettyPrint(w *bufio.Writer, config *PrettyPrintConfig, depth int, parentIndentCount int)
func (*ModuleArgs) PropertyNames ¶
func (s *ModuleArgs) PropertyNames(*Context) []string
func (*ModuleArgs) SetProp ¶
func (s *ModuleArgs) SetProp(ctx *Context, name string, value Value) error
func (*ModuleArgs) ToSymbolicValue ¶
func (*ModuleArgs) ValueMap ¶
func (s *ModuleArgs) ValueMap() map[string]Value
type ModuleComptimeTypes ¶
type ModuleComptimeTypes struct {
// contains filtered or unexported fields
}
func NewModuleComptimeTypes ¶
func NewModuleComptimeTypes(symb *symbolic.ModuleCompileTimeTypes) *ModuleComptimeTypes
type ModuleHeap ¶
type ModuleHeap struct { Alloc func(size int, alignment int) HeapAddress DeallocAll func() }
func NewArenaHeap ¶
func NewArenaHeap(initialCapacity int) *ModuleHeap
type ModuleKind ¶
type ModuleKind int
const ( UnspecifiedModuleKind ModuleKind = iota SpecModule //.spec.ix file ApplicationModule UserLThreadModule TestSuiteModule TestCaseModule LifetimeJobModule )
func ParseModuleKind ¶
func ParseModuleKind(s string) (ModuleKind, error)
func (ModuleKind) IsEmbedded ¶
func (k ModuleKind) IsEmbedded() bool
func (ModuleKind) IsTestModule ¶
func (k ModuleKind) IsTestModule() bool
func (ModuleKind) String ¶
func (k ModuleKind) String() string
type ModuleParameter ¶
type ModuleParameter struct {
// contains filtered or unexported fields
}
func (ModuleParameter) CliArgNames ¶
func (p ModuleParameter) CliArgNames() string
func (ModuleParameter) DefaultValue ¶
func (p ModuleParameter) DefaultValue(ctx *Context) (Value, bool)
func (ModuleParameter) GetArgumentFromCliArg ¶
func (p ModuleParameter) GetArgumentFromCliArg(ctx *Context, s string) (v Serializable, handled bool, err error)
func (ModuleParameter) GetRestArgumentFromCliArgs ¶
func (p ModuleParameter) GetRestArgumentFromCliArgs(ctx *Context, args []string) (v Value, err error)
func (ModuleParameter) Name ¶
func (p ModuleParameter) Name() string
func (ModuleParameter) Pattern ¶
func (p ModuleParameter) Pattern() Pattern
func (ModuleParameter) RequiredOnCLI ¶
func (p ModuleParameter) RequiredOnCLI(ctx *Context) bool
func (ModuleParameter) StringifiedPattern ¶
func (p ModuleParameter) StringifiedPattern() string
func (ModuleParameter) StringifiedPatternNoPercent ¶
func (p ModuleParameter) StringifiedPatternNoPercent() string
type ModuleParameters ¶
type ModuleParameters struct {
// contains filtered or unexported fields
}
func (*ModuleParameters) GetArgumentsFromCliArgs ¶
func (p *ModuleParameters) GetArgumentsFromCliArgs(ctx *Context, cliArgs []string) (*ModuleArgs, error)
func (*ModuleParameters) GetArgumentsFromObject ¶
func (p *ModuleParameters) GetArgumentsFromObject(ctx *Context, argObj *Object) (*ModuleArgs, error)
func (*ModuleParameters) GetArgumentsFromStruct ¶
func (p *ModuleParameters) GetArgumentsFromStruct(ctx *Context, argStruct *ModuleArgs) (*ModuleArgs, error)
func (*ModuleParameters) GetSymbolicArguments ¶
func (p *ModuleParameters) GetSymbolicArguments(ctx *Context) *symbolic.ModuleArgs
func (ModuleParameters) NoParameters ¶
func (p ModuleParameters) NoParameters() bool
func (*ModuleParameters) NonPositionalParameters ¶
func (p *ModuleParameters) NonPositionalParameters() []ModuleParameter
func (*ModuleParameters) PositionalParameters ¶
func (p *ModuleParameters) PositionalParameters() []ModuleParameter
type ModuleParamsPattern ¶
type ModuleParamsPattern struct { NotCallablePatternMixin // contains filtered or unexported fields }
A ModuleParamsPattern is pattern for ModuleArgs values.
func NewModuleParamsPattern ¶
func NewModuleParamsPattern( keys []string, types []Pattern, ) *ModuleParamsPattern
func (*ModuleParamsPattern) IsMutable ¶
func (*ModuleParamsPattern) IsMutable() bool
func (*ModuleParamsPattern) Iterator ¶
func (patt *ModuleParamsPattern) Iterator(ctx *Context, config IteratorConfiguration) Iterator
func (*ModuleParamsPattern) PrettyPrint ¶
func (p *ModuleParamsPattern) PrettyPrint(w *bufio.Writer, config *PrettyPrintConfig, depth int, parentIndentCount int)
func (*ModuleParamsPattern) Random ¶
func (patt *ModuleParamsPattern) Random(ctx *Context, options ...Option) Value
func (*ModuleParamsPattern) StringPattern ¶
func (*ModuleParamsPattern) StringPattern() (StringPattern, bool)
func (*ModuleParamsPattern) ToSymbolicValue ¶
func (*ModuleParamsPattern) WriteJSONRepresentation ¶
func (p *ModuleParamsPattern) WriteJSONRepresentation(ctx *Context, w *jsoniter.Stream, config JSONSerializationConfig, depth int) error
type ModuleParsingConfig ¶
type ModulePreparationArgs ¶
type ModulePreparationArgs struct { //path of the script in the .ParsingCompilationContext's filesystem. Fpath string //if not nil the module is not parsed and this value is used. CachedModule *Module // enable data extraction mode, this mode allows some errors. // this mode is intended to be used by the LSP server. DataExtractionMode bool AllowMissingEnvVars bool FullAccessToDatabases bool ForceExpectSchemaUpdate bool EnableTesting bool TestFilters TestFilters // If set this function is called just before the context creation, // the preparation is aborted if an error is returned. // The returned limits are used instead of the manifest limits. BeforeContextCreation func(*Manifest) ([]Limit, error) CliArgs []string Args *ModuleArgs // if set the result of the function is used instead of .Args GetArguments func(*Manifest) (*ModuleArgs, error) ParsingCompilationContext *Context //always necessary even if .CachedModule is set ParentContext *Context ParentContextRequired bool UseParentStateAsMainState bool //should not be set if ParentContext is set StdlibCtx context.Context //Limits that are not in this list nor in the prepared module's manifest will be initialized //with the minimum value. DefaultLimits []Limit //should not be set if ParentContext is set AdditionalPermissions []Permission //should only be set if the module is a main module Project Project //defaults to os.Stdout Out io.Writer //defaults to Out, ignored if .Logger is set LogOut io.Writer Logger zerolog.Logger LogLevels *LogLevels //used during the preinit PreinitFilesystem afs.Filesystem //Used to create the context. //If nil the parent context's filesystem is used. ScriptContextFileSystem afs.Filesystem AdditionalGlobalsTestOnly map[string]Value }
type ModulePriority ¶
type ModulePriority uint32
type ModuleRetrievalError ¶
type ModuleRetrievalError struct {
// contains filtered or unexported fields
}
func (ModuleRetrievalError) Error ¶
func (err ModuleRetrievalError) Error() string
type MutableLengthSequence ¶
type MutableLengthSequence interface { MutableSequence // contains filtered or unexported methods }
type MutableSequence ¶
type MutableSequence interface { Sequence SetSlice(ctx *Context, start, end int, v Sequence) // contains filtered or unexported methods }
A MutableSequence is a mutable sequence of Inox values, the number of elements cannot be necessarily changed.
type Mutation ¶
type Mutation struct { Kind MutationKind Complete bool // true if the Mutation contains all the data necessary to be applied SpecificMutationVersion SpecificMutationVersion // set only if specific mutation SpecificMutationKind SpecificMutationKind // set only if specific mutation Tx *Transaction Data []byte DataElementLengths [6]int32 Path Path // can be empty Depth WatchingDepth }
A Mutation stores the data (or part of the data) about the modification of a value, it is immutable and implements Value.
func NewAddEntryMutation ¶
func NewAddEntryMutation(ctx *Context, key, value Serializable, depth WatchingDepth, path Path) Mutation
func NewAddPropMutation ¶
func NewAddPropMutation(ctx *Context, name string, value Serializable, depth WatchingDepth, path Path) Mutation
func NewInsertElemAtIndexMutation ¶
func NewInsertElemAtIndexMutation(ctx *Context, index int, elem Serializable, depth WatchingDepth, path Path) Mutation
func NewRemovePositionMutation ¶
func NewRemovePositionMutation(ctx *Context, index int, depth WatchingDepth, path Path) Mutation
func NewRemovePositionRangeMutation ¶
func NewRemovePositionRangeMutation(ctx *Context, intRange IntRange, depth WatchingDepth, path Path) Mutation
func NewSetElemAtIndexMutation ¶
func NewSetElemAtIndexMutation(ctx *Context, index int, elem Serializable, depth WatchingDepth, path Path) Mutation
func NewSetSliceAtRangeMutation ¶
func NewSetSliceAtRangeMutation(ctx *Context, intRange IntRange, slice Serializable, depth WatchingDepth, path Path) Mutation
func NewSpecificIncompleteNoDataMutation ¶
func NewSpecificIncompleteNoDataMutation(meta SpecificMutationMetadata) Mutation
func NewSpecificMutation ¶
func NewSpecificMutation(ctx *Context, meta SpecificMutationMetadata, values ...Serializable) Mutation
func NewUnspecifiedMutation ¶
func NewUnspecifiedMutation(depth WatchingDepth, path Path) Mutation
func NewUpdateEntryMutation ¶
func NewUpdateEntryMutation(ctx *Context, key, newValue Serializable, depth WatchingDepth, path Path) Mutation
func NewUpdatePropMutation ¶
func NewUpdatePropMutation(ctx *Context, name string, newValue Serializable, depth WatchingDepth, path Path) Mutation
func (Mutation) AffectedIndex ¶
func (Mutation) AffectedProperty ¶
func (Mutation) AffectedRange ¶
func (Mutation) PrettyPrint ¶
func (Mutation) Relocalized ¶
type MutationCallbacks ¶
type MutationCallbacks struct {
// contains filtered or unexported fields
}
MutationCallbacks is used by watchables that implement OnMutation.
func NewMutationCallbacks ¶
func NewMutationCallbacks() *MutationCallbacks
func (*MutationCallbacks) AddMicrotask ¶
func (c *MutationCallbacks) AddMicrotask(m MutationCallbackMicrotask, config MutationWatchingConfiguration) (handle CallbackHandle)
func (*MutationCallbacks) CallMicrotasks ¶
func (c *MutationCallbacks) CallMicrotasks(ctx *Context, m Mutation)
CallMicrotasks calls the registered tasks that have a configured depth greater or equal to the depth at which the mutation happened (depth argument).
func (*MutationCallbacks) Functions ¶
func (c *MutationCallbacks) Functions() []mutationCallback
func (*MutationCallbacks) RemoveMicrotask ¶
func (c *MutationCallbacks) RemoveMicrotask(handle CallbackHandle)
func (*MutationCallbacks) RemoveMicrotasks ¶
func (c *MutationCallbacks) RemoveMicrotasks()
type MutationKind ¶
type MutationKind int
const ( UnspecifiedMutation MutationKind = iota + 1 AddProp UpdateProp AddEntry UpdateEntry InsertElemAtIndex SetElemAtIndex SetSliceAtRange InsertSequenceAtIndex RemovePosition RemovePositionRange SpecificMutation )
func (MutationKind) String ¶
func (k MutationKind) String() string
type MutationPattern ¶
type MutationPattern struct { NotCallablePatternMixin // contains filtered or unexported fields }
func NewMutationPattern ¶
func NewMutationPattern(kind MutationKind, data0Pattern Pattern) *MutationPattern
func (*MutationPattern) IsMutable ¶
func (patt *MutationPattern) IsMutable() bool
func (*MutationPattern) Iterator ¶
func (patt *MutationPattern) Iterator(ctx *Context, config IteratorConfiguration) Iterator
func (*MutationPattern) PrettyPrint ¶
func (patt *MutationPattern) PrettyPrint(w *bufio.Writer, config *PrettyPrintConfig, depth int, parentIndentCount int)
func (*MutationPattern) Random ¶
func (patt *MutationPattern) Random(ctx *Context, options ...Option) Value
func (*MutationPattern) StringPattern ¶
func (patt *MutationPattern) StringPattern() (StringPattern, bool)
func (*MutationPattern) ToSymbolicValue ¶
func (*MutationPattern) WriteJSONRepresentation ¶
func (patt *MutationPattern) WriteJSONRepresentation(ctx *Context, w *jsoniter.Stream, config JSONSerializationConfig, depth int) error
type MutationWatchingConfiguration ¶
type MutationWatchingConfiguration struct {
Depth WatchingDepth
}
type NamedSegmentPathPattern ¶
type NamedSegmentPathPattern struct { NotCallablePatternMixin // contains filtered or unexported fields }
A NamedSegmentPathPattern is a path pattern with named sections, NamedSegmentPathPattern implements GroupPattern.
func NewNamedSegmentPathPattern ¶
func NewNamedSegmentPathPattern(node *parse.NamedSegmentPathPatternLiteral) *NamedSegmentPathPattern
func (*NamedSegmentPathPattern) FindGroupMatches ¶
func (patt *NamedSegmentPathPattern) FindGroupMatches(*Context, Serializable, GroupMatchesFindConfig) (groups []*Object, err error)
func (*NamedSegmentPathPattern) IsMutable ¶
func (patt *NamedSegmentPathPattern) IsMutable() bool
func (*NamedSegmentPathPattern) Iterator ¶
func (patt *NamedSegmentPathPattern) Iterator(ctx *Context, config IteratorConfiguration) Iterator
func (*NamedSegmentPathPattern) MatchGroups ¶
func (patt *NamedSegmentPathPattern) MatchGroups(ctx *Context, v Serializable) (map[string]Serializable, bool, error)
func (*NamedSegmentPathPattern) PrettyPrint ¶
func (patt *NamedSegmentPathPattern) PrettyPrint(w *bufio.Writer, config *PrettyPrintConfig, depth int, parentIndentCount int)
func (*NamedSegmentPathPattern) Prop ¶
func (patt *NamedSegmentPathPattern) Prop(ctx *Context, name string) Value
func (*NamedSegmentPathPattern) PropertyNames ¶
func (patt *NamedSegmentPathPattern) PropertyNames(ctx *Context) []string
func (*NamedSegmentPathPattern) Random ¶
func (pattern *NamedSegmentPathPattern) Random(ctx *Context, options ...Option) Value
func (*NamedSegmentPathPattern) SetProp ¶
func (*NamedSegmentPathPattern) SetProp(ctx *Context, name string, value Value) error
func (*NamedSegmentPathPattern) StringPattern ¶
func (patt *NamedSegmentPathPattern) StringPattern() (StringPattern, bool)
func (*NamedSegmentPathPattern) Test ¶
func (patt *NamedSegmentPathPattern) Test(ctx *Context, v Value) bool
func (NamedSegmentPathPattern) ToSymbolicValue ¶
func (*NamedSegmentPathPattern) WriteJSONRepresentation ¶
func (patt *NamedSegmentPathPattern) WriteJSONRepresentation(ctx *Context, w *jsoniter.Stream, config JSONSerializationConfig, depth int) error
type Namespace ¶
type Namespace struct {
// contains filtered or unexported fields
}
func NewMutableEntriesNamespace ¶
NewMutableEntriesNamespace creates a namespace that allows the entry values to be modified. Adding, removing or assigning an entry is not allowed.
func (*Namespace) PrettyPrint ¶
func (*Namespace) PropertyNames ¶
type NamespaceMemberPatternReprMixin ¶
func (NamespaceMemberPatternReprMixin) WriteJSONRepresentation ¶
func (m NamespaceMemberPatternReprMixin) WriteJSONRepresentation(ctx *Context, w *jsoniter.Stream, config JSONSerializationConfig, depth int) error
func (NamespaceMemberPatternReprMixin) WriteRepresentation ¶
func (m NamespaceMemberPatternReprMixin) WriteRepresentation(ctx *Context, w io.Writer, config *ReprConfig, depth int) error
type NewDefaultContextFn ¶
type NewDefaultContextFn func(config DefaultContextConfig) (*Context, error)
type NewDefaultGlobalStateFn ¶
type NewDefaultGlobalStateFn func(ctx *Context, conf DefaultGlobalStateConfig) (*GlobalState, error)
type NilT ¶
type NilT int
NilT implements Value.
func (NilT) PrettyPrint ¶
func (NilT) ToSymbolicValue ¶
func (NilT) WriteJSONRepresentation ¶
type NillableInitializationMigrationOp ¶
type NillableInitializationMigrationOp struct { Value Pattern MigrationMixin }
func (NillableInitializationMigrationOp) ToSymbolicValue ¶
func (op NillableInitializationMigrationOp) ToSymbolicValue(ctx *Context, encountered map[uintptr]symbolic.Value) symbolic.MigrationOp
type NotAllowedError ¶
type NotAllowedError struct { Permission Permission Message string }
func NewNotAllowedError ¶
func NewNotAllowedError(perm Permission) *NotAllowedError
func (NotAllowedError) Error ¶
func (err NotAllowedError) Error() string
func (NotAllowedError) Is ¶
func (err NotAllowedError) Is(target error) bool
type NotCallablePatternMixin ¶
type NotCallablePatternMixin struct { }
func (NotCallablePatternMixin) Call ¶
func (NotCallablePatternMixin) Call(values []Serializable) (Pattern, error)
type NotRenderableMixin ¶
type NotRenderableMixin struct { }
func (NotRenderableMixin) IsRecursivelyRenderable ¶
func (m NotRenderableMixin) IsRecursivelyRenderable(ctx *Context, input RenderingInput) bool
func (NotRenderableMixin) Render ¶
func (m NotRenderableMixin) Render(ctx *Context, w io.Writer, config RenderingInput) (int, error)
type NumberList ¶
type NumberList[T interface { constraints.Integer | constraints.Float Serializable }] struct { // contains filtered or unexported fields }
NumberList implements underlyingList
func (*NumberList[T]) Clone ¶
func (list *NumberList[T]) Clone(originState *GlobalState, sharableValues *[]PotentiallySharable, clones map[uintptr]Clonable, depth int) (Serializable, error)
func (*NumberList[T]) ConstraintId ¶
func (list *NumberList[T]) ConstraintId() ConstraintId
func (*NumberList[T]) ContainsSimple ¶
func (list *NumberList[T]) ContainsSimple(ctx *Context, v Serializable) bool
func (*NumberList[T]) IsMutable ¶
func (list *NumberList[T]) IsMutable() bool
func (*NumberList[T]) Iterator ¶
func (list *NumberList[T]) Iterator(ctx *Context, config IteratorConfiguration) Iterator
func (*NumberList[T]) Len ¶
func (list *NumberList[T]) Len() int
func (*NumberList[T]) PrettyPrint ¶
func (list *NumberList[T]) PrettyPrint(w *bufio.Writer, config *PrettyPrintConfig, depth int, parentIndentCount int)
func (*NumberList[T]) SetSlice ¶
func (list *NumberList[T]) SetSlice(ctx *Context, start, end int, seq Sequence)
func (*NumberList[N]) ToSymbolicValue ¶
func (*NumberList[T]) WriteJSONRepresentation ¶
func (list *NumberList[T]) WriteJSONRepresentation(ctx *Context, w *jsoniter.Stream, config JSONSerializationConfig, depth int) error
type NumberListIterator ¶
type NumberListIterator[T interface { constraints.Integer | constraints.Float Serializable }] struct { // contains filtered or unexported fields }
func (NumberListIterator[T]) HasNext ¶
func (it NumberListIterator[T]) HasNext(*Context) bool
func (*NumberListIterator[T]) IsMutable ¶
func (it *NumberListIterator[T]) IsMutable() bool
func (*NumberListIterator[T]) Key ¶
func (it *NumberListIterator[T]) Key(ctx *Context) Value
func (*NumberListIterator[T]) Next ¶
func (it *NumberListIterator[T]) Next(ctx *Context) bool
func (*NumberListIterator[T]) PrettyPrint ¶
func (it *NumberListIterator[T]) PrettyPrint(w *bufio.Writer, config *PrettyPrintConfig, depth int, parentIndentCount int)
func (*NumberListIterator[T]) ToSymbolicValue ¶
func (*NumberListIterator[T]) Value ¶
func (it *NumberListIterator[T]) Value(*Context) Value
type Object ¶
type Object struct {
// contains filtered or unexported fields
}
Object implements Value.
func CreateDirEntry ¶
func EvaluatePermissionListingObjectNode ¶
func EvaluatePermissionListingObjectNode(n *parse.ObjectLiteral, config PreinitArgs) (*Object, error)
EvaluatePermissionListingObjectNode evaluates the object literal listing permissions in a permission drop statement.
func NewObjectFromMap ¶
helper function to create an object, lifetime jobs are initialized.
func NewObjectFromMapNoInit ¶
helper function to create an object, lifetime jobs are not initialized.
func (*Object) AddSystemGraphEvent ¶
func (*Object) ForEachElement ¶
ForEachElement iterates over the elements in the empty "" property, if the property's value is not a list the function does nothing.
func (*Object) ForEachEntry ¶
func (obj *Object) ForEachEntry(fn func(k string, v Serializable) error) error
func (*Object) IsRecursivelyRenderable ¶
func (obj *Object) IsRecursivelyRenderable(ctx *Context, input RenderingInput) bool
func (*Object) IsSharable ¶
func (obj *Object) IsSharable(originState *GlobalState) (bool, string)
func (*Object) Iterator ¶
func (obj *Object) Iterator(ctx *Context, config IteratorConfiguration) Iterator
func (*Object) LifetimeJobs ¶
func (obj *Object) LifetimeJobs() *ValueLifetimeJobs
LifetimeJobs returns the lifetime jobs bound to the object, the returned pointer can be nil.
func (*Object) OnMutation ¶
func (obj *Object) OnMutation(ctx *Context, microtask MutationCallbackMicrotask, config MutationWatchingConfiguration) (CallbackHandle, error)
func (*Object) PrettyPrint ¶
func (*Object) PropertyNames ¶
func (*Object) ProposeSystemGraph ¶
func (obj *Object) ProposeSystemGraph(ctx *Context, g *SystemGraph, proposedName string, optionalParent SystemGraphNodeValue)
func (*Object) RemoveMutationCallback ¶
func (obj *Object) RemoveMutationCallback(ctx *Context, handle CallbackHandle)
func (*Object) RemoveMutationCallbackMicrotasks ¶
func (*Object) Share ¶
func (obj *Object) Share(originState *GlobalState)
func (*Object) SmartLock ¶
func (obj *Object) SmartLock(state *GlobalState)
func (*Object) SmartUnlock ¶
func (obj *Object) SmartUnlock(state *GlobalState)
func (*Object) SystemGraph ¶
func (obj *Object) SystemGraph() *SystemGraph
func (*Object) ToSymbolicValue ¶
func (*Object) Watcher ¶
func (obj *Object) Watcher(ctx *Context, config WatcherConfiguration) Watcher
func (*Object) WriteJSONRepresentation ¶
type ObjectPattern ¶
type ObjectPattern struct { NotCallablePatternMixin // contains filtered or unexported fields }
An ObjectPattern represents a pattern matching Inox objects (e.g. {a: 1}), ObjectPattern implements Value.
func NewExactObjectPattern ¶
func NewExactObjectPattern(entries []ObjectPatternEntry) *ObjectPattern
func NewInexactObjectPattern ¶
func NewInexactObjectPattern(entries []ObjectPatternEntry) *ObjectPattern
func NewObjectPattern ¶
func NewObjectPattern(inexact bool, entries []ObjectPatternEntry) *ObjectPattern
func (*ObjectPattern) CompleteEntry ¶
func (patt *ObjectPattern) CompleteEntry(name string) (ObjectPatternEntry, bool)
func (*ObjectPattern) Entry ¶
func (patt *ObjectPattern) Entry(name string) (pattern Pattern, optional bool, yes bool)
func (*ObjectPattern) EntryCount ¶
func (patt *ObjectPattern) EntryCount() int
func (*ObjectPattern) ForEachEntry ¶
func (patt *ObjectPattern) ForEachEntry(fn func(entry ObjectPatternEntry) error) error
func (*ObjectPattern) GetMigrationOperations ¶
func (patt *ObjectPattern) GetMigrationOperations(ctx *Context, next Pattern, pseudoPath string) (migrations []MigrationOp, _ error)
func (*ObjectPattern) HasRequiredOrOptionalEntry ¶
func (patt *ObjectPattern) HasRequiredOrOptionalEntry(name string) bool
func (*ObjectPattern) IsMutable ¶
func (patt *ObjectPattern) IsMutable() bool
func (ObjectPattern) Iterator ¶
func (patt ObjectPattern) Iterator(ctx *Context, config IteratorConfiguration) Iterator
func (ObjectPattern) PrettyPrint ¶
func (patt ObjectPattern) PrettyPrint(w *bufio.Writer, config *PrettyPrintConfig, depth int, parentIndentCount int)
func (*ObjectPattern) Random ¶
func (patt *ObjectPattern) Random(ctx *Context, options ...Option) Value
func (*ObjectPattern) StringPattern ¶
func (patt *ObjectPattern) StringPattern() (StringPattern, bool)
func (*ObjectPattern) ToSymbolicValue ¶
func (*ObjectPattern) ValuePropPattern ¶
func (patt *ObjectPattern) ValuePropPattern(name string) (propPattern Pattern, isOptional bool, ok bool)
func (*ObjectPattern) ValuePropertyNames ¶
func (patt *ObjectPattern) ValuePropertyNames() []string
func (*ObjectPattern) WithConstraints ¶
func (patt *ObjectPattern) WithConstraints(constraints []*ComplexPropertyConstraint) *ObjectPattern
func (ObjectPattern) WriteJSONRepresentation ¶
func (patt ObjectPattern) WriteJSONRepresentation(ctx *Context, w *jsoniter.Stream, config JSONSerializationConfig, depth int) error
type ObjectPatternEntriesHelper ¶
type ObjectPatternEntriesHelper []ObjectPatternEntry
func (ObjectPatternEntriesHelper) CompleteEntry ¶
func (h ObjectPatternEntriesHelper) CompleteEntry(name string) (ObjectPatternEntry, bool)
func (ObjectPatternEntriesHelper) Entry ¶
func (h ObjectPatternEntriesHelper) Entry(name string) (pattern Pattern, optional bool, yes bool)
func (ObjectPatternEntriesHelper) HasRequiredOrOptionalEntry ¶
func (h ObjectPatternEntriesHelper) HasRequiredOrOptionalEntry(name string) bool
type ObjectPatternEntry ¶
type ObjectPatternEntry struct { Name string Pattern Pattern IsOptional bool //an entry is considered to have dependencies if .RequiredKeys > 0 or .Pattern is not nil. Dependencies PropertyDependencies }
func (ObjectPatternEntry) Equal ¶
func (e ObjectPatternEntry) Equal(ctx *Context, other ObjectPatternEntry, alreadyCompared map[uintptr]uintptr, depth int) bool
type Opcode ¶
type Opcode = byte
Opcode represents a single byte operation code.
const ( OpPushConstant Opcode = iota OpPop OpCopyTop OpSwap OpMoveThirdTop //move third element at the top of the stack & shift the two others OpPushTrue OpPushFalse OpEqual OpNotEqual OpIs OpIsNot OpMinus OpBooleanNot OpMatch OpGroupMatch OpIn OpSubstrOf OpKeyOf OpUrlOf OpDoSetDifference OpNilCoalesce OpJumpIfFalse OpAndJump // Logical AND jump OpOrJump // Logical OR jump OpJump OpPopJumpIfTestDisabled OpPushNil OpCreateList OpCreateKeyList OpCreateTuple OpCreateObject OpCreateRecord OpCreateDict OpCreateMapping OpCreateTreedata OpCreateTreedataHiearchyEntry OpCreateOrderedPair OpCreateStruct OpSpreadObject OpExtractProps OpSpreadList OpSpreadTuple OpAppend OpCreateListPattern OpCreateTuplePattern OpCreateObjectPattern OpCreateRecordPattern OpCreateOptionPattern OpCreateUnionPattern OpCreateStringUnionPattern OpCreateRepeatedPatternElement OpCreateSequenceStringPattern OpCreatePatternNamespace OpCreateOptionalPattern OpToPattern OpToBool OpCreateString OpCreateOption OpCreatePath OpCreatePathPattern OpCreateURL OpCreateHost OpCreateRuneRange OpCreateIntRange OpCreateFloatRange OpCreateUpperBoundRange OpCreateTestSuite OpCreateTestCase OpAddTestSuiteResult OpAddTestCaseResult //add test case result if in test suite OpCreateLifetimeJob OpCreateReceptionHandler OpCreateXMLelem OpCreateAddTypeExtension OpAllocStruct OpSendValue OpSpreadObjectPattern OpSpreadRecordPattern BindCapturedLocals OpCall OpReturn OpCallFromXMLFactory OpYield OpCallPattern OpDropPerms OpSpawnLThread OpImport OpGetGlobal OpSetGlobal OpGetLocal OpSetLocal OpGetSelf OpSetSelf OpResolveHost OpAddHostAlias OpResolvePattern OpAddPattern OpResolvePatternNamespace OpAddPatternNamespace OpPatternNamespaceMemb OpSetMember OpSetIndex OpSetSlice OpSetBoolField OpSetIntField OpSetFloatField OpSetStructPtrField OpIterInit OpIterNext OpIterNextChunk OpIterKey OpIterValue OpIterPrune OpWalkerInit OpIntBin OpFloatBin OpNumBin OpPseudoArith OpLess OpLessEqual OpGreater OpGreaterEqual OptStrQueryParamVal OpStrConcat OpConcatStrLikes OpConcatBytesLikes OpConcatTuples OpRange OpMemb OpGetBoolField OpGetIntField OpGetFloatField OpGetStructPtrField OpObjPropNotStored OpExtensionMethod OpOptionalMemb OpComputedMemb OpDynMemb OpAt OpSafeAt OpSlice OpLoadDBVal OpAssert OpBlockLock OpBlockUnlock OpRuntimeTypecheck OpPushIncludedChunk OpPopIncludedChunk OpNoOp OpSuspendVM )
opcodes
type OpenDBFn ¶
type OpenDBFn func(ctx *Context, config DbOpenConfiguration) (Database, error)
func GetOpenDbFn ¶
type Option ¶
An Option represents an option with a name and value, Option implements value. Inox's flag literals (e.g. `--verbose`) and option expressions (e.g. `--val=100`) evaluate to an Option.
func (Option) Clone ¶
func (opt Option) Clone(originState *GlobalState, sharableValues *[]PotentiallySharable, clones map[uintptr]Clonable, depth int) (Serializable, error)
func (Option) PrettyPrint ¶
func (Option) ToSymbolicValue ¶
func (Option) WriteJSONRepresentation ¶
type OptionPattern ¶
type OptionPattern struct { NotCallablePatternMixin // contains filtered or unexported fields }
func (*OptionPattern) IsMutable ¶
func (patt *OptionPattern) IsMutable() bool
func (OptionPattern) Iterator ¶
func (patt OptionPattern) Iterator(ctx *Context, config IteratorConfiguration) Iterator
func (OptionPattern) PrettyPrint ¶
func (patt OptionPattern) PrettyPrint(w *bufio.Writer, config *PrettyPrintConfig, depth int, parentIndentCount int)
func (OptionPattern) Random ¶
func (patt OptionPattern) Random(ctx *Context, options ...Option) Value
func (*OptionPattern) StringPattern ¶
func (patt *OptionPattern) StringPattern() (StringPattern, bool)
func (*OptionPattern) ToSymbolicValue ¶
func (OptionPattern) WriteJSONRepresentation ¶
func (patt OptionPattern) WriteJSONRepresentation(ctx *Context, w *jsoniter.Stream, config JSONSerializationConfig, depth int) error
type OptionalParam ¶
type OptionalParam[T Value] struct { Value T }
optional parameter in symbolic Go function parameters
func ToOptionalParam ¶
func ToOptionalParam[T Value](v T) *OptionalParam[T]
func ToValueOptionalParam ¶
func ToValueOptionalParam(v Value) *OptionalParam[Value]
type OptionalPattern ¶
type OptionalPattern struct { NotCallablePatternMixin // contains filtered or unexported fields }
An OptionalPattern represents a pattern that matches the nil value in additional to the same values as an underlying pattern. Optional pattern expressions (e.g. `%int?`) evaluate to an optional pattern.
func NewOptionalPattern ¶
func NewOptionalPattern(ctx *Context, pattern Pattern) (*OptionalPattern, error)
func (*OptionalPattern) IsMutable ¶
func (pattern *OptionalPattern) IsMutable() bool
func (*OptionalPattern) Iterator ¶
func (patt *OptionalPattern) Iterator(ctx *Context, config IteratorConfiguration) Iterator
func (*OptionalPattern) PrettyPrint ¶
func (pattern *OptionalPattern) PrettyPrint(w *bufio.Writer, config *PrettyPrintConfig, depth int, parentIndentCount int)
func (*OptionalPattern) Random ¶
func (patt *OptionalPattern) Random(ctx *Context, options ...Option) Value
func (*OptionalPattern) StringPattern ¶
func (patt *OptionalPattern) StringPattern() (StringPattern, bool)
func (*OptionalPattern) ToSymbolicValue ¶
func (*OptionalPattern) WriteJSONRepresentation ¶
func (pattern *OptionalPattern) WriteJSONRepresentation(ctx *Context, w *jsoniter.Stream, config JSONSerializationConfig, depth int) error
type OrderedPair ¶
type OrderedPair [2]Serializable
OrderedPair is an immutable ordered pair, OrderedPair implements Value.
func NewOrderedPair ¶
func NewOrderedPair(first, second Serializable) *OrderedPair
func (*OrderedPair) GetOrBuildElements ¶
func (p *OrderedPair) GetOrBuildElements(ctx *Context) []Serializable
func (*OrderedPair) IsMutable ¶
func (tuple *OrderedPair) IsMutable() bool
func (*OrderedPair) Iterator ¶
func (p *OrderedPair) Iterator(ctx *Context, config IteratorConfiguration) Iterator
func (*OrderedPair) Len ¶
func (p *OrderedPair) Len() int
func (OrderedPair) PrettyPrint ¶
func (p OrderedPair) PrettyPrint(w *bufio.Writer, config *PrettyPrintConfig, depth int, parentIndentCount int)
func (*OrderedPair) ToSymbolicValue ¶
func (*OrderedPair) WriteJSONRepresentation ¶
func (p *OrderedPair) WriteJSONRepresentation(ctx *Context, w *jsoniter.Stream, config JSONSerializationConfig, depth int) error
type ParserBasedPseudoPattern ¶
type ParserBasedPseudoPattern struct { NotCallablePatternMixin // contains filtered or unexported fields }
func NewParserBasePattern ¶
func NewParserBasePattern(parser StatelessParser) *ParserBasedPseudoPattern
func (*ParserBasedPseudoPattern) CompiledRegex ¶
func (patt *ParserBasedPseudoPattern) CompiledRegex() *regexp.Regexp
func (*ParserBasedPseudoPattern) EffectiveLengthRange ¶
func (patt *ParserBasedPseudoPattern) EffectiveLengthRange() IntRange
func (*ParserBasedPseudoPattern) FindMatches ¶
func (patt *ParserBasedPseudoPattern) FindMatches(ctx *Context, val Serializable, config MatchesFindConfig) (groups []Serializable, err error)
func (*ParserBasedPseudoPattern) HasRegex ¶
func (pattern *ParserBasedPseudoPattern) HasRegex() bool
func (*ParserBasedPseudoPattern) IsMutable ¶
func (patt *ParserBasedPseudoPattern) IsMutable() bool
func (*ParserBasedPseudoPattern) IsResolved ¶
func (patt *ParserBasedPseudoPattern) IsResolved() bool
func (*ParserBasedPseudoPattern) Iterator ¶
func (patt *ParserBasedPseudoPattern) Iterator(ctx *Context, config IteratorConfiguration) Iterator
func (*ParserBasedPseudoPattern) LengthRange ¶
func (patt *ParserBasedPseudoPattern) LengthRange() IntRange
func (*ParserBasedPseudoPattern) Parse ¶
func (patt *ParserBasedPseudoPattern) Parse(ctx *Context, s string) (Serializable, error)
func (*ParserBasedPseudoPattern) PatternNestingDepth ¶
func (patt *ParserBasedPseudoPattern) PatternNestingDepth(parentDepth int) int
func (*ParserBasedPseudoPattern) PrettyPrint ¶
func (patt *ParserBasedPseudoPattern) PrettyPrint(w *bufio.Writer, config *PrettyPrintConfig, depth int, parentIndentCount int)
func (*ParserBasedPseudoPattern) Random ¶
func (pattern *ParserBasedPseudoPattern) Random(ctx *Context, options ...Option) Value
func (*ParserBasedPseudoPattern) Regex ¶
func (pattern *ParserBasedPseudoPattern) Regex() string
func (*ParserBasedPseudoPattern) Resolve ¶
func (patt *ParserBasedPseudoPattern) Resolve() (StringPattern, error)
func (*ParserBasedPseudoPattern) StringPattern ¶
func (patt *ParserBasedPseudoPattern) StringPattern() (StringPattern, bool)
func (*ParserBasedPseudoPattern) Test ¶
func (patt *ParserBasedPseudoPattern) Test(ctx *Context, v Value) bool
func (*ParserBasedPseudoPattern) ToSymbolicValue ¶
func (ParserBasedPseudoPattern) WriteJSONRepresentation ¶
func (patt ParserBasedPseudoPattern) WriteJSONRepresentation(ctx *Context, w *jsoniter.Stream, config JSONSerializationConfig, depth int) error
type Path ¶
type Path string
func CreateTempdir ¶
func CreateTempdir(nameSecondPrefix string, fls afs.Filesystem) Path
CreateTempdir creates a directory with permissions o700 in /tmp.
func DirPathFrom ¶
func NonDirPathFrom ¶
func ParsePathLiteral ¶
func (Path) CanBeDirOfEntry ¶
IsDirOfEntry returns true if $absPath is the path of a potentiel entry in $pth. The function panics if $pth is not a dirpath or if one of the two paths is not absolute.
func (Path) IsAbsolute ¶
func (Path) IsRelative ¶
func (Path) Join ¶
func (pth Path) Join(relativePath Path, fls afs.Filesystem) Path
Join joins the current path to a relative path: /a , ./b -> /a/b /a , ./b/ -> /a/b/ /a , /b -> error /a , /b/ -> error
func (Path) JoinAbsolute ¶
func (pth Path) JoinAbsolute(absPath Path, fls afs.Filesystem) Path
JoinAbsolute joins the current path to an absolute path: /a , /b -> /a/b /a , /b/ -> /a/b/ /a , ./b -> error /a , ./b/ -> error
func (Path) PrettyPrint ¶
func (Path) PropertyNames ¶
func (Path) RelativeEquiv ¶
func (Path) ResourceName ¶
func (Path) ToGlobbingPattern ¶
func (pth Path) ToGlobbingPattern() PathPattern
func (Path) ToPrefixPattern ¶
func (pth Path) ToPrefixPattern() PathPattern
ToPrefixPattern makes a prefix pattern by appending "..." to the path, if the path is not a directory the function panics.
func (Path) ToSymbolicValue ¶
func (Path) UnderlyingString ¶
func (Path) WriteJSONRepresentation ¶
type PathPattern ¶
type PathPattern string
func (PathPattern) Call ¶
func (PathPattern) Call(values []Serializable) (Pattern, error)
func (PathPattern) IsAbsolute ¶
func (patt PathPattern) IsAbsolute() bool
func (PathPattern) IsDirGlobbingPattern ¶
func (patt PathPattern) IsDirGlobbingPattern() bool
func (PathPattern) IsGlobbingPattern ¶
func (patt PathPattern) IsGlobbingPattern() bool
func (PathPattern) IsMutable ¶
func (patt PathPattern) IsMutable() bool
func (PathPattern) IsPrefixPattern ¶
func (patt PathPattern) IsPrefixPattern() bool
func (PathPattern) Iterator ¶
func (patt PathPattern) Iterator(ctx *Context, config IteratorConfiguration) Iterator
func (PathPattern) Prefix ¶
func (patt PathPattern) Prefix() string
func (PathPattern) PrettyPrint ¶
func (patt PathPattern) PrettyPrint(w *bufio.Writer, config *PrettyPrintConfig, depth int, parentIndentCount int)
func (PathPattern) PropertyNames ¶
func (patt PathPattern) PropertyNames(ctx *Context) []string
func (PathPattern) Random ¶
func (pattern PathPattern) Random(ctx *Context, options ...Option) Value
func (PathPattern) SetProp ¶
func (PathPattern) SetProp(ctx *Context, name string, value Value) error
func (PathPattern) StringPattern ¶
func (patt PathPattern) StringPattern() (StringPattern, bool)
func (PathPattern) ToAbs ¶
func (patt PathPattern) ToAbs(fls afs.Filesystem) PathPattern
func (PathPattern) ToGlobbingPattern ¶
func (patt PathPattern) ToGlobbingPattern() PathPattern
func (PathPattern) ToSymbolicValue ¶
func (PathPattern) UnderlyingString ¶
func (patt PathPattern) UnderlyingString() string
func (PathPattern) WriteJSONRepresentation ¶
func (patt PathPattern) WriteJSONRepresentation(ctx *Context, w *jsoniter.Stream, config JSONSerializationConfig, depth int) error
type PathStringPattern ¶
type PathStringPattern struct {
// contains filtered or unexported fields
}
A PathStringPattern represents a string pattern for paths.
func NewStringPathPattern ¶
func NewStringPathPattern(pathPattern PathPattern) *PathStringPattern
NewRegexPattern creates a StringPathPattern from the given string, if path pattern is empty the pattern matches any path.
func (*PathStringPattern) Call ¶
func (patt *PathStringPattern) Call(values []Serializable) (Pattern, error)
func (*PathStringPattern) CompiledRegex ¶
func (patt *PathStringPattern) CompiledRegex() *regexp.Regexp
func (*PathStringPattern) EffectiveLengthRange ¶
func (patt *PathStringPattern) EffectiveLengthRange() IntRange
func (*PathStringPattern) FindMatches ¶
func (patt *PathStringPattern) FindMatches(ctx *Context, val Serializable, config MatchesFindConfig) (groups []Serializable, err error)
func (*PathStringPattern) HasRegex ¶
func (pattern *PathStringPattern) HasRegex() bool
func (*PathStringPattern) IsMutable ¶
func (patt *PathStringPattern) IsMutable() bool
func (*PathStringPattern) IsResolved ¶
func (patt *PathStringPattern) IsResolved() bool
func (*PathStringPattern) Iterator ¶
func (patt *PathStringPattern) Iterator(ctx *Context, config IteratorConfiguration) Iterator
func (*PathStringPattern) LengthRange ¶
func (patt *PathStringPattern) LengthRange() IntRange
func (*PathStringPattern) MatchGroups ¶
func (patt *PathStringPattern) MatchGroups(ctx *Context, v Serializable) (map[string]Serializable, bool, error)
func (*PathStringPattern) Parse ¶
func (patt *PathStringPattern) Parse(ctx *Context, s string) (Serializable, error)
func (*PathStringPattern) PatternNestingDepth ¶
func (patt *PathStringPattern) PatternNestingDepth(parentDepth int) int
func (*PathStringPattern) PrettyPrint ¶
func (patt *PathStringPattern) PrettyPrint(w *bufio.Writer, config *PrettyPrintConfig, depth int, parentIndentCount int)
func (*PathStringPattern) Random ¶
func (pattern *PathStringPattern) Random(ctx *Context, options ...Option) Value
func (*PathStringPattern) Regex ¶
func (pattern *PathStringPattern) Regex() string
func (*PathStringPattern) Resolve ¶
func (patt *PathStringPattern) Resolve() (StringPattern, error)
func (*PathStringPattern) StringPattern ¶
func (patt *PathStringPattern) StringPattern() (StringPattern, bool)
func (*PathStringPattern) ToSymbolicValue ¶
func (*PathStringPattern) WriteJSONRepresentation ¶
func (patt *PathStringPattern) WriteJSONRepresentation(ctx *Context, w *jsoniter.Stream, config JSONSerializationConfig, depth int) error
type Pattern ¶
type Pattern interface { Serializable Iterable //Test returns true if the argument matches the pattern. Test(*Context, Value) bool Random(ctx *Context, options ...Option) Value Call(values []Serializable) (Pattern, error) StringPattern() (StringPattern, bool) }
The Pattern interface is implemented by Inox patterns (e.g. *ObjectPattern, *ListPattern, URLPattern, ....). A pattern should always be immutable.
func ConvertJsonSchemaToPattern ¶
ConvertJsonSchemaToPattern converts a JSON schema definition to an Inox pattern, all schemas are not supported and the resulting pattern might be stricter.
func GetConstraint ¶
func GetConstraint(constraintId ConstraintId) (Pattern, bool)
func NewMostAdaptedExactPattern ¶
func NewMostAdaptedExactPattern(value Serializable) Pattern
NewMostAdaptedExactPattern returns an *ExactStringPattern if value implements StringLike, otherwise an *ExactValuePattern is returned.
type PatternDeserializer ¶
type PatternIterator ¶
type PatternIterator struct {
// contains filtered or unexported fields
}
func NewEmptyPatternIterator ¶
func NewEmptyPatternIterator() *PatternIterator
func (*PatternIterator) HasNext ¶
func (it *PatternIterator) HasNext(ctx *Context) bool
func (*PatternIterator) IsMutable ¶
func (it *PatternIterator) IsMutable() bool
func (*PatternIterator) Key ¶
func (it *PatternIterator) Key(ctx *Context) Value
func (*PatternIterator) Next ¶
func (it *PatternIterator) Next(ctx *Context) bool
func (*PatternIterator) PrettyPrint ¶
func (it *PatternIterator) PrettyPrint(w *bufio.Writer, config *PrettyPrintConfig, depth int, parentIndentCount int)
func (PatternIterator) ToSymbolicValue ¶
func (*PatternIterator) Value ¶
func (it *PatternIterator) Value(ctx *Context) Value
type PatternNamespace ¶
A PatternNamespace represents a group of related Inox patterns, PatternNamespace implements Value.
func CreatePatternNamespace ¶
func CreatePatternNamespace(ctx *Context, init Value) (*PatternNamespace, error)
func (*PatternNamespace) IsMutable ¶
func (ns *PatternNamespace) IsMutable() bool
func (*PatternNamespace) PrettyPrint ¶
func (ns *PatternNamespace) PrettyPrint(w *bufio.Writer, config *PrettyPrintConfig, depth int, parentIndentCount int)
func (*PatternNamespace) ToSymbolicValue ¶
type PeriodicWatcher ¶
type PeriodicWatcher struct {
// contains filtered or unexported fields
}
A PeriodicWatcher is Watcher that periodically checks if it has a value.
func NewPeriodicWatcher ¶
func NewPeriodicWatcher(config WatcherConfiguration, period time.Duration) *PeriodicWatcher
func (*PeriodicWatcher) Config ¶
func (w *PeriodicWatcher) Config() WatcherConfiguration
func (*PeriodicWatcher) InformAboutAsync ¶
func (w *PeriodicWatcher) InformAboutAsync(ctx *Context, v Value)
InformAboutAsync sets the next value the watcher will "see", on a tick the watcher only sees the last value set.
func (*PeriodicWatcher) IsMutable ¶
func (w *PeriodicWatcher) IsMutable() bool
func (*PeriodicWatcher) IsStopped ¶
func (w *PeriodicWatcher) IsStopped() bool
func (*PeriodicWatcher) PrettyPrint ¶
func (watcher *PeriodicWatcher) PrettyPrint(w *bufio.Writer, config *PrettyPrintConfig, depth int, parentIndentCount int)
func (*PeriodicWatcher) Stop ¶
func (w *PeriodicWatcher) Stop()
func (*PeriodicWatcher) Stream ¶
func (w *PeriodicWatcher) Stream(ctx *Context, config *ReadableStreamConfiguration) ReadableStream
func (*PeriodicWatcher) ToSymbolicValue ¶
type Permission ¶
type Permission interface { Kind() PermissionKind InternalPermTypename() permkind.InternalPermissionTypename Includes(Permission) bool String() string }
A Permission carries a kind and can include narrower permissions, for example (read http://**) includes (read https://example.com).
func GetDefaultGlobalVarPermissions ¶
func GetDefaultGlobalVarPermissions() (perms []Permission)
func RemovePerms ¶
func RemovePerms(grantedPerms, removedPerms []Permission) (remainingPerms []Permission)
type PermissionKind ¶
type PermissionKind = permkind.PermissionKind
type PointerType ¶
type PointerType struct {
// contains filtered or unexported fields
}
func (*PointerType) GetValueAllocParams ¶
func (t *PointerType) GetValueAllocParams() (size int, alignment int)
func (*PointerType) GoType ¶
func (t *PointerType) GoType() reflect.Type
func (*PointerType) New ¶
func (t *PointerType) New(heap *ModuleHeap) HeapAddress
New allocates the memory needed for the value and returns a pointer to it.
func (*PointerType) StructFieldRetrieval ¶
func (t *PointerType) StructFieldRetrieval(name string) fieldRetrievalInfo
func (*PointerType) Symbolic ¶
func (t *PointerType) Symbolic() symbolic.CompileTimeType
func (*PointerType) ValueSize ¶
func (t *PointerType) ValueSize() uintptr
func (*PointerType) ValueType ¶
func (t *PointerType) ValueType() CompileTimeType
type Port ¶
type Port struct { Number uint16 Scheme Scheme //set to NO_SCHEME_SCHEME_NAME if no scheme is specified. }
Port implements Value. Inox's port literals (e.g. `:80`, `:80/http`) evaluate to a Port.
func (Port) PrettyPrint ¶
func (Port) ToSymbolicValue ¶
func (Port) WriteJSONRepresentation ¶
type PotentiallySharable ¶
type PotentiallySharable interface { Value IsSharable(originState *GlobalState) (bool, string) //(No-op allowed) If possible SmartLock() should lock the PotentiallySharable. //This function is primarily called by Inox interpreters when evaluating synchronized() blocks. //TODO: add symbolic evaluation checks to warn the developer if a no-op SmartLock is used inside //a synchronized block. SmartLock(*GlobalState) //If SmartLock() is not a no-op, SmartUnlock should unlock the PotentiallySharable. SmartUnlock(*GlobalState) }
type PreinitArgs ¶
type PreinitArgs struct { GlobalConsts *parse.GlobalConstantDeclarations //only used if no running state PreinitStatement *parse.PreinitStatement //only used if no running state RunningState *TreeWalkState //optional ParentState *GlobalState //optional Filesystem afs.Filesystem //if RunningState is nil .PreinitFilesystem is used to create the temporary context. PreinitFilesystem afs.Filesystem DefaultLimits []Limit AddDefaultPermissions bool HandleCustomType CustomPermissionTypeHandler //optional IgnoreUnknownSections bool IgnoreConstDeclErrors bool //used if .RunningState is nil AdditionalGlobals map[string]Value Project Project //optional }
type PreinitFile ¶
type PreinitFile struct { Name string //declared name, this is NOT the basename. Path Path //absolute Pattern Pattern RequiredPermission FilesystemPermission Content []byte Parsed Serializable ReadParseError error }
type PreinitFiles ¶
type PreinitFiles []*PreinitFile
type PrettyPrintColors ¶
type PrettyPrintColors struct {
ControlKeyword, OtherKeyword, PatternLiteral, StringLiteral, PathLiteral, IdentifierLiteral,
NumberLiteral, Constant, PatternIdentifier, CssTypeSelector, CssOtherSelector, InvalidNode, Index []byte
}
type PrettyPrintConfig ¶
type PrettyPrintConfig struct { pprint.PrettyPrintConfig Context *Context }
func (*PrettyPrintConfig) WithContext ¶
func (config *PrettyPrintConfig) WithContext(ctx *Context) *PrettyPrintConfig
type ProgramStopReason ¶
type ProgramStopReason int
const ( PauseStop ProgramStopReason = 1 + iota NextStepStop StepInStop StepOutStop BreakpointStop ExceptionBreakpointStop )
type ProgramStoppedEvent ¶
type ProgramStoppedEvent struct { ThreadId StateId Reason ProgramStopReason Breakpoint *BreakpointInfo ExceptionError error }
type Project ¶
type Project interface { Id() ProjectID BaseImage() (Image, error) ListSecrets(ctx *Context) ([]ProjectSecretInfo, error) GetSecrets(ctx *Context) ([]ProjectSecret, error) //CanProvideS3Credentials should return true if the project can provide S3 credentials for //the given S3 provider AT THE MOMENT OF THE CALL. If the error is not nil the boolean result //should be false. CanProvideS3Credentials(s3Provider string) (bool, error) // GetS3CredentialsForBucket creates the bucket bucketName if necessary & returns credentials to access it, // the returned credentials should not work for other buckets. GetS3CredentialsForBucket(ctx *Context, bucketName string, provider string) (accessKey, secretKey string, s3Endpoint Host, _ error) Configuration() ProjectConfiguration //DevDatabasesDirOnOsFs returns the directory where the project's databases are stored. DevDatabasesDirOnOsFs() string }
type ProjectConfiguration ¶
type ProjectConfiguration interface {
AreExposedWebServersAllowed() bool
}
type ProjectSecret ¶
type ProjectSecret struct { Name SecretName LastModifDate time.Time Value *Secret }
type ProjectSecretInfo ¶
type ProjectSecretInfo struct { Name SecretName `json:"name"` LastModifDate time.Time `json:"lastModificationDate"` }
type PropertyDependencies ¶
type PropertyName ¶
type PropertyName string
Property name literals (e.g. `.age`) evaluate to a PropertyName. PropertyName implements Value and ValuePath.
func (PropertyName) IsMutable ¶
func (n PropertyName) IsMutable() bool
func (PropertyName) PrettyPrint ¶
func (n PropertyName) PrettyPrint(w *bufio.Writer, config *PrettyPrintConfig, depth int, parentIndentCount int)
func (PropertyName) SegmentGetFrom ¶
func (n PropertyName) SegmentGetFrom(ctx *Context, v Value) Value
func (PropertyName) ToSymbolicValue ¶
func (PropertyName) UnderlyingString ¶
func (n PropertyName) UnderlyingString() string
func (PropertyName) Validate ¶
func (n PropertyName) Validate() error
func (PropertyName) WriteJSONRepresentation ¶
func (p PropertyName) WriteJSONRepresentation(ctx *Context, w *jsoniter.Stream, config JSONSerializationConfig, depth int) error
type ProtocolClient ¶
A ProtocolClient represents a client for one or more protocols such as HTTP, HTTPS.
type Publication ¶
type Publication struct {
// contains filtered or unexported fields
}
A Publication is an package around an immutable piece of data sent by a publisher to its subscribers, Publication implements Value.
func (*Publication) Data ¶
func (p *Publication) Data() Value
func (Publication) IsMutable ¶
func (Publication) IsMutable() bool
func (*Publication) PrettyPrint ¶
func (p *Publication) PrettyPrint(w *bufio.Writer, config *PrettyPrintConfig, depth int, parentIndentCount int)
func (*Publication) PublicationDate ¶
func (p *Publication) PublicationDate() DateTime
func (*Publication) Publisher ¶
func (p *Publication) Publisher() Value
func (*Publication) ToSymbolicValue ¶
type PublicationCallbackConfiguration ¶
type PublicationCallbackConfiguration struct { }
type PublicationCallbackMicrotask ¶
type PublicationCallbackMicrotask func(ctx *Context, pub *Publication)
type Quantity ¶
type Quantity interface { Value // Int64() should return (value, true) if the internal representation of the quantity is an integer (int64, int32, ...), // (0, false) otherwise. If $hasIntegralRepr is true the implementation should aso implement Integral. AsInt64() (v int64, hasIntegralRepr bool) // Int64() should return (value, true) if the internal representation of the quantity is a float (float64, float32, ...), // (0, false) otherwise. AsFloat64() (v float64, hasFloatRepr bool) IsZeroQuantity() bool }
type QuantityRange ¶
type QuantityRange struct {
// contains filtered or unexported fields
}
QuantityRange implements Value.
func (QuantityRange) Contains ¶
func (r QuantityRange) Contains(ctx *Context, v Serializable) bool
func (QuantityRange) InclusiveEnd ¶
func (r QuantityRange) InclusiveEnd() Serializable
func (QuantityRange) IsEmpty ¶
func (r QuantityRange) IsEmpty(ctx *Context) bool
func (QuantityRange) IsMutable ¶
func (r QuantityRange) IsMutable() bool
func (QuantityRange) Iterator ¶
func (r QuantityRange) Iterator(ctx *Context, config IteratorConfiguration) Iterator
func (QuantityRange) KnownStart ¶
func (r QuantityRange) KnownStart() Serializable
func (QuantityRange) PrettyPrint ¶
func (r QuantityRange) PrettyPrint(w *bufio.Writer, config *PrettyPrintConfig, depth int, parentIndentCount int)
func (QuantityRange) ToSymbolicValue ¶
func (QuantityRange) WriteJSONRepresentation ¶
func (r QuantityRange) WriteJSONRepresentation(ctx *Context, w *jsoniter.Stream, config JSONSerializationConfig, depth int) error
type QuantityRangeIterator ¶
type QuantityRangeIterator struct {
// contains filtered or unexported fields
}
func (*QuantityRangeIterator) HasNext ¶
func (it *QuantityRangeIterator) HasNext(*Context) bool
func (QuantityRangeIterator) IsMutable ¶
func (it QuantityRangeIterator) IsMutable() bool
func (*QuantityRangeIterator) Key ¶
func (it *QuantityRangeIterator) Key(ctx *Context) Value
func (*QuantityRangeIterator) Next ¶
func (it *QuantityRangeIterator) Next(ctx *Context) bool
func (QuantityRangeIterator) PrettyPrint ¶
func (it QuantityRangeIterator) PrettyPrint(w *bufio.Writer, config *PrettyPrintConfig, depth int, parentIndentCount int)
func (QuantityRangeIterator) ToSymbolicValue ¶
func (*QuantityRangeIterator) Value ¶
func (it *QuantityRangeIterator) Value(*Context) Value
type RandomnessSource ¶
type RandomnessSource struct {
// contains filtered or unexported fields
}
func GetRandomnessSource ¶
func GetRandomnessSource(default_ *RandomnessSource, options ...Option) *RandomnessSource
func (*RandomnessSource) Int64 ¶
func (r *RandomnessSource) Int64() int64
func (*RandomnessSource) IsMutable ¶
func (r *RandomnessSource) IsMutable() bool
func (*RandomnessSource) PrettyPrint ¶
func (r *RandomnessSource) PrettyPrint(w *bufio.Writer, config *PrettyPrintConfig, depth int, parentIndentCount int)
func (*RandomnessSource) RandBit ¶
func (r *RandomnessSource) RandBit() bool
func (*RandomnessSource) RandInt64Range ¶
func (r *RandomnessSource) RandInt64Range(start, end int64) int64
RandInt64Range returns a random int64 in the interval [start, end].
func (*RandomnessSource) RandUint64Range ¶
func (r *RandomnessSource) RandUint64Range(start, end uint64) uint64
RandUint64Range returns a random uint64 in the interval [start, end].
func (*RandomnessSource) ReadNBytesAsBase64Unpadded ¶
func (s *RandomnessSource) ReadNBytesAsBase64Unpadded(n int) string
func (*RandomnessSource) ReadNBytesAsHex ¶
func (s *RandomnessSource) ReadNBytesAsHex(n int) string
func (*RandomnessSource) ToSymbolicValue ¶
func (*RandomnessSource) Uint64 ¶
func (r *RandomnessSource) Uint64() uint64
type RawTcpPermission ¶
type RawTcpPermission struct { Kind_ PermissionKind Domain WrappedString //Host | HostPattern }
func (RawTcpPermission) Includes ¶
func (perm RawTcpPermission) Includes(otherPerm Permission) bool
func (RawTcpPermission) InternalPermTypename ¶
func (perm RawTcpPermission) InternalPermTypename() permkind.InternalPermissionTypename
func (RawTcpPermission) Kind ¶
func (perm RawTcpPermission) Kind() PermissionKind
func (RawTcpPermission) String ¶
func (perm RawTcpPermission) String() string
type ReadableByteStream ¶
type ReadableByteStream struct {
// contains filtered or unexported fields
}
A ReadableByteStream represents a stream of bytes, ElementsStream implements Value.
func NewByteStream ¶
func NewByteStream( readSourceBytes func(s *ReadableByteStream, p []byte) (int, error), readSourceByte func(s *ReadableByteStream) (byte, error), rechargedSourceSignal chan struct{}, filter Pattern, ) *ReadableByteStream
func (*ReadableByteStream) ChunkDataType ¶
func (s *ReadableByteStream) ChunkDataType() Pattern
func (*ReadableByteStream) IsMainlyChunked ¶
func (s *ReadableByteStream) IsMainlyChunked() bool
func (*ReadableByteStream) IsMutable ¶
func (*ReadableByteStream) IsMutable() bool
func (*ReadableByteStream) IsStopped ¶
func (s *ReadableByteStream) IsStopped() bool
func (*ReadableByteStream) PrettyPrint ¶
func (s *ReadableByteStream) PrettyPrint(w *bufio.Writer, config *PrettyPrintConfig, depth int, parentIndentCount int)
func (*ReadableByteStream) Stop ¶
func (s *ReadableByteStream) Stop()
func (*ReadableByteStream) Stream ¶
func (s *ReadableByteStream) Stream(ctx *Context, config *ReadableStreamConfiguration) ReadableStream
func (*ReadableByteStream) ToSymbolicValue ¶
func (*ReadableByteStream) WaitNextChunk ¶
type ReadableStream ¶
type ReadableStream interface { StreamSource // WaitNext should be called by a single goroutine, filter can be nil. // WaitNext should return the EndOfStream error only after the last element has been returned WaitNext(ctx *Context, filter Pattern, timeout time.Duration) (Value, error) // WaitNextChunk should be called by a single goroutine, filter can be nil. // If there is a non-nil error that is not EndOfStream the chunk should be nil WaitNextChunk(ctx *Context, filter Pattern, sizeRange IntRange, timeout time.Duration) (*DataChunk, error) Stop() IsStopped() bool IsMainlyChunked() bool ChunkDataType() Pattern }
func ToReadableStream ¶
func ToReadableStream(ctx *Context, v Value, optionalFilter Pattern) ReadableStream
type ReadableStreamConfiguration ¶
type ReadableStreamConfiguration struct {
Filter Pattern
}
type Reader ¶
type Reader struct {
// contains filtered or unexported fields
}
A Reader is a Value wrapping an io.Reader. TODO: close wrapped. when closing Reader
func (*Reader) AlreadyHasAllData ¶
func (*Reader) GetBytesDataToNotModify ¶
GetBytesDataToNotModify returns all the bytes if they are already available. If the bytes are not available the function panics, the returned slice should not be modified.
func (*Reader) GetGoMethod ¶
func (reader *Reader) GetGoMethod(name string) (*GoFunction, bool)
func (*Reader) PrettyPrint ¶
func (Reader) PropertyNames ¶
func (*Reader) ReadAllBytes ¶
type Record ¶
type Record struct {
// contains filtered or unexported fields
}
Record is the immutable counterpart of an Object, Record implements Value.
func NewEmptyRecord ¶
func NewEmptyRecord() *Record
func NewRecordFromKeyValLists ¶
func NewRecordFromKeyValLists(keys []string, values []Serializable) *Record
func NewRecordFromMap ¶
func (*Record) EntryMap ¶
func (rec *Record) EntryMap() map[string]Serializable
func (*Record) ForEachElement ¶
ForEachElement iterates over the elements in the empty "" property, if the property's value is not a tuple the function does nothing.
func (*Record) ForEachEntry ¶
func (*Record) Iterator ¶
func (rec *Record) Iterator(ctx *Context, config IteratorConfiguration) Iterator
func (Record) PrettyPrint ¶
func (Record) PropertyNames ¶
func (*Record) ToSymbolicValue ¶
func (*Record) ValueEntryMap ¶
func (*Record) WriteJSONRepresentation ¶
type RecordPattern ¶
type RecordPattern struct { NotCallablePatternMixin // contains filtered or unexported fields }
A RecordPattern represents a pattern matching Inox records (e.g. #{a: 1}), RecordPattern implements Value.
func NewExactRecordPattern ¶
func NewExactRecordPattern(entries []RecordPatternEntry) *RecordPattern
func NewInexactRecordPattern ¶
func NewInexactRecordPattern(entries []RecordPatternEntry) *RecordPattern
func NewRecordPattern ¶
func NewRecordPattern(inexact bool, entries []RecordPatternEntry) *RecordPattern
func (*RecordPattern) CompleteEntry ¶
func (patt *RecordPattern) CompleteEntry(name string) (RecordPatternEntry, bool)
func (*RecordPattern) Entry ¶
func (patt *RecordPattern) Entry(name string) (pattern Pattern, optional bool, yes bool)
func (*RecordPattern) ForEachEntry ¶
func (patt *RecordPattern) ForEachEntry(fn func(entry RecordPatternEntry) error) error
func (*RecordPattern) GetMigrationOperations ¶
func (patt *RecordPattern) GetMigrationOperations(ctx *Context, next Pattern, pseudoPath string) (migrations []MigrationOp, _ error)
func (*RecordPattern) HasRequiredOrOptionalEntry ¶
func (patt *RecordPattern) HasRequiredOrOptionalEntry(name string) bool
func (*RecordPattern) IsMutable ¶
func (patt *RecordPattern) IsMutable() bool
func (*RecordPattern) Iterator ¶
func (patt *RecordPattern) Iterator(ctx *Context, config IteratorConfiguration) Iterator
func (*RecordPattern) PrettyPrint ¶
func (patt *RecordPattern) PrettyPrint(w *bufio.Writer, config *PrettyPrintConfig, depth int, parentIndentCount int)
func (*RecordPattern) Random ¶
func (patt *RecordPattern) Random(ctx *Context, options ...Option) Value
func (*RecordPattern) StringPattern ¶
func (patt *RecordPattern) StringPattern() (StringPattern, bool)
func (*RecordPattern) ToSymbolicValue ¶
func (*RecordPattern) ValuePropPattern ¶
func (patt *RecordPattern) ValuePropPattern(name string) (propPattern Pattern, isOptional bool, ok bool)
func (*RecordPattern) ValuePropertyNames ¶
func (patt *RecordPattern) ValuePropertyNames() []string
func (RecordPattern) WriteJSONRepresentation ¶
func (patt RecordPattern) WriteJSONRepresentation(ctx *Context, w *jsoniter.Stream, config JSONSerializationConfig, depth int) error
type RecordPatternEntry ¶
func (RecordPatternEntry) Equal ¶
func (e RecordPatternEntry) Equal(ctx *Context, other RecordPatternEntry, alreadyCompared map[uintptr]uintptr, depth int) bool
type RegexPattern ¶
type RegexPattern struct {
// contains filtered or unexported fields
}
RegexPattern matches any StringLike that matches .regexp
func NewRegexPattern ¶
func NewRegexPattern(s string) *RegexPattern
NewRegexPattern creates a RegexPattern from the given string, the unicode flag is enabled.
func NewRegexPatternFromPERLCompiled ¶
func NewRegexPatternFromPERLCompiled(regexp *regexp.Regexp) *RegexPattern
NewRegexPatternFromPERLCompiled creates a RegexPattern from the given regexp.
func (*RegexPattern) Call ¶
func (patt *RegexPattern) Call(values []Serializable) (Pattern, error)
func (*RegexPattern) CompiledRegex ¶
func (patt *RegexPattern) CompiledRegex() *regexp.Regexp
func (*RegexPattern) EffectiveLengthRange ¶
func (patt *RegexPattern) EffectiveLengthRange() IntRange
func (*RegexPattern) FindMatches ¶
func (patt *RegexPattern) FindMatches(ctx *Context, val Serializable, config MatchesFindConfig) (groups []Serializable, err error)
func (*RegexPattern) HasRegex ¶
func (pattern *RegexPattern) HasRegex() bool
func (*RegexPattern) IsMutable ¶
func (patt *RegexPattern) IsMutable() bool
func (*RegexPattern) IsResolved ¶
func (patt *RegexPattern) IsResolved() bool
func (RegexPattern) Iterator ¶
func (patt RegexPattern) Iterator(ctx *Context, config IteratorConfiguration) Iterator
func (*RegexPattern) LengthRange ¶
func (patt *RegexPattern) LengthRange() IntRange
func (*RegexPattern) MatchGroups ¶
func (patt *RegexPattern) MatchGroups(ctx *Context, v Serializable) (map[string]Serializable, bool, error)
func (*RegexPattern) Parse ¶
func (patt *RegexPattern) Parse(ctx *Context, s string) (Serializable, error)
func (*RegexPattern) PatternNestingDepth ¶
func (patt *RegexPattern) PatternNestingDepth(parentDepth int) int
func (*RegexPattern) PrettyPrint ¶
func (patt *RegexPattern) PrettyPrint(w *bufio.Writer, config *PrettyPrintConfig, depth int, parentIndentCount int)
func (RegexPattern) Random ¶
func (pattern RegexPattern) Random(ctx *Context, options ...Option) Value
func (*RegexPattern) Regex ¶
func (pattern *RegexPattern) Regex() string
func (*RegexPattern) Resolve ¶
func (patt *RegexPattern) Resolve() (StringPattern, error)
func (*RegexPattern) StringPattern ¶
func (patt *RegexPattern) StringPattern() (StringPattern, bool)
func (*RegexPattern) ToSymbolicValue ¶
func (*RegexPattern) WithLengthRange ¶
func (patt *RegexPattern) WithLengthRange(lenRange IntRange) *RegexPattern
func (RegexPattern) WriteJSONRepresentation ¶
func (patt RegexPattern) WriteJSONRepresentation(ctx *Context, w *jsoniter.Stream, config JSONSerializationConfig, depth int) error
type RelativeTimeInstant64 ¶
type RelativeTimeInstant64 int64
RelativeTimeInstant64 is a number of milliseconds since PROCESS_BEGIN_TIME.
func GetRelativeTimeInstant64 ¶
func GetRelativeTimeInstant64() RelativeTimeInstant64
GetRelativeTimeInstant64 returns the current RelativeTimeInstant64 (number of milliseconds since PROCESS_BEGIN_TIME).
func (RelativeTimeInstant64) Time ¶
func (i RelativeTimeInstant64) Time() time.Time
Time returns an UTC-located time.
type RemovalMigrationOp ¶
type RemovalMigrationOp struct { Value Pattern MigrationMixin }
func (RemovalMigrationOp) ToSymbolicValue ¶
func (op RemovalMigrationOp) ToSymbolicValue(ctx *Context, encountered map[uintptr]symbolic.Value) symbolic.MigrationOp
type Renderable ¶
type Renderable interface { Value IsRecursivelyRenderable(ctx *Context, config RenderingInput) bool Render(ctx *Context, w io.Writer, config RenderingInput) (int, error) }
A renderable is a Value that can be rendered to at least one MIME type.
type RenderingFn ¶
type RenderingFn func(ctx *Context, w io.Writer, renderable Renderable, config RenderingInput) (int, error)
type RenderingInput ¶
type RepeatedPatternElement ¶
type RepeatedPatternElement struct { NotCallablePatternMixin // contains filtered or unexported fields }
func (*RepeatedPatternElement) CompiledRegex ¶
func (patt *RepeatedPatternElement) CompiledRegex() *regexp.Regexp
func (*RepeatedPatternElement) EffectiveLengthRange ¶
func (patt *RepeatedPatternElement) EffectiveLengthRange() IntRange
func (*RepeatedPatternElement) FindMatches ¶
func (patt *RepeatedPatternElement) FindMatches(ctx *Context, val Serializable, config MatchesFindConfig) (groups []Serializable, err error)
func (*RepeatedPatternElement) HasRegex ¶
func (patt *RepeatedPatternElement) HasRegex() bool
func (*RepeatedPatternElement) IsMutable ¶
func (patt *RepeatedPatternElement) IsMutable() bool
func (*RepeatedPatternElement) IsResolved ¶
func (patt *RepeatedPatternElement) IsResolved() bool
func (*RepeatedPatternElement) Iterator ¶
func (patt *RepeatedPatternElement) Iterator(ctx *Context, config IteratorConfiguration) Iterator
func (*RepeatedPatternElement) LengthRange ¶
func (patt *RepeatedPatternElement) LengthRange() IntRange
func (*RepeatedPatternElement) MatchGroups ¶
func (patt *RepeatedPatternElement) MatchGroups(ctx *Context, v Serializable) (map[string]Serializable, bool, error)
func (*RepeatedPatternElement) MinMaxCounts ¶
func (patt *RepeatedPatternElement) MinMaxCounts(maxRandOcurrence int) (int, int)
func (*RepeatedPatternElement) Parse ¶
func (patt *RepeatedPatternElement) Parse(ctx *Context, s string) (Serializable, error)
func (*RepeatedPatternElement) PatternNestingDepth ¶
func (patt *RepeatedPatternElement) PatternNestingDepth(parentDepth int) int
func (*RepeatedPatternElement) PrettyPrint ¶
func (patt *RepeatedPatternElement) PrettyPrint(w *bufio.Writer, config *PrettyPrintConfig, depth int, parentIndentCount int)
func (*RepeatedPatternElement) Random ¶
func (patt *RepeatedPatternElement) Random(ctx *Context, options ...Option) Value
func (*RepeatedPatternElement) Regex ¶
func (patt *RepeatedPatternElement) Regex() string
func (*RepeatedPatternElement) Resolve ¶
func (patt *RepeatedPatternElement) Resolve() (StringPattern, error)
func (*RepeatedPatternElement) StringPattern ¶
func (patt *RepeatedPatternElement) StringPattern() (StringPattern, bool)
func (*RepeatedPatternElement) Test ¶
func (patt *RepeatedPatternElement) Test(ctx *Context, v Value) bool
func (*RepeatedPatternElement) ToSymbolicValue ¶
func (*RepeatedPatternElement) WriteJSONRepresentation ¶
func (patt *RepeatedPatternElement) WriteJSONRepresentation(ctx *Context, w *jsoniter.Stream, config JSONSerializationConfig, depth int) error
type ReplacementMigrationOp ¶
type ReplacementMigrationOp struct {
Current, Next Pattern
MigrationMixin
}
func (ReplacementMigrationOp) ToSymbolicValue ¶
func (op ReplacementMigrationOp) ToSymbolicValue(ctx *Context, encountered map[uintptr]symbolic.Value) symbolic.MigrationOp
type ReprConfig ¶
type ReprConfig struct {
AllVisible bool
}
func (*ReprConfig) IsPropertyVisible ¶
func (r *ReprConfig) IsPropertyVisible(name string, v Value, info *ValueVisibility, ctx *Context) bool
func (*ReprConfig) IsValueVisible ¶
func (r *ReprConfig) IsValueVisible(v Value) bool
type ResourceGraph ¶
type ResourceGraph struct {
// contains filtered or unexported fields
}
func NewResourceGraph ¶
func NewResourceGraph() *ResourceGraph
func (*ResourceGraph) AddEdge ¶
func (g *ResourceGraph) AddEdge(from, to ResourceName, rel ResourceRelationKind)
func (*ResourceGraph) AddResource ¶
func (g *ResourceGraph) AddResource(r ResourceName, kind string)
func (*ResourceGraph) GetEdge ¶
func (g *ResourceGraph) GetEdge(from, to ResourceName) (memds.GraphEdge[ResourceRelationKind], bool)
func (*ResourceGraph) GetNode ¶
func (g *ResourceGraph) GetNode(r ResourceName) (*ResourceNode, bool)
func (*ResourceGraph) Roots ¶
func (g *ResourceGraph) Roots() (roots []*ResourceNode)
type ResourceName ¶
type ResourceName interface { WrappedString Serializable ResourceName() string }
A resource name is a string value that designates a resource, examples: URL, Path & Host are resource names. The meaning of resource is broad and should not be confused with HTTP Resources.
func ResourceNameFrom ¶
func ResourceNameFrom(s string) ResourceName
type ResourceNode ¶
type ResourceNode struct {
// contains filtered or unexported fields
}
func (ResourceNode) Kind ¶
func (r ResourceNode) Kind() string
type ResourceRelationKind ¶
type ResourceRelationKind string
type Reversability ¶
type Reversability int
const ( Irreversible Reversability = iota SomewhatReversible Reversible )
type RingBuffer ¶
type RingBuffer struct {
// contains filtered or unexported fields
}
func NewRingBuffer ¶
func NewRingBuffer(ctx *Context, size ByteCount) *RingBuffer
func (*RingBuffer) Capacity ¶
func (r *RingBuffer) Capacity() int
func (*RingBuffer) Free ¶
func (r *RingBuffer) Free() ByteCount
func (*RingBuffer) GetGoMethod ¶
func (r *RingBuffer) GetGoMethod(name string) (*GoFunction, bool)
func (*RingBuffer) IsEmpty ¶
func (r *RingBuffer) IsEmpty() bool
func (*RingBuffer) IsFull ¶
func (r *RingBuffer) IsFull() bool
func (*RingBuffer) IsMutable ¶
func (*RingBuffer) IsMutable() bool
func (*RingBuffer) IsSharable ¶
func (r *RingBuffer) IsSharable(originState *GlobalState) (bool, string)
func (*RingBuffer) IsShared ¶
func (r *RingBuffer) IsShared() bool
func (*RingBuffer) PrettyPrint ¶
func (r *RingBuffer) PrettyPrint(w *bufio.Writer, config *PrettyPrintConfig, depth int, parentIndentCount int)
func (*RingBuffer) PropertyNames ¶
func (r *RingBuffer) PropertyNames(ctx *Context) []string
func (*RingBuffer) ReadByte ¶
func (r *RingBuffer) ReadByte() (b byte, err error)
func (*RingBuffer) ReadableBytesCopy ¶
func (r *RingBuffer) ReadableBytesCopy() []byte
func (*RingBuffer) ReadableCount ¶
func (r *RingBuffer) ReadableCount(ctx *Context) ByteCount
func (*RingBuffer) Reset ¶
func (r *RingBuffer) Reset()
func (*RingBuffer) SetProp ¶
func (*RingBuffer) SetProp(ctx *Context, name string, value Value) error
func (*RingBuffer) Share ¶
func (r *RingBuffer) Share(originState *GlobalState)
func (*RingBuffer) SmartLock ¶
func (r *RingBuffer) SmartLock(state *GlobalState)
func (*RingBuffer) SmartUnlock ¶
func (r *RingBuffer) SmartUnlock(state *GlobalState)
func (*RingBuffer) Stream ¶
func (r *RingBuffer) Stream(ctx *Context, config *ReadableStreamConfiguration) ReadableStream
func (*RingBuffer) ToSymbolicValue ¶
func (*RingBuffer) WritableStream ¶
func (r *RingBuffer) WritableStream(ctx *Context, config *WritableStreamConfiguration) WritableStream
func (*RingBuffer) WriteString ¶
func (r *RingBuffer) WriteString(s string) (n int, err error)
func (*RingBuffer) Writer ¶
func (r *RingBuffer) Writer() *Writer
type RiskScore ¶
type RiskScore int
func ComputePermissionRiskScore ¶
func ComputePermissionRiskScore(perm Permission) RiskScore
func (RiskScore) ValueAndLevel ¶
type Rune ¶
type Rune rune
func (Rune) PrettyPrint ¶
func (Rune) PropertyNames ¶
func (Rune) ToSymbolicValue ¶
func (Rune) WriteJSONRepresentation ¶
type RuneCount ¶
type RuneCount int64
RuneCount implements Value.
func (RuneCount) IsZeroQuantity ¶
func (RuneCount) PrettyPrint ¶
func (RuneCount) ToSymbolicValue ¶
func (RuneCount) WriteJSONRepresentation ¶
type RuneRange ¶
TODO: implement Iterable
func (RuneRange) Iterator ¶
func (r RuneRange) Iterator(ctx *Context, config IteratorConfiguration) Iterator
func (RuneRange) PrettyPrint ¶
func (RuneRange) RandomRune ¶
func (RuneRange) ToSymbolicValue ¶
func (RuneRange) WriteJSONRepresentation ¶
type RuneRangeIterator ¶
type RuneRangeIterator struct {
// contains filtered or unexported fields
}
func (*RuneRangeIterator) HasNext ¶
func (it *RuneRangeIterator) HasNext(*Context) bool
func (RuneRangeIterator) IsMutable ¶
func (it RuneRangeIterator) IsMutable() bool
func (*RuneRangeIterator) Key ¶
func (it *RuneRangeIterator) Key(ctx *Context) Value
func (*RuneRangeIterator) Next ¶
func (it *RuneRangeIterator) Next(ctx *Context) bool
func (RuneRangeIterator) PrettyPrint ¶
func (it RuneRangeIterator) PrettyPrint(w *bufio.Writer, config *PrettyPrintConfig, depth int, parentIndentCount int)
func (RuneRangeIterator) ToSymbolicValue ¶
func (*RuneRangeIterator) Value ¶
func (it *RuneRangeIterator) Value(*Context) Value
type RuneRangeStringPattern ¶
type RuneRangeStringPattern struct { NotCallablePatternMixin // contains filtered or unexported fields }
func NewRuneRangeStringPattern ¶
func NewRuneRangeStringPattern(lower, upper rune, node parse.Node) *RuneRangeStringPattern
func (*RuneRangeStringPattern) CompiledRegex ¶
func (patt *RuneRangeStringPattern) CompiledRegex() *regexp.Regexp
func (*RuneRangeStringPattern) EffectiveLengthRange ¶
func (patt *RuneRangeStringPattern) EffectiveLengthRange() IntRange
func (*RuneRangeStringPattern) FindMatches ¶
func (patt *RuneRangeStringPattern) FindMatches(ctx *Context, val Serializable, config MatchesFindConfig) (groups []Serializable, err error)
func (*RuneRangeStringPattern) HasRegex ¶
func (patt *RuneRangeStringPattern) HasRegex() bool
func (*RuneRangeStringPattern) IsMutable ¶
func (patt *RuneRangeStringPattern) IsMutable() bool
func (*RuneRangeStringPattern) IsResolved ¶
func (patt *RuneRangeStringPattern) IsResolved() bool
func (RuneRangeStringPattern) Iterator ¶
func (patt RuneRangeStringPattern) Iterator(ctx *Context, config IteratorConfiguration) Iterator
func (*RuneRangeStringPattern) LengthRange ¶
func (patt *RuneRangeStringPattern) LengthRange() IntRange
func (*RuneRangeStringPattern) Parse ¶
func (patt *RuneRangeStringPattern) Parse(ctx *Context, s string) (Serializable, error)
func (*RuneRangeStringPattern) PatternNestingDepth ¶
func (patt *RuneRangeStringPattern) PatternNestingDepth(parentDepth int) int
func (*RuneRangeStringPattern) PrettyPrint ¶
func (patt *RuneRangeStringPattern) PrettyPrint(w *bufio.Writer, config *PrettyPrintConfig, depth int, parentIndentCount int)
func (*RuneRangeStringPattern) Random ¶
func (patt *RuneRangeStringPattern) Random(ctx *Context, options ...Option) Value
func (*RuneRangeStringPattern) Regex ¶
func (patt *RuneRangeStringPattern) Regex() string
func (*RuneRangeStringPattern) Resolve ¶
func (patt *RuneRangeStringPattern) Resolve() (StringPattern, error)
func (*RuneRangeStringPattern) StringPattern ¶
func (patt *RuneRangeStringPattern) StringPattern() (StringPattern, bool)
func (*RuneRangeStringPattern) Test ¶
func (patt *RuneRangeStringPattern) Test(ctx *Context, v Value) bool
func (*RuneRangeStringPattern) ToSymbolicValue ¶
func (RuneRangeStringPattern) WriteJSONRepresentation ¶
func (patt RuneRangeStringPattern) WriteJSONRepresentation(ctx *Context, w *jsoniter.Stream, config JSONSerializationConfig, depth int) error
type RuneSlice ¶
type RuneSlice struct {
// contains filtered or unexported fields
}
func NewRuneSlice ¶
func (*RuneSlice) Clone ¶
func (slice *RuneSlice) Clone(originState *GlobalState, sharableValues *[]PotentiallySharable, clones map[uintptr]Clonable, depth int) (Serializable, error)
func (*RuneSlice) ElementsDoNotModify ¶
func (*RuneSlice) IsRecursivelyRenderable ¶
func (s *RuneSlice) IsRecursivelyRenderable(ctx *Context, input RenderingInput) bool
func (*RuneSlice) Iterator ¶
func (s *RuneSlice) Iterator(ctx *Context, config IteratorConfiguration) Iterator
func (*RuneSlice) OnMutation ¶
func (s *RuneSlice) OnMutation(ctx *Context, microtask MutationCallbackMicrotask, config MutationWatchingConfiguration) (CallbackHandle, error)
func (*RuneSlice) PrettyPrint ¶
func (*RuneSlice) PropertyNames ¶
func (*RuneSlice) RemoveMutationCallback ¶
func (s *RuneSlice) RemoveMutationCallback(ctx *Context, handle CallbackHandle)
func (*RuneSlice) RemoveMutationCallbackMicrotasks ¶
func (*RuneSlice) TakeInMemorySnapshot ¶
func (*RuneSlice) ToSymbolicValue ¶
func (*RuneSlice) Watcher ¶
func (s *RuneSlice) Watcher(ctx *Context, config WatcherConfiguration) Watcher
func (*RuneSlice) WriteJSONRepresentation ¶
type ScaledTokenCount ¶
type ScaledTokenCount int64
Token count scaled by TOKEN_BUCKET_CAPACITY_SCALE.
func (ScaledTokenCount) RealCount ¶
func (c ScaledTokenCount) RealCount() int64
type Scheme ¶
type Scheme string
A Scheme represents an URL scheme, example: 'https'.
func (Scheme) IsDatabaseScheme ¶
func (Scheme) PrettyPrint ¶
func (Scheme) ToSymbolicValue ¶
func (Scheme) UnderlyingString ¶
func (Scheme) WriteJSONRepresentation ¶
type SchemeHolder ¶
type SchemeHolder interface { ResourceName Scheme() Scheme }
type SecondaryDebugEvent ¶
type SecondaryDebugEvent interface {
SecondaryDebugEventType() SecondaryDebugEventType
}
type SecondaryDebugEventType ¶
type SecondaryDebugEventType int
func (SecondaryDebugEventType) String ¶
func (t SecondaryDebugEventType) String() string
type Secret ¶
type Secret struct {
// contains filtered or unexported fields
}
A Secret represents a string such as a password, an API-Key or a PEM encoded key; a secret always return false when it is compared for equality.
func (*Secret) AssertIsPattern ¶
func (s *Secret) AssertIsPattern(secret *SecretPattern)
func (*Secret) PrettyPrint ¶
func (*Secret) StringValue ¶
func (s *Secret) StringValue() StringLike
func (*Secret) ToSymbolicValue ¶
func (*Secret) WriteJSONRepresentation ¶
func (*Secret) WriteRepresentation ¶
type SecretName ¶
type SecretName string
func SecretNameFrom ¶
func SecretNameFrom(name string) (SecretName, error)
type SecretPattern ¶
type SecretPattern struct { NotCallablePatternMixin // contains filtered or unexported fields }
func NewSecretPattern ¶
func NewSecretPattern(stringPattern StringPattern, pem bool) *SecretPattern
func (*SecretPattern) IsMutable ¶
func (*SecretPattern) IsMutable() bool
func (*SecretPattern) Iterator ¶
func (patt *SecretPattern) Iterator(ctx *Context, config IteratorConfiguration) Iterator
func (*SecretPattern) NewSecret ¶
func (pattern *SecretPattern) NewSecret(ctx *Context, s string) (*Secret, error)
func (*SecretPattern) PrettyPrint ¶
func (s *SecretPattern) PrettyPrint(w *bufio.Writer, config *PrettyPrintConfig, depth int, parentIndentCount int)
func (*SecretPattern) Random ¶
func (pattern *SecretPattern) Random(ctx *Context, options ...Option) Value
func (*SecretPattern) StringPattern ¶
func (pattern *SecretPattern) StringPattern() (StringPattern, bool)
func (*SecretPattern) Test ¶
func (p *SecretPattern) Test(ctx *Context, v Value) bool
Test returns true if the pattern of the secret is p, the content of the secret is not verified.
func (*SecretPattern) ToSymbolicValue ¶
func (*SecretPattern) WriteJSONRepresentation ¶
func (patt *SecretPattern) WriteJSONRepresentation(ctx *Context, w *jsoniter.Stream, config JSONSerializationConfig, depth int) error
type Sequence ¶
type Sequence interface { Indexable // contains filtered or unexported methods }
A Sequence is a sequence of Inox values, it is not necessarily mutable.
type SequenceStringPattern ¶
type SequenceStringPattern struct {
// contains filtered or unexported fields
}
SequenceStringPattern represents a string pattern with sub elements. Sequence string patterns with lazy elements are mutable while they are not fully resolved.
func NewSequenceStringPattern ¶
func NewSequenceStringPattern( node *parse.ComplexStringPatternPiece, nodeChunk *parse.Chunk, subpatterns []StringPattern, groupNames KeyList, ) (*SequenceStringPattern, error)
func (*SequenceStringPattern) Call ¶
func (patt *SequenceStringPattern) Call(values []Serializable) (Pattern, error)
func (*SequenceStringPattern) CompiledRegex ¶
func (patt *SequenceStringPattern) CompiledRegex() *regexp.Regexp
func (*SequenceStringPattern) EffectiveLengthRange ¶
func (patt *SequenceStringPattern) EffectiveLengthRange() IntRange
func (*SequenceStringPattern) FindGroupMatches ¶
func (patt *SequenceStringPattern) FindGroupMatches(ctx *Context, v Serializable, config GroupMatchesFindConfig) (groups []*Object, err error)
func (*SequenceStringPattern) FindMatches ¶
func (patt *SequenceStringPattern) FindMatches(ctx *Context, val Serializable, config MatchesFindConfig) (groups []Serializable, err error)
func (*SequenceStringPattern) HasRegex ¶
func (patt *SequenceStringPattern) HasRegex() bool
func (*SequenceStringPattern) IsMutable ¶
func (patt *SequenceStringPattern) IsMutable() bool
func (*SequenceStringPattern) IsResolved ¶
func (patt *SequenceStringPattern) IsResolved() bool
func (SequenceStringPattern) Iterator ¶
func (patt SequenceStringPattern) Iterator(ctx *Context, config IteratorConfiguration) Iterator
func (*SequenceStringPattern) LengthRange ¶
func (patt *SequenceStringPattern) LengthRange() IntRange
func (*SequenceStringPattern) MatchGroups ¶
func (patt *SequenceStringPattern) MatchGroups(ctx *Context, v Serializable) (map[string]Serializable, bool, error)
func (*SequenceStringPattern) Parse ¶
func (patt *SequenceStringPattern) Parse(ctx *Context, s string) (Serializable, error)
func (*SequenceStringPattern) PatternNestingDepth ¶
func (patt *SequenceStringPattern) PatternNestingDepth(parentDepth int) int
func (*SequenceStringPattern) PrettyPrint ¶
func (patt *SequenceStringPattern) PrettyPrint(w *bufio.Writer, config *PrettyPrintConfig, depth int, parentIndentCount int)
func (SequenceStringPattern) Random ¶
func (patt SequenceStringPattern) Random(ctx *Context, options ...Option) Value
func (*SequenceStringPattern) Regex ¶
func (patt *SequenceStringPattern) Regex() string
func (*SequenceStringPattern) Resolve ¶
func (patt *SequenceStringPattern) Resolve() (StringPattern, error)
func (*SequenceStringPattern) StringPattern ¶
func (patt *SequenceStringPattern) StringPattern() (StringPattern, bool)
func (*SequenceStringPattern) Test ¶
func (patt *SequenceStringPattern) Test(ctx *Context, v Value) bool
func (*SequenceStringPattern) ToSymbolicValue ¶
func (SequenceStringPattern) WriteJSONRepresentation ¶
func (patt SequenceStringPattern) WriteJSONRepresentation(ctx *Context, w *jsoniter.Stream, config JSONSerializationConfig, depth int) error
type Serializable ¶
type Serializable interface { Value //JSON representation WriteJSONRepresentation(ctx *Context, w *jsoniter.Stream, config JSONSerializationConfig, depth int) error }
Serializable is the interface implemented by all values serializable to JSON.
func ConvertJSONValToInoxVal ¶
func ConvertJSONValToInoxVal(v any, immutable bool) Serializable
func ConvertYamlNodeToInoxVal ¶
func ConvertYamlNodeToInoxVal(ctx *Context, n yaml.Node, immutable bool) Serializable
ConvertYamlNodeToInoxVal converts a YAML AST Node into an Inox value. Records and tuples are returned insted of objects and lists when immutable is true. ConvertYamlNodeToInoxVal has the following limitations: - uint64 values greater than math.MaxInt64 cannot be converted: the function will panic.
func ConvertYamlParsedFileToInoxVal ¶
func ConvertYamlParsedFileToInoxVal(ctx *Context, f *yaml.File, immutable bool) Serializable
ConvertYamlParsedFileToInoxVal converts the list of documents in f to a list (or tuple) of Inox values. A tuple is returned when immutable is true.
func EvalSimpleValueLiteral ¶
func EvalSimpleValueLiteral(n parse.SimpleValueLiteral, global *GlobalState) (Serializable, error)
EvalSimpleValueLiteral evalutes a SimpleValueLiteral node (except IdentifierLiteral because it is ambiguous)
func FindMatchesForRegex ¶
func FindMatchesForRegex(ctx *Context, regexp *regexp.Regexp, s string, config MatchesFindConfig) (matches []Serializable, err error)
func FindMatchesForStringPattern ¶
func FindMatchesForStringPattern(ctx *Context, patt StringPattern, val Serializable, config MatchesFindConfig) (matches []Serializable, err error)
func GetOrLoadValueAtURL ¶
func GetOrLoadValueAtURL(ctx *Context, u URL, state *GlobalState) (Serializable, error)
func ParseJSONRepresentation ¶
func ParseJSONRepresentation(ctx *Context, s string, pattern Pattern) (Serializable, error)
func RepresentationBasedClone ¶
func RepresentationBasedClone(ctx *Context, val Serializable) (Serializable, error)
RepresentationBasedClone clones a Serializable by marshalling it to JSON and then unmarshalling it.
func ToSerializableAsserted ¶
func ToSerializableAsserted(v any) Serializable
func ToSerializableSlice ¶
func ToSerializableSlice(values []Value) []Serializable
type SerializableIterable ¶
type SerializableIterable interface { Iterable Serializable }
type SmartLock ¶
type SmartLock struct {
// contains filtered or unexported fields
}
A SmartLock is a lock that ignores locking operations until the value it protects is shared. It is not intended to be held for long durations and it should not be used to isolate transactions. The context of the current holder state (module) may be cancelled by other modules calling the Lock method.
func (*SmartLock) AssertValueShared ¶
func (lock *SmartLock) AssertValueShared()
func (*SmartLock) IsHeld ¶
IsHeld tells whether the lock is held, regardless of the state of the holder (cancelled or not).
func (*SmartLock) IsValueShared ¶
func (*SmartLock) Lock ¶
func (lock *SmartLock) Lock(state *GlobalState, embedder PotentiallySharable, ignoreLockedValues ...bool)
func (*SmartLock) Share ¶
func (lock *SmartLock) Share(originState *GlobalState, fn func())
func (*SmartLock) Unlock ¶
func (lock *SmartLock) Unlock(state *GlobalState, embedder PotentiallySharable, ignoreLockedValues ...bool)
type Snapshot ¶
type Snapshot struct {
// contains filtered or unexported fields
}
Snapshot holds either the serialized representation of a Value or a in-memory FROZEN value.
func TakeSnapshot ¶
func TakeSnapshot(ctx *Context, v Serializable, mustBeSerialized bool) (*Snapshot, error)
func (*Snapshot) InstantiateValue ¶
func (s *Snapshot) InstantiateValue(ctx *Context) (Serializable, error)
type SnapshotWriteToFilesystem ¶
type SnapshotWriteToFilesystem struct {
Overwrite bool
}
type SnapshotableFilesystem ¶
type SnapshotableFilesystem interface { afs.Filesystem //TakeFilesystemSnapshot takes a snapshot of the filesystem using the provided configuration. //Implementations should use config.IsFileIncluded to determine if a file or dir should be included in the snapshot; //Ancestor hieararchy of included files should always be included. //Implementations should use config.GetContent to reduce memory or disk usage. TakeFilesystemSnapshot(config FilesystemSnapshotConfig) (FilesystemSnapshot, error) }
type SortableByNestedValue ¶
type SpecificMutationKind ¶
type SpecificMutationKind int8
const ( // This mutation adds a single node + an optional edge SG_AddNode SpecificMutationKind = iota + 1 // This mutation adds a single edge SG_AddEdge // This mutation adds a single event SG_AddEvent )
type SpecificMutationMetadata ¶
type SpecificMutationMetadata struct { Version SpecificMutationVersion Kind SpecificMutationKind //Depends on the value on which the mutation is applied. Depth WatchingDepth Path Path }
type SpecificMutationVersion ¶
type SpecificMutationVersion int8
type StackFrameInfo ¶
type StackFrameInfo struct { Name string //can be nil, current *Chunk | *FunctionExpression or statement (current statement if we are stopped at a breakpoint exception) Node parse.Node Chunk *parse.ParsedChunkSource Id int32 //set if debugging, unique for a given debugger tree (~ session) StartLine int32 StartColumn int32 StatementStartLine int32 StatementStartColumn int32 }
type StatDirEntry ¶
type StatDirEntry struct {
// contains filtered or unexported fields
}
func NewStatDirEntry ¶
func NewStatDirEntry(info fs.FileInfo) *StatDirEntry
func (*StatDirEntry) IsDir ¶
func (d *StatDirEntry) IsDir() bool
func (*StatDirEntry) Name ¶
func (d *StatDirEntry) Name() string
func (*StatDirEntry) Type ¶
func (d *StatDirEntry) Type() fs.FileMode
type StatelessParser ¶
type StatelessParser interface { Validate(ctx *Context, s string) bool // Parse parses a string in the data format supported by the parser and returns the resulting value. // Mutable returned values should never be stored to be returned later. Parse(ctx *Context, s string) (Serializable, error) }
A StatelessParser represents a parser for a data format such as JSON or YAML. Implementations are allowed to use caching internally.
func GetParser ¶
func GetParser(mime Mimetype) (StatelessParser, bool)
type StaticCheckData ¶
type StaticCheckData struct {
// contains filtered or unexported fields
}
A StaticCheckData is the immutable data produced by statically checking a module.
func StaticCheck ¶
func StaticCheck(input StaticCheckInput) (*StaticCheckData, error)
StaticCheck performs various checks on an AST, like checking duplicate declarations and keys or checking that statements like return, break and continue are not misplaced. No type checks are performed.
func (*StaticCheckData) ErrorTuple ¶
func (d *StaticCheckData) ErrorTuple() *Tuple
func (*StaticCheckData) Errors ¶
func (d *StaticCheckData) Errors() []*StaticCheckError
Errors returns all errors in the code after a static check, the result should not be modified.
func (*StaticCheckData) GetFnData ¶
func (data *StaticCheckData) GetFnData(fnExpr *parse.FunctionExpression) *FunctionStaticData
func (*StaticCheckData) GetGoMethod ¶
func (d *StaticCheckData) GetGoMethod(name string) (*GoFunction, bool)
func (*StaticCheckData) GetMappingData ¶
func (data *StaticCheckData) GetMappingData(expr *parse.MappingExpression) *MappingStaticData
func (*StaticCheckData) IsMutable ¶
func (*StaticCheckData) IsMutable() bool
func (*StaticCheckData) PrettyPrint ¶
func (d *StaticCheckData) PrettyPrint(w *bufio.Writer, config *PrettyPrintConfig, depth int, parentIndentCount int)
func (*StaticCheckData) PropertyNames ¶
func (*StaticCheckData) PropertyNames(ctx *Context) []string
func (*StaticCheckData) SetProp ¶
func (*StaticCheckData) SetProp(ctx *Context, name string, value Value) error
func (*StaticCheckData) ToSymbolicValue ¶
func (*StaticCheckData) WarningTuple ¶
func (d *StaticCheckData) WarningTuple() *Tuple
func (*StaticCheckData) Warnings ¶
func (d *StaticCheckData) Warnings() []*StaticCheckWarning
Warnings returns all warnings in the code after a static check, the result should not be modified.
type StaticCheckError ¶
type StaticCheckError struct { Message string LocatedMessage string Location parse.SourcePositionStack }
func NewStaticCheckError ¶
func NewStaticCheckError(s string, location parse.SourcePositionStack) *StaticCheckError
func (StaticCheckError) Err ¶
func (err StaticCheckError) Err() Error
func (StaticCheckError) Error ¶
func (err StaticCheckError) Error() string
func (StaticCheckError) LocationStack ¶
func (err StaticCheckError) LocationStack() parse.SourcePositionStack
func (StaticCheckError) MessageWithoutLocation ¶
func (err StaticCheckError) MessageWithoutLocation() string
type StaticCheckInput ¶
type StaticCheckInput struct { State *GlobalState //mainly used when checking imported modules Node parse.Node Module *Module Chunk *parse.ParsedChunkSource ParentChecker *checker Globals GlobalVariables AdditionalGlobalConsts []string ShellLocalVars map[string]Value Patterns map[string]Pattern PatternNamespaces map[string]*PatternNamespace }
type StaticCheckWarning ¶
type StaticCheckWarning struct { Message string LocatedMessage string Location parse.SourcePositionStack }
func NewStaticCheckWarning ¶
func NewStaticCheckWarning(s string, location parse.SourcePositionStack) *StaticCheckWarning
func (StaticCheckWarning) LocationStack ¶
func (err StaticCheckWarning) LocationStack() parse.SourcePositionStack
func (StaticCheckWarning) MessageWithoutLocation ¶
func (err StaticCheckWarning) MessageWithoutLocation() string
type StaticallyCheckDbResolutionDataFn ¶
func GetStaticallyCheckDbResolutionDataFn ¶
func GetStaticallyCheckDbResolutionDataFn(scheme Scheme) (StaticallyCheckDbResolutionDataFn, bool)
type StrListIterator ¶
type StrListIterator struct {
// contains filtered or unexported fields
}
func (StrListIterator) HasNext ¶
func (it StrListIterator) HasNext(*Context) bool
func (*StrListIterator) IsMutable ¶
func (it *StrListIterator) IsMutable() bool
func (*StrListIterator) Key ¶
func (it *StrListIterator) Key(ctx *Context) Value
func (*StrListIterator) Next ¶
func (it *StrListIterator) Next(ctx *Context) bool
func (*StrListIterator) PrettyPrint ¶
func (it *StrListIterator) PrettyPrint(w *bufio.Writer, config *PrettyPrintConfig, depth int, parentIndentCount int)
func (*StrListIterator) ToSymbolicValue ¶
func (*StrListIterator) Value ¶
func (it *StrListIterator) Value(*Context) Value
type StreamSink ¶
type StreamSink interface { Value WritableStream(ctx *Context, optionalConfig *WritableStreamConfiguration) WritableStream }
type StreamSource ¶
type StreamSource interface { Value Stream(ctx *Context, optionalConfig *ReadableStreamConfiguration) ReadableStream }
type String ¶
type String string
Inox string type, String implements Value.
func NewStringFromSlices ¶
func ToJSON ¶
func ToJSON(ctx *Context, v Serializable, pattern *OptionalParam[Pattern]) String
func ToJSONWithConfig ¶
func ToJSONWithConfig(ctx *Context, v Serializable, config JSONSerializationConfig) String
func ToPrettyJSON ¶
func ToPrettyJSON(ctx *Context, v Serializable, pattern *OptionalParam[Pattern]) String
func (String) GetOrBuildString ¶
func (String) IsRecursivelyRenderable ¶
func (s String) IsRecursivelyRenderable(ctx *Context, input RenderingInput) bool
func (String) Iterator ¶
func (s String) Iterator(ctx *Context, config IteratorConfiguration) Iterator
func (String) PrettyPrint ¶
func (String) PropertyNames ¶
func (String) Replace ¶
func (s String) Replace(ctx *Context, old, new StringLike) StringLike
func (String) ToSymbolicValue ¶
func (String) TrimSpace ¶
func (s String) TrimSpace(ctx *Context) StringLike
func (String) UnderlyingString ¶
func (String) WriteJSONRepresentation ¶
type StringConcatenation ¶
type StringConcatenation struct {
// contains filtered or unexported fields
}
StringConcatenation is a lazy concatenation of string-like values that can form a string, it implements StringLike and is therefore immutable from the POV of Inox code. StringConcatenation can be considered truly immutable once the concatenation has been performed. This can be forced by calling the GetOrBuildString method.
func NewStringConcatenation ¶
func NewStringConcatenation(elements ...StringLike) *StringConcatenation
func (*StringConcatenation) ByteLen ¶
func (c *StringConcatenation) ByteLen() int
func (*StringConcatenation) GetOrBuildString ¶
func (c *StringConcatenation) GetOrBuildString() string
func (*StringConcatenation) HasPrefix ¶
func (c *StringConcatenation) HasPrefix(ctx *Context, prefix StringLike) Bool
func (*StringConcatenation) HasSuffix ¶
func (c *StringConcatenation) HasSuffix(ctx *Context, prefix StringLike) Bool
func (*StringConcatenation) IsMutable ¶
func (c *StringConcatenation) IsMutable() bool
func (*StringConcatenation) Iterator ¶
func (c *StringConcatenation) Iterator(ctx *Context, config IteratorConfiguration) Iterator
func (*StringConcatenation) Len ¶
func (c *StringConcatenation) Len() int
func (*StringConcatenation) PrettyPrint ¶
func (c *StringConcatenation) PrettyPrint(w *bufio.Writer, config *PrettyPrintConfig, depth int, parentIndentCount int)
func (*StringConcatenation) Prop ¶
func (c *StringConcatenation) Prop(ctx *Context, name string) Value
func (*StringConcatenation) PropertyNames ¶
func (c *StringConcatenation) PropertyNames(ctx *Context) []string
func (*StringConcatenation) Reader ¶
func (c *StringConcatenation) Reader() *Reader
func (*StringConcatenation) Replace ¶
func (c *StringConcatenation) Replace(ctx *Context, old, new StringLike) StringLike
func (*StringConcatenation) RuneCount ¶
func (c *StringConcatenation) RuneCount() int
func (*StringConcatenation) SetProp ¶
func (*StringConcatenation) SetProp(ctx *Context, name string, value Value) error
func (*StringConcatenation) ToSymbolicValue ¶
func (*StringConcatenation) TrimSpace ¶
func (c *StringConcatenation) TrimSpace(ctx *Context) StringLike
func (*StringConcatenation) WriteJSONRepresentation ¶
func (c *StringConcatenation) WriteJSONRepresentation(ctx *Context, w *jsoniter.Stream, config JSONSerializationConfig, depth int) error
type StringFormat ¶
type StringFormat interface { Format StringPattern }
type StringLike ¶
type StringLike interface { Serializable Sequence IProps GetOrBuildString() string ByteLen() int RuneCount() int Replace(ctx *Context, old, new StringLike) StringLike TrimSpace(ctx *Context) StringLike HasPrefix(ctx *Context, prefix StringLike) Bool HasSuffix(ctx *Context, prefix StringLike) Bool }
A StringLike represents an abstract immutable string, it should behave exactly like a regular Str and have the same pseudo properties. A StringLike should never perform internal mutation if IsMutable or GetOrBuildString is called.
func ConcatStringLikes ¶
func ConcatStringLikes(stringLikes ...StringLike) (StringLike, error)
type StringList ¶
type StringList struct {
// contains filtered or unexported fields
}
StringList implements underlyingList
func (*StringList) Clone ¶
func (list *StringList) Clone(originState *GlobalState, sharableValues *[]PotentiallySharable, clones map[uintptr]Clonable, depth int) (Serializable, error)
func (*StringList) ConstraintId ¶
func (list *StringList) ConstraintId() ConstraintId
func (*StringList) ContainsSimple ¶
func (list *StringList) ContainsSimple(ctx *Context, v Serializable) bool
func (*StringList) IsMutable ¶
func (list *StringList) IsMutable() bool
func (*StringList) Iterator ¶
func (list *StringList) Iterator(ctx *Context, config IteratorConfiguration) Iterator
func (*StringList) Len ¶
func (list *StringList) Len() int
func (*StringList) PrettyPrint ¶
func (list *StringList) PrettyPrint(w *bufio.Writer, config *PrettyPrintConfig, depth int, parentIndentCount int)
func (*StringList) SetSlice ¶
func (list *StringList) SetSlice(ctx *Context, start, end int, seq Sequence)
func (*StringList) ToSymbolicValue ¶
func (*StringList) WriteJSONRepresentation ¶
func (list *StringList) WriteJSONRepresentation(ctx *Context, w *jsoniter.Stream, config JSONSerializationConfig, depth int) error
type StringPattern ¶
type StringPattern interface { Pattern //IsResolved should return true if the pattern is lazy or contains lazy sub patterns. IsResolved() bool //Resolve should replace lazy patterns with resolved patterns. //Patterns that are already resolved should return themselves and patterns containing //sub patterns should mutate themselves. Resolve() (StringPattern, error) PatternNestingDepth(parentDepth int) int Regex() string CompiledRegex() *regexp.Regexp HasRegex() bool LengthRange() IntRange EffectiveLengthRange() IntRange //length range effectively used to match strings FindMatches(*Context, Serializable, MatchesFindConfig) (groups []Serializable, err error) Parse(*Context, string) (Serializable, error) // contains filtered or unexported methods }
func NewPEMRegexPattern ¶
func NewPEMRegexPattern(typeRegex string) StringPattern
type StrongTransactionIsolator ¶
type StrongTransactionIsolator struct {
// contains filtered or unexported fields
}
func (*StrongTransactionIsolator) WaitForOtherTxsToTerminate ¶
func (isolator *StrongTransactionIsolator) WaitForOtherTxsToTerminate(ctx *Context, requireRunningTx bool) (currentTx *Transaction, _ error)
WaitForOtherTxsToTerminate waits for specific transactions tracked by the isolator to terminate, it returns $ctx's transaction (can be nil). If $ctx has no transaction the call will only wait if there is a read-write transaction. Readonly transactions do not have to wait if only readonly transactions are tracked by the isolator. Read-write transactions have to wait for all readonly transactions, or the currently tracked read-write transaction, to terminate. ErrWaitReadonlyTxsTimeout is returned if too much time is spent waiting for readonly transaction to terminate. TODO: add similar error for waiting too long for the current read-write tx to terminate. When the currently tracked read-write transaction terminates, a random transaction among all waiting transactions resumes. In other words the first transaction to start waiting is not necessarily the one to resume first. TODO: AVOID STARVATION. ErrRunningTransactionExpected is returned if requireRunningTx is true and $ctx has no tx.
type Struct ¶
type Struct byte //converting *Struct to a Value interface does not require allocations.
func (Struct) PrettyPrint ¶
type StructType ¶
type StructType struct {
// contains filtered or unexported fields
}
func (*StructType) FieldCount ¶
func (t *StructType) FieldCount() int
func (*StructType) FieldRetrievalInfo ¶
func (t *StructType) FieldRetrievalInfo(name string) fieldRetrievalInfo
func (*StructType) GoType ¶
func (t *StructType) GoType() reflect.Type
func (*StructType) Symbolic ¶
func (t *StructType) Symbolic() symbolic.CompileTimeType
type Subscriber ¶
type Subscriber interface { Value ReceivePublication(ctx *Context, pub *Publication) }
type Subscription ¶
type Subscription struct {
// contains filtered or unexported fields
}
A Subscription holds metadata about the subscription of a Subscriber to a Publisher.
func (*Subscription) IsMutable ¶
func (*Subscription) IsMutable() bool
func (*Subscription) PrettyPrint ¶
func (s *Subscription) PrettyPrint(w *bufio.Writer, config *PrettyPrintConfig, depth int, parentIndentCount int)
func (*Subscription) ToSymbolicValue ¶
type Subscriptions ¶
type Subscriptions struct {
// contains filtered or unexported fields
}
func (*Subscriptions) ReceivePublications ¶
func (s *Subscriptions) ReceivePublications(ctx *Context, pub *Publication)
type SymbolicData ¶
func (*SymbolicData) ErrorTuple ¶
func (d *SymbolicData) ErrorTuple() *Tuple
func (*SymbolicData) GetGoMethod ¶
func (d *SymbolicData) GetGoMethod(name string) (*GoFunction, bool)
func (*SymbolicData) IsMutable ¶
func (*SymbolicData) IsMutable() bool
func (*SymbolicData) PrettyPrint ¶
func (d *SymbolicData) PrettyPrint(w *bufio.Writer, config *PrettyPrintConfig, depth int, parentIndentCount int)
func (*SymbolicData) PropertyNames ¶
func (*SymbolicData) PropertyNames(ctx *Context) []string
func (*SymbolicData) SetProp ¶
func (*SymbolicData) SetProp(ctx *Context, name string, value Value) error
func (*SymbolicData) ToSymbolicValue ¶
type SynchronousMessageHandler ¶
type SynchronousMessageHandler struct {
// contains filtered or unexported fields
}
func NewSynchronousMessageHandler ¶
func NewSynchronousMessageHandler(ctx *Context, fn *InoxFunction, pattern Pattern) *SynchronousMessageHandler
func (*SynchronousMessageHandler) IsMutable ¶
func (*SynchronousMessageHandler) IsMutable() bool
func (*SynchronousMessageHandler) OnMutation ¶
func (h *SynchronousMessageHandler) OnMutation(ctx *Context, microtask MutationCallbackMicrotask, config MutationWatchingConfiguration) (CallbackHandle, error)
func (*SynchronousMessageHandler) Pattern ¶
func (h *SynchronousMessageHandler) Pattern() Pattern
func (*SynchronousMessageHandler) PrettyPrint ¶
func (h *SynchronousMessageHandler) PrettyPrint(w *bufio.Writer, config *PrettyPrintConfig, depth int, parentIndentCount int)
func (*SynchronousMessageHandler) Prop ¶
func (h *SynchronousMessageHandler) Prop(ctx *Context, name string) Value
func (*SynchronousMessageHandler) PropertyNames ¶
func (*SynchronousMessageHandler) PropertyNames(ctx *Context) []string
func (*SynchronousMessageHandler) RemoveMutationCallback ¶
func (h *SynchronousMessageHandler) RemoveMutationCallback(ctx *Context, handle CallbackHandle)
func (*SynchronousMessageHandler) RemoveMutationCallbackMicrotasks ¶
func (h *SynchronousMessageHandler) RemoveMutationCallbackMicrotasks(ctx *Context)
func (*SynchronousMessageHandler) SetProp ¶
func (*SynchronousMessageHandler) SetProp(ctx *Context, name string, value Value) error
func (*SynchronousMessageHandler) ToSymbolicValue ¶
func (*SynchronousMessageHandler) Watcher ¶
func (h *SynchronousMessageHandler) Watcher(ctx *Context, config WatcherConfiguration) Watcher
func (*SynchronousMessageHandler) WriteJSONRepresentation ¶
func (h *SynchronousMessageHandler) WriteJSONRepresentation(ctx *Context, w *jsoniter.Stream, config JSONSerializationConfig, depth int) error
type SynchronousMessageHandlers ¶
type SynchronousMessageHandlers struct {
// contains filtered or unexported fields
}
func NewSynchronousMessageHandlers ¶
func NewSynchronousMessageHandlers(handlers ...*SynchronousMessageHandler) *SynchronousMessageHandlers
func (*SynchronousMessageHandlers) CallHandlers ¶
func (handlers *SynchronousMessageHandlers) CallHandlers(ctx *Context, msg Message, self Value) error
type SystemGraph ¶
type SystemGraph struct {
// contains filtered or unexported fields
}
A SystemGraph represents relations & events between values.
func NewSystemGraph ¶
func NewSystemGraph() *SystemGraph
func (*SystemGraph) AddChildNode ¶
func (g *SystemGraph) AddChildNode(ctx *Context, parent SystemGraphNodeValue, value SystemGraphNodeValue, name string, additionalEdgeKinds ...SystemGraphEdgeKind)
AddChildNode is like AddNode but it also adds an edge of kind EdgeChild from the parent value's node to the newly created node
func (*SystemGraph) AddEvent ¶
func (g *SystemGraph) AddEvent(ctx *Context, text string, v SystemGraphNodeValue)
func (*SystemGraph) AddNode ¶
func (g *SystemGraph) AddNode(ctx *Context, value SystemGraphNodeValue, name string)
func (*SystemGraph) AddWatchedNode ¶
func (g *SystemGraph) AddWatchedNode(ctx *Context, watchingVal SystemGraphNodeValue, watchedValue SystemGraphNodeValue, name string)
AddWatcheddNode is like AddChildNode but the kind of the newly created edge is EdgeWatched
func (*SystemGraph) ApplySpecificMutation ¶
func (g *SystemGraph) ApplySpecificMutation(ctx *Context, m Mutation) error
func (*SystemGraph) IsFrozen ¶
func (g *SystemGraph) IsFrozen() bool
func (*SystemGraph) IsMutable ¶
func (*SystemGraph) IsMutable() bool
func (*SystemGraph) IsSharable ¶
func (g *SystemGraph) IsSharable(originState *GlobalState) (bool, string)
func (*SystemGraph) IsShared ¶
func (g *SystemGraph) IsShared() bool
func (*SystemGraph) OnMutation ¶
func (g *SystemGraph) OnMutation(ctx *Context, microtask MutationCallbackMicrotask, config MutationWatchingConfiguration) (CallbackHandle, error)
func (*SystemGraph) PrettyPrint ¶
func (g *SystemGraph) PrettyPrint(w *bufio.Writer, config *PrettyPrintConfig, depth int, parentIndentCount int)
func (*SystemGraph) PropertyNames ¶
func (*SystemGraph) PropertyNames(ctx *Context) []string
func (*SystemGraph) Ptr ¶
func (g *SystemGraph) Ptr() SystemGraphPointer
func (*SystemGraph) RemoveMutationCallback ¶
func (g *SystemGraph) RemoveMutationCallback(ctx *Context, handle CallbackHandle)
func (*SystemGraph) RemoveMutationCallbackMicrotasks ¶
func (g *SystemGraph) RemoveMutationCallbackMicrotasks(ctx *Context)
func (*SystemGraph) SetProp ¶
func (*SystemGraph) SetProp(ctx *Context, name string, value Value) error
func (*SystemGraph) Share ¶
func (g *SystemGraph) Share(originState *GlobalState)
func (*SystemGraph) SmartLock ¶
func (g *SystemGraph) SmartLock(state *GlobalState)
func (*SystemGraph) SmartUnlock ¶
func (g *SystemGraph) SmartUnlock(state *GlobalState)
func (*SystemGraph) TakeInMemorySnapshot ¶
func (g *SystemGraph) TakeInMemorySnapshot(ctx *Context) (*Snapshot, error)
func (*SystemGraph) ToSymbolicValue ¶
func (*SystemGraph) Unfreeze ¶
func (g *SystemGraph) Unfreeze(ctx *Context) error
func (*SystemGraph) Watcher ¶
func (*SystemGraph) Watcher(ctx *Context, config WatcherConfiguration) Watcher
func (*SystemGraph) WriteJSONRepresentation ¶
func (g *SystemGraph) WriteJSONRepresentation(ctx *Context, w *jsoniter.Stream, config JSONSerializationConfig, depth int) error
type SystemGraphAccessPermission ¶
type SystemGraphAccessPermission struct {
Kind_ PermissionKind
}
func (SystemGraphAccessPermission) Includes ¶
func (perm SystemGraphAccessPermission) Includes(otherPerm Permission) bool
func (SystemGraphAccessPermission) InternalPermTypename ¶
func (perm SystemGraphAccessPermission) InternalPermTypename() permkind.InternalPermissionTypename
func (SystemGraphAccessPermission) Kind ¶
func (perm SystemGraphAccessPermission) Kind() PermissionKind
func (SystemGraphAccessPermission) String ¶
func (perm SystemGraphAccessPermission) String() string
type SystemGraphEdge ¶
type SystemGraphEdge struct {
// contains filtered or unexported fields
}
func (SystemGraphEdge) IsMutable ¶
func (SystemGraphEdge) IsMutable() bool
func (SystemGraphEdge) IsSharable ¶
func (e SystemGraphEdge) IsSharable(originState *GlobalState) (bool, string)
func (SystemGraphEdge) PrettyPrint ¶
func (e SystemGraphEdge) PrettyPrint(w *bufio.Writer, config *PrettyPrintConfig, depth int, parentIndentCount int)
func (SystemGraphEdge) PropertyNames ¶
func (SystemGraphEdge) PropertyNames(ctx *Context) []string
func (SystemGraphEdge) SetProp ¶
func (SystemGraphEdge) SetProp(ctx *Context, name string, value Value) error
func (SystemGraphEdge) ToSymbolicValue ¶
func (SystemGraphEdge) WriteJSONRepresentation ¶
func (e SystemGraphEdge) WriteJSONRepresentation(ctx *Context, w *jsoniter.Stream, config JSONSerializationConfig, depth int) error
type SystemGraphEdgeKind ¶
type SystemGraphEdgeKind uint8
const ( EdgeChild SystemGraphEdgeKind = iota + 1 EdgeWatched )
func (SystemGraphEdgeKind) DefaultText ¶
func (k SystemGraphEdgeKind) DefaultText() string
type SystemGraphEvent ¶
type SystemGraphEvent struct {
// contains filtered or unexported fields
}
A SystemGraphEvent is an immutable value representing an event in an node or between two nodes.
func (SystemGraphEvent) IsMutable ¶
func (SystemGraphEvent) IsMutable() bool
func (SystemGraphEvent) PrettyPrint ¶
func (e SystemGraphEvent) PrettyPrint(w *bufio.Writer, config *PrettyPrintConfig, depth int, parentIndentCount int)
func (SystemGraphEvent) PropertyNames ¶
func (SystemGraphEvent) PropertyNames(ctx *Context) []string
func (SystemGraphEvent) SetProp ¶
func (SystemGraphEvent) SetProp(ctx *Context, name string, value Value) error
func (SystemGraphEvent) ToSymbolicValue ¶
func (SystemGraphEvent) WriteJSONRepresentation ¶
func (e SystemGraphEvent) WriteJSONRepresentation(ctx *Context, w *jsoniter.Stream, config JSONSerializationConfig, depth int) error
type SystemGraphNode ¶
type SystemGraphNode struct {
// contains filtered or unexported fields
}
func (*SystemGraphNode) IsMutable ¶
func (*SystemGraphNode) IsMutable() bool
func (*SystemGraphNode) IsSharable ¶
func (n *SystemGraphNode) IsSharable(originState *GlobalState) (bool, string)
func (*SystemGraphNode) IsShared ¶
func (n *SystemGraphNode) IsShared() bool
func (*SystemGraphNode) PrettyPrint ¶
func (n *SystemGraphNode) PrettyPrint(w *bufio.Writer, config *PrettyPrintConfig, depth int, parentIndentCount int)
func (*SystemGraphNode) PropertyNames ¶
func (*SystemGraphNode) PropertyNames(ctx *Context) []string
func (*SystemGraphNode) SetProp ¶
func (*SystemGraphNode) SetProp(ctx *Context, name string, value Value) error
func (*SystemGraphNode) Share ¶
func (n *SystemGraphNode) Share(originState *GlobalState)
func (*SystemGraphNode) SmartLock ¶
func (n *SystemGraphNode) SmartLock(state *GlobalState)
func (*SystemGraphNode) SmartUnlock ¶
func (n *SystemGraphNode) SmartUnlock()
func (*SystemGraphNode) ToSymbolicValue ¶
type SystemGraphNodeValue ¶
type SystemGraphNodeValue interface { Watchable ProposeSystemGraph(ctx *Context, g *SystemGraph, propoposedName string, optionalParent SystemGraphNodeValue) SystemGraph() *SystemGraph AddSystemGraphEvent(ctx *Context, text string) }
type SystemGraphNodes ¶
type SystemGraphNodes struct {
// contains filtered or unexported fields
}
func (*SystemGraphNodes) IsMutable ¶
func (*SystemGraphNodes) IsMutable() bool
func (*SystemGraphNodes) IsSharable ¶
func (n *SystemGraphNodes) IsSharable(originState *GlobalState) (bool, string)
func (*SystemGraphNodes) IsShared ¶
func (n *SystemGraphNodes) IsShared() bool
func (*SystemGraphNodes) Iterator ¶
func (n *SystemGraphNodes) Iterator(ctx *Context, config IteratorConfiguration) Iterator
func (*SystemGraphNodes) PrettyPrint ¶
func (n *SystemGraphNodes) PrettyPrint(w *bufio.Writer, config *PrettyPrintConfig, depth int, parentIndentCount int)
func (*SystemGraphNodes) Share ¶
func (n *SystemGraphNodes) Share(originState *GlobalState)
func (*SystemGraphNodes) SmartLock ¶
func (n *SystemGraphNodes) SmartLock(state *GlobalState)
func (*SystemGraphNodes) SmartUnlock ¶
func (n *SystemGraphNodes) SmartUnlock(state *GlobalState)
func (*SystemGraphNodes) ToSymbolicValue ¶
type SystemGraphPointer ¶
type SystemGraphPointer struct {
// contains filtered or unexported fields
}
func (*SystemGraphPointer) AddEvent ¶
func (p *SystemGraphPointer) AddEvent(ctx *Context, text string, v SystemGraphNodeValue)
func (*SystemGraphPointer) Graph ¶
func (p *SystemGraphPointer) Graph() *SystemGraph
func (*SystemGraphPointer) Set ¶
func (p *SystemGraphPointer) Set(ptr SystemGraphPointer) bool
type TestCase ¶
type TestCase struct {
// contains filtered or unexported fields
}
A TestCase represents a test case, TestCase implements Value.
func NewTestCase ¶
func NewTestCase(input TestCaseCreationInput) (*TestCase, error)
func (*TestCase) FilesystemSnapshot ¶
func (c *TestCase) FilesystemSnapshot() (FilesystemSnapshot, bool)
func (*TestCase) GetGoMethod ¶
func (s *TestCase) GetGoMethod(name string) (*GoFunction, bool)
func (*TestCase) ParentChunk ¶
func (c *TestCase) ParentChunk() *parse.ParsedChunkSource
Module returns the chunk that contains the test.
func (*TestCase) ParentModule ¶
Module returns the module that contains the test.
func (*TestCase) PrettyPrint ¶
func (*TestCase) PropertyNames ¶
type TestCaseCreationInput ¶
type TestCaseCreationInput struct { Meta Value Node *parse.TestCaseExpression ModChunk *parse.Chunk ParentState *GlobalState ParentChunk *parse.ParsedChunkSource //optional PositionStack parse.SourcePositionStack FormattedLocation string }
type TestCaseResult ¶
type TestCaseResult struct { Success bool `json:"success"` DarkModePrettyMessage string //colorized LightModePrettyMessage string //colorized Message string // contains filtered or unexported fields }
func NewTestCaseResult ¶
func (*TestCaseResult) IsMutable ¶
func (c *TestCaseResult) IsMutable() bool
func (*TestCaseResult) PrettyPrint ¶
func (r *TestCaseResult) PrettyPrint(w *bufio.Writer, config *PrettyPrintConfig, depth int, parentIndentCount int)
func (*TestCaseResult) ToSymbolicValue ¶
type TestFilter ¶
type TestFilter struct { //never nil NameRegex string //if path ends with '/...' all tests found in subdirectories are also enabled. //this field is ignored if it is empty. AbsolutePath string //span of the test suite or test case statement, this field is ignored if it is equal to the zero value //or AbsolutePath is empty. NodeSpan parse.NodeSpan }
A TestFilter filter tests by checking several values.
func (TestFilter) IsTestEnabled ¶
func (f TestFilter) IsTestEnabled(absoluteFilePath string, item TestItem, parentState *GlobalState) (enabled bool, reason string)
func (TestFilter) String ¶
func (f TestFilter) String() string
type TestFilters ¶
type TestFilters struct { PositiveTestFilters []TestFilter NegativeTestFilters []TestFilter }
func (TestFilters) IsTestEnabled ¶
func (filters TestFilters) IsTestEnabled(item TestItem, parentState *GlobalState) (enabled bool, reason string)
type TestItem ¶
type TestItem interface { ItemName() (string, bool) ParentChunk() *parse.ParsedChunkSource ParentModule() *Module Statement() parse.Node FilesystemSnapshot() (FilesystemSnapshot, bool) }
A TestItem is a TestSuite or a TestCase.
type TestSuite ¶
type TestSuite struct {
// contains filtered or unexported fields
}
A TestSuite represents a test suite, TestSuite implements Value.
func NewTestSuite ¶
func NewTestSuite(input TestSuiteCreationInput) (*TestSuite, error)
func (*TestSuite) FilesystemSnapshot ¶
func (s *TestSuite) FilesystemSnapshot() (FilesystemSnapshot, bool)
func (*TestSuite) GetGoMethod ¶
func (s *TestSuite) GetGoMethod(name string) (*GoFunction, bool)
func (*TestSuite) ParentChunk ¶
func (s *TestSuite) ParentChunk() *parse.ParsedChunkSource
Module returns the chunk that contains the test.
func (*TestSuite) ParentModule ¶
Module returns the module that contains the test.
func (*TestSuite) PrettyPrint ¶
func (*TestSuite) PropertyNames ¶
type TestSuiteCreationInput ¶
type TestSuiteCreationInput struct { Meta Value Node *parse.TestSuiteExpression EmbeddedModChunk *parse.Chunk ParentChunk *parse.ParsedChunkSource ParentState *GlobalState }
type TestSuiteResult ¶
type TestSuiteResult struct { Success bool DarkModePrettyMessage string //colorized LightModePrettyMessage string //colorized Message string // contains filtered or unexported fields }
func NewTestSuiteResult ¶
func NewTestSuiteResult(ctx *Context, testCaseResults []*TestCaseResult, subSuiteResults []*TestSuiteResult, testSuite *TestSuite) (*TestSuiteResult, error)
func (*TestSuiteResult) MostAdaptedMessage ¶
func (r *TestSuiteResult) MostAdaptedMessage(colorized bool, darkBackground bool) string
type TestValueStorage ¶
func (*TestValueStorage) BaseURL ¶
func (s *TestValueStorage) BaseURL() URL
func (*TestValueStorage) GetSerialized ¶
func (s *TestValueStorage) GetSerialized(ctx *Context, key Path) (string, bool)
func (*TestValueStorage) InsertSerialized ¶
func (s *TestValueStorage) InsertSerialized(ctx *Context, key Path, serialized string)
func (*TestValueStorage) SetSerialized ¶
func (s *TestValueStorage) SetSerialized(ctx *Context, key Path, serialized string)
type TestedProgram ¶
type TestedProgram struct {
// contains filtered or unexported fields
}
func (*TestedProgram) Cancel ¶
func (p *TestedProgram) Cancel(*Context)
func (*TestedProgram) GetGoMethod ¶
func (p *TestedProgram) GetGoMethod(name string) (*GoFunction, bool)
func (*TestedProgram) IsMutable ¶
func (*TestedProgram) IsMutable() bool
func (*TestedProgram) PrettyPrint ¶
func (p *TestedProgram) PrettyPrint(w *bufio.Writer, config *PrettyPrintConfig, depth int, parentIndentCount int)
func (*TestedProgram) PropertyNames ¶
func (*TestedProgram) PropertyNames(ctx *Context) []string
func (*TestedProgram) SetProp ¶
func (*TestedProgram) SetProp(ctx *Context, name string, value Value) error
func (*TestedProgram) ToSymbolicValue ¶
type TestingState ¶
type TestingState struct { IsTestingEnabled bool //if true the test suites encountered during executions are run IsImportTestingEnabled bool //if true the test suites in imported modules and included chunks are run Filters TestFilters ResultsLock sync.Mutex CaseResults []*TestCaseResult SuiteResults []*TestSuiteResult Item TestItem //can be nil ItemFullName string //can be empty TestedProgram *Module //can be nil }
type ThreadInfo ¶
type ToStringConversionCapableStringPattern ¶
type ToStringConversionCapableStringPattern interface { StringPattern StringFrom(ctx *Context, v Value) (string, error) }
type Token ¶
type Token struct {
// contains filtered or unexported fields
}
A Token is an immutable Value wrapping a token.
func (Token) PrettyPrint ¶
func (Token) PropertyNames ¶
type TokenDepletionFn ¶
type Transaction ¶
type Transaction struct {
// contains filtered or unexported fields
}
A Transaction is analogous to a database transaction but behaves a little bit differently. A Transaction can be started, commited and rolled back. Effects (reversible or not) such as FS changes are added to it. Actual database transactions or data containers can also register a callback with the OnEnd method, in order to execute logic when the transaction commits or rolls back.
func StartNewReadonlyTransaction ¶
func StartNewReadonlyTransaction(ctx *Context, options ...Option) *Transaction
StartNewReadonlyTransaction creates a new readonly transaction and starts it immediately.
func StartNewTransaction ¶
func StartNewTransaction(ctx *Context, options ...Option) *Transaction
StartNewTransaction creates a new transaction and starts it immediately.
func (*Transaction) Commit ¶
func (tx *Transaction) Commit(ctx *Context) error
func (*Transaction) Finished ¶
func (tx *Transaction) Finished() DoneChan
Finished returns an unbuffered channel that closes when tx is finished.
func (*Transaction) GetGoMethod ¶
func (tx *Transaction) GetGoMethod(name string) (*GoFunction, bool)
func (*Transaction) ID ¶
func (tx *Transaction) ID() ULID
func (*Transaction) IsFinished ¶
func (tx *Transaction) IsFinished() bool
func (*Transaction) IsFinishing ¶
func (tx *Transaction) IsFinishing() bool
func (*Transaction) IsMutable ¶
func (tx *Transaction) IsMutable() bool
func (*Transaction) IsReadonly ¶
func (tx *Transaction) IsReadonly() bool
func (*Transaction) OnEnd ¶
func (tx *Transaction) OnEnd(k any, fn TransactionEndCallbackFn) error
OnEnd associates with k the callback function fn that will be called on the end of the transacion (success or failure), IMPORTANT NOTE: fn may be called in a goroutine different from the one that registered it. If a function is already associated with k the error ErrAlreadySetTransactionEndCallback is returned
func (*Transaction) PrettyPrint ¶
func (tx *Transaction) PrettyPrint(w *bufio.Writer, config *PrettyPrintConfig, depth int, parentIndentCount int)
func (*Transaction) PropertyNames ¶
func (tx *Transaction) PropertyNames(ctx *Context) []string
func (*Transaction) Rollback ¶
func (tx *Transaction) Rollback(ctx *Context) error
func (*Transaction) SetProp ¶
func (*Transaction) SetProp(ctx *Context, name string, value Value) error
func (*Transaction) Start ¶
func (tx *Transaction) Start(ctx *Context) error
Start attaches tx to the passed context and creates a goroutine that will roll it back on timeout or context cancellation. The passed context must be the same context that created the transaction. ErrFinishedTransaction will be returned if Start is called on a finished transaction.
func (*Transaction) ToSymbolicValue ¶
type TransactionEndCallbackFn ¶
type TransactionEndCallbackFn func(tx *Transaction, success bool)
type TransientID ¶
type TransientID [2]uintptr
A TransientID of an Inox value is an address-based identifier, it should not be used to identify the value once the value is no longer accessible (GCed). TransientIDs are only obtainable by calling TransientIdOf on Inox values.
func TransientIdOf ¶
func TransientIdOf(v Value) (result TransientID, hastFastId bool)
type TraversalConfiguration ¶
type TraversalConfiguration struct {
MaxDepth int
}
type TreeWalkCall ¶
type TreeWalkCall struct {
// contains filtered or unexported fields
}
type TreeWalkState ¶
type TreeWalkState struct { Global *GlobalState LocalScopeStack []map[string]Value //TODO: reduce memory usage by using a struct { small *memds.Map8[string,Value]; grown map[string]Value } ? // contains filtered or unexported fields }
A TreeWalkState stores all the state necessary to perform a tree walking evaluation.
func NewTreeWalkState ¶
func NewTreeWalkState(ctx *Context, constants ...map[string]Value) *TreeWalkState
NewTreeWalkState creates a TreeWalkState and a GlobalState it will use.
func NewTreeWalkStateWithGlobal ¶
func NewTreeWalkStateWithGlobal(global *GlobalState) *TreeWalkState
NewTreeWalkState creates a TreeWalkState that will use $global as its global state.
func (*TreeWalkState) AttachDebugger ¶
func (state *TreeWalkState) AttachDebugger(debugger *Debugger)
func (*TreeWalkState) CurrentLocalScope ¶
func (state *TreeWalkState) CurrentLocalScope() map[string]Value
func (*TreeWalkState) DetachDebugger ¶
func (state *TreeWalkState) DetachDebugger()
func (*TreeWalkState) GetGlobalState ¶
func (state *TreeWalkState) GetGlobalState() *GlobalState
func (*TreeWalkState) HasGlobal ¶
func (state *TreeWalkState) HasGlobal(name string) bool
func (*TreeWalkState) PopScope ¶
func (state *TreeWalkState) PopScope()
func (*TreeWalkState) PushScope ¶
func (state *TreeWalkState) PushScope()
func (*TreeWalkState) Reset ¶
func (state *TreeWalkState) Reset(global *GlobalState)
Reset recycles the state by resetting its fields. Since references to the state may exist somewhere Reset() should only be used for very simple programs, at least for now. Calling Reset() with a *GlobalState is almost equivalent as creating a new state with NewTreeWalkStateWithGlobal. It is recommended to call Reset(nil) if the caller is able to know when the previous module has finished executing: this will remove references to the old state and to some values.
func (*TreeWalkState) SetGlobal ¶
func (state *TreeWalkState) SetGlobal(name string, value Value, constness GlobalConstness) (ok bool)
type Treedata ¶
type Treedata struct { Root Serializable HiearchyEntries []TreedataHiearchyEntry }
Treedata is used to represent any hiearchical data, Treedata implements Value and is immutable.
func GetDirTreeData ¶
func GetDirTreeData(fls afs.Filesystem, walkedDirPath Path) *Treedata
func (*Treedata) PrettyPrint ¶
func (*Treedata) ToSymbolicValue ¶
func (*Treedata) WalkEntriesDF ¶
func (d *Treedata) WalkEntriesDF(fn func(e TreedataHiearchyEntry, index int, ancestorChain *[]TreedataHiearchyEntry) error) error
func (*Treedata) WriteJSONRepresentation ¶
type TreedataHiearchyEntry ¶
type TreedataHiearchyEntry struct { Value Serializable Children []TreedataHiearchyEntry }
TreedataHiearchyEntry represents a hiearchical entry in a Treedata, TreedataHiearchyEntry implements Value but is never accessible by Inox code.
func (TreedataHiearchyEntry) IsMutable ¶
func (e TreedataHiearchyEntry) IsMutable() bool
func (TreedataHiearchyEntry) PrettyPrint ¶
func (e TreedataHiearchyEntry) PrettyPrint(w *bufio.Writer, config *PrettyPrintConfig, depth int, parentIndentCount int)
func (TreedataHiearchyEntry) ToSymbolicValue ¶
func (*TreedataHiearchyEntry) WriteJSONRepresentation ¶
func (u *TreedataHiearchyEntry) WriteJSONRepresentation(ctx *Context, w *jsoniter.Stream, config JSONSerializationConfig, depth int) error
type TreedataWalker ¶
type TreedataWalker struct {
// contains filtered or unexported fields
}
func (*TreedataWalker) HasNext ¶
func (it *TreedataWalker) HasNext(ctx *Context) bool
func (*TreedataWalker) IsMutable ¶
func (w *TreedataWalker) IsMutable() bool
func (*TreedataWalker) Key ¶
func (it *TreedataWalker) Key(*Context) Value
func (*TreedataWalker) Next ¶
func (it *TreedataWalker) Next(ctx *Context) bool
func (*TreedataWalker) NodeMeta ¶
func (it *TreedataWalker) NodeMeta(*Context) WalkableNodeMeta
func (*TreedataWalker) PrettyPrint ¶
func (it *TreedataWalker) PrettyPrint(w *bufio.Writer, config *PrettyPrintConfig, depth int, parentIndentCount int)
func (*TreedataWalker) Prune ¶
func (it *TreedataWalker) Prune(ctx *Context)
func (*TreedataWalker) ToSymbolicValue ¶
func (*TreedataWalker) Value ¶
func (it *TreedataWalker) Value(*Context) Value
type Tuple ¶
type Tuple struct {
// contains filtered or unexported fields
}
Tuple is the immutable equivalent of a List, Tuple implements Value.
func ConcatTuples ¶
func NewTuple ¶
func NewTuple(elements []Serializable) *Tuple
func NewTupleVariadic ¶
func NewTupleVariadic(elements ...Serializable) *Tuple
func (*Tuple) GetOrBuildElements ¶
func (tuple *Tuple) GetOrBuildElements(ctx *Context) []Serializable
the caller can modify the result
func (Tuple) Iterator ¶
func (tuple Tuple) Iterator(ctx *Context, config IteratorConfiguration) Iterator
func (Tuple) PrettyPrint ¶
func (Tuple) ToSymbolicValue ¶
func (*Tuple) WriteJSONRepresentation ¶
type TupleIterator ¶
type TupleIterator struct {
// contains filtered or unexported fields
}
func (TupleIterator) HasNext ¶
func (it TupleIterator) HasNext(*Context) bool
func (*TupleIterator) IsMutable ¶
func (it *TupleIterator) IsMutable() bool
func (*TupleIterator) Key ¶
func (it *TupleIterator) Key(ctx *Context) Value
func (*TupleIterator) Next ¶
func (it *TupleIterator) Next(ctx *Context) bool
func (*TupleIterator) PrettyPrint ¶
func (it *TupleIterator) PrettyPrint(w *bufio.Writer, config *PrettyPrintConfig, depth int, parentIndentCount int)
func (*TupleIterator) ToSymbolicValue ¶
func (*TupleIterator) Value ¶
func (it *TupleIterator) Value(*Context) Value
type TuplePattern ¶
type TuplePattern struct { NotCallablePatternMixin // contains filtered or unexported fields }
A TuplePattern represents a pattern matching Inox tuples (e.g. #[1, 2]), ListPattern TuplePattern Value.
func NewTuplePattern ¶
func NewTuplePattern(elementPatterns []Pattern) *TuplePattern
func NewTuplePatternOf ¶
func NewTuplePatternOf(generalElementPattern Pattern) *TuplePattern
func (*TuplePattern) DefaultValue ¶
func (patt *TuplePattern) DefaultValue(ctx *Context) (Value, error)
func (*TuplePattern) ElementPatternAt ¶
func (patt *TuplePattern) ElementPatternAt(i int) (Pattern, bool)
func (*TuplePattern) ExactElementCount ¶
func (patt *TuplePattern) ExactElementCount() (int, bool)
func (*TuplePattern) IsMutable ¶
func (patt *TuplePattern) IsMutable() bool
func (TuplePattern) Iterator ¶
func (patt TuplePattern) Iterator(ctx *Context, config IteratorConfiguration) Iterator
func (TuplePattern) PrettyPrint ¶
func (patt TuplePattern) PrettyPrint(w *bufio.Writer, config *PrettyPrintConfig, depth int, parentIndentCount int)
func (*TuplePattern) StringPattern ¶
func (patt *TuplePattern) StringPattern() (StringPattern, bool)
func (*TuplePattern) ToSymbolicValue ¶
func (TuplePattern) WriteJSONRepresentation ¶
func (patt TuplePattern) WriteJSONRepresentation(ctx *Context, w *jsoniter.Stream, config JSONSerializationConfig, depth int) error
type TypeExtension ¶
type TypeExtension struct {
// contains filtered or unexported fields
}
A type extension represents a set of methods & computed properties for values matching a given pattern.
func (TypeExtension) Id ¶
func (e TypeExtension) Id() string
type TypePattern ¶
type TypePattern struct { Type reflect.Type Name string SymbolicValue symbolic.Value RandomImpl func(options ...Option) Value CallImpl func(pattern *TypePattern, values []Serializable) (Pattern, error) SymbolicCallImpl func(ctx *symbolic.Context, values []symbolic.Value) (symbolic.Pattern, error) // contains filtered or unexported fields }
A TypePattern matches values implementing .Type (if .Type is an interface) or having their type equal to .Type. TypePattern implements Value.
func (*TypePattern) Call ¶
func (patt *TypePattern) Call(values []Serializable) (Pattern, error)
func (*TypePattern) IsMutable ¶
func (pattern *TypePattern) IsMutable() bool
func (TypePattern) Iterator ¶
func (patt TypePattern) Iterator(ctx *Context, config IteratorConfiguration) Iterator
func (TypePattern) PrettyPrint ¶
func (pattern TypePattern) PrettyPrint(w *bufio.Writer, config *PrettyPrintConfig, depth int, parentIndentCount int)
func (TypePattern) Random ¶
func (pattern TypePattern) Random(ctx *Context, options ...Option) Value
func (*TypePattern) StringPattern ¶
func (patt *TypePattern) StringPattern() (StringPattern, bool)
func (*TypePattern) ToSymbolicVal ¶
func (p *TypePattern) ToSymbolicVal() symbolic.Pattern
func (*TypePattern) ToSymbolicValue ¶
func (TypePattern) WriteJSONRepresentation ¶
func (pattern TypePattern) WriteJSONRepresentation(ctx *Context, w *jsoniter.Stream, config JSONSerializationConfig, depth int) error
type ULID ¶
type ULID ulid.ULID
ULID implements Value.
var (
MIN_ULID, MAX_ULID ULID
)
func NewULID ¶
func NewULID() ULID
NewULID generates in a cryptographically secure way an ULID with a monotonically increasing entropy.
func (ULID) PrettyPrint ¶
func (ULID) ToSymbolicValue ¶
func (ULID) WriteJSONRepresentation ¶
type URL ¶
type URL string
URL represents a non-relative URL, it implements Value.
func (URL) AppendAbsolutePath ¶
AppendAbsolutePath joins anabsolute path with the URL's path if it has a directory path. If the input path is not absolute or if the URL's path is not a directory path the function panics.
func (URL) AppendRelativePath ¶
AppendRelativePath joins a relative path starting with './' with the URL's path if it has a directory path. If the input path is not relative or if the URL's path is not a directory path the function panics.
func (URL) DirURL ¶
DirURL returns the URL of the parent directory, if the current path is / then ("", false) is returned.
func (URL) GetLastPathSegment ¶
func (URL) HasQueryOrFragment ¶
func (URL) IsDir ¶
IsDir returns whether the url has a trailing slash and has no query nor fragment.
func (URL) IsDirOf ¶
IsDirOf returns whether the url is a URL dir for $other, adjacent '/' characters are treated as a single '/' character. Example: https://example.com/a/ is a URL dir for https://example.com/a/b Example: https://example.com/a/ is a URL dir for https://example.com/a/b/ The function panics if the url is not a directory URL or if any of the two urls has a fragment or query.
func (URL) PrettyPrint ¶
func (URL) PropertyNames ¶
func (URL) ResourceName ¶
func (URL) ToSymbolicValue ¶
func (URL) TruncatedBeforeQuery ¶
TruncatedBeforeQuery returns a URL with everything after (and including) '?' removed. If the resulting URL has no URL specific feature a '/' is added at the end.
func (URL) UnderlyingString ¶
func (URL) WithScheme ¶
func (URL) WithoutQueryNorFragment ¶
WithoutQueryNorFragment returns a URL with everything after (and including) '?' and '#' removed. If the resulting URL has no URL specific feature a '/' is added at the end.
func (URL) WriteJSONRepresentation ¶
type URLPattern ¶
type URLPattern string
func (URLPattern) Call ¶
func (URLPattern) Call(values []Serializable) (Pattern, error)
func (URLPattern) Host ¶
func (patt URLPattern) Host() Host
func (URLPattern) IncludesURL ¶
func (patt URLPattern) IncludesURL(ctx *Context, u URL) bool
func (URLPattern) IsMutable ¶
func (patt URLPattern) IsMutable() bool
func (URLPattern) IsPrefixPattern ¶
func (patt URLPattern) IsPrefixPattern() bool
func (URLPattern) Iterator ¶
func (patt URLPattern) Iterator(ctx *Context, config IteratorConfiguration) Iterator
func (URLPattern) Prefix ¶
func (patt URLPattern) Prefix() string
func (URLPattern) PrettyPrint ¶
func (patt URLPattern) PrettyPrint(w *bufio.Writer, config *PrettyPrintConfig, depth int, parentIndentCount int)
func (URLPattern) PropertyNames ¶
func (patt URLPattern) PropertyNames(ctx *Context) []string
func (URLPattern) PseudoPath ¶
func (patt URLPattern) PseudoPath() (string, bool)
func (URLPattern) Scheme ¶
func (patt URLPattern) Scheme() Scheme
func (URLPattern) StringPattern ¶
func (URLPattern) StringPattern() (StringPattern, bool)
func (URLPattern) ToSymbolicValue ¶
func (URLPattern) UnderlyingString ¶
func (patt URLPattern) UnderlyingString() string
func (URLPattern) WriteJSONRepresentation ¶
func (patt URLPattern) WriteJSONRepresentation(ctx *Context, w *jsoniter.Stream, config JSONSerializationConfig, depth int) error
type UUIDv4 ¶
UUIDv4 implements Value.
func ParseUUIDv4 ¶
func (UUIDv4) PrettyPrint ¶
func (UUIDv4) ToSymbolicValue ¶
func (UUIDv4) WriteJSONRepresentation ¶
type UnionPattern ¶
type UnionPattern struct { NotCallablePatternMixin // contains filtered or unexported fields }
func NewDisjointUnionPattern ¶
func NewDisjointUnionPattern(cases []Pattern, node parse.Node) *UnionPattern
func NewUnionPattern ¶
func NewUnionPattern(cases []Pattern, node parse.Node) *UnionPattern
func (*UnionPattern) Cases ¶
func (patt *UnionPattern) Cases() []Pattern
the result should not be modified.
func (*UnionPattern) IsMutable ¶
func (patt *UnionPattern) IsMutable() bool
func (UnionPattern) Iterator ¶
func (patt UnionPattern) Iterator(ctx *Context, config IteratorConfiguration) Iterator
func (*UnionPattern) PrettyPrint ¶
func (patt *UnionPattern) PrettyPrint(w *bufio.Writer, config *PrettyPrintConfig, depth int, parentIndentCount int)
func (*UnionPattern) Random ¶
func (patt *UnionPattern) Random(ctx *Context, options ...Option) Value
func (*UnionPattern) StringPattern ¶
func (patt *UnionPattern) StringPattern() (StringPattern, bool)
func (*UnionPattern) ToSymbolicValue ¶
func (UnionPattern) WriteJSONRepresentation ¶
func (patt UnionPattern) WriteJSONRepresentation(ctx *Context, w *jsoniter.Stream, config JSONSerializationConfig, depth int) error
type UnionStringPattern ¶
type UnionStringPattern struct { NotCallablePatternMixin // contains filtered or unexported fields }
func NewUnionStringPattern ¶
func NewUnionStringPattern(node parse.Node, cases []StringPattern) (*UnionStringPattern, error)
func (*UnionStringPattern) CompiledRegex ¶
func (patt *UnionStringPattern) CompiledRegex() *regexp.Regexp
func (*UnionStringPattern) EffectiveLengthRange ¶
func (patt *UnionStringPattern) EffectiveLengthRange() IntRange
func (*UnionStringPattern) FindMatches ¶
func (patt *UnionStringPattern) FindMatches(ctx *Context, val Serializable, config MatchesFindConfig) (groups []Serializable, err error)
func (*UnionStringPattern) HasRegex ¶
func (patt *UnionStringPattern) HasRegex() bool
func (*UnionStringPattern) IsMutable ¶
func (patt *UnionStringPattern) IsMutable() bool
func (*UnionStringPattern) IsResolved ¶
func (patt *UnionStringPattern) IsResolved() bool
func (UnionStringPattern) Iterator ¶
func (patt UnionStringPattern) Iterator(ctx *Context, config IteratorConfiguration) Iterator
func (*UnionStringPattern) LengthRange ¶
func (patt *UnionStringPattern) LengthRange() IntRange
func (*UnionStringPattern) MatchGroups ¶
func (patt *UnionStringPattern) MatchGroups(ctx *Context, v Serializable) (map[string]Serializable, bool, error)
func (*UnionStringPattern) Parse ¶
func (patt *UnionStringPattern) Parse(ctx *Context, s string) (Serializable, error)
func (*UnionStringPattern) PatternNestingDepth ¶
func (patt *UnionStringPattern) PatternNestingDepth(parentDepth int) int
func (*UnionStringPattern) PrettyPrint ¶
func (patt *UnionStringPattern) PrettyPrint(w *bufio.Writer, config *PrettyPrintConfig, depth int, parentIndentCount int)
func (UnionStringPattern) Random ¶
func (patt UnionStringPattern) Random(ctx *Context, options ...Option) Value
func (*UnionStringPattern) Regex ¶
func (patt *UnionStringPattern) Regex() string
func (*UnionStringPattern) Resolve ¶
func (patt *UnionStringPattern) Resolve() (StringPattern, error)
func (*UnionStringPattern) StringPattern ¶
func (patt *UnionStringPattern) StringPattern() (StringPattern, bool)
func (*UnionStringPattern) ToSymbolicValue ¶
func (UnionStringPattern) WriteJSONRepresentation ¶
func (patt UnionStringPattern) WriteJSONRepresentation(ctx *Context, w *jsoniter.Stream, config JSONSerializationConfig, depth int) error
type UrlHolder ¶
func LoadFreeEntity ¶
func LoadFreeEntity(ctx *Context, args FreeEntityLoadingParams) (UrlHolder, error)
See documentation of LoadFreeEntityFn.
type VM ¶
type VM struct {
// contains filtered or unexported fields
}
VM is a virtual machine that executes bytecode.
func NewVM ¶
NewVM creates a virtual machine that will execute the fn function, if fn is nil the main function of bytecode will be executed. state is used to retrieve and set global variables.
func (*VM) IsStackEmpty ¶
type VMConfig ¶
type VMConfig struct { Bytecode *Bytecode //bytecode of the module or bytecode of the function called in isolation. State *GlobalState Self Value //isolated call Fn *InoxFunction FnArgs []Value DisabledArgSharing []bool }
type ValMap ¶
type ValMap map[string]Serializable
type Value ¶
type Value interface { // IsMutable should return true if the value is definitively mutable and false if it is definitively immutable. IsMutable() bool Equal(ctx *Context, other Value, alreadyCompared map[uintptr]uintptr, depth int) bool //human readable representation PrettyPrint(w *bufio.Writer, config *PrettyPrintConfig, depth int, parentIndentCount int) //ToSymbolicValue should return a symbolic value that represents the value. ToSymbolicValue(ctx *Context, encountered map[uintptr]symbolic.Value) (symbolic.Value, error) }
Value is the interface implemented by all values accessible to Inox code. A value should either be definitively mutable or definitively immutable.
func CheckSharedOrClone ¶
ShareOrCloneDepth performs the following logic: - if v is immutable then return it. - else if v implements PotentiallySharable
- if not shared return ErrValueIsNotShared
- else return it
- else if v is clonable then clone it. - else return ErrValueNotSharableNorClonable
func ConvertReturnValue ¶
ConvertReturnValue converts to Value a reflect.Value returned by calling a Go funtion using reflection.
func EvalBytecode ¶
func EvalBytecode(bytecode *Bytecode, state *GlobalState, self Value) (Value, error)
func EvalVM ¶
func EvalVM(mod *Module, state *GlobalState, config BytecodeEvaluationConfig) (Value, error)
EvalVM compiles the passed module (in module source) and evaluates the bytecode with the passed global state.
func GetGoMethodOrPanic ¶
func ImportWaitModule ¶
func ImportWaitModule(config ImportConfig) (Value, error)
ImportWaitModule imports a module and waits for its lthread to return its result. ImportWaitModule also adds the test suite results to the parent state.
func IterateAllValuesOnly ¶
func NewPathPattern ¶
NewPathPattern creates a PathPattern in a secure way.
func NewURL ¶
func NewURL(host Value, pathSlices []Value, isStaticPathSliceList []bool, queryParamNames []Value, queryValues []Value) (Value, error)
createPath creates an URL in a secure way.
func RandUUIDv4 ¶
func ShareOrClone ¶
func ShareOrClone(v Value, originState *GlobalState) (Value, error)
func ShareOrCloneDepth ¶
func ShareOrCloneDepth(v Value, originState *GlobalState, sharableValues *[]PotentiallySharable, clones map[uintptr]Clonable, depth int) (Value, error)
ShareOrCloneDepth performs the following logic: - if v is immutable then return it. - else if v implements PotentiallySharable then call its .Share() method if necessary. - else if v is clonable then clone it. - else return ErrValueNotSharableNorClonable
func ToValueAsserted ¶
func ToValueList ¶
func TreeWalkCallFunc ¶
func TreeWalkCallFunc(call TreeWalkCall) (Value, error)
TreeWalkCallFunc calls calleeNode, whatever its kind (Inox function or Go function). If must is true and the second result of a Go function is a non-nil error, TreeWalkCallFunc will panic.
func TreeWalkEval ¶
func TreeWalkEval(node parse.Node, state *TreeWalkState) (result Value, err error)
TreeWalkEval evaluates a node, panics are always recovered so this function should not panic.
type ValueFilteredIterator ¶
type ValueFilteredIterator struct {
// contains filtered or unexported fields
}
func (*ValueFilteredIterator) HasNext ¶
func (it *ValueFilteredIterator) HasNext(ctx *Context) bool
func (*ValueFilteredIterator) IsMutable ¶
func (it *ValueFilteredIterator) IsMutable() bool
func (*ValueFilteredIterator) Key ¶
func (it *ValueFilteredIterator) Key(ctx *Context) Value
func (*ValueFilteredIterator) Next ¶
func (it *ValueFilteredIterator) Next(ctx *Context) bool
func (*ValueFilteredIterator) PrettyPrint ¶
func (it *ValueFilteredIterator) PrettyPrint(w *bufio.Writer, config *PrettyPrintConfig, depth int, parentIndentCount int)
func (*ValueFilteredIterator) ToSymbolicValue ¶
func (*ValueFilteredIterator) Value ¶
func (it *ValueFilteredIterator) Value(ctx *Context) Value
type ValueHistory ¶
type ValueHistory struct {
// contains filtered or unexported fields
}
ValueHistory stores the history about a single value, it implements Value.
func NewValueHistory ¶
func NewValueHistory(ctx *Context, v InMemorySnapshotable, config *Object) *ValueHistory
func (*ValueHistory) AddChange ¶
func (h *ValueHistory) AddChange(ctx *Context, c Change)
func (*ValueHistory) ForgetChangesBeforeDate ¶
func (h *ValueHistory) ForgetChangesBeforeDate(ctx *Context, d DateTime)
func (*ValueHistory) ForgetLast ¶
func (h *ValueHistory) ForgetLast(ctx *Context)
func (*ValueHistory) GetGoMethod ¶
func (h *ValueHistory) GetGoMethod(name string) (*GoFunction, bool)
func (*ValueHistory) IsMutable ¶
func (*ValueHistory) IsMutable() bool
func (*ValueHistory) IsRecursivelyRenderable ¶
func (h *ValueHistory) IsRecursivelyRenderable(ctx *Context, input RenderingInput) bool
func (*ValueHistory) IsSharable ¶
func (h *ValueHistory) IsSharable(originState *GlobalState) (bool, string)
func (*ValueHistory) IsShared ¶
func (h *ValueHistory) IsShared() bool
func (*ValueHistory) LastValue ¶
func (h *ValueHistory) LastValue(ctx *Context) Value
func (*ValueHistory) PrettyPrint ¶
func (h *ValueHistory) PrettyPrint(w *bufio.Writer, config *PrettyPrintConfig, depth int, parentIndentCount int)
func (*ValueHistory) PropertyNames ¶
func (*ValueHistory) PropertyNames(ctx *Context) []string
func (*ValueHistory) Render ¶
func (h *ValueHistory) Render(ctx *Context, w io.Writer, config RenderingInput) (int, error)
func (*ValueHistory) RenderCurrentToHTMLFn ¶
func (h *ValueHistory) RenderCurrentToHTMLFn() *InoxFunction
func (*ValueHistory) SelectDate ¶
func (h *ValueHistory) SelectDate(ctx *Context, d DateTime)
func (*ValueHistory) SetProp ¶
func (h *ValueHistory) SetProp(ctx *Context, name string, value Value) error
func (*ValueHistory) Share ¶
func (h *ValueHistory) Share(originState *GlobalState)
func (*ValueHistory) SmartLock ¶
func (h *ValueHistory) SmartLock(state *GlobalState)
func (*ValueHistory) SmartUnlock ¶
func (h *ValueHistory) SmartUnlock(state *GlobalState)
func (*ValueHistory) ToSymbolicValue ¶
func (*ValueHistory) ValueAtSelection ¶
func (h *ValueHistory) ValueAtSelection(ctx *Context) Value
type ValueLifetimeJobs ¶
type ValueLifetimeJobs struct {
// contains filtered or unexported fields
}
func NewValueLifetimeJobs ¶
func NewValueLifetimeJobs(ctx *Context, self Value, jobs []*LifetimeJob) *ValueLifetimeJobs
func (*ValueLifetimeJobs) Count ¶
func (jobs *ValueLifetimeJobs) Count() int
Count returns the number of jobs at initialization.
func (*ValueLifetimeJobs) Instances ¶
func (jobs *ValueLifetimeJobs) Instances() []*LifetimeJobInstance
func (*ValueLifetimeJobs) InstantiateJobs ¶
func (jobs *ValueLifetimeJobs) InstantiateJobs(ctx *Context) error
type ValueList ¶
type ValueList struct {
// contains filtered or unexported fields
}
ValueList implements underlyingList
func (*ValueList) Clone ¶
func (list *ValueList) Clone(originState *GlobalState, sharableValues *[]PotentiallySharable, clones map[uintptr]Clonable, depth int) (Serializable, error)
func (*ValueList) ConstraintId ¶
func (list *ValueList) ConstraintId() ConstraintId
func (*ValueList) ContainsSimple ¶
func (list *ValueList) ContainsSimple(ctx *Context, v Serializable) bool
func (*ValueList) Iterator ¶
func (list *ValueList) Iterator(ctx *Context, config IteratorConfiguration) Iterator
func (*ValueList) PrettyPrint ¶
func (*ValueList) SortByNestedValue ¶
func (*ValueList) ToSymbolicValue ¶
func (*ValueList) WriteJSONRepresentation ¶
type ValueListIterator ¶
type ValueListIterator struct {
// contains filtered or unexported fields
}
func (ValueListIterator) HasNext ¶
func (it ValueListIterator) HasNext(*Context) bool
func (*ValueListIterator) IsMutable ¶
func (it *ValueListIterator) IsMutable() bool
func (*ValueListIterator) Key ¶
func (it *ValueListIterator) Key(ctx *Context) Value
func (*ValueListIterator) Next ¶
func (it *ValueListIterator) Next(ctx *Context) bool
func (*ValueListIterator) PrettyPrint ¶
func (it *ValueListIterator) PrettyPrint(w *bufio.Writer, config *PrettyPrintConfig, depth int, parentIndentCount int)
func (*ValueListIterator) ToSymbolicValue ¶
func (*ValueListIterator) Value ¶
func (it *ValueListIterator) Value(*Context) Value
type ValuePath ¶
type ValuePath interface { Serializable GetFrom(ctx *Context, v Value) Value }
A ValuePath represents a path to a value in a structure.
type ValuePathSegment ¶
type ValuePathSegment interface { Serializable SegmentGetFrom(ctx *Context, v Value) Value }
A ValuePathSegment represents a segment of path to a value in a structure.
type ValueVisibility ¶
type ValueVisibility struct {
// contains filtered or unexported fields
}
A ValueVisibility specifies what parts of an Inox value are 'visible' during serialization.
func GetVisibility ¶
func GetVisibility(id VisibilityId) (*ValueVisibility, bool)
type ValueVisibilityPermission ¶
type ValueVisibilityPermission struct {
Pattern Pattern
}
func (ValueVisibilityPermission) Includes ¶
func (perm ValueVisibilityPermission) Includes(otherPerm Permission) bool
func (ValueVisibilityPermission) InternalPermTypename ¶
func (perm ValueVisibilityPermission) InternalPermTypename() permkind.InternalPermissionTypename
func (ValueVisibilityPermission) Kind ¶
func (perm ValueVisibilityPermission) Kind() PermissionKind
func (ValueVisibilityPermission) String ¶
func (perm ValueVisibilityPermission) String() string
type ValueWatchers ¶
type ValueWatchers struct {
// contains filtered or unexported fields
}
func NewValueWatchers ¶
func NewValueWatchers() *ValueWatchers
func (*ValueWatchers) Add ¶
func (l *ValueWatchers) Add(watcher Watcher)
func (*ValueWatchers) InformAboutAsync ¶
func (l *ValueWatchers) InformAboutAsync(ctx *Context, v Value, depth WatchingDepth, relocalize bool)
func (*ValueWatchers) StopAll ¶
func (l *ValueWatchers) StopAll()
type VisibilityId ¶
type VisibilityId uint64
func (VisibilityId) HasVisibility ¶
func (v VisibilityId) HasVisibility() bool
type Walkable ¶
type Walkable interface { //Walker should return a new walker that, when possible, should be not affected by mutations of the walked value. Walker(*Context) (Walker, error) }
A Walkable is value that can be walked using a walker.
type WalkableNodeMeta ¶
type WalkableNodeMeta struct {
// contains filtered or unexported fields
}
func NewWalkableNodeMeta ¶
func NewWalkableNodeMeta(ancestors []Value, parentEdge Value) WalkableNodeMeta
type Walker ¶
type Walker interface { Iterator Prune(*Context) NodeMeta(*Context) WalkableNodeMeta }
type Watchable ¶
type Watchable interface { Value // Watcher creates a watcher managed by the watched value, callers should only call the .WaitNext & .Stop methods, // if watching depth is unspecified the watched value is free to use any depth as long as it is consistent with .OnMutation. Watcher(*Context, WatcherConfiguration) Watcher //OnMutation registers a microtask to be called on mutations, the mutations should be same as the one returned by the watcher. OnMutation(ctx *Context, microtask MutationCallbackMicrotask, config MutationWatchingConfiguration) (handle CallbackHandle, err error) RemoveMutationCallback(ctx *Context, handle CallbackHandle) RemoveMutationCallbackMicrotasks(ctx *Context) }
A Watchable value is a value that can be watched thanks to a Watcher.
type WatchableSubscriber ¶
type WatchableSubscriber interface { Subscriber Watchable OnPublication(ctx *Context, microtask PublicationCallbackMicrotask, config PublicationCallbackConfiguration) CallbackHandle }
type Watcher ¶
type Watcher interface { Value StreamSource // WaitNext should be called by a single goroutine, filter can be nil WaitNext(ctx *Context, filter Pattern, timeout time.Duration) (Value, error) Stop() IsStopped() bool Config() WatcherConfiguration // InformAboutAsync is called by the watched value, InformAboutAsync should be thread safe and should inform // asynchronously the user of the watcher about the new value during the current/next call to WaitNext. InformAboutAsync(ctx *Context, v Value) }
func WatchReceivedMessages ¶
type WatcherConfiguration ¶
type WatcherConfiguration struct { Filter Pattern Depth WatchingDepth Path Path }
type WatchingDepth ¶
type WatchingDepth int
const ( UnspecifiedWatchingDepth WatchingDepth = iota ShallowWatching IntermediateDepthWatching DeepWatching )
func (WatchingDepth) IsSpecified ¶
func (d WatchingDepth) IsSpecified() bool
func (WatchingDepth) MinusOne ¶
func (d WatchingDepth) MinusOne() (WatchingDepth, bool)
func (WatchingDepth) MustMinusOne ¶
func (d WatchingDepth) MustMinusOne() WatchingDepth
func (WatchingDepth) Plus ¶
func (d WatchingDepth) Plus(n uint) (WatchingDepth, bool)
type WebsocketPermission ¶
type WebsocketPermission struct { Kind_ PermissionKind Endpoint ResourceName //ignored for some permission kinds }
func (WebsocketPermission) Includes ¶
func (perm WebsocketPermission) Includes(otherPerm Permission) bool
func (WebsocketPermission) InternalPermTypename ¶
func (perm WebsocketPermission) InternalPermTypename() permkind.InternalPermissionTypename
func (WebsocketPermission) Kind ¶
func (perm WebsocketPermission) Kind() PermissionKind
func (WebsocketPermission) String ¶
func (perm WebsocketPermission) String() string
type WrappedBytes ¶
type WrappedBytes interface { Readable //the returned bytes should NOT be modified UnderlyingBytes() []byte }
A WrappedBytes represents a value that wraps a byte slice ( []byte ).
type WrappedString ¶
type WrappedString interface { Serializable //UnderlyingString() should instantly retrieves the wrapped string UnderlyingString() string }
A StringLike represents a value that wraps a Go string.
type WritableByteStream ¶
type WritableByteStream struct {
// contains filtered or unexported fields
}
A WritableByteStream represents a stream of bytes, ElementsStream implements Value.
func NewWritableByteStream ¶
func NewWritableByteStream( writeByteToSink func(s *WritableByteStream, b byte) error, writeChunkToSink func(s *WritableByteStream, p []byte) error, ) *WritableByteStream
func (*WritableByteStream) IsMutable ¶
func (*WritableByteStream) IsMutable() bool
func (*WritableByteStream) IsStopped ¶
func (s *WritableByteStream) IsStopped() bool
func (*WritableByteStream) PrettyPrint ¶
func (s *WritableByteStream) PrettyPrint(w *bufio.Writer, config *PrettyPrintConfig, depth int, parentIndentCount int)
func (*WritableByteStream) Stop ¶
func (s *WritableByteStream) Stop()
func (*WritableByteStream) ToSymbolicValue ¶
func (*WritableByteStream) WritableStream ¶
func (s *WritableByteStream) WritableStream(ctx *Context, config *WritableStreamConfiguration) WritableStream
func (*WritableByteStream) WriteBytes ¶
func (s *WritableByteStream) WriteBytes(ctx *Context, p []byte) error
func (*WritableByteStream) WriteChunk ¶
func (s *WritableByteStream) WriteChunk(ctx *Context, chunk *DataChunk) error
type WritableStream ¶
type WritableStreamConfiguration ¶
type WritableStreamConfiguration struct{}
type Writer ¶
type Writer struct {
// contains filtered or unexported fields
}
A Writer is a Value wrapping an io.Writer.
func (*Writer) GetGoMethod ¶
func (w *Writer) GetGoMethod(name string) (*GoFunction, bool)
func (*Writer) PrettyPrint ¶
func (Writer) PropertyNames ¶
func (*Writer) ToSymbolicValue ¶
func (*Writer) TotalWritten ¶
type XMLAttribute ¶
type XMLAttribute struct {
// contains filtered or unexported fields
}
func NewXMLAttribute ¶
func NewXMLAttribute(name string, value Value) XMLAttribute
func (XMLAttribute) Name ¶
func (a XMLAttribute) Name() string
func (XMLAttribute) Value ¶
func (a XMLAttribute) Value() Value
type XMLElement ¶
type XMLElement struct {
// contains filtered or unexported fields
}
A XMLElement represents the result of the evaluation of an XMLElement node in Inox code.
func NewRawTextXmlElement ¶
func NewRawTextXmlElement(name string, attributes []XMLAttribute, rawContent string) *XMLElement
func NewXmlElement ¶
func NewXmlElement(name string, attributes []XMLAttribute, children []Value) *XMLElement
func (*XMLElement) Attributes ¶
func (e *XMLElement) Attributes() []XMLAttribute
result should not be modified.
func (*XMLElement) Children ¶
func (e *XMLElement) Children() []Value
result should not be modified.
func (*XMLElement) IsMutable ¶
func (*XMLElement) IsMutable() bool
func (*XMLElement) Name ¶
func (e *XMLElement) Name() string
func (*XMLElement) PrettyPrint ¶
func (s *XMLElement) PrettyPrint(w *bufio.Writer, config *PrettyPrintConfig, depth int, parentIndentCount int)
func (*XMLElement) RawContent ¶
func (e *XMLElement) RawContent() string
func (*XMLElement) ToSymbolicValue ¶
type Year ¶
Year implements Value.
func (Year) PrettyPrint ¶
func (Year) ToSymbolicValue ¶
func (Year) WriteJSONRepresentation ¶
Source Files
¶
- api.go
- arg_checking.go
- arithmetic.go
- assertion.go
- ast_node.go
- bool.go
- bytecode.go
- bytes.go
- client.go
- clone.go
- collection.go
- color.go
- comparable.go
- compile_error.go
- compiler.go
- comptime_types.go
- config.go
- constraints.go
- container.go
- context.go
- data_chunk.go
- data_sensitivity.go
- database.go
- database_value_impl.go
- debug.go
- debug_types.go
- default_patterns.go
- dictionary.go
- dummy_databases.go
- dynamic.go
- effect.go
- equal.go
- error_value.go
- eval.go
- eval_error.go
- event.go
- event_source.go
- file_info.go
- fmt.go
- fs_snapshot.go
- functional.go
- global_state.go
- go.go
- go_function.go
- gob.go
- history.go
- host_resolution_data.go
- id.go
- image.go
- immutable_data_structures.go
- indexable.go
- inox_function.go
- iterator.go
- json.go
- json_schema.go
- lifetime_job.go
- limit.go
- load_free_entity.go
- locks.go
- log.go
- lthread.go
- manifest.go
- map.go
- mapping.go
- mem.go
- meta.go
- migration.go
- migration_op_handlers.go
- mime.go
- minmax.go
- module.go
- module_args.go
- module_auto_invocation.go
- module_heap.go
- module_import.go
- module_preparation.go
- mutability.go
- mutation.go
- namespace.go
- number.go
- object.go
- open_db.go
- optimize.go
- option.go
- parse_json_representation.go
- parser.go
- pattern.go
- periodic.go
- permissions.go
- pools.go
- preinit.go
- preinit_static_check.go
- pretty_print.go
- project.go
- pub_sub.go
- quantity.go
- rand.go
- readable_stream.go
- reader.go
- receiver.go
- render.go
- resource.go
- resource_graph.go
- ring_buffer.go
- risk_score.go
- secret.go
- sequence.go
- serializable.go
- shared.go
- snapshot.go
- sort.go
- static_check.go
- static_check_data.go
- static_check_error.go
- string.go
- string_pattern.go
- struct.go
- subscription.go
- symbol_table.go
- symbolic.go
- system_graph.go
- temp.go
- testing.go
- testing_results.go
- time.go
- token_bucket.go
- transaction.go
- transaction_isolation.go
- transient_id.go
- tree_walk_eval.go
- tree_walk_eval_call.go
- tree_walk_state.go
- type_extension.go
- underlying_list.go
- unwrap.go
- value.go
- value_graph.go
- value_path.go
- visibility.go
- vm.go
- walk_dir.go
- walker.go
- watcher.go
- watcher_list.go
- writable_stream.go
- write_json_representation.go
- writer.go
- xml.go
- yaml.go