[golang] implement shipyards visits
This commit is contained in:
parent
3cae67aea4
commit
bd2fb50c81
15 changed files with 299 additions and 45 deletions
|
@ -5,3 +5,7 @@ type Common struct {
|
|||
//Name string `json:"name"`
|
||||
Symbol string `json:"symbol"`
|
||||
}
|
||||
|
||||
type CommonType struct {
|
||||
Type string `json:"type"`
|
||||
}
|
||||
|
|
35
golang/pkg/model/shipyard.go
Normal file
35
golang/pkg/model/shipyard.go
Normal file
|
@ -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"`
|
||||
}
|
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue