gomodel

package
v1.5.2 Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2019 License: Apache-2.0 Imports: 10 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultLibRdl = "github.com/ardielle/ardielle-go/rdl"
View Source
var FullValidation bool = true

FullValidation - the generated validation method includes things like string pattern checks

Functions

func FormatComment

func FormatComment(s string, leftCol int, rightCol int) string

func Generate

func Generate(schema *rdl.Schema, params *GeneratorParams) error

GenerateGoModel generates the model code for the types defined in the RDL schema.

func GenerateGoSchema

func GenerateGoSchema(banner string, schema *rdl.Schema, outdir string, ns string, librdl string, prefixEnums bool) error

GenerateGoSchema generates the code to regenerate the Schema

func GenerationHeader

func GenerationHeader(banner string) string

func GenerationPackage

func GenerationPackage(schema *rdl.Schema, ns string) string

func GoType

func GoType(reg rdl.TypeRegistry, rdlType rdl.TypeRef, optional bool, items rdl.TypeRef, keys rdl.TypeRef, precise bool, reference bool) string

func GoType2

func GoType2(reg rdl.TypeRegistry, rdlType rdl.TypeRef, optional bool, items rdl.TypeRef, keys rdl.TypeRef, precise bool, reference bool, packageName string) string

func SafeTypeVarName

func SafeTypeVarName(rtype rdl.TypeRef) rdl.TypeName

Types

type GeneratorParams

type GeneratorParams struct {
	Outdir         string
	Banner         string
	Namespace      string
	UntaggedUnions []string
	LibRdl         string
	PrefixEnums    bool
	PreciseTypes   bool
	GenerateSchema bool
}

Jump to

Keyboard shortcuts

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