codegen

package
v1.51.57 Latest Latest
Warning

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

Go to latest
Published: Sep 1, 2023 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var GolangPrimitiveTypes = map[string]string{
	"string":            "",
	"int":               "",
	"int64":             "",
	"uint16":            "",
	"uint":              "",
	"bool":              "",
	"interface{}":       "",
	"ISODateTimeString": "",
	"time.Time":         "",
}

Functions

func DebugJSON

func DebugJSON(v interface{}) string

func LowercaseFirstLetter added in v1.27.5

func LowercaseFirstLetter(original string) string

func ParseGenericDeclaration added in v1.27.5

func ParseGenericDeclaration(infoToFill *TdPackage, genDeclaration *ast.GenDecl, fileName string) error

func ParseTdprotoFile added in v1.27.5

func ParseTdprotoFile(infoToFill *TdPackage, fileName string, fileAst *ast.File) error

func SnakeCaseToLowerCamel added in v1.27.5

func SnakeCaseToLowerCamel(original string) string

func ToSnakeCase added in v1.27.5

func ToSnakeCase(original string) string

func UppercaseFirstLetter added in v1.27.5

func UppercaseFirstLetter(original string) string

Types

type TdConstFields added in v1.27.5

type TdConstFields struct {
	Name  string
	Type  string
	Value string
	Help  string
}

type TdEnum added in v1.27.5

type TdEnum struct {
	Name   string
	Values []string
}

type TdMapType added in v1.30.1

type TdMapType struct {
	Name         string
	Help         string
	KeyTypeStr   string
	ValueTypeStr string
	Filename     string
}

type TdPackage added in v1.38.0

type TdPackage struct {
	TdStructs  map[string]TdStruct
	TdTypes    map[string]TdType
	TdEvents   map[string]string
	TdMapTypes map[string]TdMapType
	TdConsts   []TdConstFields
	TdQueries  map[string]TdQuery
}

func (TdPackage) GetEnums added in v1.38.0

func (i TdPackage) GetEnums() []TdEnum

type TdProto added in v1.38.0

type TdProto struct {
	TdForms  *TdPackage
	TdModels *TdPackage
}

func ParseTdproto added in v1.27.5

func ParseTdproto() (infoToFill *TdProto, err error)

type TdQuery added in v1.34.2

type TdQuery struct {
	Name               string
	Help               string
	ParamsNamesAndHelp map[string]string
}

type TdStruct added in v1.27.5

type TdStruct struct {
	Name             string
	Help             string
	Fields           []TdStructField
	ReadOnly         bool
	AnonnymousFields []string
	FileName         string
}

func (TdStruct) GetAllJsonFields added in v1.32.0

func (tds TdStruct) GetAllJsonFields(tdInfo *TdPackage) []TdStructField

func (TdStruct) GetStructAnonymousStructs added in v1.27.5

func (tds TdStruct) GetStructAnonymousStructs(tdInfo *TdPackage) []TdStruct

func (TdStruct) IsEventParams added in v1.33.6

func (tds TdStruct) IsEventParams(tdInfo *TdPackage) bool

type TdStructField added in v1.27.5

type TdStructField struct {
	Name            string
	Help            string
	JsonName        string
	SchemaName      string
	TypeStr         string
	KeyTypeStr      string
	IsPrimitive     bool
	IsReadOnly      bool
	IsPointer       bool
	IsList          bool
	IsOmitEmpty     bool
	IsNotSerialized bool
}

type TdType added in v1.27.5

type TdType struct {
	Name     string
	Help     string
	IsArray  bool
	BaseType string
	Filename string
}

Directories

Path Synopsis
sphinx

Jump to

Keyboard shortcuts

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