codegen

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2023 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Input added in v0.0.3

type Input struct {
	Package string
	Imports []*code.Import
	Types   []*Type
}

Input represents Types, Interfaces, and Variants from a specific package,

type Task

type Task struct {
	// Filename output file
	Filename string

	// Template string that is then parsed into template.Template
	Template string

	// Input represents Types, Interfaces, and Variants from a specific package,
	// that need to be generated.
	Input *Input
}

Task represent a code-gen task that Generator accepts. It's not advisable to have multiple tasks with the same Task.Filename since the Generator will just overwrite the data in it.

type Type

type Type struct {
	Name               string
	Variants           map[string]*code.Variant
	DecodingStrategy   string
	DiscriminatorField string
}

Type represents an interface for which unmarshal method needs to be created

Jump to

Keyboard shortcuts

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