gengo

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2020 License: MIT Imports: 7 Imported by: 8

README

gengo

This package contains a codegenerator for emitting Golang source code for datastructures based on IPLD Schemas.

It is at present a partially complete proof-of-concept. Use at your own risk.

There is not yet a user-facing CLI; you have to write code to use it.

Check out the HACKME document for more info about the internals, how they're organized, and how to hack on this package.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EmitEntireType added in v0.0.2

func EmitEntireType(tg typedNodeGenerator, w io.Writer)

EmitEntireType outputs every possible type of code generation for a typedNodeGenerator

func EmitFileHeader added in v0.0.2

func EmitFileHeader(packageName string, w io.Writer)

EmitFileHeader emits a baseline package header that will allow a file with a generated type to compile

func EmitMinima added in v0.0.2

func EmitMinima(packageName string, f io.Writer)

EmitMinima emits common code shared by all types -- only needs to be output once per module

func NewGeneratorForKindBytes added in v0.0.2

func NewGeneratorForKindBytes(t schema.Type) typedNodeGenerator

func NewGeneratorForKindInt added in v0.0.2

func NewGeneratorForKindInt(t schema.Type) typedNodeGenerator
func NewGeneratorForKindLink(t schema.Type) typedNodeGenerator

func NewGeneratorForKindList added in v0.0.2

func NewGeneratorForKindList(t schema.Type) typedNodeGenerator

func NewGeneratorForKindString

func NewGeneratorForKindString(t schema.Type) typedNodeGenerator

func NewGeneratorForKindStruct

func NewGeneratorForKindStruct(t schema.Type) typedNodeGenerator

Types

This section is empty.

Jump to

Keyboard shortcuts

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