hotgo/server/internal/service/hook.go
2023-02-08 20:29:34 +08:00

33 lines
670 B
Go

// ================================================================================
// Code generated by GoFrame CLI tool. DO NOT EDIT.
// You can delete these comments if you wish manually maintain this interface file.
// ================================================================================
package service
import (
"github.com/gogf/gf/v2/net/ghttp"
)
type (
IHook interface {
AccessLog(r *ghttp.Request)
LastActive(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
}