Documentation ¶
Overview ¶
Package id provides some nifty tools for manipulating mongodb objectIDs. They are not baked into rosetta (where they belong, conceptually) because it would introduce a dependency on the mongodb driver, which does not make sense for rosetta. So, they're here. Deal with it :)
Index ¶
- func Convert(value any) (primitive.ObjectID, error)
- func FromBytes(value []byte) primitive.ObjectID
- func ID(value any) primitive.ObjectID
- func SliceOfString(value []primitive.ObjectID) []string
- func SliceSchema() schema.Element
- func Sort(value []primitive.ObjectID) []primitive.ObjectID
- func ToBytes(value primitive.ObjectID) []byte
- type Slice
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ID ¶
Converts a value into an ObjectID. If the value cannot be converted, then a new ObjectID is returned
func SliceOfString ¶
func SliceSchema ¶
Types ¶
Click to show internal directories.
Click to hide internal directories.