imbytecat 8b7e7a3f85
All checks were successful
Template Cleanup / Template Cleanup (push) Has been skipped
convert to template
2024-09-04 11:36:03 +08:00

24 lines
545 B
Go

package onvif
import (
"github.com/gin-gonic/gin"
"zabbixagent2plugintemplate/response"
"zabbixagent2plugintemplate/service/onvif"
)
func GetNotifications(c *gin.Context) {
response.NewResponse().WithData(onvif.Notifications).Send(c)
}
func GetNotificationByXaddr(c *gin.Context) {
xaddr := c.Param("xaddr")
response.NewResponse().WithData(onvif.Notifications[xaddr]).Send(c)
}
func DeleteNotificationByXaddr(c *gin.Context) {
xaddr := c.Param("xaddr")
delete(onvif.Notifications, xaddr)
response.NewResponse().Success().Send(c)
}