rflowv2

package
v0.0.0-...-36d6306 Latest Latest
Warning

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

Go to latest
Published: Jul 5, 2026 License: Apache-2.0 Imports: 61 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateService

func CreateService(srv *FlowServiceV2RPC, options []connect.HandlerOption) (*api.Service, error)

Types

type AiEvent

type AiEvent struct {
	Type   string
	FlowID idwrap.IDWrap
	Node   *flowv1.NodeAi
}

AiEvent describes an AI node change for sync streaming.

type AiProviderEvent

type AiProviderEvent struct {
	Type   string
	FlowID idwrap.IDWrap
	Node   *flowv1.NodeAiProvider
}

AiProviderEvent describes an AI Provider node change for sync streaming.

type AiProviderTopic

type AiProviderTopic struct {
	FlowID idwrap.IDWrap
}

AiProviderTopic identifies the flow whose AI Provider nodes are being published.

type AiTopic

type AiTopic struct {
	FlowID idwrap.IDWrap
}

AiTopic identifies the flow whose AI nodes are being published.

type ConditionEvent

type ConditionEvent struct {
	Type   string
	FlowID idwrap.IDWrap
	Node   *flowv1.NodeCondition
}

ConditionEvent describes a Condition node change for sync streaming.

type ConditionTopic

type ConditionTopic struct {
	FlowID idwrap.IDWrap
}

ConditionTopic identifies the flow whose condition nodes are being published.

type EdgeEvent

type EdgeEvent struct {
	Type   string
	FlowID idwrap.IDWrap
	Edge   *flowv1.Edge
}

EdgeEvent describes an edge change for sync streaming.

type EdgeTopic

type EdgeTopic struct {
	FlowID idwrap.IDWrap
}

EdgeTopic identifies the flow whose edges are being published.

type ExecutionEvent

type ExecutionEvent struct {
	Type      string
	FlowID    idwrap.IDWrap
	Execution *flowv1.NodeExecution
}

ExecutionEvent describes a node execution change for sync streaming.

type ExecutionTopic

type ExecutionTopic struct {
	FlowID idwrap.IDWrap
}

ExecutionTopic identifies the flow whose node executions are being published.

type FlowEvent

type FlowEvent struct {
	Type string
	Flow *flowv1.Flow
}

FlowEvent describes a flow change for sync streaming.

type FlowServiceV2Deps

type FlowServiceV2Deps struct {
	DB              *sql.DB
	Readers         FlowServiceV2Readers
	Services        FlowServiceV2Services
	Streamers       FlowServiceV2Streamers
	Resolver        resolver.RequestResolver
	GraphQLResolver gqlresolver.GraphQLResolver
	Logger          *slog.Logger
	JsClient        node_js_executorv1connect.NodeJsExecutorServiceClient
}

func (*FlowServiceV2Deps) Validate

func (d *FlowServiceV2Deps) Validate() error

type FlowServiceV2RPC

type FlowServiceV2RPC struct {
	DB *sql.DB
	// contains filtered or unexported fields
}

func New

func (*FlowServiceV2RPC) DetectFlowFormat

func (s *FlowServiceV2RPC) DetectFlowFormat(ctx context.Context, data []byte) (string, error)

DetectFlowFormat detects the format of flow data (YAML, JSON, curl, etc.)

func (*FlowServiceV2RPC) EdgeCollection

func (*FlowServiceV2RPC) EdgeDelete

func (*FlowServiceV2RPC) EdgeInsert

func (*FlowServiceV2RPC) EdgeSync

func (*FlowServiceV2RPC) EdgeUpdate

func (*FlowServiceV2RPC) FlowCollection

func (*FlowServiceV2RPC) FlowDelete

func (*FlowServiceV2RPC) FlowDuplicate

func (*FlowServiceV2RPC) FlowInsert

func (*FlowServiceV2RPC) FlowNodesCopy

FlowNodesCopy serializes selected nodes to YAML for clipboard copy.

func (*FlowServiceV2RPC) FlowNodesPaste

FlowNodesPaste parses YAML from clipboard and creates nodes in the target flow.

func (*FlowServiceV2RPC) FlowNodesPastePreview

FlowNodesPastePreview checks which HTTP requests from clipboard YAML already exist in the target workspace.

func (*FlowServiceV2RPC) FlowRun

func (*FlowServiceV2RPC) FlowStop

