submitin

package
v0.13.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: 14 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

Submit node

Type: submitIn
Category: Triggers

Receives uploaded files via a web submit point and stamps the submitting user into the message.

Behavior

This node is registered as submitIn 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
auth string none Authentication — admin: require HTTP Basic credentials from the admin auth file (the consuming application's auth-file env var); the authenticated username lands in msg.submit.submittedBy
listener string own Listener — own: bind a private listener on Port. main: serve Path on the admin server's port — behind admin auth when configured; Port is ignored
maxSize integer 0 Max Upload Size (bytes) — Largest accepted upload; oversized requests are rejected with 413 (0 = 10 MiB default)
path string /submit Path — URL path accepting uploads (POST). ":name" segments become route params in msg.submit.params
port integer 8081 Port for the upload listener (must differ from the admin port; ignored when listener is "main")

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 submitin contains the submitIn node implementation.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SubmitConfig

type SubmitConfig struct {
	// Path is the URL path the upload endpoint listens on
	// (default "/submit"; ":name" segments become route params).
	Path string `json:"path"`
	// Port for the upload listener (default 8081 — must differ from
	// the admin port, same model as httpTrigger).
	Port int `json:"port"`
	// Listener selects where the route is served: "own" (default)
	// binds a private TCP listener on Port; "main" mounts the route
	// on the host's shared HTTP server via host.SharedHTTPRouter(), behind
	// the admin middleware — same model as httpTrigger.
	Listener string `json:"listener"`
	// MaxSize caps the upload in bytes (0 = defaultMaxSubmitBytes).
	MaxSize int64 `json:"maxSize"`
	// Auth is "none" (default) or "admin" (require credentials from
	// the admin auth file; the username lands in submittedBy).
	Auth string `json:"auth"`
}

SubmitConfig holds the node.Data fields of a submitIn node.

type SubmitNode

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

SubmitNode is a node that receives uploaded files over HTTP and injects them into the running workflow with submit metadata.

func NewSubmitNode

func NewSubmitNode(node nodestore.NodeInterface, config *SubmitConfig, host nodebase.NodeHost) *SubmitNode

NewSubmitNode creates a new submitIn node executor.

func (*SubmitNode) Execute

Execute binds the upload listener and returns immediately; each accepted upload is injected downstream as it arrives.

func (*SubmitNode) Stop

func (n *SubmitNode) Stop() error

Stop shuts down the upload listener (idempotent).

func (*SubmitNode) Validate

func (n *SubmitNode) Validate() error

Validate checks the node configuration (and normalizes defaults).

Jump to

Keyboard shortcuts

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