func (h EntityHook) Run(e, de *pb.Entity) error {
	opts := common.PluginOpts{
		Action:     h.action,
		Entity:     e,
		DataEntity: de,
	}
	res, err := h.mref.InvokeEntityProcessing(opts)
	if err != nil {
		return err
	}
	e.Reset()
	proto.Merge(e, &res.Entity)
	return nil
}
Run invokes each registered plugin in a non-deterministic order.
The only order that is guaranteed by this interface is that the
actions will be called in the same place in the chain each time.
package manager
import (
	"fmt"
	"strings"
	"google.golang.org/protobuf/proto"
	"github.com/netauth/netauth/internal/plugin/tree/common"
	pb "github.com/netauth/protocol"
)
type EntityHook struct {
	action common.PluginAction
	mref   *Manager
}
func (h EntityHook) Name() string {
	return string(fmt.Sprintf("plugin-%s", strings.ToLower(h.action.String())))
}
func (h EntityHook) Priority() int {
	return common.AutoHookPriority[h.action]
}