[golang] implement systems and waypoints lookups
This commit is contained in:
parent
d97985a694
commit
66466e161f
10 changed files with 205 additions and 0 deletions
7
golang/pkg/model/common.go
Normal file
7
golang/pkg/model/common.go
Normal file
|
@ -0,0 +1,7 @@
|
|||
package model
|
||||
|
||||
type Common struct {
|
||||
//Description string `json:"description"`
|
||||
//Name string `json:"name"`
|
||||
Symbol string `json:"symbol"`
|
||||
}
|
16
golang/pkg/model/faction.go
Normal file
16
golang/pkg/model/faction.go
Normal file
|
@ -0,0 +1,16 @@
|
|||
package model
|
||||
|
||||
type Faction struct {
|
||||
Symbol string `json:"symbol"`
|
||||
//"name": "string",
|
||||
//"description": "string",
|
||||
//"headquarters": "string",
|
||||
//"traits": [
|
||||
// {
|
||||
// "symbol": "BUREAUCRATIC",
|
||||
// "name": "string",
|
||||
// "description": "string"
|
||||
// }
|
||||
//],
|
||||
//"isRecruiting": true
|
||||
}
|
11
golang/pkg/model/system.go
Normal file
11
golang/pkg/model/system.go
Normal file
|
@ -0,0 +1,11 @@
|
|||
package model
|
||||
|
||||
type System struct {
|
||||
Factions []Faction `json:"factions"`
|
||||
SectorSymbol string `json:"sectorSymbol"`
|
||||
Symbol string `json:"symbol"`
|
||||
Type string `json:"type"`
|
||||
Waypoints []Waypoint `json:"waypoints"`
|
||||
X int `json:"x"`
|
||||
Y int `json:"y"`
|
||||
}
|
16
golang/pkg/model/waypoint.go
Normal file
16
golang/pkg/model/waypoint.go
Normal file
|
@ -0,0 +1,16 @@
|
|||
package model
|
||||
|
||||
type Waypoint struct {
|
||||
Chart *Chart `json:"chart"`
|
||||
Factions []string `json:"factions"`
|
||||
IsUnderConstruction bool `json:"isUnderConstruction"`
|
||||
Modifiers []Common `json:"modifiers"`
|
||||
//orbitals: Array<{symbol: string;}>;
|
||||
//orbits: string;
|
||||
Symbol string `json:"symbol"`
|
||||
SystemSymbol string `json:"systemSymbol"`
|
||||
Traits []Common `json:"traits"`
|
||||
Type string `json:"type"`
|
||||
X int `json:"x"`
|
||||
Y int `json:"y"`
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue