Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GoStruct2Json ¶ added in v1.1.8
func GoStruct2Json(structList []*parsing.StructFlat) (jsonStr string)
GoStruct2Json convert golang struct to json
func GoType2JsonDefaultValue ¶ added in v1.1.8
func GoType2JsonDefaultValue(goType string) (jsonDefaultValue interface{})
GoType2JsonDefaultValue convert golang type to json default value
func GoType2PB ¶
GoType2PB convert golang type to Protocol Buffers https://developers.google.com/protocol-buffers/docs/proto3 .proto Go double -> float64 float -> float32 int32 -> int32 int64 -> int64 uint32 -> uint32 uint64 -> uint64 sint32 -> int32 sint64 -> int64 fixed32 -> uint32 fixed64 -> uint64 sfixed32 -> int32 sfixed64 -> int64 bool -> bool string -> string bytes -> []byte
Types ¶
type PBFlat ¶
PBFlat pb struct
func GoStruct2PB ¶
func GoStruct2PB(structList []*parsing.StructFlat) (pbList []*PBFlat)
GoStruct2PB convert golang struct to Protocol Buffers
Click to show internal directories.
Click to hide internal directories.