Documentation
¶
Overview ¶
Package resutil provides RES utility functions, complementing the more common ones in the github.com/jirenius/go-res package.
Index ¶
- func AddNATSMessageHandler(service *res.Service, subject string, handler func(message *nats.Msg) error) error
- func CompareModels[T any](previous, current T) map[string]any
- func HandleCollectionQueryRequest[T any](service *res.Service, rid string, ...) error
- func HandleModelQueryRequest[T any](service *res.Service, rid string, ...) error
- func MapRefs[E any, S []E](s S, f func(e E) res.Ref) []res.Ref
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddNATSMessageHandler ¶
func AddNATSMessageHandler( service *res.Service, subject string, handler func(message *nats.Msg) error, ) error
AddNATSMessageHandler to a RES service. The handler will be called for each message received on the given subject.
func CompareModels ¶ added in v0.0.48
CompareModels and returns a map of the differences between them. The result can be used with the https://pkg.go.dev/github.com/jirenius/go-res#Request.ChangeEvent method.
func HandleModelQueryRequest ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.