Versions in this module Expand all Collapse all v0 v0.4.0 Jun 23, 2016 v0.3.0 Mar 16, 2016 Changes in this version + const GolangFileType + type Context struct + FileTypes map[string]FileType + Namers namer.NameSystems + Order []*types.Type + Universe types.Universe + Verify bool + func NewContext(b *parser.Builder, nameSystems namer.NameSystems, canonicalOrderName string) (*Context, error) + func (c *Context) ExecutePackage(outDir string, p Package) error + func (c *Context) ExecutePackages(outDir string, packages Packages) error + type DefaultGen struct + OptionalBody []byte + OptionalName string + func (d DefaultGen) FileType() string + func (d DefaultGen) Filename() string + func (d DefaultGen) Filter(*Context, *types.Type) bool + func (d DefaultGen) GenerateType(*Context, *types.Type, io.Writer) error + func (d DefaultGen) Imports(*Context) []string + func (d DefaultGen) Init(c *Context, w io.Writer) error + func (d DefaultGen) Name() string + func (d DefaultGen) Namers(*Context) namer.NameSystems + func (d DefaultGen) PackageConsts(*Context) []string + func (d DefaultGen) PackageVars(*Context) []string + type DefaultPackage struct + FilterFunc func(*Context, *types.Type) bool + GeneratorFunc func(*Context) []Generator + GeneratorList []Generator + HeaderText []byte + PackageDocumentation []byte + PackageName string + PackagePath string + func (d *DefaultPackage) Filter(c *Context, t *types.Type) bool + func (d *DefaultPackage) Generators(c *Context) []Generator + func (d *DefaultPackage) Header(filename string) []byte + func (d *DefaultPackage) Name() string + func (d *DefaultPackage) Path() string + type ErrorTracker struct + func NewErrorTracker(w io.Writer) *ErrorTracker + func (et *ErrorTracker) Error() error + func (et *ErrorTracker) Write(p []byte) (n int, err error) + type File struct + Body bytes.Buffer + Consts bytes.Buffer + FileType string + Header []byte + Imports map[string]struct{} + Name string + PackageName string + Vars bytes.Buffer + type FileType interface + AssembleFile func(f *File, path string) error + VerifyFile func(f *File, path string) error + type Generator interface + FileType func() string + Filename func() string + Filter func(*Context, *types.Type) bool + GenerateType func(*Context, *types.Type, io.Writer) error + Imports func(*Context) []string + Init func(*Context, io.Writer) error + Name func() string + Namers func(*Context) namer.NameSystems + PackageConsts func(*Context) []string + PackageVars func(*Context) []string + type ImportTracker struct + func NewImportTracker(types ...*types.Type) *ImportTracker + func (tracker *ImportTracker) AddType(t *types.Type) + func (tracker *ImportTracker) AddTypes(types ...*types.Type) + func (tracker *ImportTracker) ImportLines() []string + func (tracker *ImportTracker) LocalNameOf(path string) string + type Package interface + Filter func(*Context, *types.Type) bool + Generators func(*Context) []Generator + Header func(filename string) []byte + Name func() string + Path func() string + type Packages []Package + type SnippetWriter struct + func NewSnippetWriter(w io.Writer, c *Context, left, right string) *SnippetWriter + func (s *SnippetWriter) Do(format string, args interface{}) *SnippetWriter + func (s *SnippetWriter) Error() error + func (s *SnippetWriter) Out() io.Writer