github.com/HXSecurity/DongTai-agent-go@v0.4.2/hook/gorm.go (about)

     1  package hook
     2  
     3  type Gorm struct {
     4  }
     5  
     6  func (g *Gorm) GetHook() []string {
     7  	return []string{
     8  		"gormDBOrder",
     9  		"gormDBExec",
    10  		"gormDBGroup",
    11  		"gormDBHaving",
    12  		"gormDBPluck",
    13  		"gormDBRaw",
    14  		"gormDBSelect",
    15  	}
    16  }
    17  
    18  func (g *Gorm) HookAll() {
    19  	Hook(g.GetHook())
    20  }
    21  
    22  func (g *Gorm) UnHookAll() {
    23  	UnHook(g.GetHook())
    24  }