Versions in this module Expand all Collapse all v0 v0.1.1 Feb 11, 2024 Changes in this version + const MaxMsgLen + const MsgHeaderLen + const OpCodeCompressed + const OpCodeDelete + const OpCodeGetByOID + const OpCodeGetMore + const OpCodeInsert + const OpCodeKillCursors + const OpCodeMsg + const OpCodeQuery + const OpCodeReply + const OpCodeUpdate + const OpMsgChecksumPresent + const OpMsgExhaustAllowed + const OpMsgMoreToCome + const OpQueryAwaitData + const OpQueryExhaust + const OpQueryNoCursorTimeout + const OpQueryOplogReplay + const OpQueryPartial + const OpQuerySlaveOk + const OpQueryTailableCursor + const OpReplyAwaitCapable + const OpReplyCursorNotFound + const OpReplyQueryFailure + const OpReplyShardConfigStale + var ErrZeroRead = errors.New("zero bytes read") + func ReadMessage(r *bufio.Reader) (*MsgHeader, MsgBody, error) + func WriteMessage(w *bufio.Writer, header *MsgHeader, msg MsgBody) error + type MsgBody interface + type MsgHeader struct + MessageLength int32 + OpCode OpCode + RequestID int32 + ResponseTo int32 + func (msg *MsgHeader) MarshalBinary() ([]byte, error) + func (msg *MsgHeader) String() string + type OpCode int32 + func (i OpCode) String() string + type OpMsg struct + FlagBits OpMsgFlags + func (msg *OpMsg) Document() (*types.Document, error) + func (msg *OpMsg) MarshalBinary() ([]byte, error) + func (msg *OpMsg) RawDocument() (bson2.RawDocument, error) + func (msg *OpMsg) SetSections(sections ...OpMsgSection) error + func (msg *OpMsg) String() string + func (msg *OpMsg) UnmarshalBinary(b []byte) error + type OpMsgFlagBit flagBit + func (i OpMsgFlagBit) String() string + type OpMsgFlags flags + func (f OpMsgFlags) FlagSet(bit OpMsgFlagBit) bool + func (f OpMsgFlags) String() string + type OpMsgSection struct + Identifier string + Kind byte + func MakeOpMsgSection(doc *types.Document) OpMsgSection + type OpQuery struct + Flags OpQueryFlags + FullCollectionName string + NumberToReturn int32 + NumberToSkip int32 + func (query *OpQuery) MarshalBinary() ([]byte, error) + func (query *OpQuery) Query() *types.Document + func (query *OpQuery) ReturnFieldsSelector() *types.Document + func (query *OpQuery) String() string + func (query *OpQuery) UnmarshalBinary(b []byte) error + type OpQueryFlagBit flagBit + func (i OpQueryFlagBit) String() string + type OpQueryFlags flags + func (f OpQueryFlags) FlagSet(bit OpQueryFlagBit) bool + func (f OpQueryFlags) String() string + type OpReply struct + CursorID int64 + NumberReturned int32 + ResponseFlags OpReplyFlags + StartingFrom int32 + func (reply *OpReply) Documents() []*types.Document + func (reply *OpReply) MarshalBinary() ([]byte, error) + func (reply *OpReply) SetDocument(doc *types.Document) + func (reply *OpReply) String() string + func (reply *OpReply) UnmarshalBinary(b []byte) error + type OpReplyFlagBit flagBit + func (i OpReplyFlagBit) String() string + type OpReplyFlags flags + func (f OpReplyFlags) FlagSet(bit OpReplyFlagBit) bool + func (f OpReplyFlags) String() string + type Record struct + Body MsgBody + BodyB []byte + Header *MsgHeader + HeaderB []byte + func LoadRecords(dir string, limit int) ([]Record, error) + type ValidationError struct + func (v *ValidationError) Error() string v0.1.0 Feb 11, 2024