Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Make ¶ added in v0.1.2
Make initializes the data that is registered under the given name. If the data type is not the provided generic type, an error is returned.
func Register ¶ added in v0.1.2
func Register[D any](r Registerer, name string)
Register registers the generic data type under the given name.
Types ¶
type Marshaler ¶ added in v0.2.0
Marshaler can be implemented by data types to override the default marshaler.
type Option ¶ added in v0.2.0
type Option func(*Registry)
Option is an option for the Registry.
type Registerer ¶ added in v0.2.0
Registerer is implemented by Registry to allow for registering of data types.
type Registry ¶
type Registry struct {
// contains filtered or unexported fields
}
Registry is a registry of data types. A Registry marshals and unmarshals event data and command payloads.
func (*Registry) Map ¶ added in v0.2.5
Map returns all registered factory functions, mapped to the registered name.
func (*Registry) New ¶
New initializes the data type that is registered under the given name and returns a pointer to the data.
type Unmarshaler ¶ added in v0.2.0
Unmarshaler can be implemented by data types to override the default unmarshaler.