enum

package
v0.0.35-alpha4 Latest Latest
Warning

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

Go to latest
Published: Dec 23, 2021 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetEnums

func GetEnums(input *Input) (*Enum, *GQLEnum)

func GetTSEnumNameForVal

func GetTSEnumNameForVal(val string) string

Types

type Data

type Data struct {
	Name        string
	Value       string
	Comment     string
	PackagePath string
}

type Enum

type Enum struct {
	Name     string
	Values   []Data
	Imported bool // Imported enum that's not in this file
}

type GQLEnum

type GQLEnum struct {
	Name   string // Name is the name of the enum
	Type   string // type of the enum e.g. nullable or not
	Values []Data
}

func (GQLEnum) GetGraphQLNames added in v0.0.33

func (g GQLEnum) GetGraphQLNames() []string

type Input added in v0.0.29

type Input struct {
	TSName  string
	GQLName string
	GQLType string
	Values  []string
	EnumMap map[string]string
}

func (*Input) HasValues added in v0.0.29

func (i *Input) HasValues() bool

Jump to

Keyboard shortcuts

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