gen

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 30, 2021 License: MIT Imports: 11 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Generator

type Generator struct {
	Package string // package name for generated files

	Schema *ast.Schema

	Queries *ast.QueryDocument
	// contains filtered or unexported fields
}

func NewGenerator

func NewGenerator(opts ...GeneratorOption) *Generator

NewGenerator now takes a slice of option as the rest arguments

func (*Generator) Run

func (g *Generator) Run()

type GeneratorOption

type GeneratorOption func(*Generator)

func WithPackage

func WithPackage(pkg string) GeneratorOption

func WithQueries

func WithQueries(queries string) GeneratorOption

func WithQueriesFile

func WithQueriesFile(filename string) GeneratorOption

func WithSchema

func WithSchema(schema string) GeneratorOption

func WithSchemaFile

func WithSchemaFile(filename string) GeneratorOption

Jump to

Keyboard shortcuts

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