genflowtypes

package
v0.0.0-...-de50d6b Latest Latest
Warning

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

Go to latest
Published: May 6, 2017 License: MIT Imports: 12 Imported by: 0

Documentation

Overview

Package genflowtypes provides a code generator for flow types.

Index

Constants

This section is empty.

Variables

View Source
var E_Field = &proto.ExtensionDesc{
	ExtendedType:  (*pbdescriptor.FieldOptions)(nil),
	ExtensionType: validator.E_Field.ExtensionType,
	Field:         validator.E_Field.Field,
	Name:          validator.E_Field.Name,
	Tag:           validator.E_Field.Tag,
	Filename:      validator.E_Field.Filename,
}

this is a hack to use the FieldOptions descriptor from golang/proto instead of gogo/proto

Functions

This section is empty.

Types

type Flower

type Flower interface {
	FlowType() string
	IsRequired() bool
}

Flower is a flow language type

type Generator

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

Generator processes proto descriptors and generates flow type definitions.

func New

func New(reg *descriptor.Registry) *Generator

New returns a new generator which generates flowtype type definition files.

func (*Generator) Generate

func (g *Generator) Generate(targets []*descriptor.File, opts Options) ([]*plugin.CodeGeneratorResponse_File, error)

Generate processes the given proto files and produces flowtype output.

type NamedFlower

type NamedFlower interface {
	Flower
	Name() string
}

NamedFlower is a Flower with a name

type Options

type Options struct {
	AlwaysQualifyTypes bool
	EmbedEnums         bool
	OptonalSimpleTypes bool
	FilenameOverride   string
	EmitEnumZeros      bool
}

Options describes output parameters

Jump to

Keyboard shortcuts

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