generator

package
v0.0.0-...-7584e75 Latest Latest
Warning

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

Go to latest
Published: May 11, 2019 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EmptyStackError

type EmptyStackError struct{}

An EmptyStackError occurs when attempting to preform an operation which is not viable with an empty stack, e.g. `Pop`.

func (*EmptyStackError) Error

func (e *EmptyStackError) Error() string

type Generator

type Generator struct {
	*generator.Generator // github.com/golang/protobuf/protoc-gen-go/generator
	// contains filtered or unexported fields
}

Generator is responsible

func New

func New() *Generator

New creates a new default initialized Generator.

func (*Generator) Error

func (g *Generator) Error(err error, msgs ...string)

func (*Generator) Fail

func (g *Generator) Fail(msgs ...string)

Fail with proper annotation

func (*Generator) GenerateAllFiles

func (g *Generator) GenerateAllFiles()

GenerateAllFiles generates all GraphQL schema files from the input protobuf files.

type StringStack

type StringStack []string

A StringStack is stack of string elements.

func (StringStack) Empty

func (s StringStack) Empty() bool

Empty determines if a stack contains no elements

func (StringStack) Peek

func (s StringStack) Peek() string

Peek returns the first element without altering the stack.

func (StringStack) Pop

func (s StringStack) Pop() (StringStack, string, error)

Pop removes the top element of the stack, returning the modified stack, the element, and an EmptyStackError if the stack contains no elements.

func (StringStack) Push

func (s StringStack) Push(v string) StringStack

Push adds a new element to the top of the stack

Jump to

Keyboard shortcuts

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