assertnode

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Aug 26, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Package assertnode 提供用于断言上下文数据的默认 node 节点。

Index

Constants

View Source
const NodeType = "assert"

Variables

This section is empty.

Functions

func Definition

func Definition() node.Definition

Definition 返回断言节点的完整注册定义。

Types

type Config

type Config struct {
	Path    string      `json:"path"`
	Op      string      `json:"op"`
	Value   interface{} `json:"value"`
	Message string      `json:"message"`
}

Config 是 assert node 从 node.config 解码得到的内部配置。

func DefaultConfig

func DefaultConfig() *Config

type Node

type Node struct{}

Node 返回 NodeResult{Pass:false} 表示断言不通过,让 runtime 统一决定是否重试、跳过或失败。

func NewNode

func NewNode() *Node

func (*Node) Execute

func (e *Node) Execute(fc *core.FlowContext, node *core.NodeDefine) (interface{}, error)

Jump to

Keyboard shortcuts

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