internal

package
v0.9.12 Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2026 License: Apache-1.1 Imports: 12 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	HeaderTemplate  *template.Template
	TrailerTemplate *template.Template
	MessageTemplate *template.Template
	TagTemplate     *template.Template
	FieldTemplate   *template.Template
	EnumTemplate    *template.Template
)
View Source
var (
	GlobalFieldTypes []*datadictionary.FieldType
)

Functions

func BuildGlobalFieldTypes

func BuildGlobalFieldTypes(specs []*datadictionary.DataDictionary)

func WriteFile

func WriteFile(filePath, fileOut string) error

WriteFile parses the generated code in fileOut and writes the code out to filePath. Function performs some import clean up and gofmts the code before writing Returns ParseError if the generated source is invalid but is written to filePath

Types

type ErrorHandler

type ErrorHandler struct {
	ReturnCode int
}

ErrorHandler is a convenience struct for interpretting generation Errors

func (*ErrorHandler) Handle

func (h *ErrorHandler) Handle(err error)

Handle interprets the generation error. Proceeds with setting returnCode, or panics depending on error type

type ParseError

type ParseError struct {
	// contains filtered or unexported fields
}

ParseError indicates generated go source is invalid

func (ParseError) Error

func (e ParseError) Error() string

Jump to

Keyboard shortcuts

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