protobuf

package module
v1.4.5 Latest Latest
Warning

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

Go to latest
Published: Feb 11, 2025 License: OSL-3.0 Imports: 4 Imported by: 2

README

ProtoBuf

In the name of the warrior, I charge you to be brave.
In the name of the father, I charge you to be just.
In the name of the mother, I charge you to defend the innocent.

A Knight of the Seven Kingdoms (Game of Thrones) (2019)

Protocol Buffers

This module parses and formats the raw wire encoding.

prior art

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Bytes

type Bytes []byte

protobuf.dev/programming-guides/encoding#cheat-sheet

func (Bytes) Append

func (b Bytes) Append(data []byte, num Number) []byte

func (Bytes) GoString

func (b Bytes) GoString() string

type Field added in v1.4.5

type Field struct {
	Number Number
	Value  Value
}

protobuf.dev/programming-guides/encoding#cheat-sheet-key

type I32 added in v1.4.5

type I32 uint32

protobuf.dev/programming-guides/encoding#cheat-sheet

func (I32) Append added in v1.4.5

func (i I32) Append(data []byte, num Number) []byte

func (I32) GoString added in v1.4.5

func (i I32) GoString() string

type I64 added in v1.4.5

type I64 uint64

protobuf.dev/programming-guides/encoding#cheat-sheet

func (I64) Append added in v1.4.5

func (i I64) Append(data []byte, num Number) []byte

func (I64) GoString added in v1.4.5

func (i I64) GoString() string

type LenPrefix added in v1.4.5

type LenPrefix struct {
	Bytes   Bytes
	Message Message
}

protobuf.dev/programming-guides/encoding#cheat-sheet

func (*LenPrefix) Append added in v1.4.5

func (p *LenPrefix) Append(data []byte, num Number) []byte

func (*LenPrefix) GoString added in v1.4.5

func (p *LenPrefix) GoString() string

type Message

type Message []Field

protobuf.dev/programming-guides/encoding#cheat-sheet

func (*Message) Add

func (m *Message) Add(num Number, v func(*Message))

wikipedia.org/wiki/Continuation-passing_style

func (*Message) AddBytes

func (m *Message) AddBytes(num Number, v Bytes)

func (*Message) AddI32 added in v1.4.5

func (m *Message) AddI32(num Number, v I32)

func (*Message) AddI64 added in v1.4.5

func (m *Message) AddI64(num Number, v I64)

func (*Message) AddVarint

func (m *Message) AddVarint(num Number, v Varint)

func (Message) Append

func (m Message) Append(data []byte, num Number) []byte

func (Message) Get

func (m Message) Get(num Number) func() (Message, bool)

func (Message) GetBytes

func (m Message) GetBytes(num Number) func() (Bytes, bool)

func (Message) GetI32 added in v1.4.5

func (m Message) GetI32(num Number) func() (I32, bool)

func (Message) GetI64 added in v1.4.5

func (m Message) GetI64(num Number) func() (I64, bool)

func (Message) GetVarint

func (m Message) GetVarint(num Number) func() (Varint, bool)

func (Message) GoString

func (m Message) GoString() string

func (Message) Marshal

func (m Message) Marshal() []byte

func (*Message) Unmarshal

func (m *Message) Unmarshal(data []byte) error

type Number

type Number = protowire.Number

protobuf.dev/programming-guides/encoding#cheat-sheet-key

type Value

type Value interface {
	Append([]byte, Number) []byte
	fmt.GoStringer
}

protobuf.dev/programming-guides/encoding#cheat-sheet

type Varint

type Varint uint64

protobuf.dev/programming-guides/encoding#cheat-sheet

func (Varint) Append

func (v Varint) Append(data []byte, num Number) []byte

func (Varint) GoString

func (v Varint) GoString() string

Jump to

Keyboard shortcuts

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