blob: 498228d0b9103bc5c7bf1be6e23d03e013331fa3 [file] [log] [blame]
Don Newton379ae252019-04-01 12:17:06 -04001// Copyright (C) MongoDB, Inc. 2017-present.
2//
3// Licensed under the Apache License, Version 2.0 (the "License"); you may
4// not use this file except in compliance with the License. You may obtain
5// a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
6
7package wiremessage
8
9import "github.com/mongodb/mongo-go-driver/bson"
10
11// Insert represents the OP_INSERT message of the MongoDB wire protocol.
12type Insert struct {
13 MsgHeader Header
14 Flags InsertFlag
15 FullCollectionName string
16 Documents []bson.Raw
17}
18
19// MarshalWireMessage implements the Marshaler and WireMessage interfaces.
20func (i Insert) MarshalWireMessage() ([]byte, error) {
21 panic("not implemented")
22}
23
24// ValidateWireMessage implements the Validator and WireMessage interfaces.
25func (i Insert) ValidateWireMessage() error {
26 panic("not implemented")
27}
28
29// AppendWireMessage implements the Appender and WireMessage interfaces.
30func (i Insert) AppendWireMessage([]byte) ([]byte, error) {
31 panic("not implemented")
32}
33
34// String implements the fmt.Stringer interface.
35func (i Insert) String() string {
36 panic("not implemented")
37}
38
39// Len implements the WireMessage interface.
40func (i Insert) Len() int {
41 panic("not implemented")
42}
43
44// UnmarshalWireMessage implements the Unmarshaler interface.
45func (i *Insert) UnmarshalWireMessage([]byte) error {
46 panic("not implemented")
47}
48
49// InsertFlag represents the flags on an OP_INSERT message.
50type InsertFlag int32
51
52// These constants represent the individual flags on an OP_INSERT message.
53const (
54 ContinueOnError InsertFlag = 1 << iota
55)