func (*FlowServiceV2RPC) FlowSync

func (*FlowServiceV2RPC) FlowUpdate

func (*FlowServiceV2RPC) FlowVariableDelete

func (*FlowServiceV2RPC) FlowVariableInsert

func (*FlowServiceV2RPC) FlowVariableSync

func (*FlowServiceV2RPC) FlowVariableUpdate

func (*FlowServiceV2RPC) FlowVersionSync

func (*FlowServiceV2RPC) ImportCurlCommand

func (s *FlowServiceV2RPC) ImportCurlCommand(ctx context.Context, curlData []byte, workspaceID idwrap.IDWrap) (*ImportResults, error)

ImportCurlCommand imports a curl command into the workspace

func (*FlowServiceV2RPC) ImportYAMLFlow

func (s *FlowServiceV2RPC) ImportYAMLFlow(ctx context.Context, data []byte, workspaceID idwrap.IDWrap) (*ImportResults, error)

ImportYAMLFlow imports a YAML flow definition into the workspace

func (*FlowServiceV2RPC) ImportYAMLFlowSimple

func (s *FlowServiceV2RPC) ImportYAMLFlowSimple(
	ctx context.Context,
	data []byte,
	workspaceID idwrap.IDWrap,
) (*ImportResults, error)

ImportYAMLFlowSimple imports a YAML flow with simple options

func (*FlowServiceV2RPC) MutationPublisher

func (s *FlowServiceV2RPC) MutationPublisher() mutation.Publisher

MutationPublisher returns a unified publisher for flow-related mutation events. Exported so other services (e.g. the workspace importer) can dispatch flow node/edge sync events through the same machinery.

func (*FlowServiceV2RPC) NodeAiCollection

func (*FlowServiceV2RPC) NodeAiDelete

func (*FlowServiceV2RPC) NodeAiInsert

func (*FlowServiceV2RPC) NodeAiMemoryCollection

func (*FlowServiceV2RPC) NodeAiMemoryDelete

func (*FlowServiceV2RPC) NodeAiMemoryInsert

func (*FlowServiceV2RPC) NodeAiMemorySync

func (*FlowServiceV2RPC) NodeAiMemoryUpdate

func (*FlowServiceV2RPC) NodeAiProviderDelete

func (*FlowServiceV2RPC) NodeAiProviderInsert

func (*FlowServiceV2RPC) NodeAiProviderSync

func (*FlowServiceV2RPC) NodeAiProviderUpdate

func (*FlowServiceV2RPC) NodeAiSync

func (*FlowServiceV2RPC) NodeAiUpdate

func (*FlowServiceV2RPC) NodeCollection

func (*FlowServiceV2RPC) NodeConditionCollection

func (*FlowServiceV2RPC) NodeConditionDelete

func (*FlowServiceV2RPC) NodeConditionInsert

func (*FlowServiceV2RPC) NodeConditionSync

func (*FlowServiceV2RPC) NodeConditionUpdate

func (*FlowServiceV2RPC) NodeDelete

func (*FlowServiceV2RPC) NodeExecutionCollection

func (*FlowServiceV2RPC) NodeExecutionSync

func (*FlowServiceV2RPC) NodeForCollection

func (*FlowServiceV2RPC) NodeForDelete

func (*FlowServiceV2RPC) NodeForEachCollection

func (*FlowServiceV2RPC) NodeForEachDelete

func (*FlowServiceV2RPC) NodeForEachInsert

func (*FlowServiceV2RPC) NodeForEachSync

func (*FlowServiceV2RPC) NodeForEachUpdate

func (*FlowServiceV2RPC) NodeForInsert

func (*FlowServiceV2RPC) NodeForSync

func (*FlowServiceV2RPC) NodeForUpdate

func (*FlowServiceV2RPC) NodeGraphQLCollection

func (*FlowServiceV2RPC) NodeGraphQLDelete

func (*FlowServiceV2RPC) NodeGraphQLInsert

func (*FlowServiceV2RPC) NodeGraphQLSync

func (*FlowServiceV2RPC) NodeGraphQLUpdate

func (*FlowServiceV2RPC) NodeHttpCollection

func (*FlowServiceV2RPC) NodeHttpDelete

func (*FlowServiceV2RPC) NodeHttpInsert

func (*FlowServiceV2RPC) NodeHttpSync

func (*FlowServiceV2RPC) NodeHttpUpdate

