fsout

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2026 License: MIT Imports: 7 Imported by: 1 module, 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.

README

FS Out node

Type: fsOut
Category: Storage

Writes the payload to a local/sftp/ftp directory locator (Switch-style send).

Behavior

This node is registered as fsOut and runs as part of a workflow. Its exact runtime behavior is implemented in node.go; this document summarizes the editor-facing purpose and configuration contract.

Configuration

Field Type Default Description
acceptAnyHostKey boolean false Accept Any Host Key — sftp locators: skip host-key verification (INSECURE — vulnerable to MITM; prefer pinning hostKey)
appendNewline boolean false Append Newline — Append \n to every written payload
createDir boolean false Create Directory — Create missing locator directories (mkdir -p)
encoding string utf8 Encoding — base64/hex decode a string payload before writing
filename string Filename — Base name to write; with filenameType "msg" the message's filename property is used, with "flow"/"global" the value is read from that context scope (message/context names are reduced to their base name)
filenameType string fixed Filename Source
hostKey string Host Key — sftp locators: expected host public key (authorized_keys or base64); required unless acceptAnyHostKey is set
keyFile string SSH Key File — sftp locators: local path to an SSH private key
location string Location — Target directory locator: a local path, sftp://user@host/path or ftp://user@host/path. The file is written to location/filename
overwriteFile string true If File Exists — true: overwrite via tmp+rename (atomic on local/sftp); false: append; delete: remove first then write fresh
password string Password — Remote locator password, or the keyFile passphrase (credential: masked, never exported)

Implementation

  • node.go contains the executor, validation, schema, and registration.
  • editor.html contains the editor integration.
  • node_test.go, when present, contains behavioral tests.

Documentation

Overview

Package fsout contains the fsOut node implementation.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FsOutConfig

type FsOutConfig struct {
	// Location is the target DIRECTORY locator: a local path or
	// sftp:// / ftp:// URI. The written file lives at
	// location/filename.
	Location string `json:"location"`
	// Filename is the base name to write (fixed mode); with
	// FilenameType "msg" the message's filename property is used —
	// a full msg filename is reduced to its base name so a remote
	// path cannot escape the locator dir.
	Filename     string `json:"filename"`
	FilenameType string `json:"filenameType"`
	// AppendNewline appends \n to every written payload.
	AppendNewline bool `json:"appendNewline"`
	// OverwriteFile: "true" (default) truncates, "false" appends,
	// "delete" removes the file first then writes fresh.
	OverwriteFile string `json:"overwriteFile"`
	// CreateDir creates missing locator directories (mkdir -p).
	CreateDir bool `json:"createDir"`
	// Encoding decodes a string payload before writing (same values
	// as the file node).
	Encoding string `json:"encoding"`
	// Credentials for remote locators; Password is credential-typed.
	Password         string `json:"password"`
	KeyFile          string `json:"keyFile"`
	HostKey          string `json:"hostKey"`
	AcceptAnyHostKey bool   `json:"acceptAnyHostKey"`
}

FsOutConfig holds the fsOut node configuration — the remote-capable sibling of FileConfig.

type FsOutNode

type FsOutNode struct {
	*nodebase.BaseNode
	// contains filtered or unexported fields
}

FsOutNode writes the payload to a file under a dir locator, then passes the message through with the resolved path in Metadata. The Fs is opened per message and closed after the write — remote delivery is a per-item dial (Switch's send model); volume flows should prefer the file node on a mount.

func NewFsOutNode

func NewFsOutNode(node nodestore.NodeInterface, config *FsOutConfig, host nodebase.NodeHost) *FsOutNode

NewFsOutNode creates a new fsOut node.

func (*FsOutNode) Execute

Execute resolves the target, writes via tmp+rename, and stamps the resolved locator path into Metadata["filename"].

func (*FsOutNode) Validate

func (n *FsOutNode) Validate() error

Validate checks the fsOut configuration.

Jump to

Keyboard shortcuts

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