func NewSaveGroup(c tree.RefContext) (tree.GroupHook, error) {
	return &SaveGroup{tree.NewBaseHook("save-group", 99), c.DB}, nil
}
NewSaveGroup returns a configured hook for use.
package hooks
import (
	"github.com/netauth/netauth/internal/startup"
	"github.com/netauth/netauth/internal/tree"
	pb "github.com/netauth/protocol"
)
type SaveGroup struct {
	tree.BaseHook
	tree.DB
}
func (s *SaveGroup) Run(g, dg *pb.Group) error {
	return s.SaveGroup(g)
}
func init() {
	startup.RegisterCallback(saveGroupCB)
}
func saveGroupCB() {
	tree.RegisterGroupHookConstructor("save-group", NewSaveGroup)
}