27 lines
600 B
Go
Raw Normal View History

2025-05-05 10:30:33 +08:00
package event
2025-05-15 17:30:33 +08:00
import "time"
2025-05-05 10:30:33 +08:00
const (
2025-05-15 17:30:33 +08:00
EventTopic_UserExecute = "user.execute"
EventTopic_DelayInvokeCreateHook = "resource.create.delay"
2025-05-05 10:30:33 +08:00
)
type EventPayload_UserExecute struct {
UserId int `json:"user_id"`
UserName string `json:"user_name"`
ProjectId int `json:"project_id"`
Resource string `json:"resource"`
Method string `json:"method"`
OldData any `json:"old_data"`
NewData any `json:"new_data"`
2025-05-12 18:43:41 +08:00
Any any `json:"any"`
2025-05-05 10:30:33 +08:00
}
2025-05-15 17:30:33 +08:00
type EventPayload_DelayInvokeCreateHook struct {
ProjectId int
Resource string
DelayAt time.Time
Obj []byte
}