Documentation ¶
Overview ¶
Package mdbson supports serialization and deserialization using BSON. Objects with interface fields are serialized and deserialized using madkins23/go-type/reg. This package is patterned after JSON and YAML code in madkins23/go-serial.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Pointer ¶ added in v0.13.0
Pointer is used to specify an object that may be found in a cache or DB.
func (*Pointer[T]) Get ¶ added in v0.13.0
func (p *Pointer[T]) Get() T
Get the Target item from the Pointer.
func (*Pointer[T]) MarshalBSON ¶ added in v0.13.0
func (*Pointer[T]) Set ¶ added in v0.13.0
func (p *Pointer[T]) Set(t T)
Set the Target item for the Pointer.
func (*Pointer[T]) UnmarshalBSON ¶ added in v0.13.0
type Wrapper ¶
type Wrapper[T any] struct { // contains filtered or unexported fields }
Wrapper is used to attach a type name to an item to be serialized. This supports re-creating the correct type for filling an interface field.
func (*Wrapper[T]) MarshalBSON ¶
func (*Wrapper[T]) UnmarshalBSON ¶
Click to show internal directories.
Click to hide internal directories.