...

Source file src/go.mongodb.org/mongo-driver/bson/types.go

Documentation: go.mongodb.org/mongo-driver/bson

     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 bson
     8  
     9  import (
    10  	"go.mongodb.org/mongo-driver/bson/bsontype"
    11  )
    12  
    13  // BSON element types as described in https://bsonspec.org/spec.html.
    14  const (
    15  	TypeDouble           = bsontype.Double
    16  	TypeString           = bsontype.String
    17  	TypeEmbeddedDocument = bsontype.EmbeddedDocument
    18  	TypeArray            = bsontype.Array
    19  	TypeBinary           = bsontype.Binary
    20  	TypeUndefined        = bsontype.Undefined
    21  	TypeObjectID         = bsontype.ObjectID
    22  	TypeBoolean          = bsontype.Boolean
    23  	TypeDateTime         = bsontype.DateTime
    24  	TypeNull             = bsontype.Null
    25  	TypeRegex            = bsontype.Regex
    26  	TypeDBPointer        = bsontype.DBPointer
    27  	TypeJavaScript       = bsontype.JavaScript
    28  	TypeSymbol           = bsontype.Symbol
    29  	TypeCodeWithScope    = bsontype.CodeWithScope
    30  	TypeInt32            = bsontype.Int32
    31  	TypeTimestamp        = bsontype.Timestamp
    32  	TypeInt64            = bsontype.Int64
    33  	TypeDecimal128       = bsontype.Decimal128
    34  	TypeMinKey           = bsontype.MinKey
    35  	TypeMaxKey           = bsontype.MaxKey
    36  )
    37  
    38  // BSON binary element subtypes as described in https://bsonspec.org/spec.html.
    39  const (
    40  	TypeBinaryGeneric     = bsontype.BinaryGeneric
    41  	TypeBinaryFunction    = bsontype.BinaryFunction
    42  	TypeBinaryBinaryOld   = bsontype.BinaryBinaryOld
    43  	TypeBinaryUUIDOld     = bsontype.BinaryUUIDOld
    44  	TypeBinaryUUID        = bsontype.BinaryUUID
    45  	TypeBinaryMD5         = bsontype.BinaryMD5
    46  	TypeBinaryEncrypted   = bsontype.BinaryEncrypted
    47  	TypeBinaryColumn      = bsontype.BinaryColumn
    48  	TypeBinarySensitive   = bsontype.BinarySensitive
    49  	TypeBinaryUserDefined = bsontype.BinaryUserDefined
    50  )
    51  

View as plain text