Documentation ¶
Index ¶
- Variables
- func CompareComparable[T comparable]() func(t1, t2 T) bool
- func CompareEqualVT[T EqualVT[T]]() func(t1, t2 T) bool
- func EncodeVarint(dAtA []byte, offset int, v uint64) int
- func IsEqualVT[T EqualVT[T]](t1, t2 T) bool
- func SizeOfVarint(x uint64) (n int)
- func SizeOfZigzag(x uint64) (n int)
- func Skip(dAtA []byte) (n int, err error)
- type EqualVT
- type Message
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrInvalidLength is returned when decoding a negative length. ErrInvalidLength = errors.New("proto: negative length found during unmarshaling") // ErrIntOverflow is returned when decoding a varint representation of an integer that overflows 64 bits. ErrIntOverflow = errors.New("proto: integer overflow") // ErrUnexpectedEndOfGroup is returned when decoding a group end without a corresponding group start. ErrUnexpectedEndOfGroup = errors.New("proto: unexpected end of group") )
Functions ¶
func CompareComparable ¶
func CompareComparable[T comparable]() func(t1, t2 T) bool
CompareComparable returns a compare function to compare two comparable types.
func CompareEqualVT ¶
CompareEqualVT returns a compare function to compare two VTProtobuf messages.
func EncodeVarint ¶ added in v0.2.5
EncodeVarint encodes a uint64 into a varint-encoded byte slice and returns the offset of the encoded value. The provided offset is the offset after the last byte of the encoded value.
func SizeOfVarint ¶ added in v0.2.5
SizeOfVarint returns the size of the varint-encoded value.
func SizeOfZigzag ¶ added in v0.2.5
SizeOfZigzag returns the size of the zigzag-encoded value.
Types ¶
type EqualVT ¶
type EqualVT[T comparable] interface { comparable // EqualVT compares against the other message for equality. EqualVT(other T) bool }
EqualVT is a message with a EqualVT function (VTProtobuf).
type Message ¶
type Message interface { // MarshalVT marshals the message with vtprotobuf. MarshalVT() ([]byte, error) // UnmarshalVT unmarshals the message object with vtprotobuf. UnmarshalVT(data []byte) error // Reset resets the message. Reset() }
Message is the base vtprotobuf message marshal/unmarshal interface.
Directories ¶
Path | Synopsis |
---|---|
cmd
|
|
protoc-gen-go-lite
The protoc-gen-go-lite binary is a protoc plugin to generate Go code for both proto2 and proto3 versions of the protocol buffer language.
|
The protoc-gen-go-lite binary is a protoc plugin to generate Go code for both proto2 and proto3 versions of the protocol buffer language. |
compiler
|
|
protogen
Package protogen provides support for writing protoc plugins.
|
Package protogen provides support for writing protoc plugins. |
features
|
|
internal
|
|
detrand
Package detrand provides deterministically random functionality.
|
Package detrand provides deterministically random functionality. |
editiondefaults
Package editiondefaults contains the binary representation of the editions defaults.
|
Package editiondefaults contains the binary representation of the editions defaults. |
editionssupport
Package editionssupport defines constants for editions that are supported.
|
Package editionssupport defines constants for editions that are supported. |
encoding/defval
Package defval marshals and unmarshals textual forms of default values.
|
Package defval marshals and unmarshals textual forms of default values. |
encoding/tag
Package tag marshals and unmarshals the legacy struct tags as generated by historical versions of protoc-gen-go.
|
Package tag marshals and unmarshals the legacy struct tags as generated by historical versions of protoc-gen-go. |
encoding/text
Package text implements the text format for protocol buffers.
|
Package text implements the text format for protocol buffers. |
errors
Package errors implements functions to manipulate errors.
|
Package errors implements functions to manipulate errors. |
flags
Package flags provides a set of flags controlled by build tags.
|
Package flags provides a set of flags controlled by build tags. |
genid
Package genid contains constants for declarations in descriptor.proto and the well-known types.
|
Package genid contains constants for declarations in descriptor.proto and the well-known types. |
order
Package order provides ordered access to messages and maps.
|
Package order provides ordered access to messages and maps. |
pragma
Package pragma provides types that can be embedded into a struct to statically enforce or prevent certain language properties.
|
Package pragma provides types that can be embedded into a struct to statically enforce or prevent certain language properties. |
protobuild
Package protobuild constructs messages.
|
Package protobuild constructs messages. |
set
Package set provides simple set data structures for uint64s.
|
Package set provides simple set data structures for uint64s. |
strs
Package strs provides string manipulation functionality specific to protobuf.
|
Package strs provides string manipulation functionality specific to protobuf. |
version
Package version records versioning information about this module.
|
Package version records versioning information about this module. |
weakdeps
Package weakdeps exists to add weak module dependencies.
|
Package weakdeps exists to add weak module dependencies. |
testproto
|
|
types
|
|
Click to show internal directories.
Click to hide internal directories.