mirror of
https://github.com/bufanyun/hotgo.git
synced 2025-01-31 08:48:39 +08:00
27 lines
531 B
Go
27 lines
531 B
Go
|
// ==========================================================================
|
||
|
// Code generated by GoFrame CLI tool. DO NOT EDIT.
|
||
|
// ==========================================================================
|
||
|
|
||
|
package service
|
||
|
|
||
|
import (
|
||
|
"github.com/gogf/gf/v2/net/ghttp"
|
||
|
)
|
||
|
|
||
|
type IHook interface {
|
||
|
GlobalLog(r *ghttp.Request)
|
||
|
}
|
||
|
|
||
|
var localHook IHook
|
||
|
|
||
|
func Hook() IHook {
|
||
|
if localHook == nil {
|
||
|
panic("implement not found for interface IHook, forgot register?")
|
||
|
}
|
||
|
return localHook
|
||
|
}
|
||
|
|
||
|
func RegisterHook(i IHook) {
|
||
|
localHook = i
|
||
|
}
|