codegen

package
v0.0.0-...-7c551ac Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2024 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Schema []string     `yaml:"schema"`
	Client ConfigClient `yaml:"client"`

	SkipGofmt        bool `yaml:"skipGofmt"`
	CreateSchemaYaml bool `yaml:"createSchemaYaml"`
}

type ConfigClient

type ConfigClient struct {
	Dir     string
	Package string
}

type Generator

type Generator struct {
	Config Config
	Schema Schema
	// contains filtered or unexported fields
}

func New

func New(filename string) (*Generator, error)

func (*Generator) Generate

func (gen *Generator) Generate() error

type Schema

type Schema struct {
	Functions []SchemaFunction
	Types     []SchemaType
}

type SchemaFunction

type SchemaFunction struct {
	Name string
	// QueryType is graphql type [query, mutation]
	QueryType   string
	Description string

	Type      SchemaType
	Arguments map[string]SchemaType
}

type SchemaType

type SchemaType struct {
	Name        string
	NonNull     bool
	Description string
	Kind        string

	List        bool
	ListNonNull bool

	Fields map[string]SchemaType
}

Jump to

Keyboard shortcuts

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