func NewDelFuzzyEntityUM(c tree.RefContext) (tree.EntityHook, error) {
	return &ManageEntityUM{tree.NewBaseHook("del-untyped-metadata-fuzzy", 50), "CLEARFUZZY"}, nil
}
NewDelFuzzyEntityUM returns a configured hook in CLEARFUZZY mode.
package hooks
import (
	"github.com/netauth/netauth/internal/startup"
	"github.com/netauth/netauth/internal/tree"
	"github.com/netauth/netauth/internal/tree/util"
	pb "github.com/netauth/protocol"
)
type ManageEntityUM struct {
	tree.BaseHook
	mode string
}
func (mm *ManageEntityUM) Run(e, de *pb.Entity) error {
	for _, m := range de.Meta.UntypedMeta {
		key, value := splitKeyValue(m)
		e.Meta.UntypedMeta = util.PatchKeyValueSlice(e.Meta.UntypedMeta, mm.mode, key, value)
	}
	return nil
}
func init() {
	startup.RegisterCallback(manageEntityUMCB)
}
func manageEntityUMCB() {
	tree.RegisterEntityHookConstructor("add-untyped-metadata", NewAddEntityUM)
	tree.RegisterEntityHookConstructor("del-untyped-metadata-fuzzy", NewDelFuzzyEntityUM)
	tree.RegisterEntityHookConstructor("del-untyped-metadata-exact", NewDelExactEntityUM)
}
func NewAddEntityUM(c tree.RefContext) (tree.EntityHook, error) {
	return &ManageEntityUM{tree.NewBaseHook("add-untyped-metadata", 50), "UPSERT"}, nil
}