func (*FlowServiceV2RPC) NodeInsert

func (*FlowServiceV2RPC) NodeJsCollection

func (*FlowServiceV2RPC) NodeJsDelete

func (*FlowServiceV2RPC) NodeJsInsert

func (*FlowServiceV2RPC) NodeJsSync

func (*FlowServiceV2RPC) NodeJsUpdate

func (*FlowServiceV2RPC) NodeRunSubFlowDelete

func (*FlowServiceV2RPC) NodeRunSubFlowInsert

func (*FlowServiceV2RPC) NodeRunSubFlowSync

func (*FlowServiceV2RPC) NodeRunSubFlowUpdate

func (*FlowServiceV2RPC) NodeSubFlowReturnDelete

func (*FlowServiceV2RPC) NodeSubFlowReturnInsert

func (*FlowServiceV2RPC) NodeSubFlowReturnSync

func (*FlowServiceV2RPC) NodeSubFlowReturnUpdate

func (*FlowServiceV2RPC) NodeSubFlowTriggerDelete

func (*FlowServiceV2RPC) NodeSubFlowTriggerInsert

func (*FlowServiceV2RPC) NodeSubFlowTriggerSync

func (*FlowServiceV2RPC) NodeSubFlowTriggerUpdate

func (*FlowServiceV2RPC) NodeSync

func (*FlowServiceV2RPC) NodeUpdate

func (*FlowServiceV2RPC) NodeWaitCollection

func (*FlowServiceV2RPC) NodeWaitDelete

func (*FlowServiceV2RPC) NodeWaitInsert

func (*FlowServiceV2RPC) NodeWaitSync

func (*FlowServiceV2RPC) NodeWaitUpdate

func (*FlowServiceV2RPC) NodeWsConnectionDelete

func (*FlowServiceV2RPC) NodeWsConnectionInsert

func (*FlowServiceV2RPC) NodeWsConnectionSync

func (*FlowServiceV2RPC) NodeWsConnectionUpdate

func (*FlowServiceV2RPC) NodeWsSendCollection

func (*FlowServiceV2RPC) NodeWsSendDelete

func (*FlowServiceV2RPC) NodeWsSendInsert

func (*FlowServiceV2RPC) NodeWsSendSync

func (*FlowServiceV2RPC) NodeWsSendUpdate

func (*FlowServiceV2RPC) ParseCurlCommand

func (s *FlowServiceV2RPC) ParseCurlCommand(ctx context.Context, curlData []byte, workspaceID idwrap.IDWrap) (*tcurlv2.CurlResolvedV2, error)

ParseCurlCommand parses a curl command without importing it

func (*FlowServiceV2RPC) ParseFlowData

func (s *FlowServiceV2RPC) ParseFlowData(ctx context.Context, data []byte, workspaceID idwrap.IDWrap) (interface{}, error)

ParseFlowData parses flow data without importing it (supports YAML, JSON, curl)

func (*FlowServiceV2RPC) ParseYAMLFlow

func (s *FlowServiceV2RPC) ParseYAMLFlow(ctx context.Context, data []byte, workspaceID idwrap.IDWrap) (*ioworkspace.WorkspaceBundle, error)

ParseYAMLFlow parses YAML flow data without importing it

func (*FlowServiceV2RPC) ValidateYAMLFlow

func (s *FlowServiceV2RPC) ValidateYAMLFlow(ctx context.Context, data []byte) error

ValidateYAMLFlow validates YAML flow data without importing

type FlowServiceV2Readers

type FlowServiceV2Readers struct {
	Workspace     *sworkspace.WorkspaceReader
	Flow          *sflow.FlowReader
	Node          *sflow.NodeReader
	Env           *senv.EnvReader
	Http          *shttp.Reader
	Edge          *sflow.EdgeReader
	NodeRequest   *sflow.NodeRequestReader
	FlowVariable  *sflow.FlowVariableReader
	NodeExecution *sflow.NodeExecutionReader
	HttpResponse  *shttp.HttpResponseReader
}

func (*FlowServiceV2Readers) Validate

func (r *FlowServiceV2Readers) Validate() error

type FlowServiceV2Services

func (*FlowServiceV2Services) Validate

func (s *FlowServiceV2Services) Validate() error

type FlowServiceV2Streamers

