hook.go 338 B

1234567891011
  1. package rest
  2. import (
  3. "git.nspix.com/golang/micro/gateway/http"
  4. "gorm.io/gorm"
  5. )
  6. type Hook interface {
  7. HookAfterCreate(ctx *http.Context, tx *gorm.DB, pkVal interface{}, model interface{}, attributes []*DiffAttr)
  8. HookAfterUpdate(ctx *http.Context, tx *gorm.DB, pkVal interface{}, model interface{}, changedAttributes []*DiffAttr)
  9. }