Documentation ¶
Index ¶
- func ColumnMapToNames(columns map[string]string) []string
- func GenerateTypescriptDTO(name string, columns map[string]string) (string, error)
- func GenerateTypescriptModel(name string, columns map[string]string) (string, error)
- func GenerateTypescriptModels(config *lib.Config, routes *lib.RoutesJSONContainer) error
- func GenerateTypesriptDTOs(config *lib.Config, routes *lib.RoutesJSONContainer) error
- func ImportString(sb io.Writer, parts []string)
- func ImportStrings(sb io.Writer, columns map[string]string)
- func InheritStrings(sb io.Writer, columns map[string]string) []string
- func TSFileHeader(sb io.Writer, name string)
- type TypescriptGenerator
- func (tg *TypescriptGenerator) ExtractColumns(goType string) map[string]string
- func (tg *TypescriptGenerator) GenerateTypescriptAggregate(name string) (string, error)
- func (tg *TypescriptGenerator) GenerateTypescriptDefaults(sb io.Writer, objectName string)
- func (tg *TypescriptGenerator) GenerateTypescriptFields(sb io.Writer, objectName string)
- func (tg *TypescriptGenerator) GenerateTypesriptAggregates() error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ColumnMapToNames ¶ added in v1.8.74
func GenerateTypescriptDTO ¶ added in v1.8.48
GenerateTypescriptType returns a string for a type in typescript TODO need a map of all types so that import paths can be used for struct and array types TODO test for struct types (apart from array types)
func GenerateTypescriptModel ¶ added in v1.8.48
GenerateTypescriptType returns a string for a type in typescript
func GenerateTypescriptModels ¶ added in v1.8.48
func GenerateTypescriptModels(config *lib.Config, routes *lib.RoutesJSONContainer) error
GenerateTypescriptModels returns a string for a typscript types file
func GenerateTypesriptDTOs ¶ added in v1.8.48
func GenerateTypesriptDTOs(config *lib.Config, routes *lib.RoutesJSONContainer) error
func ImportString ¶ added in v1.8.74
func InheritStrings ¶ added in v1.8.74
func TSFileHeader ¶ added in v1.8.74
Types ¶
type TypescriptGenerator ¶ added in v1.8.74
type TypescriptGenerator struct {
// contains filtered or unexported fields
}
func NewTypescriptGenerator ¶ added in v1.8.74
func NewTypescriptGenerator(config *lib.Config, routes *lib.RoutesJSONContainer) *TypescriptGenerator
func (*TypescriptGenerator) ExtractColumns ¶ added in v1.8.74
func (tg *TypescriptGenerator) ExtractColumns(goType string) map[string]string
func (*TypescriptGenerator) GenerateTypescriptAggregate ¶ added in v1.8.74
func (tg *TypescriptGenerator) GenerateTypescriptAggregate(name string) (string, error)
GenerateTypescriptAggregate returns a string for a type in typescript
func (*TypescriptGenerator) GenerateTypescriptDefaults ¶ added in v1.8.74
func (tg *TypescriptGenerator) GenerateTypescriptDefaults(sb io.Writer, objectName string)
func (*TypescriptGenerator) GenerateTypescriptFields ¶ added in v1.8.74
func (tg *TypescriptGenerator) GenerateTypescriptFields(sb io.Writer, objectName string)
func (*TypescriptGenerator) GenerateTypesriptAggregates ¶ added in v1.8.74
func (tg *TypescriptGenerator) GenerateTypesriptAggregates() error
Click to show internal directories.
Click to hide internal directories.