Help us shape the future of Go! Take the 2026 Go Developer Survey

jsonfunction

package
v0.31.0 Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2026 License: MPL-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const FormatVersion = "1.0"

FormatVersion represents the version of the json format and will be incremented for any change to this format that requires changes to a consuming parser.

Variables

This section is empty.

Functions

func Marshal

func Marshal(f map[string]function.Function) ([]byte, tfdiags.Diagnostics)

Types

type FunctionSignature

type FunctionSignature struct {
	// Description is an optional human-readable description
	// of the function
	Description string `json:"description,omitempty"`

	// ReturnTypes is the ctyjson representation of the function's
	// return types based on supplying all parameters using
	// dynamic types. Functions can have dynamic return types.
	// Use [marshalType] to populate this field.
	ReturnType json.RawMessage `json:"return_type"`

	// Parameters describes the function's fixed positional parameters.
	Parameters []*parameter `json:"parameters,omitempty"`

	// VariadicParameter describes the function's variadic
	// parameters, if any are supported.
	VariadicParameter *parameter `json:"variadic_parameter,omitempty"`
}

FunctionSignature represents a function signature.

Jump to

Keyboard shortcuts

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