mirror of
https://github.com/TeaOSLab/EdgeAPI.git
synced 2025-11-23 23:10:26 +08:00
实现HTTP部分功能
This commit is contained in:
@@ -31,6 +31,20 @@ func NewHTTPGzipDAO() *HTTPGzipDAO {
|
||||
|
||||
var SharedHTTPGzipDAO = NewHTTPGzipDAO()
|
||||
|
||||
// 初始化
|
||||
func (this *HTTPGzipDAO) Init() {
|
||||
this.DAOObject.Init()
|
||||
this.DAOObject.OnUpdate(func() error {
|
||||
return SharedSysEventDAO.CreateEvent(NewServerChangeEvent())
|
||||
})
|
||||
this.DAOObject.OnInsert(func() error {
|
||||
return SharedSysEventDAO.CreateEvent(NewServerChangeEvent())
|
||||
})
|
||||
this.DAOObject.OnDelete(func() error {
|
||||
return SharedSysEventDAO.CreateEvent(NewServerChangeEvent())
|
||||
})
|
||||
}
|
||||
|
||||
// 启用条目
|
||||
func (this *HTTPGzipDAO) EnableHTTPGzip(id int64) error {
|
||||
_, err := this.Query().
|
||||
|
||||
Reference in New Issue
Block a user