Versions in this module Expand all Collapse all v0 v0.3.0 Sep 1, 2026 Changes in this version + func AreComparableTypes(t1, t2 *Type) bool + func AreTypesCompatible(actual, expected *Type) bool + func CanAssign(sourceType, targetType *Type) bool + func GetLiteralValue(lit ast.Literal) interface + func IsCoercibleTo(sourceType, targetType *Type) bool + func IsComparableType(t *Type) bool + func IsContainerType(t *Type) bool + type AdvancedFactProvider interface + GetWithContext func(path string) (interface{}, *ResolutionResult) + type Capability uint32 + const CapabilityCreate + const CapabilityDelete + const CapabilityModify + const CapabilityNone + const CapabilityRead + func (c Capability) CanPerform(required Capability) bool + func (c Capability) String() string + type FactProvider interface + Get func(path string) (interface{}, bool) + type Facts interface + Get func(path string) (interface{}, bool) + type FunctionSpec struct + ArgTypes []string + Description string + Func interface{} + Name string + ReturnType string + Unsafe bool + func StandardLibrary() []*FunctionSpec + type PrimitiveType int + const TypeBool + const TypeDate + const TypeDuration + const TypeFloat + const TypeInt + const TypeList + const TypeMap + const TypeObject + const TypeString + const TypeTime + const TypeUnknown + type ResolutionResult struct + Depth int + Error error + Exists bool + Path string + Resolved []string + Value interface{} + type Type struct + ElementType *Type + Name string + PrimType PrimitiveType + Properties map[string]*Type + ReferenceType string + func InferTypeFromInterface(value interface{}) *Type + func InferTypeFromJSON(jsonData []byte) (*Type, error) + func InferTypeFromLiteral(lit *ast.Literal) *Type + func InferTypeFromValue(value interface{}) *Type + func NewAnyType() *Type + func NewBoolType() *Type + func NewDateType() *Type + func NewDurationType() *Type + func NewFloatType() *Type + func NewIntType() *Type + func NewListType(elemType *Type) *Type + func NewMapType(keyType, valueType *Type) *Type + func NewObjectType() *Type + func NewStringType() *Type + func NewTimeType() *Type + func ParseTypeName(name string) (*Type, error) + func (t *Type) AddProperty(name string, propType *Type) error + func (t *Type) Clone() *Type + func (t *Type) Equals(other *Type) bool + func (t *Type) IsContainer() bool + func (t *Type) IsNamed() bool + func (t *Type) IsNumeric() bool + func (t *Type) IsPrimitive() bool + func (t *Type) IsReference() bool + func (t *Type) ListType() *Type + func (t *Type) MapKeyType() *Type + func (t *Type) MapValueType() *Type + func (t *Type) String() string + type TypeSystem struct + func NewTypeSystem() *TypeSystem + func (ts *TypeSystem) AutoRegisterTypes(facts effectus.Facts) + func (ts *TypeSystem) BuildTypeSchemaFromFacts(facts effectus.Facts) + func (ts *TypeSystem) CheckValueTypeCompatibility(operator string, factType, valueType *Type) error + func (ts *TypeSystem) GenerateTypeReport() string + func (ts *TypeSystem) GetAllFactPaths() []string + func (ts *TypeSystem) GetAllTypes() map[string]*Type + func (ts *TypeSystem) GetAllVerbNames() []string + func (ts *TypeSystem) GetFactType(path string) (*Type, error) + func (ts *TypeSystem) GetFactTypeVersion(path, version string) (*Type, error) + func (ts *TypeSystem) GetFunctionSpec(name string) (*FunctionSpec, bool) + func (ts *TypeSystem) GetFunctionSpecs() map[string]*FunctionSpec + func (ts *TypeSystem) GetType(name string) (*Type, bool) + func (ts *TypeSystem) GetVerbSpec(verbName string) (*VerbSpec, error) + func (ts *TypeSystem) GetVerbType(verbName string) (*VerbInfo, bool) + func (ts *TypeSystem) GetVerbTypes() map[string]*VerbInfo + func (ts *TypeSystem) InferTypeFromFactPath(facts effectus.Facts, path string) (*Type, error) + func (ts *TypeSystem) LoadJSONSchemaBytes(prefix string, data []byte) error + func (ts *TypeSystem) LoadJSONSchemaBytesVersion(prefix, version string, data []byte, setDefault bool) error + func (ts *TypeSystem) LoadJSONSchemaFile(filename string) error + func (ts *TypeSystem) LoadSchemaFile(filename string) error + func (ts *TypeSystem) LoadSchemaJSONBytes(prefix string, data []byte) error + func (ts *TypeSystem) LoadSchemaJSONBytesVersion(prefix, version string, data []byte, setDefault bool) error + func (ts *TypeSystem) LoadVerbSpecs(filename string) error + func (ts *TypeSystem) MergeTypeSystem(other *TypeSystem) + func (ts *TypeSystem) OperatorCompatibility(operator string, valueType *Type) error + func (ts *TypeSystem) RegisterFactType(path string, typ *Type) + func (ts *TypeSystem) RegisterFactTypeVersion(path, version string, typ *Type, setDefault bool) + func (ts *TypeSystem) RegisterFunctionSpec(spec *FunctionSpec) + func (ts *TypeSystem) RegisterNamespaceAlias(alias, target string) + func (ts *TypeSystem) RegisterProtoTypes(protoFile string) error + func (ts *TypeSystem) RegisterStandardLibrary() + func (ts *TypeSystem) RegisterType(name string, typ *Type) + func (ts *TypeSystem) RegisterVerb(verbName string, argTypes map[string]*Type, returnType *Type, ...) error + func (ts *TypeSystem) RegisterVerbType(verbName string, argTypes map[string]*Type, returnType *Type) error + func (ts *TypeSystem) ResetFactTypes() + func (ts *TypeSystem) ResolveAlias(path string) string + func (ts *TypeSystem) SetDefaultFactVersion(path, version string) + func (ts *TypeSystem) TypeCheckArgValue(value *ast.ArgValue, requiredType *Type, facts Facts) error + func (ts *TypeSystem) TypeCheckArgValueWithBindings(value *ast.ArgValue, requiredType *Type, facts Facts, ...) error + func (ts *TypeSystem) TypeCheckArgumentValue(arg *ast.ArgValue, requiredType *Type, facts Facts) error + func (ts *TypeSystem) TypeCheckEffect(effect *ast.Effect, facts Facts) error + func (ts *TypeSystem) TypeCheckFact(facts effectus.Facts, path string, expectedType *Type) error + func (ts *TypeSystem) TypeCheckFile(file *ast.File, facts effectus.Facts) error + func (ts *TypeSystem) TypeCheckListElements(elements []ast.Literal, elementType *Type) error + func (ts *TypeSystem) TypeCheckLiteralArgument(lit *ast.Literal, requiredType *Type) error + func (ts *TypeSystem) TypeCheckLogicalExpressionAST(expr string) error + func (ts *TypeSystem) TypeCheckMapEntries(entries []*ast.MapEntry, keyType, valueType *Type) error + func (ts *TypeSystem) TypeCheckPayload(payload interface{}, expectedType *Type) error + func (ts *TypeSystem) TypeCheckPredicate(expr string) error + func (ts *TypeSystem) TypeCheckPredicateAST(expr string) error + func (ts *TypeSystem) TypeCheckStep(step *ast.Step, facts Facts) error + func (ts *TypeSystem) TypeCheckValue(value interface{}, expectedType *Type) error + type TypedProvider struct + func NewTypedProvider(provider FactProvider, typeSystem *TypeSystem) *TypedProvider + func (p *TypedProvider) EnrichWithTypes(facts effectus.Facts) *TypedProvider + func (p *TypedProvider) Get(path string) (interface{}, bool) + func (p *TypedProvider) GetTypeSystem() *TypeSystem + func (p *TypedProvider) GetWithContext(path string) (interface{}, *ResolutionResult) + func (p *TypedProvider) WithProvider(provider FactProvider) *TypedProvider + type VerbInfo struct + ArgTypes map[string]*Type + ReturnType *Type + type VerbSpec struct + ArgTypes map[string]*Type + Capability Capability + Description string + InverseVerb string + Name string + RequiredArgs []string + ReturnType *Type