event.go
730 字节
package event
import (
"github.com/gookit/event"
"gitlab.fjmaimaimai.com/allied-creation/character-library-metadata-bastion/pkg/domain"
)
func Start() {
RegisterEvent()
}
func RegisterEvent() {
event.On(domain.TableDataEditEvent.ToString(), event.ListenerFunc(tableDataChangeHandler), event.High)
event.On(domain.TableDataImportEvent.ToString(), event.ListenerFunc(tableDataChangeHandler), event.High)
event.On(domain.TableDeleteEvent.ToString(), event.ListenerFunc(tableDataChangeHandler), event.High)
event.On(domain.QuerySetUpdateEvent.ToString(), event.ListenerFunc(tableDataChangeHandler), event.High)
event.On(domain.QuerySetUpdateRenameEvent.ToString(), event.ListenerFunc(tableDataChangeHandler), event.High)
}