Versions in this module Expand all Collapse all v1 v1.0.2 Sep 28, 2025 v1.0.1 Sep 28, 2025 Changes in this version + type BaseNodeParser struct + func NewBaseNodeParser(nodeType string, variableRefSystem *models.VariableReferenceSystem) *BaseNodeParser + func (p *BaseNodeParser) GetSupportedType() string + func (p *BaseNodeParser) ParseNode(difyNode DifyNode) (*models.Node, error) + func (p *BaseNodeParser) ValidateNode(difyNode DifyNode) error + type ClassifierNodeParser struct + func NewClassifierNodeParser(variableRefSystem *models.VariableReferenceSystem) *ClassifierNodeParser + func (p *ClassifierNodeParser) ParseNode(difyNode DifyNode) (*models.Node, error) + type CodeNodeParser struct + func (p *CodeNodeParser) ParseNode(difyNode DifyNode) (*models.Node, error) + type ConditionNodeParser struct + func (p *ConditionNodeParser) ParseNode(difyNode DifyNode) (*models.Node, error) + type DifyApp struct + Description string + Icon string + IconBackground string + Mode string + Name string + UseIconAsAnswerIcon bool + type DifyCase struct + CaseID string + Conditions []DifyCondition + ID string + LogicalOperator string + type DifyClass struct + ID string + Name string + type DifyCondition struct + ComparisonOperator string + ID string + Value string + VarType string + VariableSelector []string + type DifyContext struct + Enabled bool + VariableSelector []string + type DifyDSL struct + App DifyApp + Kind string + Version string + Workflow DifyWorkflow + type DifyEdge struct + Data *DifyEdgeData + ID string + Selected bool + Source string + SourceHandle string + Target string + TargetHandle string + Type string + ZIndex int + type DifyEdgeData struct + IsInIteration bool + IsInLoop bool + IterationID string + SourceType string + TargetType string + type DifyFeatureConfig struct + Enabled bool + type DifyFeatures struct + FileUpload *DifyFileUploadConfig + OpeningStatement string + RetrieverResource *DifyRetrieverConfig + SensitiveWordAvoidance *DifyFeatureConfig + SpeechToText *DifyFeatureConfig + SuggestedQuestions []string + SuggestedQuestionsAfterAnswer *DifyFeatureConfig + TextToSpeech *DifyTextToSpeechConfig + type DifyFileUploadConfig struct + AllowedFileExtensions []string + AllowedFileTypes []string + AllowedFileUploadMethods []string + Enabled bool + FileUploadConfig *DifyUploadLimits + Image *DifyImageConfig + NumberLimits int + type DifyGraph struct + Edges []DifyEdge + Nodes []DifyNode + Viewport *DifyViewport + type DifyImageConfig struct + Enabled bool + NumberLimits int + TransferMethods []string + type DifyModel struct + CompletionParams map[string]interface{} + Mode string + Name string + Provider string + type DifyNode struct + Data DifyNodeData + Draggable bool + Extent string + Height float64 + ID string + ParentID string + Position DifyPosition + PositionAbsolute *DifyPosition + Selectable bool + Selected bool + SourcePosition string + TargetPosition string + Type string + Width float64 + ZIndex int + type DifyNodeData struct + Cases []DifyCase + Classes []DifyClass + Code string + CodeLanguage string + Context *DifyContext + Desc string + ErrorHandleMode string + Instruction string + Instructions string + IsInIteration bool + IsInLoop bool + IsParallel bool + IterationID string + IteratorInputType string + IteratorSelector []string + Model *DifyModel + OutputSelector []string + OutputType string + Outputs interface{} + ParallelNums int + PromptTemplate []DifyPrompt + QueryVariableSelector []string + Selected bool + StartNodeID string + Title string + Topics []string + Type string + Variables []DifyVariable + Vision *DifyVision + type DifyOutput struct + ValueSelector []string + ValueType string + Variable string + type DifyParser struct + func NewDifyParser() *DifyParser + func (p *DifyParser) Parse(data []byte) (*models.UnifiedDSL, error) + func (p *DifyParser) Validate(data []byte) error + type DifyPosition struct + X float64 + Y float64 + type DifyPrompt struct + ID string + Role string + Text string + type DifyRetrieverConfig struct + Enabled bool + type DifyTextToSpeechConfig struct + Enabled bool + Language string + Voice string + type DifyUploadLimits struct + AudioFileSizeLimit int + BatchCountLimit int + FileSizeLimit int + ImageFileSizeLimit int + VideoFileSizeLimit int + WorkflowFileUploadLimit int + type DifyVariable struct + Label string + MaxLength int + Options []string + Required bool + Type string + ValueSelector []string + ValueType string + Variable string + type DifyViewport struct + X float64 + Y float64 + Zoom float64 + type DifyVision struct + Enabled bool + type DifyWorkflow struct + ConversationVariables []interface{} + EnvironmentVariables []interface{} + Features DifyFeatures + Graph DifyGraph + type EndNodeParser struct + func (p *EndNodeParser) GetSupportedType() string + func (p *EndNodeParser) ParseNode(difyNode DifyNode) (*models.Node, error) + func (p *EndNodeParser) SetSkippedNodeIDs(skippedNodeIDs map[string]bool) + func (p *EndNodeParser) ValidateNode(difyNode DifyNode) error + type IterationNodeParser struct + func (p *IterationNodeParser) ParseNode(difyNode DifyNode) (*models.Node, error) + type IterationStartNodeParser struct + func (p *IterationStartNodeParser) ParseNode(difyNode DifyNode) (*models.Node, error) + type LLMNodeParser struct + func (p *LLMNodeParser) GetSupportedType() string + func (p *LLMNodeParser) ParseNode(difyNode DifyNode) (*models.Node, error) + func (p *LLMNodeParser) ValidateNode(difyNode DifyNode) error + type NodeParser interface + GetSupportedType func() string + ParseNode func(difyNode DifyNode) (*models.Node, error) + ValidateNode func(difyNode DifyNode) error + func NewCodeNodeParser(variableRefSystem *models.VariableReferenceSystem) NodeParser + func NewConditionNodeParser(variableRefSystem *models.VariableReferenceSystem) NodeParser + func NewEndNodeParser(vrs *models.VariableReferenceSystem) NodeParser + func NewIterationNodeParser(variableRefSystem *models.VariableReferenceSystem) NodeParser + func NewIterationStartNodeParser(variableRefSystem *models.VariableReferenceSystem) NodeParser + func NewLLMNodeParser(vrs *models.VariableReferenceSystem) NodeParser + type NodeParserFactory interface + CreateParser func(nodeType string, variableRefSystem *models.VariableReferenceSystem) (NodeParser, error) + GetSupportedTypes func() []string + type ParserFactory struct + func NewParserFactory() *ParserFactory + func (f *ParserFactory) CreateParser(nodeType string, variableRefSystem *models.VariableReferenceSystem) (NodeParser, error) + func (f *ParserFactory) CreateParserWithFallback(nodeType string, variableRefSystem *models.VariableReferenceSystem) (NodeParser, bool, error) + func (f *ParserFactory) GetSupportedTypes() []string + func (f *ParserFactory) ParseNodeWithFallback(difyNode DifyNode, variableRefSystem *models.VariableReferenceSystem) (*models.Node, bool, error) + func (f *ParserFactory) Register(nodeType string, creator func(*models.VariableReferenceSystem) NodeParser) + type StartNodeParser struct + func NewStartNodeParser(variableRefSystem *models.VariableReferenceSystem) *StartNodeParser + func (p *StartNodeParser) ParseNode(difyNode DifyNode) (*models.Node, error)