From e887213affbf2b1e6804d5d2cd86417c881249ba Mon Sep 17 00:00:00 2001 From: Julien Dessaux Date: Fri, 21 Feb 2025 00:58:45 +0100 Subject: [golang] finished implementing procument contracts --- golang/pkg/model/cargo.go | 6 +++--- golang/pkg/model/inventory.go | 2 +- golang/pkg/model/ship.go | 12 ++++++------ golang/pkg/model/shipyard.go | 10 +++++----- 4 files changed, 15 insertions(+), 15 deletions(-) (limited to 'golang/pkg/model') diff --git a/golang/pkg/model/cargo.go b/golang/pkg/model/cargo.go index bf58204..7bd8db8 100644 --- a/golang/pkg/model/cargo.go +++ b/golang/pkg/model/cargo.go @@ -1,7 +1,7 @@ package model type Cargo struct { - Capacity int `json:"capacity"` - Inventory []Inventory `json:"inventory"` - Units int `json:"units"` + Capacity int `json:"capacity"` + Inventory []InventoryItem `json:"inventory"` + Units int `json:"units"` } diff --git a/golang/pkg/model/inventory.go b/golang/pkg/model/inventory.go index d685250..dfb28f8 100644 --- a/golang/pkg/model/inventory.go +++ b/golang/pkg/model/inventory.go @@ -1,6 +1,6 @@ package model -type Inventory struct { +type InventoryItem struct { //Description string `json:"description"` Units int `json:"units"` //Name string `json:"name"` diff --git a/golang/pkg/model/ship.go b/golang/pkg/model/ship.go index 73244d4..6bdfa81 100644 --- a/golang/pkg/model/ship.go +++ b/golang/pkg/model/ship.go @@ -3,14 +3,14 @@ package model type Ship struct { Cargo *Cargo `json:"cargo"` Cooldown *Cooldown `json:"cooldown"` - //// crew - //// engine - //// frame + // crew + // engine + // frame Fuel *Fuel `json:"fuel"` - //// modules - //// mounts + // modules + // mounts Nav *Nav `json:"nav"` - //// reactor + // reactor //registration: Registration; Symbol string `json:"symbol"` } diff --git a/golang/pkg/model/shipyard.go b/golang/pkg/model/shipyard.go index 2ba2e95..4140d44 100644 --- a/golang/pkg/model/shipyard.go +++ b/golang/pkg/model/shipyard.go @@ -3,11 +3,11 @@ package model import "time" type Shipyard struct { - ModificationFee int `json:"modificationFee"` - Symbol string `json:"symbol"` - ShipTypes []CommonType `json:"shipTypes"` - Transactions []ShipyardTransaction `json:"transactions"` - Ships []ShipyardShip `json:"ships"` + ModificationFee int `json:"modificationFee"` + Symbol string `json:"symbol"` + ShipTypes []CommonType `json:"shipTypes"` + //Transactions []ShipyardTransaction `json:"transactions"` + Ships []ShipyardShip `json:"ships"` } type ShipyardShip struct { -- cgit v1.2.3