type FlowServiceV2Streamers struct {
	Flow                  eventstream.SyncStreamer[FlowTopic, FlowEvent]
	Node                  eventstream.SyncStreamer[NodeTopic, NodeEvent]
	Edge                  eventstream.SyncStreamer[EdgeTopic, EdgeEvent]
	Var                   eventstream.SyncStreamer[FlowVariableTopic, FlowVariableEvent]
	Version               eventstream.SyncStreamer[FlowVersionTopic, FlowVersionEvent]
	For                   eventstream.SyncStreamer[ForTopic, ForEvent]
	Condition             eventstream.SyncStreamer[ConditionTopic, ConditionEvent]
	ForEach               eventstream.SyncStreamer[ForEachTopic, ForEachEvent]
	Js                    eventstream.SyncStreamer[JsTopic, JsEvent]
	Ai                    eventstream.SyncStreamer[AiTopic, AiEvent]
	AiProvider            eventstream.SyncStreamer[AiProviderTopic, AiProviderEvent]
	Memory                eventstream.SyncStreamer[MemoryTopic, MemoryEvent]
	NodeGraphQL           eventstream.SyncStreamer[NodeGraphQLTopic, NodeGraphQLEvent]
	GraphQL               eventstream.SyncStreamer[rgraphql.GraphQLTopic, rgraphql.GraphQLEvent]
	WebSocket             eventstream.SyncStreamer[rwebsocket.WebSocketTopic, rwebsocket.WebSocketEvent]
	Execution             eventstream.SyncStreamer[ExecutionTopic, ExecutionEvent]
	Http                  eventstream.SyncStreamer[rhttp.HttpTopic, rhttp.HttpEvent]
	HttpResponse          eventstream.SyncStreamer[rhttp.HttpResponseTopic, rhttp.HttpResponseEvent]
	HttpResponseHeader    eventstream.SyncStreamer[rhttp.HttpResponseHeaderTopic, rhttp.HttpResponseHeaderEvent]
	HttpResponseAssert    eventstream.SyncStreamer[rhttp.HttpResponseAssertTopic, rhttp.HttpResponseAssertEvent]
	GraphQLResponse       eventstream.SyncStreamer[rgraphql.GraphQLResponseTopic, rgraphql.GraphQLResponseEvent]
	GraphQLResponseHeader eventstream.SyncStreamer[rgraphql.GraphQLResponseHeaderTopic, rgraphql.GraphQLResponseHeaderEvent]
	GraphQLResponseAssert eventstream.SyncStreamer[rgraphql.GraphQLResponseAssertTopic, rgraphql.GraphQLResponseAssertEvent]
	Log                   eventstream.SyncStreamer[rlog.LogTopic, rlog.LogEvent]
	File                  eventstream.SyncStreamer[rfile.FileTopic, rfile.FileEvent]
}

type FlowTopic

type FlowTopic struct {
	WorkspaceID idwrap.IDWrap
}

FlowTopic identifies the workspace whose flows are being published.

type FlowVariableEvent

type FlowVariableEvent struct {
	Type     string
	FlowID   idwrap.IDWrap
	Variable mflow.FlowVariable
}

FlowVariableEvent describes a flow variable change for sync streaming.

type FlowVariableTopic

type FlowVariableTopic struct {
	FlowID idwrap.IDWrap
}

FlowVariableTopic identifies the flow whose variables are being published.

type FlowVersionEvent

type FlowVersionEvent struct {
	Type      string
	FlowID    idwrap.IDWrap
	VersionID idwrap.IDWrap
}

FlowVersionEvent describes a flow version change for sync streaming.

type FlowVersionTopic

type FlowVersionTopic struct {
	FlowID idwrap.IDWrap
}

FlowVersionTopic identifies the flow whose versions are being published.

type ForEachEvent

type ForEachEvent struct {
	Type   string
	FlowID idwrap.IDWrap
	Node   *flowv1.NodeForEach
}

ForEachEvent describes a ForEach node change for sync streaming.

type ForEachTopic

type ForEachTopic struct {
	FlowID idwrap.IDWrap
}

ForEachTopic identifies the flow whose ForEach nodes are being published.

type ForEvent

type ForEvent struct {
	Type   string
	FlowID idwrap.IDWrap
	Node   *flowv1.NodeFor
}

ForEvent describes a For node change for sync streaming.

type ForTopic

type ForTopic struct {
	FlowID idwrap.IDWrap
}

ForTopic identifies the flow whose For nodes are being published.

type ImportResults

