From 66466e161fff1bd2b8c2ea42249947ccc19c39fe Mon Sep 17 00:00:00 2001 From: Julien Dessaux Date: Sat, 15 Feb 2025 01:22:36 +0100 Subject: [golang] implement systems and waypoints lookups --- golang/pkg/model/common.go | 7 +++++++ golang/pkg/model/faction.go | 16 ++++++++++++++++ golang/pkg/model/system.go | 11 +++++++++++ golang/pkg/model/waypoint.go | 16 ++++++++++++++++ 4 files changed, 50 insertions(+) create mode 100644 golang/pkg/model/common.go create mode 100644 golang/pkg/model/faction.go create mode 100644 golang/pkg/model/system.go create mode 100644 golang/pkg/model/waypoint.go (limited to 'golang/pkg/model') diff --git a/golang/pkg/model/common.go b/golang/pkg/model/common.go new file mode 100644 index 0000000..058b43d --- /dev/null +++ b/golang/pkg/model/common.go @@ -0,0 +1,7 @@ +package model + +type Common struct { + //Description string `json:"description"` + //Name string `json:"name"` + Symbol string `json:"symbol"` +} diff --git a/golang/pkg/model/faction.go b/golang/pkg/model/faction.go new file mode 100644 index 0000000..207a527 --- /dev/null +++ b/golang/pkg/model/faction.go @@ -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 +} diff --git a/golang/pkg/model/system.go b/golang/pkg/model/system.go new file mode 100644 index 0000000..c1e302d --- /dev/null +++ b/golang/pkg/model/system.go @@ -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"` +} diff --git a/golang/pkg/model/waypoint.go b/golang/pkg/model/waypoint.go new file mode 100644 index 0000000..7b71e6a --- /dev/null +++ b/golang/pkg/model/waypoint.go @@ -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"` +} -- cgit v1.2.3