Help us shape the future of Go! Take the 2026 Go Developer Survey

fieldset

package
v0.15.2 Latest Latest
Warning

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

Go to latest
Published: Jan 18, 2022 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Field

type Field []string

Field represents a single field in a FieldSet

func (Field) FieldDefinition

func (f Field) FieldDefinition(schemaType *ast.Definition, schema *ast.Schema) *ast.FieldDefinition

FieldDefinition looks up a field in the type.

func (Field) Join

func (f Field) Join(str string) string

Join concatenates the field parts with a string separator between. Useful in templates.

func (Field) JoinGo

func (f Field) JoinGo(str string) string

JoinGo concatenates the Go name of field parts with a string separator between. Useful in templates.

func (Field) LastIndex

func (f Field) LastIndex() int

func (Field) ToGo

func (f Field) ToGo() string

ToGo converts a (possibly nested) field into a proper public Go name.

func (Field) ToGoPrivate

func (f Field) ToGoPrivate() string

ToGoPrivate converts a (possibly nested) field into a proper private Go name.

func (Field) TypeReference

func (f Field) TypeReference(obj *codegen.Object, objects codegen.Objects) *codegen.Field

TypeReference looks up the type of a field.

type Set

type Set []Field

Set represents a FieldSet that is used in federation directives @key and @requires. Would be happier to reuse FieldSet parsing from gqlparser, but this suits for now.

func New

func New(raw string, prefix []string) Set

New parses a FieldSet string into a TinyFieldSet.

Jump to

Keyboard shortcuts

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