package contracts import ( "git.fsdpf.net/go/req/resx" ) // ResEventType 资源操作类型:读(SELECT)+ 写(INSERT/UPDATE/DELETE) type ResEventType = resx.ResEventType const ( ResEventSelect = resx.ResEventSelect ResEventInsert = resx.ResEventInsert ResEventUpdate = resx.ResEventUpdate ResEventDelete = resx.ResEventDelete ) // ResChangeRow 描述一次资源写操作中某一行的变更内容 type ResChangeRow = resx.ResChangeRow // ResWatcher 关注一个或多个资源写操作的处理器,通过 _res_listener 注册表按资源绑定, // 每次事件触发都会重新构造实例(见 framework-v2 的 handler.ResWatcherBase / internal/resource 的 // watcherDispatcher.getAppWatcher) type ResWatcher interface { Controller // Handle 处理一次资源变更,row 自带 User() Handle(row ResChangeRow) error GetCode() string }