generator

package
v0.0.6-alpha Latest Latest
Warning

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

Go to latest
Published: Aug 1, 2019 License: MIT Imports: 9 Imported by: 0

Documentation

Overview

Package generator generates code from Service Definitions

Jenny's approach to the code generation pipeline consists of 2 steps, decode and encode.

IR representations exist for the purposee of converting a meta description to code. Service description defined here is a super-set of many meta languages; for instance consumes and produces are Swagger concepts that are highly tied to HTTP package, while parameter order is required for gRPC

graphQL schema ↘            ↗ js
 swagger {2,3} → serviceIR  → go
          gRPC ↗            ↘ swift

Index

Constants

View Source
const (
	Swagger decoder = iota
	Golang  encoder = iota
	JS
	Twirp
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Generator

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

Generator is an object that can be used to create jenny services

func New

func New(in, out string) *Generator

New returns a new generator with the given output directory

func (*Generator) Generate

func (g *Generator) Generate() error

Generate Generates the necessary folders and files for the typeform service.

func (*Generator) SetPrefix

func (g *Generator) SetPrefix(s string)

Directories

Path Synopsis
internal
ir
Package ir holds Intermediary Representations of Services, Methods and Responses.
Package ir holds Intermediary Representations of Services, Methods and Responses.
Stolen entirely from Golint
Stolen entirely from Golint

Jump to

Keyboard shortcuts

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