lang

package
v0.2.3 Latest Latest
Warning

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

Go to latest
Published: Sep 4, 2020 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateGoMethodsForPackage added in v0.2.0

func GenerateGoMethodsForPackage(s *schema.Schema, genConfig *config.GeneratorConfig, pkgConfig *config.PackageConfig) (*[]GoMethod, error)

func GenerateGoTypesForPackage

func GenerateGoTypesForPackage(s *schema.Schema, genConfig *config.GeneratorConfig, pkgConfig *config.PackageConfig, expandedTypes *[]*schema.Type) (*[]GoStruct, *[]GoEnum, *[]GoScalar, *[]GoInterface, error)

Types

type GoEnum

type GoEnum struct {
	Name        string
	Description string
	Values      []GoEnumValue
}

type GoEnumValue

type GoEnumValue struct {
	Name        string
	Description string
}

type GoInterface

type GoInterface struct {
	Name        string
	Description string
	Type        string
}

type GoMethod added in v0.2.0

type GoMethod struct {
	Description string
	Name        string
	QueryVars   []QueryVar
	Signature   GoMethodSignature
}

type GoMethodInputType added in v0.2.0

type GoMethodInputType struct {
	Name string
	Type string
}

type GoMethodSignature added in v0.2.0

type GoMethodSignature struct {
	Input  []GoMethodInputType
	Return []string
}

type GoScalar

type GoScalar struct {
	Name        string
	Description string
	Type        string
}

type GoStruct

type GoStruct struct {
	Name        string
	Description string
	Fields      []GoStructField
	Implements  []string
}

type GoStructField

type GoStructField struct {
	Name        string
	Type        string
	Tags        string
	Description string
}

type GolangGenerator

type GolangGenerator struct {
	Types       []GoStruct
	PackageName string
	Enums       []GoEnum
	Imports     []string
	Scalars     []GoScalar
	Interfaces  []GoInterface
	Methods     []GoMethod
}

GolangGenerator is enough information to generate Go code for a single package.

type QueryVar added in v0.2.0

type QueryVar struct {
	Key   string
	Value string
	Type  string
}

Jump to

Keyboard shortcuts

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