codegen

package
v0.4.0 Latest Latest
Warning

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

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

Documentation

Overview

Package codegen generates typed source code from plugin action and connector descriptors (JSON Schema). First target language: TypeScript.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateTypeScript

func GenerateTypeScript(entry *plugins.CatalogEntry, namespace string) ([]byte, error)

GenerateTypeScript converts a CatalogEntry into a complete .ts file containing one namespace (PascalCase of the plugin id) with Input/Output interfaces for every action, a type guard function for every Output, and a Config interface for every connector.

namespace overrides the auto-detected namespace name. When empty, the namespace is inferred from the common domain prefix of the plugin's action ids (e.g. actions "imap.list-messages@1" and "imap.get-message@1" share the domain "imap" → namespace "Imap"). If no common domain exists, the plugin id itself is used as a fallback.

Types

This section is empty.

Jump to

Keyboard shortcuts

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