iprototypes

package
v0.0.17 Latest Latest
Warning

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

Go to latest
Published: Jul 17, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const MaxIProtoLen = 1 << 20

MaxIProtoLen caps how many elements a generated UnmarshalIProto will pre-allocate for a length-prefixed slice or map, bounding memory amplification when decoding untrusted input: a short message can encode a huge element count, and make([]T, n) / make(map, n) reserves n*sizeof(elem) before any element is read. Decoding a slice or map longer than this fails with iproto.ErrOverflow. Declare a constant of this name in the package to override the default.

Variables

This section is empty.

Functions

This section is empty.

Types

type BER

type BER uint64

func (BER) MarshalIProto

func (recvBER BER) MarshalIProto(buf []byte) ([]byte, error)

func (*BER) UnmarshalIProto

func (recv_BER *BER) UnmarshalIProto(buf []byte) ([]byte, error)

type Bool added in v0.0.16

type Bool bool

func (Bool) MarshalIProto added in v0.0.16

func (recvBool Bool) MarshalIProto(buf []byte) ([]byte, error)

func (*Bool) UnmarshalIProto added in v0.0.16

func (recv_Bool *Bool) UnmarshalIProto(buf []byte) ([]byte, error)

type Byte

type Byte = Uint8

type Bytes

type Bytes []uint8

func (Bytes) MarshalIProto

func (recvBytes Bytes) MarshalIProto(buf []byte) ([]byte, error)

func (*Bytes) UnmarshalIProto

func (recv_Bytes *Bytes) UnmarshalIProto(buf []byte) ([]byte, error)

type Float32

type Float32 float32

func (Float32) MarshalIProto

func (recvFloat32 Float32) MarshalIProto(buf []byte) ([]byte, error)

func (*Float32) UnmarshalIProto

func (recv_Float32 *Float32) UnmarshalIProto(buf []byte) ([]byte, error)

type Float64

type Float64 float64

func (Float64) MarshalIProto

func (recvFloat64 Float64) MarshalIProto(buf []byte) ([]byte, error)

func (*Float64) UnmarshalIProto

func (recv_Float64 *Float64) UnmarshalIProto(buf []byte) ([]byte, error)

type Int8

type Int8 int8

func (Int8) MarshalIProto

func (recvInt8 Int8) MarshalIProto(buf []byte) ([]byte, error)

func (*Int8) UnmarshalIProto

func (recv_Int8 *Int8) UnmarshalIProto(buf []byte) ([]byte, error)

type Int16

type Int16 int16

func (Int16) MarshalIProto

func (recvInt16 Int16) MarshalIProto(buf []byte) ([]byte, error)

func (*Int16) UnmarshalIProto

func (recv_Int16 *Int16) UnmarshalIProto(buf []byte) ([]byte, error)

type Int32

type Int32 int32

func (Int32) MarshalIProto

func (recvInt32 Int32) MarshalIProto(buf []byte) ([]byte, error)

func (*Int32) UnmarshalIProto

func (recv_Int32 *Int32) UnmarshalIProto(buf []byte) ([]byte, error)

type Int64

type Int64 int64

func (Int64) MarshalIProto

func (recvInt64 Int64) MarshalIProto(buf []byte) ([]byte, error)

func (*Int64) UnmarshalIProto

func (recv_Int64 *Int64) UnmarshalIProto(buf []byte) ([]byte, error)

type Rune

type Rune = Uint32

type Slice

func (Slice) MarshalIProto

func (recvSlice Slice) MarshalIProto(buf []byte) ([]byte, error)

type String

type String string

func (String) MarshalIProto

func (recvString String) MarshalIProto(buf []byte) ([]byte, error)

func (*String) UnmarshalIProto

func (recv_String *String) UnmarshalIProto(buf []byte) ([]byte, error)

type Uint8

type Uint8 uint8

func (Uint8) MarshalIProto

func (recvUint8 Uint8) MarshalIProto(buf []byte) ([]byte, error)

func (*Uint8) UnmarshalIProto

func (recv_Uint8 *Uint8) UnmarshalIProto(buf []byte) ([]byte, error)

type Uint16

type Uint16 uint16

func (Uint16) MarshalIProto

func (recvUint16 Uint16) MarshalIProto(buf []byte) ([]byte, error)

func (*Uint16) UnmarshalIProto

func (recv_Uint16 *Uint16) UnmarshalIProto(buf []byte) ([]byte, error)

type Uint32

type Uint32 uint32

func (Uint32) MarshalIProto

func (recvUint32 Uint32) MarshalIProto(buf []byte) ([]byte, error)

func (*Uint32) UnmarshalIProto

func (recv_Uint32 *Uint32) UnmarshalIProto(buf []byte) ([]byte, error)

type Uint64

type Uint64 uint64

func (Uint64) MarshalIProto

func (recvUint64 Uint64) MarshalIProto(buf []byte) ([]byte, error)

func (*Uint64) UnmarshalIProto

func (recv_Uint64 *Uint64) UnmarshalIProto(buf []byte) ([]byte, error)

Jump to

Keyboard shortcuts

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