Documentation
¶
Index ¶
- func CompareInterfacesMapEqual(m1, m2 map[string]*CustomInterface) bool
- func CustomInterfaceEqual(ci1, ci2 *CustomInterface) bool
- func CustomUnionEqual(cu1, cu2 *CustomUnion) bool
- type ConvertMethodInfo
- type CustomInterface
- func (ci *CustomInterface) AddEnum(tsEnum *enum.Enum, gqlEnum *enum.GQLEnum)
- func (ci *CustomInterface) Equal(ct CustomType) bool
- func (ci *CustomInterface) ForeignImport(typ string) bool
- func (ci *CustomInterface) GetAllCustomTypes() []CustomType
- func (ci *CustomInterface) GetAllEnums() []*enum.Enum
- func (ci *CustomInterface) GetConvertListMethod() string
- func (ci *CustomInterface) GetConvertMethod() string
- func (ci *CustomInterface) GetConvertNullableListMethod() string
- func (ci *CustomInterface) GetConvertNullableMethod() string
- func (ci *CustomInterface) GetGraphQLEnums() []*enum.GQLEnum
- func (ci *CustomInterface) GetGraphQLName() string
- func (ci *CustomInterface) GetGraphQLType() string
- func (ci *CustomInterface) GetTSEnums() []*enum.Enum
- func (ci *CustomInterface) GetTSType() string
- func (ci *CustomInterface) GetTSTypes() []string
- func (ci *CustomInterface) HasConvertFunction(cfg codegenapi.Config) bool
- func (ci *CustomInterface) IsCustomInterface() bool
- func (ci *CustomInterface) IsCustomUnion() bool
- type CustomType
- type CustomUnion
- func (cu *CustomUnion) Equal(ct CustomType) bool
- func (cu *CustomUnion) GetAllCustomTypes() []CustomType
- func (ci *CustomUnion) GetAllEnums() []*enum.Enum
- func (cu *CustomUnion) GetConvertMethod() string
- func (cu *CustomUnion) GetConvertMethodInfo(cfg codegenapi.Config) (*ConvertMethodInfo, error)
- func (cu *CustomUnion) GetConvertNullableMethod() string
- func (cu *CustomUnion) GetGraphQLName() string
- func (cu *CustomUnion) GetGraphQLType() string
- func (cu *CustomUnion) GetTSType() string
- func (cu *CustomUnion) GetTSTypes() []string
- func (cu *CustomUnion) GetTypeDeclaration() (string, error)
- func (cu *CustomUnion) HasConvertFunction(cfg codegenapi.Config) bool
- func (cu *CustomUnion) IsCustomInterface() bool
- func (cu *CustomUnion) IsCustomUnion() bool
- type NarrowingInfo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CompareInterfacesMapEqual ¶
func CompareInterfacesMapEqual(m1, m2 map[string]*CustomInterface) bool
func CustomInterfaceEqual ¶
func CustomInterfaceEqual(ci1, ci2 *CustomInterface) bool
func CustomUnionEqual ¶
func CustomUnionEqual(cu1, cu2 *CustomUnion) bool
Types ¶
type ConvertMethodInfo ¶
type ConvertMethodInfo struct {
Method string
NullableMethod string
Infos []NarrowingInfo
Default string
}
type CustomInterface ¶
type CustomInterface struct {
TSType string
GQLName string
Fields []*field.Field
NonEntFields []*field.NonEntField
// if present, means that this interface should be imported in GraphQL instead...
// interface{} to avoid circular dependencies
Action interface{}
// if part of input, we store GraphQLFieldName here and use it later on.
GraphQLFieldName string
// children of this interface. could be other interfaces or unions
Children []CustomType
// right now they're all exported??
Exported bool
GenerateListConvert bool
// contains filtered or unexported fields
}
func (*CustomInterface) AddEnum ¶
func (ci *CustomInterface) AddEnum(tsEnum *enum.Enum, gqlEnum *enum.GQLEnum)
func (*CustomInterface) Equal ¶
func (ci *CustomInterface) Equal(ct CustomType) bool
func (*CustomInterface) ForeignImport ¶
func (ci *CustomInterface) ForeignImport(typ string) bool
func (*CustomInterface) GetAllCustomTypes ¶
func (ci *CustomInterface) GetAllCustomTypes() []CustomType
func (*CustomInterface) GetAllEnums ¶
func (ci *CustomInterface) GetAllEnums() []*enum.Enum
func (*CustomInterface) GetConvertListMethod ¶
func (ci *CustomInterface) GetConvertListMethod() string
func (*CustomInterface) GetConvertMethod ¶
func (ci *CustomInterface) GetConvertMethod() string
note the logic for these 4 duplicated in Field.GetConvertMethod() in field_type.go
func (*CustomInterface) GetConvertNullableListMethod ¶
func (ci *CustomInterface) GetConvertNullableListMethod() string
func (*CustomInterface) GetConvertNullableMethod ¶
func (ci *CustomInterface) GetConvertNullableMethod() string
func (*CustomInterface) GetGraphQLEnums ¶
func (ci *CustomInterface) GetGraphQLEnums() []*enum.GQLEnum
func (*CustomInterface) GetGraphQLName ¶
func (ci *CustomInterface) GetGraphQLName() string
func (*CustomInterface) GetGraphQLType ¶
func (ci *CustomInterface) GetGraphQLType() string
func (*CustomInterface) GetTSEnums ¶
func (ci *CustomInterface) GetTSEnums() []*enum.Enum
local enums
func (*CustomInterface) GetTSType ¶
func (ci *CustomInterface) GetTSType() string
func (*CustomInterface) GetTSTypes ¶
func (ci *CustomInterface) GetTSTypes() []string
func (*CustomInterface) HasConvertFunction ¶
func (ci *CustomInterface) HasConvertFunction(cfg codegenapi.Config) bool
func (*CustomInterface) IsCustomInterface ¶
func (ci *CustomInterface) IsCustomInterface() bool
func (*CustomInterface) IsCustomUnion ¶
func (ci *CustomInterface) IsCustomUnion() bool
type CustomType ¶
type CustomType interface {
field.CustomTypeWithHasConvertFunction
GetTSType() string
GetGraphQLName() string
GetGraphQLType() string
IsCustomInterface() bool
IsCustomUnion() bool
GetTSTypes() []string
GetAllEnums() []*enum.Enum
// put self last because you can reference
// want to render in order so that dependencies are rendered first
GetAllCustomTypes() []CustomType
Equal(ct CustomType) bool
}
type CustomUnion ¶
type CustomUnion struct {
TSType string
GQLName string
Interfaces []*CustomInterface
}
func (*CustomUnion) Equal ¶
func (cu *CustomUnion) Equal(ct CustomType) bool
func (*CustomUnion) GetAllCustomTypes ¶
func (cu *CustomUnion) GetAllCustomTypes() []CustomType
func (*CustomUnion) GetAllEnums ¶
func (ci *CustomUnion) GetAllEnums() []*enum.Enum
func (*CustomUnion) GetConvertMethod ¶
func (cu *CustomUnion) GetConvertMethod() string
func (*CustomUnion) GetConvertMethodInfo ¶
func (cu *CustomUnion) GetConvertMethodInfo(cfg codegenapi.Config) (*ConvertMethodInfo, error)
need all but one to be set
func (*CustomUnion) GetConvertNullableMethod ¶
func (cu *CustomUnion) GetConvertNullableMethod() string
func (*CustomUnion) GetGraphQLName ¶
func (cu *CustomUnion) GetGraphQLName() string
func (*CustomUnion) GetGraphQLType ¶
func (cu *CustomUnion) GetGraphQLType() string
func (*CustomUnion) GetTSType ¶
func (cu *CustomUnion) GetTSType() string
func (*CustomUnion) GetTSTypes ¶
func (cu *CustomUnion) GetTSTypes() []string
func (*CustomUnion) GetTypeDeclaration ¶
func (cu *CustomUnion) GetTypeDeclaration() (string, error)
func (*CustomUnion) HasConvertFunction ¶
func (cu *CustomUnion) HasConvertFunction(cfg codegenapi.Config) bool
func (*CustomUnion) IsCustomInterface ¶
func (cu *CustomUnion) IsCustomInterface() bool
func (*CustomUnion) IsCustomUnion ¶
func (cu *CustomUnion) IsCustomUnion() bool
type NarrowingInfo ¶
Click to show internal directories.
Click to hide internal directories.