Documentation ¶
Index ¶
- func Decode(typeInfo map[string]*reflection.TypeInfo, typeName string, buf []byte, ...) (msg interface{}, err error)
- func DecodeBytes(buf []byte) (x []byte, i int)
- func DecodeFixed32(buf []byte) (x uint32, i int)
- func DecodeFixed64(buf []byte) (x uint64, i int)
- func DecodeTag(buf []byte) (wireType int, fieldNumber int, i int)
- func DecodeVarint(buf []byte) (x uint64, i int)
- func DecodeZigzag32(buf []byte) (x uint64, i int)
- func DecodeZigzag64(buf []byte) (x uint64, i int)
- func Encode(typeInfo map[string]*reflection.TypeInfo, typeName string, data []FieldValue) (resBuf []byte, err error)
- func EncodeBytes(x []byte) (buf []byte)
- func EncodeFixed32(x uint32) []byte
- func EncodeFixed64(x uint64) []byte
- func EncodeTag(n int, wt int) []byte
- func EncodeVarint(x uint64) []byte
- func EncodeZigzag32(x uint64) []byte
- func EncodeZigzag64(x uint64) []byte
- func FetchMethodReflection(serverAddr string, methodPath string) (result *reflection.Method, err error)
- func FieldTypeToWireType(typeId descriptor.FieldDescriptorProto_Type) (wireType int)
- func Invoke(ctx context.Context, addr string, packageName, serviceName, methodName string, ...) (interface{}, error)
- type FieldValue
- type Message
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DecodeBytes ¶
func DecodeFixed32 ¶
func DecodeFixed64 ¶
func DecodeVarint ¶
func DecodeZigzag32 ¶
func DecodeZigzag64 ¶
func Encode ¶
func Encode(typeInfo map[string]*reflection.TypeInfo, typeName string, data []FieldValue) (resBuf []byte, err error)
func EncodeBytes ¶
func EncodeFixed32 ¶
func EncodeFixed64 ¶
func EncodeVarint ¶
func EncodeZigzag32 ¶
func EncodeZigzag64 ¶
func FetchMethodReflection ¶
func FetchMethodReflection(serverAddr string, methodPath string) (result *reflection.Method, err error)
func FieldTypeToWireType ¶
func FieldTypeToWireType(typeId descriptor.FieldDescriptorProto_Type) (wireType int)
Types ¶
type FieldValue ¶
type FieldValue struct { Number int `json:"number"` Value interface{} `json:"val"` }
type Message ¶
type Message struct { TypeInfo map[string]*reflection.TypeInfo TypeName string Data []FieldValue PB map[string]interface{} }
func (*Message) ProtoMessage ¶
func (m *Message) ProtoMessage()
Click to show internal directories.
Click to hide internal directories.