package
0.3.0
Repository: https://github.com/mongodb/mongo-go-driver.git
Documentation: pkg.go.dev

# Functions

CurrentRequestID returns the current request ID.
NextRequestID returns the next request ID.
ReadFrom will read a single WireMessage from the given io.Reader.
ReadHeader reads a header from the given slice of bytes starting at offset pos.
Unmarshal will unmarshal data into a WireMessage.
Validate will validate that data is a valid MongoDB wire protocol message.

# Constants

These constants represent the individual flags of an OP_REPLY message.
These constants represent the individual flags on an OP_QUERY message.
These constants represent the individual flags on an OP_MSG message.
These constants represent the individual compressor IDs for an OP_COMPRESSED.
These constants represent the individual compressor IDs for an OP_COMPRESSED.
These constants represent the individual compressor IDs for an OP_COMPRESSED.
These constants represent the individual flags on an OP_INSERT message.
These constants represent the individual flags of an OP_REPLY message.
DefaultZlibLevel is the default level for zlib compression.
These constants represent the individual section types for a section in an OP_MSG.
These constants are the types of errors exposed by this package.
These constants are the types of errors exposed by this package.
These constants are the types of errors exposed by this package.
These constants are the types of errors exposed by this package.
These constants are the types of errors exposed by this package.
These constants are the types of errors exposed by this package.
These constants are the types of errors exposed by this package.
These constants represent the individual flags on an OP_QUERY message.
These constants represent the individual flags on an OP_MSG message.
These constants represent the individual flags on an OP_MSG message.
These constants represent the individual flags on an OP_UPDATE message.
These constants represent the individual flags on an OP_QUERY message.
These constants are the valid opcodes for the version of the wireprotocol supported by this library.
These constants are the valid opcodes for the version of the wireprotocol supported by this library.
These constants are the valid opcodes for the version of the wireprotocol supported by this library.
These constants are the valid opcodes for the version of the wireprotocol supported by this library.
These constants are the valid opcodes for the version of the wireprotocol supported by this library.
These constants are the valid opcodes for the version of the wireprotocol supported by this library.
These constants are the valid opcodes for the version of the wireprotocol supported by this library.
These constants represent the individual flags on an OP_QUERY message.
These constants are the valid opcodes for the version of the wireprotocol supported by this library.
OpmsgWireVersion is the minimum wire version needed to use OP_MSG.
These constants are the valid opcodes for the version of the wireprotocol supported by this library.
These constants are the valid opcodes for the version of the wireprotocol supported by this library.
These constants are the valid opcodes for the version of the wireprotocol supported by this library.
These constants represent the individual flags on an OP_QUERY message.
These constants represent the individual flags of an OP_REPLY message.
These constants represent the individual flags of an OP_REPLY message.
These constants represent the individual section types for a section in an OP_MSG.
These constants represent the individual flags on an OP_DELETE message.
These constants represent the individual flags on an OP_QUERY message.
These constants represent the individual flags on an OP_QUERY message.
These constants represent the individual flags on an OP_UPDATE message.

# Variables

ErrHeaderIncorrectOpCode is returned when the OpCode on a header is set but is not set to the correct OpCode.
ErrHeaderInvalidLength is returned when the MessageLength of a header is set but is not set to the correct size.
ErrHeaderTooFewBytes is returned when a call to ReadHeader does not contain enough bytes to be a valid header.
ErrHeaderTooSmall is returned when the size of the header is too small to be valid.
ErrInvalidHeader is returned when methods are called on a malformed Header.
ErrInvalidMessageLength is returned when the provided message length is too small to be valid.
ErrUnknownOpCode is returned when the provided opcode is not a valid opcode.

# Structs

Command represents the OP_COMMAND message of the MongoDB wire protocol.
CommandReply represents the OP_COMMANDREPLY message of the MongoDB wire protocol.
Compressed represents the OP_COMPRESSED message of the MongoDB wire protocol.
Delete represents the OP_DELETE message of the MongoDB wire protocol.
Error represents an error related to wire protocol messages.
GetMore represents the OP_GET_MORE message of the MongoDB wire protocol.
Header represents the header of a MongoDB wire protocol message.
Insert represents the OP_INSERT message of the MongoDB wire protocol.
KillCursors represents the OP_KILL_CURSORS message of the MongoDB wire protocol.
Msg represents the OP_MSG message of the MongoDB wire protocol.
Query represents the OP_QUERY message of the MongoDB wire protocol.
Reply represents the OP_REPLY message of the MongoDB wire protocol.
SectionBody represents the kind body of an OP_MSG message.
SectionDocumentSequence represents the kind document sequence of an OP_MSG message.
Update represents the OP_UPDATE message of the MongoDB wire protocol.

# Interfaces

Appender is the interface implemented by types that can append themselves, as a MongoDB wire protocol message, to the provided slice of bytes.
Marshaler is the interface implemented by types that can marshal themselves into a valid MongoDB wire protocol message.
Reader is the interface implemented by types that can have WireMessages read from them.
ReadWriteCloser is the interface implemented by types that can read and write WireMessages and can also be closed.
ReadWriter is the interface implemented by types that can both read and write WireMessages.
Section represents a section on an OP_MSG message.
Transformer is the interface implemented by types that can alter a WireMessage.
Unmarshaler is the interface implemented by types that can unmarshal a MongoDB wire protocol message version of themselves.
Validator is the interface implemented by types that can validate themselves as a MongoDB wire protocol message.
WireMessage represents a message in the MongoDB wire protocol.
Writer is the interface implemented by types that can have WireMessages written to them.

# Type aliases

CompressorID is the ID for each type of Compressor.
DeleteFlag represents the flags on an OP_DELETE message.
ErrorType is the type of error, which indicates from which part of the code the error originated.
InsertFlag represents the flags on an OP_INSERT message.
MsgFlag represents the flags on an OP_MSG message.
OpCode represents a MongoDB wire protocol opcode.
QueryFlag represents the flags on an OP_QUERY message.
ReplyFlag represents the flags of an OP_REPLY message.
SectionType represents the type for 1 section in an OP_MSG.
UpdateFlag represents the flags on an OP_UPDATE message.