Versions in this module Expand all Collapse all v0 v0.4.0 Mar 6, 2020 Changes in this version + const ActionDelete + const ActionGet + const ActionInsert + const ActionList + const ActionUpdate + var ErrFieldHasBadTypeDefinition = errors.New("field has bad type definition, must be <type> or [<type>]") + var ErrFieldHasNoName = errors.New("fields must have a 'name' attribute") + var ErrTypeAndResolver = errors.New("field cannot declare Type and Resolver") + var GeneratedFilesPath = "./generated" + type DynamoKeyType struct + Name string + Type string + type DynamoSource struct + Backup bool + HashKey *DynamoKeyType + SortKey *DynamoKeyType + type Enum struct + Name string + Values []string + type Field struct + InputType *FieldType + Name string + Parent string + Resolver *Resolver + Type *FieldType + func (f *Field) IsLegalScalarType() bool + func (f *Field) UnmarshalYAML(unmarshal func(interface{}) error) error + type FieldType struct + IsList bool + Name string + NonNullable bool + func (ft *FieldType) UnmarshalYAML(unmarshal func(interface{}) error) error + type FilterObject Object + func NewFilterFromObject(o *Object) *FilterObject + type FilterObjectList []*FilterObject + type InputObject Object + func NewInputFromObject(o *Object, action string) (*InputObject, error) + type InputObjectList []*InputObject + type Mutation Query + type Object struct + Fields []*Field + Name string + type Query struct + Name string + Resolver *Resolver + Type *FieldType + type Resolver struct + Action string + ArgsSource string + DataSource *Source + FieldName string + KeyFields []*Field + Parent string + SourceKey string + Type *FieldType + func (r *Resolver) GenerateBytes() ([]byte, error) + func (r *Resolver) KeyFieldArgsString() string + func (r *Resolver) KeyFieldJSONList() string + func (r *Resolver) KeyFieldJSONMap() string + func (r *Resolver) OutputName() string + type SQLSource struct + PrimaryKey string + type Schema struct + Connections []string + Enums []*Enum + Errors []error + FilterInputs []string + FilterObjects FilterObjectList + InputObjects InputObjectList + Mutations []*Mutation + Objects []*Object + Queries []*Query + Sources map[string]*Source + func NewSchemaFromManifest(manifest []byte) (*Schema, error) + func (s *Schema) AddFilterFromObject(o *Object) + func (s *Schema) AddInputFromObject(o *Object, action string) error + func (s *Schema) CleanOutput() error + func (s *Schema) GenerateBytes() ([]byte, error) + func (s *Schema) OutputName() string + func (s *Schema) WriteAll() error + type Source struct + Dynamo *DynamoSource + Name string + SQL *SQLSource + Type string + func (ds *Source) GenerateBytes() ([]byte, error) + func (ds *Source) OutputName() string + func (ds *Source) UnmarshalYAML(unmarshal func(interface{}) error) error