diff options
Diffstat (limited to '')
-rw-r--r-- | golang/pkg/model/common.go | 4 | ||||
-rw-r--r-- | golang/pkg/model/contract.go | 2 | ||||
-rw-r--r-- | golang/pkg/model/market.go | 10 | ||||
-rw-r--r-- | golang/pkg/model/shipyard.go | 35 | ||||
-rw-r--r-- | golang/pkg/model/trade_good.go | 11 | ||||
-rw-r--r-- | golang/pkg/model/waypoint.go | 8 |
6 files changed, 69 insertions, 1 deletions
diff --git a/golang/pkg/model/common.go b/golang/pkg/model/common.go index 058b43d..6a2c321 100644 --- a/golang/pkg/model/common.go +++ b/golang/pkg/model/common.go @@ -5,3 +5,7 @@ type Common struct { //Name string `json:"name"` Symbol string `json:"symbol"` } + +type CommonType struct { + Type string `json:"type"` +} diff --git a/golang/pkg/model/contract.go b/golang/pkg/model/contract.go index 24ed403..9d9c7bd 100644 --- a/golang/pkg/model/contract.go +++ b/golang/pkg/model/contract.go @@ -7,7 +7,7 @@ type Contract struct { DeadlineToAccept time.Time `json:"deadlineToAccept"` Expiration time.Time `json:"expiration"` FactionSymbol string `json:"factionSymbol"` - Fullfilled bool `json:"fulfilled"` + Fulfilled bool `json:"fulfilled"` Id string `json:"id"` Terms *Terms `json:"terms"` Type string `json:"type"` diff --git a/golang/pkg/model/market.go b/golang/pkg/model/market.go new file mode 100644 index 0000000..6c11386 --- /dev/null +++ b/golang/pkg/model/market.go @@ -0,0 +1,10 @@ +package model + +type Market struct { + Exchange []Common `json:"exchange"` + Exports []Common `json:"exports"` + Imports []Common `json:"imports"` + Symbol string `json:"symbol"` + TradeGoods []TradeGood `json:"tradeGoods"` + Transactions []Transaction `json:"transactions"` +} diff --git a/golang/pkg/model/shipyard.go b/golang/pkg/model/shipyard.go new file mode 100644 index 0000000..2ba2e95 --- /dev/null +++ b/golang/pkg/model/shipyard.go @@ -0,0 +1,35 @@ +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"` +} + +type ShipyardShip struct { + Activity string `json:"activity"` + // crew + //Description string `json:"description"` + // engine + // frame + // modules + // mounts + //Name string `json:"name"` + PurchasePrice int `json:"purchasePrice"` + // reactor + Supply string `json:"supply"` + Type string `json:"type"` +} + +type ShipyardTransaction struct { + AgentSymbol string `json:"agentSymbol"` + Price int `json:"price"` + ShipSymbol string `json:"shipSymbol"` + ShipType string `json:"shipType"` + Timestamp time.Time `json:"timestamp"` + WaypointSymbol string `json:"waypointSymbol"` +} diff --git a/golang/pkg/model/trade_good.go b/golang/pkg/model/trade_good.go new file mode 100644 index 0000000..602f667 --- /dev/null +++ b/golang/pkg/model/trade_good.go @@ -0,0 +1,11 @@ +package model + +type TradeGood struct { + Activity string `json:"activity"` + PurchasePrice int `json:"purchasePrice"` + SellPrice int `json:"sellPrice"` + Supply string `json:"supply"` + Symbol string `json:"symbol"` + TradeVolume int `json:"tradeVolume"` + Type string `json:"type"` +} diff --git a/golang/pkg/model/waypoint.go b/golang/pkg/model/waypoint.go index 7b71e6a..d8bd5cd 100644 --- a/golang/pkg/model/waypoint.go +++ b/golang/pkg/model/waypoint.go @@ -14,3 +14,11 @@ type Waypoint struct { X int `json:"x"` Y int `json:"y"` } + +func (w Waypoint) GetX() int { + return w.X +} + +func (w Waypoint) GetY() int { + return w.Y +} |