enum

package
v0.0.39-alpha8 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2022 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CompareEnums added in v0.0.38

func CompareEnums(l1, l2 []*Enum) ([]change.Change, error)

func EnumEqual added in v0.0.38

func EnumEqual(e1, e2 *Enum) bool

func EnumsEqual added in v0.0.38

func EnumsEqual(l1, l2 []*Enum) bool

func GQLEnumEqual added in v0.0.38

func GQLEnumEqual(e1, e2 *GQLEnum) bool

func GQLEnumsEqual added in v0.0.38

func GQLEnumsEqual(l1, l2 []*GQLEnum) bool

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
}

func (*Enum) Clone added in v0.0.37

func (c *Enum) Clone() *Enum

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