FerretDB / wire

Apache License 2.0
2 stars 3 forks source link

Expose sections #8

Closed chilagrow closed 2 months ago

chilagrow commented 2 months ago

Closes FerretDB/engineering#179.

To convert RawDocument to types.Document, both sections need to be exposed.

chilagrow commented 2 months ago

Let’s export opMsgSection, opMsgSection.identifier, opMsgSection.kind, and add OpMsgSection.Documents() []wirebson.RawDocument method instead

Yeah, we need what you've mentioned. Let's do that.

chilagrow commented 2 months ago

Actually if we expose OpMsgSection, that's sufficient.

type OpMsgSection struct {
    Identifier string
    Documents  []wirebson.RawDocument
    Kind       byte
}