typescript

package
v1.8.81 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 23, 2022 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ColumnMapToNames added in v1.8.74

func ColumnMapToNames(columns map[string]string) []string

func GenerateTypescriptDTO added in v1.8.48

func GenerateTypescriptDTO(name string, columns map[string]string) (string, error)

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

func GenerateTypescriptModel(name string, columns map[string]string) (string, error)

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 ImportString(sb io.Writer, parts []string)

func ImportStrings added in v1.8.74

func ImportStrings(sb io.Writer, columns map[string]string)

func InheritStrings added in v1.8.74

func InheritStrings(sb io.Writer, columns map[string]string) []string

func TSFileHeader added in v1.8.74

func TSFileHeader(sb io.Writer, name string)

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL