Skip to content

Commit

Permalink
fix: add oracle csp connection to switch case for map
Browse files Browse the repository at this point in the history
  • Loading branch information
MegaportPhilipBrowne committed Nov 5, 2024
1 parent 3fcdb48 commit 21b1e63
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions vxc_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -670,6 +670,16 @@ func (c *CSPConnection) UnmarshalJSON(data []byte) error {
return err
}
c.CSPConnection = append(c.CSPConnection, transit)
case "ORACLE":
marshaled, err := json.Marshal(cn)
if err != nil {
return err
}
oracle := CSPConnectionOracle{}
if err := json.Unmarshal(marshaled, &oracle); err != nil {
return err
}
c.CSPConnection = append(c.CSPConnection, oracle)
default: // Any other cases will be marshaled into a map[string]interface{}
marshaled, err := json.Marshal(cn)
if err != nil {
Expand Down

0 comments on commit 21b1e63

Please sign in to comment.