generate

package
v0.19.0 Latest Latest
Warning

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

Go to latest
Published: Apr 1, 2026 License: BSD-3-Clause Imports: 17 Imported by: 3

Documentation

Overview

Package generate produces canoto serialization code, proto definitions, and standalone library copies from Go source files.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Canoto

func Canoto(
	inputFilePath string,
	canotoImport string,
	internal bool,
	cacheTemplate string,
	numberTemplate string,
	tagTemplate string,
	oneOfTypeTemplate string,
	oneOfUnsetTemplate string,
	oneOfFieldTemplate string,
) error

Canoto generates the canoto serialization logic for the provided file.

func Library added in v0.10.0

func Library(parentDir string) error

Library generates the canoto serialization primitives package in the provided folder.

Specifically, if "./internal" is provided, this will generate the package "./internal/canoto" with the serialization primitives included in "./internal/canoto/canoto.go" and "./internal/canoto/canoto.canoto.go".

func Proto

func Proto(
	inputFilePath string,
	canotoImport string,
	internal bool,
) error

Proto generates a corresponding proto file for the provided file.

Types

This section is empty.

Jump to

Keyboard shortcuts

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