add code to handle deletion event
This commit is contained in:
@@ -2,7 +2,6 @@ package models
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"time"
|
||||
)
|
||||
|
||||
type CloudEventReceived struct {
|
||||
@@ -11,7 +10,7 @@ type CloudEventReceived struct {
|
||||
Specversion string `json:"specversion"`
|
||||
Source string `json:"source"`
|
||||
Type string `json:"type"`
|
||||
Time string `json:"time"`
|
||||
Time string `json:"time"` // Modified from time.Time
|
||||
Data struct {
|
||||
ChainID int `json:"ChainId"`
|
||||
ChangeTag string `json:"ChangeTag"`
|
||||
@@ -22,7 +21,7 @@ type CloudEventReceived struct {
|
||||
} `json:"ComputeResource"`
|
||||
Name string `json:"Name"`
|
||||
} `json:"ComputeResource"`
|
||||
CreatedTime time.Time `json:"CreatedTime"`
|
||||
CreatedTime string `json:"CreatedTime"` // Modified from time.Time
|
||||
Datacenter struct {
|
||||
Datacenter struct {
|
||||
Type string `json:"Type"`
|
||||
@@ -59,7 +58,7 @@ type CloudEventReceived struct {
|
||||
} `json:"Vm"`
|
||||
} `json:"Vm"`
|
||||
ConfigSpec *json.RawMessage `json:"configSpec"`
|
||||
ConfigChanges *ConfigChangesReceived `json:"configChanges"`
|
||||
ConfigChanges *ConfigChangesReceived `json:"configChanges"` // Modified to separate struct
|
||||
} `json:"data"`
|
||||
} `json:"cloudEvent"`
|
||||
}
|
||||
|
Reference in New Issue
Block a user