func init() { … } // IsBSONObjectID returns true when the string is a valid BSON.ObjectId func IsBSONObjectID(str string) bool { … } type ObjectId … // NewObjectId creates a ObjectId from a Hex String func NewObjectId(hex string) ObjectId { … } // MarshalText turns this instance into text func (id ObjectId) MarshalText() ([]byte, error) { … } // UnmarshalText hydrates this instance from text func (id *ObjectId) UnmarshalText(data []byte) error { … } func (id ObjectId) String() string { … } // MarshalJSON returns the ObjectId as JSON func (id ObjectId) MarshalJSON() ([]byte, error) { … } // UnmarshalJSON sets the ObjectId from JSON func (id *ObjectId) UnmarshalJSON(data []byte) error { … } // DeepCopyInto copies the receiver and writes its value into out. func (id *ObjectId) DeepCopyInto(out *ObjectId) { … } // DeepCopy copies the receiver into a new ObjectId. func (id *ObjectId) DeepCopy() *ObjectId { … }