lang

package
v1.15.21 Latest Latest
Warning

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

Go to latest
Published: Mar 18, 2024 License: GPL-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CommonValues

func CommonValues(typeId int) string

func FmtPackage

func FmtPackage(lang string, pkg string) string

func GoTypes

func GoTypes(typeId int) string

func GoValues

func GoValues(typeId int) string

func KotlinTypes

func KotlinTypes(typeId int) string

func KotlinValues

func KotlinValues(typeId int) string

func PkgStyleLikeGo

func PkgStyleLikeGo(pkg string) string

PkgStyleLikeGo "go", "rust", "php", "python"

func PkgStyleLikeJava

func PkgStyleLikeJava(pkg string) string

PkgStyleLikeJava case "java", "kotlin", "csharp", "py", "thrift", "protobuf":

func ProtobufTypes

func ProtobufTypes(typeId int) string

func PyTypes

func PyTypes(typeId int) string

func PythonValues

func PythonValues(typeId int) string

func ThriftTypes

func ThriftTypes(typeId int) string

func TsTypes

func TsTypes(typeId int) string

Types

type CommonLang

type CommonLang struct {
}

func (CommonLang) DefaultValue

func (c CommonLang) DefaultValue(typeId int) string

func (CommonLang) ParseType

func (c CommonLang) ParseType(typeId int) string

func (CommonLang) PkgName

func (c CommonLang) PkgName(pkg string) string

func (CommonLang) PkgPath

func (c CommonLang) PkgPath(pkg string) string

func (CommonLang) SqlMapType

func (c CommonLang) SqlMapType(typeId int, _ int) string

type Java

type Java struct {
}

func (Java) DefaultValue

func (j Java) DefaultValue(typeId int) string

func (Java) ParsePkType

func (j Java) ParsePkType(typeId int) string

func (Java) ParseType

func (j Java) ParseType(typeId int) string

func (Java) PkgName

func (j Java) PkgName(pkg string) string

func (Java) PkgPath

func (j Java) PkgPath(pkg string) string

func (Java) SqlMapType

func (j Java) SqlMapType(typeId int, len int) string

type Lang

type Lang interface {
	// ParseType parse to lang type
	ParseType(typeId int) string
	// SqlMapType the type of orm mapping
	SqlMapType(typeId int, len int) string
	// DefaultValue get default value of lang
	DefaultValue(typeId int) string
	// PkgPath parse package path
	PkgPath(pkg string) string
	// PkgName get package name
	PkgName(pkg string) string
}

func Get

func Get(n string) Lang

type Protobuf

type Protobuf struct {
}

func (Protobuf) DefaultValue

func (p Protobuf) DefaultValue(typeId int) string

func (Protobuf) ParseType

func (p Protobuf) ParseType(typeId int) string

func (Protobuf) PkgName

func (p Protobuf) PkgName(pkg string) string

func (Protobuf) PkgPath

func (p Protobuf) PkgPath(pkg string) string

func (Protobuf) SqlMapType

func (p Protobuf) SqlMapType(typeId int, len int) string

type Python

type Python struct {
}

func (Python) DefaultValue

func (p Python) DefaultValue(typeId int) string

func (Python) ParseType

func (p Python) ParseType(typeId int) string

func (Python) PkgName

func (p Python) PkgName(pkg string) string

func (Python) PkgPath

func (p Python) PkgPath(pkg string) string

func (Python) SqlMapType

func (p Python) SqlMapType(typeId int, len int) string

python SQL ORM 类型与python类型不一样,需单独处理

type Thrift

type Thrift struct {
}

func (Thrift) DefaultValue

func (t Thrift) DefaultValue(typeId int) string

func (Thrift) ParseType

func (t Thrift) ParseType(typeId int) string

func (Thrift) PkgName

func (t Thrift) PkgName(pkg string) string

func (Thrift) PkgPath

func (t Thrift) PkgPath(pkg string) string

func (Thrift) SqlMapType

func (t Thrift) SqlMapType(typeId int, len int) string

type Typescript

type Typescript struct {
}

func (Typescript) DefaultValue

func (t Typescript) DefaultValue(typeId int) string

func (Typescript) ParseType

func (t Typescript) ParseType(typeId int) string

func (Typescript) PkgName

func (t Typescript) PkgName(pkg string) string

func (Typescript) PkgPath

func (t Typescript) PkgPath(pkg string) string

func (Typescript) SqlMapType

func (t Typescript) SqlMapType(typeId int, len int) string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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