File tree Expand file tree Collapse file tree 5 files changed +13
-73
lines changed Expand file tree Collapse file tree 5 files changed +13
-73
lines changed Original file line number Diff line number Diff line change @@ -7,8 +7,12 @@ import (
77)
88
99type Vector2 struct {
10- X float64 `json:"x"`
11- Y float64 `json:"y"`
10+ X float64
11+ Y float64
12+ }
13+
14+ func (v Vector2 ) MarshalJSON () ([]byte , error ) {
15+ return json .Marshal ([]float64 {v .X , v .Y })
1216}
1317
1418type Vector2Wrapper struct {
@@ -29,9 +33,13 @@ func (v *Vector2Wrapper) UnmarshalJSON(data []byte) error {
2933}
3034
3135type Vector3 struct {
32- X float64 `json:"x"`
33- Y float64 `json:"y"`
34- Z float64 `json:"z"`
36+ X float64
37+ Y float64
38+ Z float64
39+ }
40+
41+ func (v Vector3 ) MarshalJSON () ([]byte , error ) {
42+ return json .Marshal ([]float64 {v .X , v .Y , v .Z })
3543}
3644
3745type Vector3Wrapper struct {
@@ -52,24 +60,8 @@ func (v *Vector3Wrapper) UnmarshalJSON(data []byte) error {
5260}
5361
5462type Color string
55-
5663type MetricImperialUnit string
57-
58- const (
59- MetricMM MetricImperialUnit = "mm"
60- MetricCM MetricImperialUnit = "cm"
61- MetricM MetricImperialUnit = "m"
62- MetricF MetricImperialUnit = "f"
63- )
64-
6564type FloorMetric string
66-
67- const (
68- FloorM FloorMetric = "m"
69- FloorT FloorMetric = "t"
70- FloorF FloorMetric = "f"
71- )
72-
7365type Slug string
7466
7567type Header struct {
Original file line number Diff line number Diff line change @@ -4,11 +4,6 @@ import "encoding/json"
44
55type Temperature string
66
7- const (
8- COLD Temperature = "cold"
9- WARM Temperature = "warm"
10- )
11-
127type Corridor struct {
138 Header
149 Content string `json:"content"`
Original file line number Diff line number Diff line change @@ -4,13 +4,6 @@ import "encoding/json"
44
55type DeviceOrientation string
66
7- const (
8- DeviceFront DeviceOrientation = "front"
9- DeviceRear DeviceOrientation = "rear"
10- DeviceFrontflipped DeviceOrientation = "frontflipped"
11- DeviceRearflipped DeviceOrientation = "rearflipped"
12- )
13-
147type DeviceTemplate = RackTemplate
158
169type Device struct {
Original file line number Diff line number Diff line change @@ -6,43 +6,10 @@ import (
66)
77
88type RackOrientation string
9-
10- const (
11- RackFront RackOrientation = "front"
12- RackRear RackOrientation = "rear"
13- RackLeft RackOrientation = "left"
14- RackRight RackOrientation = "right"
15- )
16-
179type RackUnit string
18-
19- const (
20- RackMM RackUnit = "mm"
21- RackCM RackUnit = "cm"
22- RackM RackUnit = "m"
23- RackU RackUnit = "u"
24- RackOU RackUnit = "ou"
25- RackF RackUnit = "f"
26- )
27-
2810type LabelPosition string
29-
30- const (
31- LabelFront LabelPosition = "front"
32- LabelRear LabelPosition = "rear"
33- LabelFrontrear LabelPosition = "frontrear"
34- LabelTop LabelPosition = "top"
35- LabelRight LabelPosition = "right"
36- LabelLeft LabelPosition = "left"
37- )
38-
3911type ComponentOrientation string
4012
41- const (
42- ComponentHorizontal ComponentOrientation = "horizontal"
43- ComponentVertical ComponentOrientation = "vertical"
44- )
45-
4613type Component struct {
4714 Factor string `json:"factor,omitempty"`
4815 Color * Color `json:"color,omitempty"`
Original file line number Diff line number Diff line change @@ -4,13 +4,6 @@ import "encoding/json"
44
55type SiteOrientation string
66
7- const (
8- EN SiteOrientation = "EN"
9- NW SiteOrientation = "NW"
10- WS SiteOrientation = "WS"
11- SE SiteOrientation = "SE"
12- )
13-
147type Site struct {
158 Header
169 Orientation * SiteOrientation `json:"orientation,omitempty"`
You can’t perform that action at this time.
0 commit comments