add code to handle deletion event
Some checks are pending
CI / Test (push) Waiting to run
CI / End-to-End (push) Waiting to run
CI / Publish Docker (push) Blocked by required conditions
CI / Lint (push) Waiting to run
continuous-integration/drone/push Build is passing

This commit is contained in:
2024-09-16 10:50:05 +10:00
parent 57980a860a
commit 282459ccf8
4 changed files with 82 additions and 7 deletions

View File

@@ -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"`
}