types

package
v0.0.0-...-f8e3175 Latest Latest
Warning

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

Go to latest
Published: Jun 22, 2022 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetAliasFromGoType

func GetAliasFromGoType(goType string) string

Types

type Type

type Type string

Type alias

const (
	// GoFloat64 float64 type
	GoFloat64 Type = "float64"
	// GoFloat32 float32 type
	GoFloat32 Type = "float32"
	// GoInt64 int64 type
	GoInt64 Type = "int64"
	// GoUInt64 uint64 type
	GoUInt64 Type = "uint64"
	// GoInt32 int32 type
	GoInt32 Type = "int32"
	// GoUInt32 uint32 type
	GoUInt32 Type = "uint32"
	// GoBool bool type
	GoBool Type = "bool"
	// GoString string type
	GoString Type = "string"
	// GoMessage message type
	GoMessage Type = "message"
)
const (
	// PhpInt int type
	PhpInt Type = "int"
	// PhpDouble double type
	PhpDouble Type = "double"
	// PhpBoolean boolean type
	PhpBoolean Type = "boolean"
	// PhpString string type
	PhpString Type = "string"
	// PhpMessage message type
	PhpMessage = "message"
)
const (
	// TypescriptBigint bigint type
	TypescriptBigint Type = "bigint"
	// TypescriptNumber number type
	TypescriptNumber Type = "number"
	// TypescriptBoolean boolean type
	TypescriptBoolean Type = "boolean"
	// TypescriptString string type
	TypescriptString Type = "string"
	// TypescriptEnum enum type
	TypescriptEnum Type = "enum"
	// TypescriptMessage message type
	TypescriptMessage Type = "message"
)

func GetGoType

func GetGoType(fieldType descriptorpb.FieldDescriptorProto_Type) Type

GetGoType returns golang type by protobuf type

func GetPhpType

func GetPhpType(fieldType descriptorpb.FieldDescriptorProto_Type) Type

GetPhpType returns PHP type by protobuf type

func GetTypescriptType

func GetTypescriptType(fieldType descriptorpb.FieldDescriptorProto_Type) Type

GetTypescriptType returns typescript type by protobuf type

func GoTypeToAliased

func GoTypeToAliased(goType string) Type

Jump to

Keyboard shortcuts

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