bind

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2026 License: MIT Imports: 10 Imported by: ? modules, 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.

Documentation

Overview

Package bind generates a typed Go binding of a library of lib/ from the description of its interface (library.Description: lib/plugin's interface.json, served by describe). The generated code is a thin layer over cengine/library's described runtime: a type for each kind of object, a method for each operation, a struct of handlers for each object's events and for a call's own, and struct types where the description's JSON Schemas name properties. It knows no library: whatever a description says is what it generates.

`ext bundle bind` runs it from a project's go generate (cengine/libcmd).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Generate

func Generate(d library.Description, o Options) ([]byte, error)

Generate returns the Go source of a binding of d.

Types

type Options

type Options struct {
	// Package is the Go package name of the generated file.
	Package string
	// Source names where the description came from, for the generated file's header.
	Source string
}

Options says what to generate.

Jump to

Keyboard shortcuts

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