codegen

package
v1.30.2 Latest Latest
Warning

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

Go to latest
Published: May 26, 2021 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 *TdInfo, genDeclaration *ast.GenDecl, fileName string) error

func ParseTdprotoFile added in v1.27.5

func ParseTdprotoFile(infoToFill *TdInfo, 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 TdInfo added in v1.27.5

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

func ParseTdproto added in v1.27.5

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

func (TdInfo) GetEnums added in v1.27.5

func (i TdInfo) GetEnums() []TdEnum

type TdMapType added in v1.30.1

type TdMapType struct {
	Name         string
	Help         string
	KeyTypeStr   string
	ValueTypeStr 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) GetStructAnonymousStructs added in v1.27.5

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

type TdStructField added in v1.27.5

type TdStructField struct {
	Name            string
	Help            string
	JsonName        string
	TypeStr         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
}

Directories

Path Synopsis
sphinx

Jump to

Keyboard shortcuts

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