Documentation ¶
Index ¶
- Constants
- func BoolNumber(v interface{}) bool
- func GetBoolDefault(in *bool, d bool) bool
- func Lookup(in bson.D, keys ...string) (interface{}, bool)
- func Ok(in bson.D) bool
- func Pop(in bson.D, keys ...string) (bson.D, interface{}, bool)
- type ArrayReader
- type BSONValueReader
- func (r *BSONValueReader) ReadArray() (bsonrw.ArrayReader, error)
- func (r *BSONValueReader) ReadBinary() (b []byte, btype byte, err error)
- func (r *BSONValueReader) ReadBoolean() (bool, error)
- func (r *BSONValueReader) ReadCodeWithScope() (code string, dr bsonrw.DocumentReader, err error)
- func (r *BSONValueReader) ReadDBPointer() (ns string, oid primitive.ObjectID, err error)
- func (r *BSONValueReader) ReadDateTime() (int64, error)
- func (r *BSONValueReader) ReadDecimal128() (primitive.Decimal128, error)
- func (r *BSONValueReader) ReadDocument() (bsonrw.DocumentReader, error)
- func (r *BSONValueReader) ReadDouble() (float64, error)
- func (r *BSONValueReader) ReadInt32() (int32, error)
- func (r *BSONValueReader) ReadInt64() (int64, error)
- func (r *BSONValueReader) ReadJavascript() (code string, err error)
- func (r *BSONValueReader) ReadMaxKey() error
- func (r *BSONValueReader) ReadMinKey() error
- func (r *BSONValueReader) ReadNull() error
- func (r *BSONValueReader) ReadObjectID() (primitive.ObjectID, error)
- func (r *BSONValueReader) ReadRegex() (pattern, options string, err error)
- func (r *BSONValueReader) ReadString() (string, error)
- func (r *BSONValueReader) ReadSymbol() (symbol string, err error)
- func (r *BSONValueReader) ReadTimestamp() (t, i uint32, err error)
- func (r *BSONValueReader) ReadUndefined() error
- func (r *BSONValueReader) SetKey(k string)
- func (r *BSONValueReader) Skip() error
- func (r *BSONValueReader) Type() bsontype.Type
- type DocumentReader
- type UpdateFields
Constants ¶
View Source
const MaxBsonObjectSize = 16777216
Variables ¶
This section is empty.
Functions ¶
func BoolNumber ¶
func BoolNumber(v interface{}) bool
BoolNumber returns the "bool" status of the result (assuming its a number)
func GetBoolDefault ¶
Types ¶
type ArrayReader ¶
type ArrayReader struct { A interface{} // contains filtered or unexported fields }
func NewArrayReader ¶
func NewArrayReader(a interface{}, disallow bool) *ArrayReader
func (*ArrayReader) ReadValue ¶
func (r *ArrayReader) ReadValue() (bsonrw.ValueReader, error)
type BSONValueReader ¶
type BSONValueReader struct {
// contains filtered or unexported fields
}
func NewStrictValueReader ¶
func NewStrictValueReader(in interface{}) *BSONValueReader
func NewValueReader ¶
func NewValueReader(in interface{}, disallow bool) *BSONValueReader
func (*BSONValueReader) ReadArray ¶
func (r *BSONValueReader) ReadArray() (bsonrw.ArrayReader, error)
func (*BSONValueReader) ReadBinary ¶
func (r *BSONValueReader) ReadBinary() (b []byte, btype byte, err error)
func (*BSONValueReader) ReadBoolean ¶
func (r *BSONValueReader) ReadBoolean() (bool, error)
func (*BSONValueReader) ReadCodeWithScope ¶
func (r *BSONValueReader) ReadCodeWithScope() (code string, dr bsonrw.DocumentReader, err error)
func (*BSONValueReader) ReadDBPointer ¶
func (r *BSONValueReader) ReadDBPointer() (ns string, oid primitive.ObjectID, err error)
func (*BSONValueReader) ReadDateTime ¶
func (r *BSONValueReader) ReadDateTime() (int64, error)
func (*BSONValueReader) ReadDecimal128 ¶
func (r *BSONValueReader) ReadDecimal128() (primitive.Decimal128, error)
func (*BSONValueReader) ReadDocument ¶
func (r *BSONValueReader) ReadDocument() (bsonrw.DocumentReader, error)
func (*BSONValueReader) ReadDouble ¶
func (r *BSONValueReader) ReadDouble() (float64, error)
func (*BSONValueReader) ReadInt32 ¶
func (r *BSONValueReader) ReadInt32() (int32, error)
func (*BSONValueReader) ReadInt64 ¶
func (r *BSONValueReader) ReadInt64() (int64, error)
func (*BSONValueReader) ReadJavascript ¶
func (r *BSONValueReader) ReadJavascript() (code string, err error)
func (*BSONValueReader) ReadMaxKey ¶
func (r *BSONValueReader) ReadMaxKey() error
func (*BSONValueReader) ReadMinKey ¶
func (r *BSONValueReader) ReadMinKey() error
func (*BSONValueReader) ReadNull ¶
func (r *BSONValueReader) ReadNull() error
func (*BSONValueReader) ReadObjectID ¶
func (r *BSONValueReader) ReadObjectID() (primitive.ObjectID, error)
func (*BSONValueReader) ReadRegex ¶
func (r *BSONValueReader) ReadRegex() (pattern, options string, err error)
func (*BSONValueReader) ReadString ¶
func (r *BSONValueReader) ReadString() (string, error)
func (*BSONValueReader) ReadSymbol ¶
func (r *BSONValueReader) ReadSymbol() (symbol string, err error)
func (*BSONValueReader) ReadTimestamp ¶
func (r *BSONValueReader) ReadTimestamp() (t, i uint32, err error)
func (*BSONValueReader) ReadUndefined ¶
func (r *BSONValueReader) ReadUndefined() error
func (*BSONValueReader) SetKey ¶
func (r *BSONValueReader) SetKey(k string)
func (*BSONValueReader) Skip ¶
func (r *BSONValueReader) Skip() error
Skip is called when a value is going to be skipped; so this allows us to be "pedantic" or return an error if there is an unknown field
func (*BSONValueReader) Type ¶
func (r *BSONValueReader) Type() bsontype.Type
type DocumentReader ¶
type DocumentReader struct { V interface{} // contains filtered or unexported fields }
func NewDocumentReader ¶
func NewDocumentReader(v interface{}, disallow bool) *DocumentReader
func (*DocumentReader) ReadElement ¶
func (r *DocumentReader) ReadElement() (string, bsonrw.ValueReader, error)
type UpdateFields ¶
func ExpandUpdate ¶
func ExpandUpdate(d bson.D, ups *bool) UpdateFields
ExpandUpdate expands the update to a set of fields that will be CRUD
Click to show internal directories.
Click to hide internal directories.