From 8fa0b258ac89781dae269790a4bde09cbcd2f324 Mon Sep 17 00:00:00 2001 From: Michael Muré Date: Sun, 29 Jul 2018 18:58:42 +0200 Subject: cleaning --- .../graphql-go/graphql/language/ast/selections.go | 144 --------------------- 1 file changed, 144 deletions(-) delete mode 100644 vendor/github.com/graphql-go/graphql/language/ast/selections.go (limited to 'vendor/github.com/graphql-go/graphql/language/ast/selections.go') diff --git a/vendor/github.com/graphql-go/graphql/language/ast/selections.go b/vendor/github.com/graphql-go/graphql/language/ast/selections.go deleted file mode 100644 index 0dc0ea12..00000000 --- a/vendor/github.com/graphql-go/graphql/language/ast/selections.go +++ /dev/null @@ -1,144 +0,0 @@ -package ast - -import ( - "github.com/graphql-go/graphql/language/kinds" -) - -type Selection interface { - GetSelectionSet() *SelectionSet -} - -// Ensure that all definition types implements Selection interface -var _ Selection = (*Field)(nil) -var _ Selection = (*FragmentSpread)(nil) -var _ Selection = (*InlineFragment)(nil) - -// Field implements Node, Selection -type Field struct { - Kind string - Loc *Location - Alias *Name - Name *Name - Arguments []*Argument - Directives []*Directive - SelectionSet *SelectionSet -} - -func NewField(f *Field) *Field { - if f == nil { - f = &Field{} - } - return &Field{ - Kind: kinds.Field, - Loc: f.Loc, - Alias: f.Alias, - Name: f.Name, - Arguments: f.Arguments, - Directives: f.Directives, - SelectionSet: f.SelectionSet, - } -} - -func (f *Field) GetKind() string { - return f.Kind -} - -func (f *Field) GetLoc() *Location { - return f.Loc -} - -func (f *Field) GetSelectionSet() *SelectionSet { - return f.SelectionSet -} - -// FragmentSpread implements Node, Selection -type FragmentSpread struct { - Kind string - Loc *Location - Name *Name - Directives []*Directive -} - -func NewFragmentSpread(fs *FragmentSpread) *FragmentSpread { - if fs == nil { - fs = &FragmentSpread{} - } - return &FragmentSpread{ - Kind: kinds.FragmentSpread, - Loc: fs.Loc, - Name: fs.Name, - Directives: fs.Directives, - } -} - -func (fs *FragmentSpread) GetKind() string { - return fs.Kind -} - -func (fs *FragmentSpread) GetLoc() *Location { - return fs.Loc -} - -func (fs *FragmentSpread) GetSelectionSet() *SelectionSet { - return nil -} - -// InlineFragment implements Node, Selection -type InlineFragment struct { - Kind string - Loc *Location - TypeCondition *Named - Directives []*Directive - SelectionSet *SelectionSet -} - -func NewInlineFragment(f *InlineFragment) *InlineFragment { - if f == nil { - f = &InlineFragment{} - } - return &InlineFragment{ - Kind: kinds.InlineFragment, - Loc: f.Loc, - TypeCondition: f.TypeCondition, - Directives: f.Directives, - SelectionSet: f.SelectionSet, - } -} - -func (f *InlineFragment) GetKind() string { - return f.Kind -} - -func (f *InlineFragment) GetLoc() *Location { - return f.Loc -} - -func (f *InlineFragment) GetSelectionSet() *SelectionSet { - return f.SelectionSet -} - -// SelectionSet implements Node -type SelectionSet struct { - Kind string - Loc *Location - Selections []Selection -} - -func NewSelectionSet(ss *SelectionSet) *SelectionSet { - if ss == nil { - ss = &SelectionSet{} - } - return &SelectionSet{ - Kind: kinds.SelectionSet, - Loc: ss.Loc, - Selections: ss.Selections, - } -} - -func (ss *SelectionSet) GetKind() string { - return ss.Kind -} - -func (ss *SelectionSet) GetLoc() *Location { - return ss.Loc -} -- cgit