Documentation ¶
Index ¶
- Variables
- func AddObserver(obsr ModelObserver)
- func EmitObjectDeleted(object map[string]interface{}, entityName string, ctx context.Context)
- func EmitObjectMultiDeleted(objects []map[string]interface{}, entityName string, ctx context.Context)
- func EmitObjectMultiPosted(objects []map[string]interface{}, entityName string, ctx context.Context)
- func EmitObjectPosted(object map[string]interface{}, entityName string, ctx context.Context)
- func RemoveObserver(key string)
- type ModelObserver
Constants ¶
This section is empty.
Variables ¶
View Source
var ModelObservers sync.Map
Functions ¶
func AddObserver ¶
func AddObserver(obsr ModelObserver)
func EmitObjectDeleted ¶
func EmitObjectMultiDeleted ¶
func EmitObjectMultiPosted ¶
func EmitObjectPosted ¶
func RemoveObserver ¶
func RemoveObserver(key string)
Types ¶
type ModelObserver ¶
type ModelObserver interface { Key() string ObjectPosted(object map[string]interface{}, entityName string, ctx context.Context) ObjectMultiPosted(objects []map[string]interface{}, entityName string, ctx context.Context) ObjectDeleted(object map[string]interface{}, entityName string, ctx context.Context) ObjectMultiDeleted(objects []map[string]interface{}, entityName string, ctx context.Context) }
Click to show internal directories.
Click to hide internal directories.