Don Newton | 379ae25 | 2019-04-01 12:17:06 -0400 | [diff] [blame^] | 1 | // 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 | |
| 7 | package wiremessage |
| 8 | |
| 9 | import "github.com/mongodb/mongo-go-driver/bson" |
| 10 | |
| 11 | // Delete represents the OP_DELETE message of the MongoDB wire protocol. |
| 12 | type Delete struct { |
| 13 | MsgHeader Header |
| 14 | FullCollectionName string |
| 15 | Flags DeleteFlag |
| 16 | Selector bson.Raw |
| 17 | } |
| 18 | |
| 19 | // MarshalWireMessage implements the Marshaler and WireMessage interfaces. |
| 20 | func (d Delete) MarshalWireMessage() ([]byte, error) { |
| 21 | panic("not implemented") |
| 22 | } |
| 23 | |
| 24 | // ValidateWireMessage implements the Validator and WireMessage interfaces. |
| 25 | func (d Delete) ValidateWireMessage() error { |
| 26 | panic("not implemented") |
| 27 | } |
| 28 | |
| 29 | // AppendWireMessage implements the Appender and WireMessage interfaces. |
| 30 | func (d Delete) AppendWireMessage([]byte) ([]byte, error) { |
| 31 | panic("not implemented") |
| 32 | } |
| 33 | |
| 34 | // String implements the fmt.Stringer interface. |
| 35 | func (d Delete) String() string { |
| 36 | panic("not implemented") |
| 37 | } |
| 38 | |
| 39 | // Len implements the WireMessage interface. |
| 40 | func (d Delete) Len() int { |
| 41 | panic("not implemented") |
| 42 | } |
| 43 | |
| 44 | // UnmarshalWireMessage implements the Unmarshaler interface. |
| 45 | func (d *Delete) UnmarshalWireMessage([]byte) error { |
| 46 | panic("not implemented") |
| 47 | } |
| 48 | |
| 49 | // DeleteFlag represents the flags on an OP_DELETE message. |
| 50 | type DeleteFlag int32 |
| 51 | |
| 52 | // These constants represent the individual flags on an OP_DELETE message. |
| 53 | const ( |
| 54 | SingleRemove DeleteFlag = 1 << iota |
| 55 | ) |