generator

package
v1.2.13 Latest Latest
Warning

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

Go to latest
Published: Feb 26, 2023 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Overview

The generator package defines code generators for Babel. IDL files describe models and web services. The generator package defines generators for the supported languages. This allows each language to have its own approach to generating code.

For more information, see the README.md file.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LocateTemplateDir

func LocateTemplateDir() string

LocateTemplateDir determines the default template folder based on the location of the currently running executable.

Types

type Arguments

type Arguments struct {
	TemplateDir string
	OutputDir   string
	Scopes      []string
	GenServer   bool
	GenClient   bool
	GenModel    bool
	ServerType  string
	Options     map[string]string
}

Arguments holds the intialization data needed by the generators.

type Generator

type Generator interface {
	GenerateCode(pidl *idl.Idl) ([]string, error)
	// contains filtered or unexported methods
}

Generator defines the interface for code generators.

func New

func New(lang string, args *Arguments) (Generator, error)

New creates a new Generator for the given language, initializing it with the given arguments.

Jump to

Keyboard shortcuts

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