protobufparser

package module
v0.0.0-...-9235d5b Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BaseValue

type BaseValue struct {
	ThisObject interface{}
}

func NewBaseValue

func NewBaseValue() *BaseValue

func ToBaseValue

func ToBaseValue(object interface{}) (dst *BaseValue, err error)

type ProtobufParser

type ProtobufParser struct {
	// contains filtered or unexported fields
}

func NewProtobufParser

func NewProtobufParser(bin []byte) *ProtobufParser

func (*ProtobufParser) Put

func (that *ProtobufParser) Put(index int, value *BaseValue) error

func (*ProtobufParser) Query

func (that *ProtobufParser) Query(fieldNumbers ...uint) ([]interface{}, error)

type ValueType

type ValueType byte
const (
	VARINT ValueType = 0 //varint := int32 | int64 | uint32 | uint64 | bool | enum | sint32 | sint64
	String ValueType = 1 //string := valid UTF-8 string (e.g. ASCII)
	I32    ValueType = 2 //i32 := sfixed32 | fixed32 | float
	I64    ValueType = 3 //i64 := sfixed64 | fixed64 | double

)

Jump to

Keyboard shortcuts

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