generator

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Aug 16, 2017 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const MkdirPermissions = 0777

Variables

This section is empty.

Functions

This section is empty.

Types

type Generator

type Generator interface {
	Generate() error
}

func NewGenerator

func NewGenerator(ts []Template, iface *parser.Interface, strategy Strategy) Generator

type Strategy

type Strategy interface {
	Write(*jen.File, Template) error
}

func NewFileStrategy

func NewFileStrategy(dir string) Strategy

func NewWriterStrategy

func NewWriterStrategy(writer io.Writer) Strategy

type Template

type Template interface {
	Path() string
	Render(data *parser.Interface) *jen.File
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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