generators

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Sep 28, 2025 License: Apache-2.0 Imports: 4 Imported by: ? modules, 0 packages

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckCodeContent

func CheckCodeContent(codeNode map[string]interface{}, targetPlatform string) bool

CheckCodeContent validates code node contains non-empty content.

func CheckParameters

func CheckParameters(paramList []interface{}, expectedParams []string) bool

CheckParameters validates parameter existence in parameter list.

func FindNodesByType

func FindNodesByType(nodes []interface{}, nodeTypes map[string]string) map[string]map[string]interface{}

FindNodesByType finds nodes by type field matching.

func HasNonEmptyCozeReference

func HasNonEmptyCozeReference(inputs []interface{}) bool

HasNonEmptyCozeReference checks for non-empty blockID references in Coze format.

func HasNonEmptyDifyReference

func HasNonEmptyDifyReference(inputs []interface{}) bool

HasNonEmptyDifyReference checks for non-empty value_selector references in Dify format.

func HasNonEmptyIFlytekReference

func HasNonEmptyIFlytekReference(inputs []interface{}) bool

HasNonEmptyIFlytekReference checks for non-empty nodeId references in iFlytek format.

func RunCompleteBasicStartEndValidation

func RunCompleteBasicStartEndValidation(t *testing.T, conversionResult []byte, targetPlatform string) bool

RunCompleteBasicStartEndValidation runs complete validation for basic start-end workflow.

func RunCompleteCodeWorkflowValidation

func RunCompleteCodeWorkflowValidation(t *testing.T, conversionResult []byte, targetPlatform string) bool

RunCompleteCodeWorkflowValidation runs complete validation for code workflow.

Types

type PlatformStructure

type PlatformStructure struct {
	RequiredFields []string
	NodesPath      []string // Path to nodes array: ["schema", "nodes"]
	EdgesPath      []string // Path to edges array: ["schema", "edges"]
}

PlatformStructure defines expected structure requirements for each platform.

func GetPlatformStructure

func GetPlatformStructure(platform string) PlatformStructure

GetPlatformStructure returns platform-specific structure requirements.

type ValidationResult

type ValidationResult struct {
	Passed  bool
	Message string
	Details map[string]interface{}
}

ValidationResult represents validation check result.

func ValidateCodeContent

func ValidateCodeContent(t *testing.T, foundNodes map[string]map[string]interface{}, targetPlatform string) ValidationResult

ValidateCodeContent validates code node contains non-empty content.

func ValidateConversionBasics

func ValidateConversionBasics(t *testing.T, conversionResult []byte, targetPlatform string) (map[string]interface{}, ValidationResult)

ValidateConversionBasics performs basic conversion validation.

func ValidateNodeCount

func ValidateNodeCount(t *testing.T, result map[string]interface{}, targetPlatform string, expectedCount int) ValidationResult

ValidateNodeCount validates node count consistency.

func ValidateNodeTypeMapping

func ValidateNodeTypeMapping(t *testing.T, nodes []interface{}, expectedNodeTypes map[string]string) ValidationResult

ValidateNodeTypeMapping validates node type mapping accuracy.

func ValidateParameterPreservation

func ValidateParameterPreservation(t *testing.T, foundNodes map[string]map[string]interface{}, expectedParams map[string]map[string][]string) ValidationResult

ValidateParameterPreservation validates node parameter preservation.

func ValidateReferenceValues

func ValidateReferenceValues(t *testing.T, foundNodes map[string]map[string]interface{}, targetPlatform string) ValidationResult

ValidateReferenceValues validates platform-specific reference values.

Jump to

Keyboard shortcuts

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