core

package
v0.0.0-...-340a8d1 Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2021 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Codegen

func Codegen(schema string, config ModelMapping) ([]byte, []byte, error)

Codegen takes a GraphQL schema as well as a mapping file of GQL structs to DB structs, then returns a generated REST model with conversion code, as well as utility code to convert between pointers

func SetGeneratePathPrefix

func SetGeneratePathPrefix(prefix string)

SetGeneratePathPrefix allows callers outside this package to set the path to this package, since it uses relative paths for all the templates

Types

type ModelMapping

type ModelMapping map[string]string

ModelMapping maps schema type names to their respective DB model

Jump to

Keyboard shortcuts

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