Documentation ¶
Index ¶
- func ConvertFunc(t EntType) string
- func GetGoType(typ types.Type) string
- func IsContextType(typ Type) bool
- func IsConvertDataType(t EntType) bool
- func IsErrorType(typ Type) bool
- func IsIDType(t Type) bool
- func IsImportDepsType(t EntType) bool
- func IsListType(t Type) bool
- func IsNullType(typ Type) bool
- type ArrayListType
- func (t *ArrayListType) Convert() FileImport
- func (t *ArrayListType) GetCastToMethod() string
- func (t *ArrayListType) GetDBType() string
- func (t *ArrayListType) GetGraphQLType() string
- func (t *ArrayListType) GetNullableType() TSGraphQLType
- func (t *ArrayListType) GetTSGraphQLImports() []FileImport
- func (t *ArrayListType) GetTSType() string
- func (t *ArrayListType) GetTsTypeImports() []string
- func (t *ArrayListType) GetZeroValue() string
- type ArrayType
- func (t *ArrayType) DefaultGraphQLFieldName() string
- func (t *ArrayType) GetCastToMethod() string
- func (t *ArrayType) GetDBType() string
- func (t *ArrayType) GetElemGraphQLType() string
- func (t *ArrayType) GetGraphQLType() string
- func (t *ArrayType) GetTSGraphQLImports() []FileImport
- func (t *ArrayType) GetTSType() string
- func (t *ArrayType) GetZeroValue() string
- type BigIntImport
- type BigIntegerType
- func (t *BigIntegerType) Convert() FileImport
- func (t *BigIntegerType) GetCastToMethod() string
- func (t *BigIntegerType) GetDBType() string
- func (t *BigIntegerType) GetGraphQLType() string
- func (t *BigIntegerType) GetImportType() Import
- func (t *BigIntegerType) GetNullableType() TSGraphQLType
- func (t *BigIntegerType) GetTSGraphQLImports() []FileImport
- func (t *BigIntegerType) GetTSType() string
- func (t *BigIntegerType) GetZeroValue() string
- type BoolImport
- type BoolType
- func (t *BoolType) Convert() FileImport
- func (t *BoolType) GetCastToMethod() string
- func (t *BoolType) GetDBType() string
- func (t *BoolType) GetGraphQLType() string
- func (t *BoolType) GetImportType() Import
- func (t *BoolType) GetNullableType() TSGraphQLType
- func (t *BoolType) GetTSGraphQLImports() []FileImport
- func (t *BoolType) GetTSType() string
- func (t *BoolType) GetZeroValue() string
- type CommonObjectType
- type ConvertDataType
- type DateImport
- type DateType
- type DefaulFieldNameType
- type EmailImport
- type EmailType
- type EntType
- type EnumType
- func (t *EnumType) GetCastToMethod() string
- func (t *EnumType) GetDBType() string
- func (t *EnumType) GetEnumMap() map[string]string
- func (t *EnumType) GetEnumValues() []string
- func (t *EnumType) GetGraphQLName() string
- func (t *EnumType) GetGraphQLType() string
- func (t *EnumType) GetNullableType() TSGraphQLType
- func (t *EnumType) GetTSGraphQLImports() []FileImport
- func (t *EnumType) GetTSName() string
- func (t *EnumType) GetTSType() string
- func (t *EnumType) GetTsTypeImports() []string
- func (t *EnumType) GetZeroValue() string
- type EnumeratedType
- type FileImport
- type FloatImport
- type FloatType
- func (t *FloatType) GetCastToMethod() string
- func (t *FloatType) GetDBType() string
- func (t *FloatType) GetGraphQLType() string
- func (t *FloatType) GetImportType() Import
- func (t *FloatType) GetNullableType() TSGraphQLType
- func (t *FloatType) GetTSGraphQLImports() []FileImport
- func (t *FloatType) GetTSType() string
- func (t *FloatType) GetZeroValue() string
- type IDMarkerInterface
- type IDType
- func (t *IDType) GetCastToMethod() string
- func (t *IDType) GetDBType() string
- func (t *IDType) GetGraphQLType() string
- func (t *IDType) GetImportType() Import
- func (t *IDType) GetNullableType() TSGraphQLType
- func (t *IDType) GetTSGraphQLImports() []FileImport
- func (t *IDType) GetTSType() string
- func (t *IDType) GetTsTypeImports() []string
- func (t *IDType) GetZeroValue() string
- func (t *IDType) IsIDType() bool
- type Import
- type ImportDepsType
- type ImportType
- type InputImportType
- type IntImport
- type IntegerType
- func (t *IntegerType) GetCastToMethod() string
- func (t *IntegerType) GetDBType() string
- func (t *IntegerType) GetGraphQLType() string
- func (t *IntegerType) GetImportType() Import
- func (t *IntegerType) GetNullableType() TSGraphQLType
- func (t *IntegerType) GetTSGraphQLImports() []FileImport
- func (t *IntegerType) GetTSType() string
- func (t *IntegerType) GetZeroValue() string
- type JSONBImport
- type JSONBType
- func (t *JSONBType) Convert() FileImport
- func (t *JSONBType) GetCastToMethod() string
- func (t *JSONBType) GetDBType() string
- func (t *JSONBType) GetGraphQLType() string
- func (t *JSONBType) GetImportDepsType() *InputImportType
- func (t *JSONBType) GetImportType() Import
- func (t *JSONBType) GetNullableType() TSGraphQLType
- func (t *JSONBType) GetTSGraphQLImports() []FileImport
- func (t *JSONBType) GetTSType() string
- func (t *JSONBType) GetTsTypeImports() []string
- func (t *JSONBType) GetZeroValue() string
- type JSONImport
- type JSONType
- func (t *JSONType) Convert() FileImport
- func (t *JSONType) GetCastToMethod() string
- func (t *JSONType) GetDBType() string
- func (t *JSONType) GetGraphQLType() string
- func (t *JSONType) GetImportDepsType() *InputImportType
- func (t *JSONType) GetImportType() Import
- func (t *JSONType) GetNullableType() TSGraphQLType
- func (t *JSONType) GetTSGraphQLImports() []FileImport
- func (t *JSONType) GetTSType() string
- func (t *JSONType) GetTsTypeImports() []string
- func (t *JSONType) GetZeroValue() string
- type ListType
- type ListWrapperType
- func (t *ListWrapperType) GetActionName() string
- func (t *ListWrapperType) GetCastToMethod() string
- func (t *ListWrapperType) GetDBType() string
- func (t *ListWrapperType) GetGraphQLType() string
- func (t *ListWrapperType) GetNonNullableType() TSGraphQLType
- func (t *ListWrapperType) GetNullableType() TSGraphQLType
- func (t *ListWrapperType) GetTSGraphQLImports() []FileImport
- func (t *ListWrapperType) GetTSType() string
- func (t *ListWrapperType) GetZeroValue() string
- type MapType
- type NamedType
- func (t *NamedType) DefaultGraphQLFieldName() string
- func (t *NamedType) GetCastToMethod() string
- func (t *NamedType) GetDBType() string
- func (t *NamedType) GetGraphQLType() string
- func (t *NamedType) GetNonNullableType() Type
- func (t *NamedType) GetNullableType() Type
- func (t *NamedType) GetTSGraphQLImports() []FileImport
- func (t *NamedType) GetTSType() string
- func (t *NamedType) GetZeroValue() string
- type NonNullableType
- type NullableArrayListType
- func (t *NullableArrayListType) Convert() FileImport
- func (t *NullableArrayListType) GetCastToMethod() string
- func (t *NullableArrayListType) GetDBType() string
- func (t *NullableArrayListType) GetGraphQLType() string
- func (t *NullableArrayListType) GetNonNullableType() TSGraphQLType
- func (t *NullableArrayListType) GetTSGraphQLImports() []FileImport
- func (t *NullableArrayListType) GetTSType() string
- func (t *NullableArrayListType) GetTsTypeImports() []string
- func (t *NullableArrayListType) GetZeroValue() string
- type NullableBigIntegerType
- func (t *NullableBigIntegerType) Convert() FileImport
- func (t *NullableBigIntegerType) GetCastToMethod() string
- func (t *NullableBigIntegerType) GetDBType() string
- func (t *NullableBigIntegerType) GetGraphQLType() string
- func (t *NullableBigIntegerType) GetImportType() Import
- func (t *NullableBigIntegerType) GetNonNullableType() TSGraphQLType
- func (t *NullableBigIntegerType) GetTSGraphQLImports() []FileImport
- func (t *NullableBigIntegerType) GetTSType() string
- func (t *NullableBigIntegerType) GetZeroValue() string
- type NullableBoolType
- func (t *NullableBoolType) Convert() FileImport
- func (t *NullableBoolType) GetCastToMethod() string
- func (t *NullableBoolType) GetDBType() string
- func (t *NullableBoolType) GetGraphQLType() string
- func (t *NullableBoolType) GetImportType() Import
- func (t *NullableBoolType) GetNonNullableType() TSGraphQLType
- func (t *NullableBoolType) GetTSGraphQLImports() []FileImport
- func (t *NullableBoolType) GetTSType() string
- func (t *NullableBoolType) GetZeroValue() string
- type NullableDateType
- type NullableEmailType
- type NullableEnumType
- func (t *NullableEnumType) GetCastToMethod() string
- func (t *NullableEnumType) GetDBType() string
- func (t *NullableEnumType) GetEnumMap() map[string]string
- func (t *NullableEnumType) GetEnumValues() []string
- func (t *NullableEnumType) GetGraphQLName() string
- func (t *NullableEnumType) GetGraphQLType() string
- func (t *NullableEnumType) GetNonNullableType() TSGraphQLType
- func (t *NullableEnumType) GetTSGraphQLImports() []FileImport
- func (t *NullableEnumType) GetTSName() string
- func (t *NullableEnumType) GetTSType() string
- func (t *NullableEnumType) GetTsTypeImports() []string
- func (t *NullableEnumType) GetZeroValue() string
- type NullableFloatType
- func (t *NullableFloatType) GetCastToMethod() string
- func (t *NullableFloatType) GetDBType() string
- func (t *NullableFloatType) GetGraphQLType() string
- func (t *NullableFloatType) GetImportType() Import
- func (t *NullableFloatType) GetNonNullableType() TSGraphQLType
- func (t *NullableFloatType) GetTSGraphQLImports() []FileImport
- func (t *NullableFloatType) GetTSType() string
- func (t *NullableFloatType) GetZeroValue() string
- type NullableIDType
- func (t *NullableIDType) GetCastToMethod() string
- func (t *NullableIDType) GetDBType() string
- func (t *NullableIDType) GetGraphQLType() string
- func (t *NullableIDType) GetImportType() Import
- func (t *NullableIDType) GetNonNullableType() TSGraphQLType
- func (t *NullableIDType) GetTSGraphQLImports() []FileImport
- func (t *NullableIDType) GetTSType() string
- func (t *NullableIDType) GetTsTypeImports() []string
- func (t *NullableIDType) GetZeroValue() string
- func (t *NullableIDType) IsIDType() bool
- type NullableIntegerType
- func (t *NullableIntegerType) GetCastToMethod() string
- func (t *NullableIntegerType) GetDBType() string
- func (t *NullableIntegerType) GetGraphQLType() string
- func (t *NullableIntegerType) GetImportType() Import
- func (t *NullableIntegerType) GetNonNullableType() TSGraphQLType
- func (t *NullableIntegerType) GetTSGraphQLImports() []FileImport
- func (t *NullableIntegerType) GetTSType() string
- func (t *NullableIntegerType) GetZeroValue() string
- type NullableJSONBType
- func (t *NullableJSONBType) Convert() FileImport
- func (t *NullableJSONBType) GetCastToMethod() string
- func (t *NullableJSONBType) GetDBType() string
- func (t *NullableJSONBType) GetGraphQLType() string
- func (t *NullableJSONBType) GetImportDepsType() *InputImportType
- func (t *NullableJSONBType) GetImportType() Import
- func (t *NullableJSONBType) GetNonNullableType() TSGraphQLType
- func (t *NullableJSONBType) GetTSGraphQLImports() []FileImport
- func (t *NullableJSONBType) GetTSType() string
- func (t *NullableJSONBType) GetTsTypeImports() []string
- func (t *NullableJSONBType) GetZeroValue() string
- type NullableJSONType
- func (t *NullableJSONType) Convert() FileImport
- func (t *NullableJSONType) GetCastToMethod() string
- func (t *NullableJSONType) GetDBType() string
- func (t *NullableJSONType) GetGraphQLType() string
- func (t *NullableJSONType) GetImportDepsType() *InputImportType
- func (t *NullableJSONType) GetImportType() Import
- func (t *NullableJSONType) GetNonNullableType() TSGraphQLType
- func (t *NullableJSONType) GetTSGraphQLImports() []FileImport
- func (t *NullableJSONType) GetTSType() string
- func (t *NullableJSONType) GetTsTypeImports() []string
- func (t *NullableJSONType) GetZeroValue() string
- type NullableObjectType
- type NullablePasswordType
- type NullablePhoneType
- type NullableStringType
- func (t *NullableStringType) GetCastToMethod() string
- func (t *NullableStringType) GetDBType() string
- func (t *NullableStringType) GetGraphQLType() string
- func (t *NullableStringType) GetImportType() Import
- func (t *NullableStringType) GetNonNullableType() TSGraphQLType
- func (t *NullableStringType) GetTSGraphQLImports() []FileImport
- func (t *NullableStringType) GetTSType() string
- func (t *NullableStringType) GetZeroValue() string
- type NullableTimeType
- func (t *NullableTimeType) DefaultGraphQLFieldName() string
- func (t *NullableTimeType) GetCastToMethod() string
- func (t *NullableTimeType) GetDBType() string
- func (t *NullableTimeType) GetGraphQLType() string
- func (t *NullableTimeType) GetImportType() Import
- func (t *NullableTimeType) GetNonNullableType() TSGraphQLType
- func (t *NullableTimeType) GetTSGraphQLImports() []FileImport
- func (t *NullableTimeType) GetTSType() string
- func (t *NullableTimeType) GetZeroValue() string
- type NullableTimestampType
- func (t *NullableTimestampType) Convert() FileImport
- func (t *NullableTimestampType) DefaultGraphQLFieldName() string
- func (t *NullableTimestampType) GetCastToMethod() string
- func (t *NullableTimestampType) GetDBType() string
- func (t *NullableTimestampType) GetGraphQLType() string
- func (t *NullableTimestampType) GetImportType() Import
- func (t *NullableTimestampType) GetNonNullableType() TSGraphQLType
- func (t *NullableTimestampType) GetTSGraphQLImports() []FileImport
- func (t *NullableTimestampType) GetTSType() string
- func (t *NullableTimestampType) GetZeroValue() string
- type NullableTimestamptzType
- func (t *NullableTimestamptzType) DefaultGraphQLFieldName() string
- func (t *NullableTimestamptzType) GetDBType() string
- func (t *NullableTimestamptzType) GetImportType() Import
- func (t *NullableTimestamptzType) GetNonNullableType() TSGraphQLType
- func (t *NullableTimestamptzType) GetZeroValue() string
- type NullableTimetzType
- type NullableType
- type ObjectType
- type PasswordImport
- type PasswordType
- type PhoneImport
- type PhoneType
- type PointerType
- func (t *PointerType) DefaultGraphQLFieldName() string
- func (t *PointerType) GetCastToMethod() string
- func (t *PointerType) GetDBType() string
- func (t *PointerType) GetGraphQLType() string
- func (t *PointerType) GetNonNullableType() TSGraphQLType
- func (t *PointerType) GetNullableType() Type
- func (t *PointerType) GetTSGraphQLImports() []FileImport
- func (t *PointerType) GetTSType() string
- func (t *PointerType) GetZeroValue() string
- type RawJSONType
- type SliceType
- func (t *SliceType) DefaultGraphQLFieldName() string
- func (t *SliceType) GetCastToMethod() string
- func (t *SliceType) GetDBType() string
- func (t *SliceType) GetElemGraphQLType() string
- func (t *SliceType) GetGraphQLType() string
- func (t *SliceType) GetTSGraphQLImports() []FileImport
- func (t *SliceType) GetTSType() string
- func (t *SliceType) GetZeroValue() string
- type StringImport
- type StringType
- func (t *StringType) GetCastToMethod() string
- func (t *StringType) GetDBType() string
- func (t *StringType) GetGraphQLType() string
- func (t *StringType) GetImportType() Import
- func (t *StringType) GetNullableType() TSGraphQLType
- func (t *StringType) GetTSGraphQLImports() []FileImport
- func (t *StringType) GetTSType() string
- func (t *StringType) GetZeroValue() string
- type TSCodegenableType
- type TSGraphQLType
- type TSType
- type TSTypeWithActionFields
- type TSTypeWithImports
- type TimeImport
- type TimeType
- func (t *TimeType) DefaultGraphQLFieldName() string
- func (t *TimeType) GetCastToMethod() string
- func (t *TimeType) GetDBType() string
- func (t *TimeType) GetGraphQLType() string
- func (t *TimeType) GetImportType() Import
- func (t *TimeType) GetNullableType() TSGraphQLType
- func (t *TimeType) GetTSGraphQLImports() []FileImport
- func (t *TimeType) GetTSType() string
- func (t *TimeType) GetZeroValue() string
- type TimestampImport
- type TimestampType
- type TimestamptzImport
- type TimestamptzType
- type TimetzImport
- type TimetzType
- type Type
- type UUIDImport
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConvertFunc ¶
func GetGoType ¶
GetGoType returns the type that should be put in a golang-declaration for the type e.g. in structs, in generated graphql code, etc
func IsContextType ¶
func IsConvertDataType ¶
func IsErrorType ¶
func IsImportDepsType ¶
func IsNullType ¶
Types ¶
type ArrayListType ¶
type ArrayListType struct { ElemType TSType // contains filtered or unexported fields }
actual list type that we use not ArrayType or SliceType
func (*ArrayListType) Convert ¶
func (t *ArrayListType) Convert() FileImport
func (*ArrayListType) GetCastToMethod ¶
func (t *ArrayListType) GetCastToMethod() string
func (*ArrayListType) GetDBType ¶
func (t *ArrayListType) GetDBType() string
func (*ArrayListType) GetGraphQLType ¶
func (t *ArrayListType) GetGraphQLType() string
func (*ArrayListType) GetNullableType ¶
func (t *ArrayListType) GetNullableType() TSGraphQLType
func (*ArrayListType) GetTSGraphQLImports ¶
func (t *ArrayListType) GetTSGraphQLImports() []FileImport
func (*ArrayListType) GetTSType ¶
func (t *ArrayListType) GetTSType() string
func (*ArrayListType) GetTsTypeImports ¶
func (t *ArrayListType) GetTsTypeImports() []string
func (*ArrayListType) GetZeroValue ¶
func (t *ArrayListType) GetZeroValue() string
type ArrayType ¶
type ArrayType struct {
// contains filtered or unexported fields
}
func (*ArrayType) DefaultGraphQLFieldName ¶
func (*ArrayType) GetCastToMethod ¶
func (t *ArrayType) GetCastToMethod() string
func (*ArrayType) GetDBType ¶
func (t *ArrayType) GetDBType() string
json fields are stored as strings in the db
func (*ArrayType) GetElemGraphQLType ¶
func (*ArrayType) GetGraphQLType ¶
func (*ArrayType) GetTSGraphQLImports ¶
func (t *ArrayType) GetTSGraphQLImports() []FileImport
func (*ArrayType) GetZeroValue ¶
func (t *ArrayType) GetZeroValue() string
type BigIntImport ¶
type BigIntImport struct {
// contains filtered or unexported fields
}
func (*BigIntImport) Aliases ¶
func (imp *BigIntImport) Aliases() []string
func (*BigIntImport) DefaultImport ¶
func (b *BigIntImport) DefaultImport() bool
func (*BigIntImport) Import ¶
func (imp *BigIntImport) Import() string
func (*BigIntImport) ImportPath ¶
func (b *BigIntImport) ImportPath() string
type BigIntegerType ¶
type BigIntegerType struct {
IntegerType
}
func (*BigIntegerType) Convert ¶
func (t *BigIntegerType) Convert() FileImport
func (*BigIntegerType) GetCastToMethod ¶
func (t *BigIntegerType) GetCastToMethod() string
func (*BigIntegerType) GetDBType ¶
func (t *BigIntegerType) GetDBType() string
func (*BigIntegerType) GetGraphQLType ¶
func (t *BigIntegerType) GetGraphQLType() string
func (*BigIntegerType) GetImportType ¶
func (t *BigIntegerType) GetImportType() Import
func (*BigIntegerType) GetNullableType ¶
func (t *BigIntegerType) GetNullableType() TSGraphQLType
func (*BigIntegerType) GetTSGraphQLImports ¶
func (t *BigIntegerType) GetTSGraphQLImports() []FileImport
func (*BigIntegerType) GetTSType ¶
func (t *BigIntegerType) GetTSType() string
func (*BigIntegerType) GetZeroValue ¶
func (t *BigIntegerType) GetZeroValue() string
type BoolImport ¶
type BoolImport struct {
// contains filtered or unexported fields
}
func (*BoolImport) Aliases ¶
func (imp *BoolImport) Aliases() []string
func (*BoolImport) DefaultImport ¶
func (b *BoolImport) DefaultImport() bool
func (*BoolImport) Import ¶
func (imp *BoolImport) Import() string
func (*BoolImport) ImportPath ¶
func (b *BoolImport) ImportPath() string
type BoolType ¶
type BoolType struct {
// contains filtered or unexported fields
}
func (*BoolType) Convert ¶
func (t *BoolType) Convert() FileImport
func (*BoolType) GetCastToMethod ¶
func (*BoolType) GetGraphQLType ¶
func (*BoolType) GetImportType ¶
func (t *BoolType) GetImportType() Import
func (*BoolType) GetNullableType ¶
func (t *BoolType) GetNullableType() TSGraphQLType
func (*BoolType) GetTSGraphQLImports ¶
func (t *BoolType) GetTSGraphQLImports() []FileImport
func (*BoolType) GetZeroValue ¶
func (t *BoolType) GetZeroValue() string
type CommonObjectType ¶
public for tests
func (*CommonObjectType) GetActionName ¶
func (t *CommonObjectType) GetActionName() string
func (*CommonObjectType) GetCastToMethod ¶
func (t *CommonObjectType) GetCastToMethod() string
func (*CommonObjectType) GetDBType ¶
func (t *CommonObjectType) GetDBType() string
func (*CommonObjectType) GetZeroValue ¶
func (t *CommonObjectType) GetZeroValue() string
type ConvertDataType ¶
type ConvertDataType interface { TSType Convert() FileImport }
type DateImport ¶
type DateImport struct {
// contains filtered or unexported fields
}
func (*DateImport) Aliases ¶
func (imp *DateImport) Aliases() []string
func (*DateImport) DefaultImport ¶
func (b *DateImport) DefaultImport() bool
func (*DateImport) Import ¶
func (imp *DateImport) Import() string
func (*DateImport) ImportPath ¶
func (b *DateImport) ImportPath() string
type DateType ¶
type DateType struct {
TimestampType
}
func (*DateType) Convert ¶
func (t *DateType) Convert() FileImport
func (*DateType) GetImportType ¶
func (*DateType) GetNullableType ¶
func (t *DateType) GetNullableType() TSGraphQLType
type DefaulFieldNameType ¶
type DefaulFieldNameType interface {
DefaultGraphQLFieldName() string
}
type EmailImport ¶
type EmailImport struct {
// contains filtered or unexported fields
}
func (*EmailImport) Aliases ¶
func (imp *EmailImport) Aliases() []string
func (*EmailImport) DefaultImport ¶
func (b *EmailImport) DefaultImport() bool
func (*EmailImport) Import ¶
func (imp *EmailImport) Import() string
func (*EmailImport) ImportPath ¶
func (imp *EmailImport) ImportPath() string
type EmailType ¶
type EmailType struct {
StringType
}
func (*EmailType) GetImportType ¶
func (*EmailType) GetNullableType ¶
func (t *EmailType) GetNullableType() TSGraphQLType
func (*EmailType) GetZeroValue ¶
func (t *EmailType) GetZeroValue() string
hmm we don't use these for the nullable types right now. unclear if right thing...
type EntType ¶
type EntType interface { Type GetDBType() string GetCastToMethod() string // returns the method in cast.go (cast.To***) which casts from interface{} to strongly typed GetZeroValue() string }
EntType interface is for fields exposed to Ents (stored in the DB) etc
type EnumType ¶
type EnumType struct { EnumDBType bool Type string GraphQLType string Values []string EnumMap map[string]string // contains filtered or unexported fields }
func (*EnumType) GetCastToMethod ¶
func (*EnumType) GetEnumMap ¶ added in v0.0.29
func (*EnumType) GetEnumValues ¶
func (*EnumType) GetGraphQLName ¶
func (*EnumType) GetGraphQLType ¶
func (*EnumType) GetNullableType ¶
func (t *EnumType) GetNullableType() TSGraphQLType
func (*EnumType) GetTSGraphQLImports ¶
func (t *EnumType) GetTSGraphQLImports() []FileImport
func (*EnumType) GetTsTypeImports ¶
func (*EnumType) GetZeroValue ¶
func (t *EnumType) GetZeroValue() string
type EnumeratedType ¶
type EnumeratedType interface { TSType // GetTSName refers to the name of the generated enum GetTSName() string GetGraphQLName() string GetEnumValues() []string GetEnumMap() map[string]string }
EnumeratedType indicates that this is an enum type
func GetEnumType ¶
func GetEnumType(t Type) (EnumeratedType, bool)
this exists because we need to account for lists...
type FileImport ¶
type FileImport struct { Type string ImportType ImportType // so instead of the path being hardcoded, we indicate we're exposing an enum of a given type Name string // TODO name of import e.g. foo }
for imports that are not from "graphql" we need a way to flag different import types e.g. Node of type User or enum of type RequestStatus and have the import path be handled separately/later
func NewGQLFileImport ¶
func NewGQLFileImport(typ string) FileImport
helper to more easily create a GraphQL import since very common
type FloatImport ¶
type FloatImport struct {
// contains filtered or unexported fields
}
func (*FloatImport) Aliases ¶
func (imp *FloatImport) Aliases() []string
func (*FloatImport) DefaultImport ¶
func (b *FloatImport) DefaultImport() bool
func (*FloatImport) Import ¶
func (imp *FloatImport) Import() string
func (*FloatImport) ImportPath ¶
func (b *FloatImport) ImportPath() string
type FloatType ¶
type FloatType struct {
// contains filtered or unexported fields
}
func (*FloatType) GetCastToMethod ¶
func (*FloatType) GetGraphQLType ¶
func (*FloatType) GetImportType ¶
func (t *FloatType) GetImportType() Import
func (*FloatType) GetNullableType ¶
func (t *FloatType) GetNullableType() TSGraphQLType
func (*FloatType) GetTSGraphQLImports ¶
func (t *FloatType) GetTSGraphQLImports() []FileImport
func (*FloatType) GetZeroValue ¶
func (t *FloatType) GetZeroValue() string
type IDMarkerInterface ¶
type IDMarkerInterface interface { TSGraphQLType IsIDType() bool }
type IDType ¶
type IDType struct {
// contains filtered or unexported fields
}
func (*IDType) GetCastToMethod ¶
func (*IDType) GetGraphQLType ¶
func (*IDType) GetImportType ¶
func (t *IDType) GetImportType() Import
func (*IDType) GetNullableType ¶
func (t *IDType) GetNullableType() TSGraphQLType
func (*IDType) GetTSGraphQLImports ¶
func (t *IDType) GetTSGraphQLImports() []FileImport
func (*IDType) GetTsTypeImports ¶
func (t *IDType) GetTsTypeImports() []string
func (*IDType) GetZeroValue ¶
func (t *IDType) GetZeroValue() string
type Import ¶
type Import interface { ImportPath() string Import() string DefaultImport() bool Aliases() []string }
func GetTypeForField ¶
func ValidateTypeForImport ¶
type ImportDepsType ¶
type ImportDepsType interface { TSGraphQLType GetImportDepsType() *InputImportType }
type ImportType ¶
type ImportType string
const ( GraphQL ImportType = "graphql" Node ImportType = "node" Enum ImportType = "enum" Connection ImportType = "connection" // EntGraphQL refers to graphql scalars or things in the ent graphql space EntGraphQL ImportType = "ent_graphql" Package ImportType = "package" // TODO need to kill this for actual paths // https://github.com/taion/graphql-type-json GraphQLJSON ImportType = "graphql-type-json" )
type InputImportType ¶
to resolve circular dependency btw input and this
type IntImport ¶
type IntImport struct {
// contains filtered or unexported fields
}
func (*IntImport) DefaultImport ¶
func (b *IntImport) DefaultImport() bool
func (*IntImport) ImportPath ¶
func (b *IntImport) ImportPath() string
type IntegerType ¶
type IntegerType struct {
// contains filtered or unexported fields
}
func (*IntegerType) GetCastToMethod ¶
func (t *IntegerType) GetCastToMethod() string
func (*IntegerType) GetGraphQLType ¶
func (t *IntegerType) GetGraphQLType() string
func (*IntegerType) GetImportType ¶
func (t *IntegerType) GetImportType() Import
func (*IntegerType) GetNullableType ¶
func (t *IntegerType) GetNullableType() TSGraphQLType
func (*IntegerType) GetTSGraphQLImports ¶
func (t *IntegerType) GetTSGraphQLImports() []FileImport
func (*IntegerType) GetTSType ¶
func (t *IntegerType) GetTSType() string
func (*IntegerType) GetZeroValue ¶
func (t *IntegerType) GetZeroValue() string
type JSONBImport ¶
type JSONBImport struct {
// contains filtered or unexported fields
}
func (*JSONBImport) Aliases ¶
func (imp *JSONBImport) Aliases() []string
func (*JSONBImport) DefaultImport ¶
func (b *JSONBImport) DefaultImport() bool
func (*JSONBImport) Import ¶
func (imp *JSONBImport) Import() string
func (*JSONBImport) ImportPath ¶
func (imp *JSONBImport) ImportPath() string
type JSONBType ¶
type JSONBType struct { ImportType *InputImportType // contains filtered or unexported fields }
func (*JSONBType) Convert ¶
func (t *JSONBType) Convert() FileImport
func (*JSONBType) GetCastToMethod ¶
func (t *JSONBType) GetCastToMethod() string
func (*JSONBType) GetGraphQLType ¶
func (t *JSONBType) GetGraphQLType() string
func (*JSONBType) GetImportDepsType ¶
func (t *JSONBType) GetImportDepsType() *InputImportType
func (*JSONBType) GetImportType ¶
func (*JSONBType) GetNullableType ¶
func (t *JSONBType) GetNullableType() TSGraphQLType
func (*JSONBType) GetTSGraphQLImports ¶
func (t *JSONBType) GetTSGraphQLImports() []FileImport
func (*JSONBType) GetTsTypeImports ¶
func (*JSONBType) GetZeroValue ¶
func (t *JSONBType) GetZeroValue() string
type JSONImport ¶
type JSONImport struct {
// contains filtered or unexported fields
}
func (*JSONImport) Aliases ¶
func (imp *JSONImport) Aliases() []string
func (*JSONImport) DefaultImport ¶
func (b *JSONImport) DefaultImport() bool
func (*JSONImport) Import ¶
func (imp *JSONImport) Import() string
func (*JSONImport) ImportPath ¶
func (imp *JSONImport) ImportPath() string
type JSONType ¶
type JSONType struct { ImportType *InputImportType // contains filtered or unexported fields }
func (*JSONType) Convert ¶
func (t *JSONType) Convert() FileImport
func (*JSONType) GetCastToMethod ¶
func (t *JSONType) GetCastToMethod() string
func (*JSONType) GetGraphQLType ¶
func (t *JSONType) GetGraphQLType() string
func (*JSONType) GetImportDepsType ¶
func (t *JSONType) GetImportDepsType() *InputImportType
func (*JSONType) GetImportType ¶
func (t *JSONType) GetImportType() Import
func (*JSONType) GetNullableType ¶
func (t *JSONType) GetNullableType() TSGraphQLType
func (*JSONType) GetTSGraphQLImports ¶
func (t *JSONType) GetTSGraphQLImports() []FileImport
func (*JSONType) GetTsTypeImports ¶
func (*JSONType) GetZeroValue ¶
func (t *JSONType) GetZeroValue() string
type ListWrapperType ¶
type ListWrapperType struct { Type TSGraphQLType // doesn't care if content is nullable. that's handled by Type passed... Nullable bool }
func (*ListWrapperType) GetActionName ¶
func (t *ListWrapperType) GetActionName() string
func (*ListWrapperType) GetCastToMethod ¶
func (t *ListWrapperType) GetCastToMethod() string
func (*ListWrapperType) GetDBType ¶
func (t *ListWrapperType) GetDBType() string
func (*ListWrapperType) GetGraphQLType ¶
func (t *ListWrapperType) GetGraphQLType() string
func (*ListWrapperType) GetNonNullableType ¶
func (t *ListWrapperType) GetNonNullableType() TSGraphQLType
func (*ListWrapperType) GetNullableType ¶
func (t *ListWrapperType) GetNullableType() TSGraphQLType
func (*ListWrapperType) GetTSGraphQLImports ¶
func (t *ListWrapperType) GetTSGraphQLImports() []FileImport
func (*ListWrapperType) GetTSType ¶
func (t *ListWrapperType) GetTSType() string
func (*ListWrapperType) GetZeroValue ¶
func (t *ListWrapperType) GetZeroValue() string
type MapType ¶
type MapType struct {
// contains filtered or unexported fields
}
func (*MapType) GetCastToMethod ¶
func (t *MapType) GetCastToMethod() string
func (*MapType) GetDBType ¶
func (t *MapType) GetDBType() string
json fields are stored as strings in the db
func (*MapType) GetGraphQLType ¶
func (*MapType) GetTSGraphQLImports ¶
func (t *MapType) GetTSGraphQLImports() []FileImport
func (*MapType) GetZeroValue ¶
func (t *MapType) GetZeroValue() string
type NamedType ¶
type NamedType struct {
// contains filtered or unexported fields
}
func NewNamedType ¶
func (*NamedType) DefaultGraphQLFieldName ¶
func (t *NamedType) DefaultGraphQLFieldName() string
func (*NamedType) GetCastToMethod ¶
func (t *NamedType) GetCastToMethod() string
func (*NamedType) GetDBType ¶
func (t *NamedType) GetDBType() string
json fields are stored as strings in the db
func (*NamedType) GetGraphQLType ¶
func (t *NamedType) GetGraphQLType() string
func (*NamedType) GetNonNullableType ¶
func (*NamedType) GetNullableType ¶
func (*NamedType) GetTSGraphQLImports ¶
func (t *NamedType) GetTSGraphQLImports() []FileImport
func (*NamedType) GetZeroValue ¶
type NonNullableType ¶
type NonNullableType interface { TSGraphQLType GetNonNullableType() TSGraphQLType }
type NullableArrayListType ¶
type NullableArrayListType struct { ElemType TSType // contains filtered or unexported fields }
func (*NullableArrayListType) Convert ¶
func (t *NullableArrayListType) Convert() FileImport
func (*NullableArrayListType) GetCastToMethod ¶
func (t *NullableArrayListType) GetCastToMethod() string
func (*NullableArrayListType) GetDBType ¶
func (t *NullableArrayListType) GetDBType() string
func (*NullableArrayListType) GetGraphQLType ¶
func (t *NullableArrayListType) GetGraphQLType() string
func (*NullableArrayListType) GetNonNullableType ¶
func (t *NullableArrayListType) GetNonNullableType() TSGraphQLType
func (*NullableArrayListType) GetTSGraphQLImports ¶
func (t *NullableArrayListType) GetTSGraphQLImports() []FileImport
func (*NullableArrayListType) GetTSType ¶
func (t *NullableArrayListType) GetTSType() string
func (*NullableArrayListType) GetTsTypeImports ¶
func (t *NullableArrayListType) GetTsTypeImports() []string
func (*NullableArrayListType) GetZeroValue ¶
func (t *NullableArrayListType) GetZeroValue() string
type NullableBigIntegerType ¶
type NullableBigIntegerType struct {
NullableIntegerType
}
what's the best graphql representation? for now we'll use strings but there's a few graphql representations on the Internet
func (*NullableBigIntegerType) Convert ¶
func (t *NullableBigIntegerType) Convert() FileImport
func (*NullableBigIntegerType) GetCastToMethod ¶
func (t *NullableBigIntegerType) GetCastToMethod() string
func (*NullableBigIntegerType) GetDBType ¶
func (t *NullableBigIntegerType) GetDBType() string
func (*NullableBigIntegerType) GetGraphQLType ¶
func (t *NullableBigIntegerType) GetGraphQLType() string
func (*NullableBigIntegerType) GetImportType ¶
func (t *NullableBigIntegerType) GetImportType() Import
func (*NullableBigIntegerType) GetNonNullableType ¶
func (t *NullableBigIntegerType) GetNonNullableType() TSGraphQLType
func (*NullableBigIntegerType) GetTSGraphQLImports ¶
func (t *NullableBigIntegerType) GetTSGraphQLImports() []FileImport
func (*NullableBigIntegerType) GetTSType ¶
func (t *NullableBigIntegerType) GetTSType() string
func (*NullableBigIntegerType) GetZeroValue ¶
func (t *NullableBigIntegerType) GetZeroValue() string
type NullableBoolType ¶
type NullableBoolType struct {
// contains filtered or unexported fields
}
func (*NullableBoolType) Convert ¶
func (t *NullableBoolType) Convert() FileImport
func (*NullableBoolType) GetCastToMethod ¶
func (t *NullableBoolType) GetCastToMethod() string
func (*NullableBoolType) GetGraphQLType ¶
func (t *NullableBoolType) GetGraphQLType() string
func (*NullableBoolType) GetImportType ¶
func (t *NullableBoolType) GetImportType() Import
func (*NullableBoolType) GetNonNullableType ¶
func (t *NullableBoolType) GetNonNullableType() TSGraphQLType
func (*NullableBoolType) GetTSGraphQLImports ¶
func (t *NullableBoolType) GetTSGraphQLImports() []FileImport
func (*NullableBoolType) GetTSType ¶
func (t *NullableBoolType) GetTSType() string
func (*NullableBoolType) GetZeroValue ¶
func (t *NullableBoolType) GetZeroValue() string
type NullableDateType ¶
type NullableDateType struct {
NullableTimestampType
}
func (*NullableDateType) DefaultGraphQLFieldName ¶
func (t *NullableDateType) DefaultGraphQLFieldName() string
func (*NullableDateType) GetDBType ¶
func (t *NullableDateType) GetDBType() string
func (*NullableDateType) GetImportType ¶
func (t *NullableDateType) GetImportType() Import
func (*NullableDateType) GetNonNullableType ¶
func (t *NullableDateType) GetNonNullableType() TSGraphQLType
func (*NullableDateType) GetZeroValue ¶
func (t *NullableDateType) GetZeroValue() string
type NullableEmailType ¶
type NullableEmailType struct {
NullableStringType
}
func (*NullableEmailType) GetImportType ¶
func (t *NullableEmailType) GetImportType() Import
func (*NullableEmailType) GetNonNullableType ¶
func (t *NullableEmailType) GetNonNullableType() TSGraphQLType
func (*NullableEmailType) GetZeroValue ¶
func (t *NullableEmailType) GetZeroValue() string
hmm we don't use these for the nullable types right now. unclear if right thing...
type NullableEnumType ¶
type NullableEnumType struct { EnumDBType bool Type string GraphQLType string Values []string EnumMap map[string]string // contains filtered or unexported fields }
func (*NullableEnumType) GetCastToMethod ¶
func (t *NullableEnumType) GetCastToMethod() string
func (*NullableEnumType) GetDBType ¶
func (t *NullableEnumType) GetDBType() string
func (*NullableEnumType) GetEnumMap ¶ added in v0.0.29
func (t *NullableEnumType) GetEnumMap() map[string]string
func (*NullableEnumType) GetEnumValues ¶
func (t *NullableEnumType) GetEnumValues() []string
func (*NullableEnumType) GetGraphQLName ¶
func (t *NullableEnumType) GetGraphQLName() string
func (*NullableEnumType) GetGraphQLType ¶
func (t *NullableEnumType) GetGraphQLType() string
func (*NullableEnumType) GetNonNullableType ¶
func (t *NullableEnumType) GetNonNullableType() TSGraphQLType
func (*NullableEnumType) GetTSGraphQLImports ¶
func (t *NullableEnumType) GetTSGraphQLImports() []FileImport
func (*NullableEnumType) GetTSName ¶
func (t *NullableEnumType) GetTSName() string
func (*NullableEnumType) GetTSType ¶
func (t *NullableEnumType) GetTSType() string
func (*NullableEnumType) GetTsTypeImports ¶
func (t *NullableEnumType) GetTsTypeImports() []string
func (*NullableEnumType) GetZeroValue ¶
func (t *NullableEnumType) GetZeroValue() string
type NullableFloatType ¶
type NullableFloatType struct {
// contains filtered or unexported fields
}
func (*NullableFloatType) GetCastToMethod ¶
func (t *NullableFloatType) GetCastToMethod() string
func (*NullableFloatType) GetGraphQLType ¶
func (t *NullableFloatType) GetGraphQLType() string
func (*NullableFloatType) GetImportType ¶
func (t *NullableFloatType) GetImportType() Import
func (*NullableFloatType) GetNonNullableType ¶
func (t *NullableFloatType) GetNonNullableType() TSGraphQLType
func (*NullableFloatType) GetTSGraphQLImports ¶
func (t *NullableFloatType) GetTSGraphQLImports() []FileImport
func (*NullableFloatType) GetTSType ¶
func (t *NullableFloatType) GetTSType() string
func (*NullableFloatType) GetZeroValue ¶
func (t *NullableFloatType) GetZeroValue() string
type NullableIDType ¶
type NullableIDType struct {
// contains filtered or unexported fields
}
func (*NullableIDType) GetCastToMethod ¶
func (t *NullableIDType) GetCastToMethod() string
func (*NullableIDType) GetGraphQLType ¶
func (t *NullableIDType) GetGraphQLType() string
func (*NullableIDType) GetImportType ¶
func (t *NullableIDType) GetImportType() Import
func (*NullableIDType) GetNonNullableType ¶
func (t *NullableIDType) GetNonNullableType() TSGraphQLType
func (*NullableIDType) GetTSGraphQLImports ¶
func (t *NullableIDType) GetTSGraphQLImports() []FileImport
func (*NullableIDType) GetTSType ¶
func (t *NullableIDType) GetTSType() string
func (*NullableIDType) GetTsTypeImports ¶
func (t *NullableIDType) GetTsTypeImports() []string
func (*NullableIDType) GetZeroValue ¶
func (t *NullableIDType) GetZeroValue() string
type NullableIntegerType ¶
type NullableIntegerType struct {
// contains filtered or unexported fields
}
func (*NullableIntegerType) GetCastToMethod ¶
func (t *NullableIntegerType) GetCastToMethod() string
func (*NullableIntegerType) GetGraphQLType ¶
func (t *NullableIntegerType) GetGraphQLType() string
func (*NullableIntegerType) GetImportType ¶
func (t *NullableIntegerType) GetImportType() Import
func (*NullableIntegerType) GetNonNullableType ¶
func (t *NullableIntegerType) GetNonNullableType() TSGraphQLType
func (*NullableIntegerType) GetTSGraphQLImports ¶
func (t *NullableIntegerType) GetTSGraphQLImports() []FileImport
func (*NullableIntegerType) GetTSType ¶
func (t *NullableIntegerType) GetTSType() string
func (*NullableIntegerType) GetZeroValue ¶
func (t *NullableIntegerType) GetZeroValue() string
type NullableJSONBType ¶
type NullableJSONBType struct { ImportType *InputImportType // contains filtered or unexported fields }
func (*NullableJSONBType) Convert ¶
func (t *NullableJSONBType) Convert() FileImport
func (*NullableJSONBType) GetCastToMethod ¶
func (t *NullableJSONBType) GetCastToMethod() string
func (*NullableJSONBType) GetDBType ¶
func (t *NullableJSONBType) GetDBType() string
func (*NullableJSONBType) GetGraphQLType ¶
func (t *NullableJSONBType) GetGraphQLType() string
func (*NullableJSONBType) GetImportDepsType ¶
func (t *NullableJSONBType) GetImportDepsType() *InputImportType
func (*NullableJSONBType) GetImportType ¶
func (t *NullableJSONBType) GetImportType() Import
func (*NullableJSONBType) GetNonNullableType ¶
func (t *NullableJSONBType) GetNonNullableType() TSGraphQLType
func (*NullableJSONBType) GetTSGraphQLImports ¶
func (t *NullableJSONBType) GetTSGraphQLImports() []FileImport
func (*NullableJSONBType) GetTSType ¶
func (t *NullableJSONBType) GetTSType() string
func (*NullableJSONBType) GetTsTypeImports ¶
func (t *NullableJSONBType) GetTsTypeImports() []string
func (*NullableJSONBType) GetZeroValue ¶
func (t *NullableJSONBType) GetZeroValue() string
type NullableJSONType ¶
type NullableJSONType struct { ImportType *InputImportType // contains filtered or unexported fields }
func (*NullableJSONType) Convert ¶
func (t *NullableJSONType) Convert() FileImport
func (*NullableJSONType) GetCastToMethod ¶
func (t *NullableJSONType) GetCastToMethod() string
func (*NullableJSONType) GetDBType ¶
func (t *NullableJSONType) GetDBType() string
func (*NullableJSONType) GetGraphQLType ¶
func (t *NullableJSONType) GetGraphQLType() string
func (*NullableJSONType) GetImportDepsType ¶
func (t *NullableJSONType) GetImportDepsType() *InputImportType
func (*NullableJSONType) GetImportType ¶
func (t *NullableJSONType) GetImportType() Import
func (*NullableJSONType) GetNonNullableType ¶
func (t *NullableJSONType) GetNonNullableType() TSGraphQLType
func (*NullableJSONType) GetTSGraphQLImports ¶
func (t *NullableJSONType) GetTSGraphQLImports() []FileImport
func (*NullableJSONType) GetTSType ¶
func (t *NullableJSONType) GetTSType() string
func (*NullableJSONType) GetTsTypeImports ¶
func (t *NullableJSONType) GetTsTypeImports() []string
func (*NullableJSONType) GetZeroValue ¶
func (t *NullableJSONType) GetZeroValue() string
type NullableObjectType ¶
type NullableObjectType struct {
CommonObjectType
}
func (*NullableObjectType) GetGraphQLType ¶
func (t *NullableObjectType) GetGraphQLType() string
func (*NullableObjectType) GetNullableType ¶
func (t *NullableObjectType) GetNullableType() TSGraphQLType
func (*NullableObjectType) GetTSGraphQLImports ¶
func (t *NullableObjectType) GetTSGraphQLImports() []FileImport
func (*NullableObjectType) GetTSType ¶
func (t *NullableObjectType) GetTSType() string
type NullablePasswordType ¶
type NullablePasswordType struct {
NullableStringType
}
func (*NullablePasswordType) GetImportType ¶
func (t *NullablePasswordType) GetImportType() Import
func (*NullablePasswordType) GetNonNullableType ¶
func (t *NullablePasswordType) GetNonNullableType() TSGraphQLType
func (*NullablePasswordType) GetZeroValue ¶
func (t *NullablePasswordType) GetZeroValue() string
hmm we don't use these for the nullable types right now. unclear if right thing...
type NullablePhoneType ¶
type NullablePhoneType struct {
NullableStringType
}
func (*NullablePhoneType) GetImportType ¶
func (t *NullablePhoneType) GetImportType() Import
func (*NullablePhoneType) GetNonNullableType ¶
func (t *NullablePhoneType) GetNonNullableType() TSGraphQLType
func (*NullablePhoneType) GetZeroValue ¶
func (t *NullablePhoneType) GetZeroValue() string
hmm we don't use these for the nullable types right now. unclear if right thing...
type NullableStringType ¶
type NullableStringType struct {
// contains filtered or unexported fields
}
func (*NullableStringType) GetCastToMethod ¶
func (t *NullableStringType) GetCastToMethod() string
func (*NullableStringType) GetGraphQLType ¶
func (t *NullableStringType) GetGraphQLType() string
func (*NullableStringType) GetImportType ¶
func (t *NullableStringType) GetImportType() Import
func (*NullableStringType) GetNonNullableType ¶
func (t *NullableStringType) GetNonNullableType() TSGraphQLType
func (*NullableStringType) GetTSGraphQLImports ¶
func (t *NullableStringType) GetTSGraphQLImports() []FileImport
func (*NullableStringType) GetTSType ¶
func (t *NullableStringType) GetTSType() string
func (*NullableStringType) GetZeroValue ¶
func (t *NullableStringType) GetZeroValue() string
hmm we don't use these for the nullable types right now. unclear if right thing...
type NullableTimeType ¶
type NullableTimeType struct {
// contains filtered or unexported fields
}
func (*NullableTimeType) DefaultGraphQLFieldName ¶
func (t *NullableTimeType) DefaultGraphQLFieldName() string
func (*NullableTimeType) GetCastToMethod ¶
func (t *NullableTimeType) GetCastToMethod() string
func (*NullableTimeType) GetDBType ¶
func (t *NullableTimeType) GetDBType() string
func (*NullableTimeType) GetGraphQLType ¶
func (t *NullableTimeType) GetGraphQLType() string
func (*NullableTimeType) GetImportType ¶
func (t *NullableTimeType) GetImportType() Import
func (*NullableTimeType) GetNonNullableType ¶
func (t *NullableTimeType) GetNonNullableType() TSGraphQLType
func (*NullableTimeType) GetTSGraphQLImports ¶
func (t *NullableTimeType) GetTSGraphQLImports() []FileImport
func (*NullableTimeType) GetTSType ¶
func (t *NullableTimeType) GetTSType() string
func (*NullableTimeType) GetZeroValue ¶
func (t *NullableTimeType) GetZeroValue() string
type NullableTimestampType ¶
type NullableTimestampType struct {
// contains filtered or unexported fields
}
func (*NullableTimestampType) Convert ¶
func (t *NullableTimestampType) Convert() FileImport
func (*NullableTimestampType) DefaultGraphQLFieldName ¶
func (t *NullableTimestampType) DefaultGraphQLFieldName() string
func (*NullableTimestampType) GetCastToMethod ¶
func (t *NullableTimestampType) GetCastToMethod() string
func (*NullableTimestampType) GetGraphQLType ¶
func (t *NullableTimestampType) GetGraphQLType() string
func (*NullableTimestampType) GetImportType ¶
func (t *NullableTimestampType) GetImportType() Import
func (*NullableTimestampType) GetNonNullableType ¶
func (t *NullableTimestampType) GetNonNullableType() TSGraphQLType
func (*NullableTimestampType) GetTSGraphQLImports ¶
func (t *NullableTimestampType) GetTSGraphQLImports() []FileImport
func (*NullableTimestampType) GetTSType ¶
func (t *NullableTimestampType) GetTSType() string
func (*NullableTimestampType) GetZeroValue ¶
func (t *NullableTimestampType) GetZeroValue() string
type NullableTimestamptzType ¶
type NullableTimestamptzType struct {
NullableTimestampType
}
func (*NullableTimestamptzType) DefaultGraphQLFieldName ¶
func (t *NullableTimestamptzType) DefaultGraphQLFieldName() string
func (*NullableTimestamptzType) GetDBType ¶
func (t *NullableTimestamptzType) GetDBType() string
func (*NullableTimestamptzType) GetImportType ¶
func (t *NullableTimestamptzType) GetImportType() Import
func (*NullableTimestamptzType) GetNonNullableType ¶
func (t *NullableTimestamptzType) GetNonNullableType() TSGraphQLType
func (*NullableTimestamptzType) GetZeroValue ¶
func (t *NullableTimestamptzType) GetZeroValue() string
type NullableTimetzType ¶
type NullableTimetzType struct {
NullableTimeType
}
func (*NullableTimetzType) DefaultGraphQLFieldName ¶
func (t *NullableTimetzType) DefaultGraphQLFieldName() string
func (*NullableTimetzType) GetDBType ¶
func (t *NullableTimetzType) GetDBType() string
func (*NullableTimetzType) GetImportType ¶
func (t *NullableTimetzType) GetImportType() Import
func (*NullableTimetzType) GetNonNullableType ¶
func (t *NullableTimetzType) GetNonNullableType() TSGraphQLType
func (*NullableTimetzType) GetZeroValue ¶
func (t *NullableTimetzType) GetZeroValue() string
type NullableType ¶
type NullableType interface { TSGraphQLType GetNullableType() TSGraphQLType }
NullableType refers to a Type that has the nullable version of the same type
type ObjectType ¶
type ObjectType struct {
CommonObjectType
}
func (*ObjectType) GetGraphQLType ¶
func (t *ObjectType) GetGraphQLType() string
func (*ObjectType) GetNullableType ¶
func (t *ObjectType) GetNullableType() TSGraphQLType
func (*ObjectType) GetTSGraphQLImports ¶
func (t *ObjectType) GetTSGraphQLImports() []FileImport
func (*ObjectType) GetTSType ¶
func (t *ObjectType) GetTSType() string
type PasswordImport ¶
type PasswordImport struct {
// contains filtered or unexported fields
}
func (*PasswordImport) Aliases ¶
func (imp *PasswordImport) Aliases() []string
func (*PasswordImport) DefaultImport ¶
func (b *PasswordImport) DefaultImport() bool
func (*PasswordImport) Import ¶
func (imp *PasswordImport) Import() string
func (*PasswordImport) ImportPath ¶
func (imp *PasswordImport) ImportPath() string
type PasswordType ¶
type PasswordType struct {
StringType
}
func (*PasswordType) GetImportType ¶
func (t *PasswordType) GetImportType() Import
func (*PasswordType) GetNullableType ¶
func (t *PasswordType) GetNullableType() TSGraphQLType
func (*PasswordType) GetZeroValue ¶
func (t *PasswordType) GetZeroValue() string
hmm we don't use these for the nullable types right now. unclear if right thing...
type PhoneImport ¶
type PhoneImport struct {
// contains filtered or unexported fields
}
func (*PhoneImport) Aliases ¶
func (imp *PhoneImport) Aliases() []string
func (*PhoneImport) DefaultImport ¶
func (b *PhoneImport) DefaultImport() bool
func (*PhoneImport) Import ¶
func (imp *PhoneImport) Import() string
func (*PhoneImport) ImportPath ¶
func (imp *PhoneImport) ImportPath() string
type PhoneType ¶
type PhoneType struct {
StringType
}
func (*PhoneType) GetImportType ¶
func (*PhoneType) GetNullableType ¶
func (t *PhoneType) GetNullableType() TSGraphQLType
func (*PhoneType) GetZeroValue ¶
func (t *PhoneType) GetZeroValue() string
hmm we don't use these for the nullable types right now. unclear if right thing...
type PointerType ¶
type PointerType struct {
// contains filtered or unexported fields
}
func NewPointerType ¶
func NewPointerType(typ types.Type, forceNullable, forceNonNullable bool) *PointerType
func (*PointerType) DefaultGraphQLFieldName ¶
func (t *PointerType) DefaultGraphQLFieldName() string
func (*PointerType) GetCastToMethod ¶
func (t *PointerType) GetCastToMethod() string
func (*PointerType) GetDBType ¶
func (t *PointerType) GetDBType() string
json fields are stored as strings in the db
func (*PointerType) GetGraphQLType ¶
func (t *PointerType) GetGraphQLType() string
func (*PointerType) GetNonNullableType ¶
func (t *PointerType) GetNonNullableType() TSGraphQLType
func (*PointerType) GetNullableType ¶
func (t *PointerType) GetNullableType() Type
func (*PointerType) GetTSGraphQLImports ¶
func (t *PointerType) GetTSGraphQLImports() []FileImport
func (*PointerType) GetTSType ¶
func (t *PointerType) GetTSType() string
func (*PointerType) GetZeroValue ¶
func (t *PointerType) GetZeroValue() string
type RawJSONType ¶
type RawJSONType struct {
// contains filtered or unexported fields
}
func (*RawJSONType) GetCastToMethod ¶
func (t *RawJSONType) GetCastToMethod() string
func (*RawJSONType) GetDBType ¶
func (t *RawJSONType) GetDBType() string
json fields are stored as strings in the db
func (*RawJSONType) GetGraphQLType ¶
func (t *RawJSONType) GetGraphQLType() string
func (*RawJSONType) GetTSGraphQLImports ¶
func (t *RawJSONType) GetTSGraphQLImports() []FileImport
func (*RawJSONType) GetTSType ¶
func (t *RawJSONType) GetTSType() string
func (*RawJSONType) GetZeroValue ¶
func (t *RawJSONType) GetZeroValue() string
type SliceType ¶
type SliceType struct {
// contains filtered or unexported fields
}
func NewSliceType ¶
func (*SliceType) DefaultGraphQLFieldName ¶
func (*SliceType) GetCastToMethod ¶
func (t *SliceType) GetCastToMethod() string
func (*SliceType) GetDBType ¶
func (t *SliceType) GetDBType() string
json fields are stored as strings in the db
func (*SliceType) GetElemGraphQLType ¶
func (*SliceType) GetGraphQLType ¶
func (*SliceType) GetTSGraphQLImports ¶
func (t *SliceType) GetTSGraphQLImports() []FileImport
func (*SliceType) GetZeroValue ¶
func (t *SliceType) GetZeroValue() string
type StringImport ¶
type StringImport struct {
// contains filtered or unexported fields
}
func (*StringImport) Aliases ¶
func (imp *StringImport) Aliases() []string
func (*StringImport) DefaultImport ¶
func (b *StringImport) DefaultImport() bool
func (*StringImport) Import ¶
func (imp *StringImport) Import() string
func (*StringImport) ImportPath ¶
func (b *StringImport) ImportPath() string
type StringType ¶
type StringType struct {
// contains filtered or unexported fields
}
func (*StringType) GetCastToMethod ¶
func (t *StringType) GetCastToMethod() string
func (*StringType) GetGraphQLType ¶
func (t *StringType) GetGraphQLType() string
func (*StringType) GetImportType ¶
func (t *StringType) GetImportType() Import
func (*StringType) GetNullableType ¶
func (t *StringType) GetNullableType() TSGraphQLType
func (*StringType) GetTSGraphQLImports ¶
func (t *StringType) GetTSGraphQLImports() []FileImport
func (*StringType) GetTSType ¶
func (t *StringType) GetTSType() string
func (*StringType) GetZeroValue ¶
func (t *StringType) GetZeroValue() string
hmm we don't use these for the nullable types right now. unclear if right thing...
type TSCodegenableType ¶
type TSCodegenableType interface { TSGraphQLType GetImportType() Import }
type TSGraphQLType ¶
type TSGraphQLType interface { TSType // returns imports from outside in // e.g. required string => []fileImport{newGQLFileImport("GraphQLNonNull"), newGQLFileImport("GraphQLString")} GetTSGraphQLImports() []FileImport }
type TSType ¶
types that also support Typescript TODO need to eventually add this for all things but starting with primitives for now
type TSTypeWithActionFields ¶
type TSTypeWithActionFields interface { TSGraphQLType GetActionName() string }
type TSTypeWithImports ¶
type TimeImport ¶
type TimeImport struct {
// contains filtered or unexported fields
}
func (*TimeImport) Aliases ¶
func (imp *TimeImport) Aliases() []string
func (*TimeImport) DefaultImport ¶
func (b *TimeImport) DefaultImport() bool
func (*TimeImport) Import ¶
func (imp *TimeImport) Import() string
func (*TimeImport) ImportPath ¶
func (b *TimeImport) ImportPath() string
type TimeType ¶
type TimeType struct {
// contains filtered or unexported fields
}
func (*TimeType) DefaultGraphQLFieldName ¶
func (t *TimeType) DefaultGraphQLFieldName() string
func (*TimeType) GetCastToMethod ¶
func (t *TimeType) GetCastToMethod() string
func (*TimeType) GetGraphQLType ¶
func (*TimeType) GetImportType ¶
func (*TimeType) GetNullableType ¶
func (t *TimeType) GetNullableType() TSGraphQLType
func (*TimeType) GetTSGraphQLImports ¶
func (t *TimeType) GetTSGraphQLImports() []FileImport
func (*TimeType) GetZeroValue ¶
func (t *TimeType) GetZeroValue() string
type TimestampImport ¶
type TimestampImport struct {
// contains filtered or unexported fields
}
func (*TimestampImport) Aliases ¶
func (imp *TimestampImport) Aliases() []string
func (*TimestampImport) DefaultImport ¶
func (b *TimestampImport) DefaultImport() bool
func (*TimestampImport) Import ¶
func (imp *TimestampImport) Import() string
func (*TimestampImport) ImportPath ¶
func (b *TimestampImport) ImportPath() string
type TimestampType ¶
type TimestampType struct {
// contains filtered or unexported fields
}
func (*TimestampType) Convert ¶
func (t *TimestampType) Convert() FileImport
func (*TimestampType) GetGraphQLType ¶
func (t *TimestampType) GetGraphQLType() string
use the built in graphql type
func (*TimestampType) GetImportType ¶
func (t *TimestampType) GetImportType() Import
func (*TimestampType) GetNullableType ¶
func (t *TimestampType) GetNullableType() TSGraphQLType
func (*TimestampType) GetTSGraphQLImports ¶
func (t *TimestampType) GetTSGraphQLImports() []FileImport
func (*TimestampType) GetTSType ¶
func (t *TimestampType) GetTSType() string
type TimestamptzImport ¶
type TimestamptzImport struct {
// contains filtered or unexported fields
}
func (*TimestamptzImport) Aliases ¶
func (imp *TimestamptzImport) Aliases() []string
func (*TimestamptzImport) DefaultImport ¶
func (b *TimestamptzImport) DefaultImport() bool
func (*TimestamptzImport) Import ¶
func (imp *TimestamptzImport) Import() string
func (*TimestamptzImport) ImportPath ¶
func (b *TimestamptzImport) ImportPath() string
type TimestamptzType ¶
type TimestamptzType struct {
TimestampType
}
func (*TimestamptzType) Convert ¶
func (t *TimestamptzType) Convert() FileImport
func (*TimestamptzType) GetDBType ¶
func (t *TimestamptzType) GetDBType() string
func (*TimestamptzType) GetImportType ¶
func (t *TimestamptzType) GetImportType() Import
func (*TimestamptzType) GetNullableType ¶
func (t *TimestamptzType) GetNullableType() TSGraphQLType
type TimetzImport ¶
type TimetzImport struct {
// contains filtered or unexported fields
}
func (*TimetzImport) Aliases ¶
func (imp *TimetzImport) Aliases() []string
func (*TimetzImport) DefaultImport ¶
func (b *TimetzImport) DefaultImport() bool
func (*TimetzImport) Import ¶
func (imp *TimetzImport) Import() string
func (*TimetzImport) ImportPath ¶
func (b *TimetzImport) ImportPath() string
type TimetzType ¶
type TimetzType struct {
TimeType
}
func (*TimetzType) DefaultGraphQLFieldName ¶
func (t *TimetzType) DefaultGraphQLFieldName() string
func (*TimetzType) GetCastToMethod ¶
func (t *TimetzType) GetCastToMethod() string
func (*TimetzType) GetDBType ¶
func (t *TimetzType) GetDBType() string
func (*TimetzType) GetImportType ¶
func (t *TimetzType) GetImportType() Import
func (*TimetzType) GetNullableType ¶
func (t *TimetzType) GetNullableType() TSGraphQLType
func (*TimetzType) GetZeroValue ¶
func (t *TimetzType) GetZeroValue() string
type Type ¶
type Type interface {
GetGraphQLType() string
}
Type represents a Type that's expressed in the framework The only initial requirement is GraphQL since that's exposed everywhere
func GetNullableType ¶
GetNullableType takes a type where the nullable-ness is not encoded in the type but alas somewhere else so we need to get the nullable type from a different place
type UUIDImport ¶
type UUIDImport struct {
// contains filtered or unexported fields
}
func (*UUIDImport) Aliases ¶
func (imp *UUIDImport) Aliases() []string
func (*UUIDImport) DefaultImport ¶
func (b *UUIDImport) DefaultImport() bool
func (*UUIDImport) Import ¶
func (imp *UUIDImport) Import() string
func (*UUIDImport) ImportPath ¶
func (b *UUIDImport) ImportPath() string