type ImportResults struct {
	WorkspaceID     idwrap.IDWrap
	HTTPReqsCreated int
	HTTPReqsUpdated int
	HTTPReqsSkipped int
	HTTPReqsFailed  int
	FilesCreated    int
	FilesUpdated    int
	FilesSkipped    int
	FilesFailed     int
	FlowsCreated    int
	FlowsUpdated    int
	FlowsSkipped    int
	FlowsFailed     int
	NodesCreated    int
	NodesUpdated    int
	NodesSkipped    int
	NodesFailed     int
	Duration        int64
}

ImportResults represents the results of a workspace import operation

type JsEvent

type JsEvent struct {
	Type   string
	FlowID idwrap.IDWrap
	Node   *flowv1.NodeJs
}

JsEvent describes a JavaScript node change for sync streaming.

type JsTopic

type JsTopic struct {
	FlowID idwrap.IDWrap
}

JsTopic identifies the flow whose JavaScript nodes are being published.

type MemoryEvent

type MemoryEvent struct {
	Type   string
	FlowID idwrap.IDWrap
	Node   *flowv1.NodeAiMemory
}

MemoryEvent describes a Memory node change for sync streaming.

type MemoryTopic

type MemoryTopic struct {
	FlowID idwrap.IDWrap
}

MemoryTopic identifies the flow whose Memory nodes are being published.

type MockWorkspaceImporter

type MockWorkspaceImporter struct {
	// contains filtered or unexported fields
}

MockWorkspaceImporter provides a mock implementation for testing

func NewMockWorkspaceImporter

func NewMockWorkspaceImporter(results *ImportResults, err error) *MockWorkspaceImporter

NewMockWorkspaceImporter creates a new mock importer

func (*MockWorkspaceImporter) ImportWorkspaceFromCurl

func (m *MockWorkspaceImporter) ImportWorkspaceFromCurl(ctx context.Context, curlData []byte, workspaceID idwrap.IDWrap) (*ImportResults, error)

func (*MockWorkspaceImporter) ImportWorkspaceFromYAML

func (m *MockWorkspaceImporter) ImportWorkspaceFromYAML(ctx context.Context, data []byte, workspaceID idwrap.IDWrap) (*ImportResults, error)

type NodeEvent

type NodeEvent struct {
	Type   string
	FlowID idwrap.IDWrap
	Node   *flowv1.Node
}

NodeEvent describes a node change for sync streaming.

type NodeGraphQLEvent

type NodeGraphQLEvent struct {
	Type   string
	FlowID idwrap.IDWrap
	Node   *flowv1.NodeGraphQL
}

NodeGraphQLEvent describes a GraphQL node change for sync streaming.

type NodeGraphQLTopic

type NodeGraphQLTopic struct {
	FlowID idwrap.IDWrap
}

NodeGraphQLTopic identifies the flow whose GraphQL nodes are being published.

type NodeTopic

type NodeTopic struct {
	FlowID idwrap.IDWrap
}

NodeTopic identifies the flow whose nodes are being published.

type NodeWsConnectionEvent

type NodeWsConnectionEvent struct {
	Type   string
	FlowID idwrap.IDWrap
	Node   *flowv1.NodeWsConnection
}

NodeWsConnectionEvent describes a WS Connection node change for sync streaming.

type NodeWsConnectionTopic

type NodeWsConnectionTopic struct {
	FlowID idwrap.IDWrap
}

NodeWsConnectionTopic identifies the flow whose WS Connection nodes are being published.

type NodeWsSendEvent

type NodeWsSendEvent struct {
	Type   string
	FlowID idwrap.IDWrap
	Node   *flowv1.NodeWsSend
}

NodeWsSendEvent describes a WS Send node change for sync streaming.

type NodeWsSendTopic

type NodeWsSendTopic struct {
	FlowID idwrap.IDWrap
}

NodeWsSendTopic identifies the flow whose WS Send nodes are being published.

type WorkspaceImporter

type WorkspaceImporter interface {
	ImportWorkspaceFromYAML(ctx context.Context, data []byte, workspaceID idwrap.IDWrap) (*ImportResults, error)
	ImportWorkspaceFromCurl(ctx context.Context, curlData []byte, workspaceID idwrap.IDWrap) (*ImportResults, error)
}

WorkspaceImporter defines the interface for importing workspace data

Jump to

Keyboard shortcuts

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