engine

package
v0.0.0-...-3a30b81 Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Overview

Package engine evaluates the grammar.Tree and returns the results.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CastAndFilterSliceOfDynamicValue

func CastAndFilterSliceOfDynamicValue[T any](value *DynamicValue) ([]T, error)

func CastSliceValueAtIndexOfDynamicValue

func CastSliceValueAtIndexOfDynamicValue[T any](value *DynamicValue, index int) (T, error)

func Execute

func Execute[T any](fhir map[string]interface{}, fhirPathTree grammar.Tree, context context.Definition) ([]T, error)

Execute starts the evaluation of the grammar.Tree given the FHIR object. It also filters out types that don't match the type parameter.

Types

type DynamicValue

type DynamicValue struct {
	Value interface{}
	// contains filtered or unexported fields
}

func NewDynamicValue

func NewDynamicValue(value interface{}) *DynamicValue

func (*DynamicValue) IsSlice

func (receiver *DynamicValue) IsSlice() bool

func (*DynamicValue) IsSliceOfFhirOptions

func (receiver *DynamicValue) IsSliceOfFhirOptions() bool

func (*DynamicValue) SliceSize

func (receiver *DynamicValue) SliceSize() (int, error)

func (*DynamicValue) SliceValueAtIndex

func (receiver *DynamicValue) SliceValueAtIndex(index int) (interface{}, error)

Jump to

Keyboard shortcuts

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