genflowtypes

package
v0.5.2 Latest Latest
Warning

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

Go to latest
Published: Jul 15, 2020 License: MIT Imports: 15 Imported by: 0

Documentation

Overview

Package genflowtypes provides a code generator for flow types.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Dependencies

type Dependencies map[string]map[string]bool

Dependencies maps packages names to imported type names.

type FlowTyper

type FlowTyper interface {
	FlowType() string
	IsRequired() bool
	IsNullable() bool
}

FlowTyper 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 GeneratorOptions) ([]*plugin.CodeGeneratorResponse_File, error)

Generate processes the given proto files and produces flowtype output.

type GeneratorOptions

type GeneratorOptions struct {
	AlwaysQualifyTypes bool
	EmbedEnums         bool
	OptonalSimpleTypes bool
	FilenameOverride   string
	EmitEnumZeros      bool
	InputID            string
	DumpJSON           bool
	ProtoOptions       opts.Options
}

GeneratorOptions describes output parameters

type NamedFlowTyper

type NamedFlowTyper interface {
	FlowTyper
	Name() string
}

NamedFlowTyper is a FlowTyper with a name.

Jump to

Keyboard shortcuts

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