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

actionbuild

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2026 License: MIT Imports: 24 Imported by: 0

Documentation

Overview

Package actionbuild derives one typed action catalog, editor schema and same-package invocation adapters from explicit game function declarations.

Index

Constants

This section is empty.

Variables

View Source
var ErrInvalidActions = errors.New("invalid authored actions")

Functions

func CompileDocument

func CompileDocument(source []byte) ([]byte, error)

CompileDocument validates YAML against the public editor schema and emits the bounded binary runtime document stored in the KLD.

Types

type Declaration

type Declaration struct {
	ID         string      `toml:"id"`
	Kind       string      `toml:"kind"`
	Function   string      `toml:"function"`
	Source     string      `toml:"source"`
	Parameters []Parameter `toml:"parameters"`
}

func Discover

func Discover(directory, module string) ([]Declaration, error)

Discover reads only confined game sources. Annotated functions must be top-level, non-generic functions with a typed ActionContext and bounded args.

type Level

type Level struct {
	Name, Directory string
	Actors          map[string]bool
	// contains filtered or unexported fields
}

type Parameter

type Parameter struct {
	Name string `toml:"name"`
	Type string `toml:"type"`
}

type Result

type Result struct {
	Source, Catalog, Schema []byte
	LevelSchemas            map[string][]byte
}

func Compile

func Compile(
	directory, module string,
	declarations []Declaration,
	levels []Level,
	contract []byte,
	generatorVersion ...int,
) (Result, error)

Jump to

Keyboard shortcuts

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