Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CustomRegistry ¶
func RegisterResourceType ¶
func RegisterResourceType(ref any, caster CastHandler)
RegisterResourceType Registers a Result ID to be encoded and decoded as a Mongo ObjectId. ref is an instance of RefType which is a Type override of a string such as: type MyReference string caster is a function which can convert a string to the type specified by the ref object (i.e. convert the string to the ref type: Example
type MyReference string mongoms.RegisterResourceType(MyReference(""),
func(id string) any { return MyReference(id) })
Types ¶
type CastHandler ¶
Click to show internal directories.
Click to hide internal directories.