[golang] added ships first api calls
This commit is contained in:
parent
0d00bf9fd2
commit
860984057d
9 changed files with 164 additions and 0 deletions
7
golang/pkg/model/cargo.go
Normal file
7
golang/pkg/model/cargo.go
Normal file
|
@ -0,0 +1,7 @@
|
|||
package model
|
||||
|
||||
type Cargo struct {
|
||||
Capacity int `json:"capacity"`
|
||||
Inventory []Inventory `json:"inventory"`
|
||||
Units int `json:"units"`
|
||||
}
|
7
golang/pkg/model/cooldown.go
Normal file
7
golang/pkg/model/cooldown.go
Normal file
|
@ -0,0 +1,7 @@
|
|||
package model
|
||||
|
||||
type Cooldown struct {
|
||||
//ShipSymbol int `json:"shipSymbol"`
|
||||
RemainingSeconds int `json:"remainingSeconds"`
|
||||
//TotalSeconds int `json:"totalSeconds"`
|
||||
}
|
7
golang/pkg/model/fuel.go
Normal file
7
golang/pkg/model/fuel.go
Normal file
|
@ -0,0 +1,7 @@
|
|||
package model
|
||||
|
||||
type Fuel struct {
|
||||
Capacity int `json:"capacity"`
|
||||
//Consummed
|
||||
Current int `json:"current"`
|
||||
}
|
8
golang/pkg/model/inventory.go
Normal file
8
golang/pkg/model/inventory.go
Normal file
|
@ -0,0 +1,8 @@
|
|||
package model
|
||||
|
||||
type Inventory struct {
|
||||
//Description string `json:"description"`
|
||||
Units int `json:"units"`
|
||||
//Name string `json:"name"`
|
||||
Symbol string `json:"symbol"`
|
||||
}
|
9
golang/pkg/model/nav.go
Normal file
9
golang/pkg/model/nav.go
Normal file
|
@ -0,0 +1,9 @@
|
|||
package model
|
||||
|
||||
type Nav struct {
|
||||
FlightMode string `json:"flightMode"`
|
||||
Route Route `json:"route"`
|
||||
Status string `json:"status"`
|
||||
SystemSymbol string `json:"systemSymbol"`
|
||||
WaypointSymbol string `json:"waypointSymbol"`
|
||||
}
|
17
golang/pkg/model/route.go
Normal file
17
golang/pkg/model/route.go
Normal file
|
@ -0,0 +1,17 @@
|
|||
package model
|
||||
|
||||
import "time"
|
||||
|
||||
type Route struct {
|
||||
Arrival time.Time `json:"arrival"`
|
||||
DepartureTime time.Time `json:"departureTime"`
|
||||
Destination RouteEndpoint `json:"destination"`
|
||||
}
|
||||
|
||||
type RouteEndpoint struct {
|
||||
Type string `json:"type"`
|
||||
Symbol string `json:"symbol"`
|
||||
SystemSymbol string `json:"systemSymbol"`
|
||||
X int `json:"x"`
|
||||
Y int `json:"y"`
|
||||
}
|
16
golang/pkg/model/ship.go
Normal file
16
golang/pkg/model/ship.go
Normal file
|
@ -0,0 +1,16 @@
|
|||
package model
|
||||
|
||||
type Ship struct {
|
||||
Cargo Cargo `json:"cargo"`
|
||||
Cooldown Cooldown `json:"cooldown"`
|
||||
//// crew
|
||||
//// engine
|
||||
//// frame
|
||||
Fuel Fuel `json:"fuel"`
|
||||
//// modules
|
||||
//// mounts
|
||||
Nav Nav `json:"nav"`
|
||||
//// reactor
|
||||
//registration: Registration;
|
||||
Symbol string `json:"symbol"`
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue