Documentation
¶
Index ¶
- Constants
- func GetPHPCompatibleType(goType string, isPointer bool) string
- func GetSwiftCompatibleType(goType string, isPointer bool) string
- func GetTypescriptCompatibleType(goType string, isPointer bool) string
- func IsEmbeddedStructForInheritance(field *godmt.ScannedStructField) bool
- func MapValuesToPHPArray(rawMap map[string]string) string
- func MapValuesToTypeScriptRecord(rawMap map[string]string) string
- func TransformSliceTypeToPHP(rawSliceType string, isPointer bool) string
- func TransformSliceTypeToSwift(rawSliceType string, isPointer bool) string
- func TransformSliceTypeToTypeScript(rawSliceType string, isPointer bool) string
- func TransformSwiftRecord(goMapType string, isPointer bool) string
- func TransformTypeScriptRecord(goMapType string, isPointer bool) string
- type JSONTranslator
- type PHPTranslator
- type ScannedRecordItem
- type SwiftTranslator
- type Translator
- type TypeScriptTranslator
- type TypeTranslator
Constants ¶
View Source
const ( TypeScriptTranslationMode = "typescript" TSTranslationMode = "ts" SwiftTranslationMode = "swift" JSONTranslationMode = "json" PHPTranslationMode = "php" )
View Source
const (
StructTypeKeyWord = "struct"
)
Variables ¶
This section is empty.
Functions ¶
func GetPHPCompatibleType ¶ added in v1.1.0
func GetSwiftCompatibleType ¶
func IsEmbeddedStructForInheritance ¶
func IsEmbeddedStructForInheritance(field *godmt.ScannedStructField) bool
func MapValuesToPHPArray ¶ added in v1.1.0
func TransformSliceTypeToPHP ¶ added in v1.1.0
func TransformSwiftRecord ¶ added in v1.2.0
func TransformTypeScriptRecord ¶ added in v1.2.0
Types ¶
type JSONTranslator ¶
type JSONTranslator struct {
Translator
}
func (*JSONTranslator) Translate ¶
func (t *JSONTranslator) Translate() string
type PHPTranslator ¶ added in v1.1.0
type PHPTranslator struct {
Translator
}
func (*PHPTranslator) Translate ¶ added in v1.1.0
func (t *PHPTranslator) Translate() string
type ScannedRecordItem ¶ added in v1.2.0
type SwiftTranslator ¶
type SwiftTranslator struct {
Translator
}
func (*SwiftTranslator) Translate ¶
func (t *SwiftTranslator) Translate() string
type Translator ¶
type Translator struct {
Preserve bool
Data syntaxtree.FileResult
}
type TypeScriptTranslator ¶
type TypeScriptTranslator struct {
Translator
}
func (*TypeScriptTranslator) Translate ¶
func (t *TypeScriptTranslator) Translate() string
type TypeTranslator ¶
type TypeTranslator interface {
Translate() string
Setup(d []godmt.ScannedType)
}
Click to show internal directories.
Click to hide internal directories.