unknownfields

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2024 License: Apache-2.0 Imports: 4 Imported by: 1

Documentation

Index

Constants

View Source
const UnknownFieldsName = "_unknownFields"

UnknownFieldsName ... generated by thriftgo, check thriftgo for more information

Variables

This section is empty.

Functions

func UnknownFieldsLength

func UnknownFieldsLength(fs []UnknownField) (int, error)

UnknownFieldsLength returns the length of fs.

func WriteUnknownFields

func WriteUnknownFields(buf []byte, fs []UnknownField) (offset int, err error)

WriteUnknownFields writes fs into buf, and return written offset of the buf.

Types

type UnknownField

type UnknownField struct {
	ID      int16
	Type    thrift.TType
	KeyType thrift.TType
	ValType thrift.TType
	Value   interface{}
}

UnknownField is used to describe an unknown field.

func ConvertUnknownFields

func ConvertUnknownFields(buf []byte) (fields []UnknownField, err error)

ConvertUnknownFields converts buf to deserialized unknown fields.

func GetUnknownFields

func GetUnknownFields(v interface{}) (fields []UnknownField, err error)

GetUnknownFields deserialize unknownFields stored in v to a list of *UnknownFields.

Jump to

Keyboard shortcuts

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