Skip to content
This repository was archived by the owner on Jan 20, 2024. It is now read-only.

Commit a97dd2c

Browse files
committedAug 13, 2022
json defs
1 parent c720f3d commit a97dd2c

File tree

1 file changed

+22
-22
lines changed

1 file changed

+22
-22
lines changed
 

‎types.go

+22-22
Original file line numberDiff line numberDiff line change
@@ -17,25 +17,25 @@ const (
1717
)
1818

1919
type DeviceDetectorResult struct {
20-
Client ClientResult
21-
Device DeviceResult
22-
OS OperatingSystemResult
23-
Bot BotResult
20+
Client ClientResult `json:"client"`
21+
Device DeviceResult `json:"device"`
22+
OS OperatingSystemResult `json:"os"`
23+
Bot BotResult `json:"bot"`
2424
}
2525

2626
type ClientResult struct {
27-
Name string
28-
Version string
29-
Engine string
30-
EngineVersion string
31-
Type string
32-
URL string
27+
Name string `json:"name"`
28+
Version string `json:"version"`
29+
Engine string `json:"engine"`
30+
EngineVersion string `json:"engineVersion"`
31+
Type string `json:"type"`
32+
URL string `json:"url"`
3333
}
3434

3535
type DeviceResult struct {
36-
Type DeviceType
37-
Brand string
38-
Model string
36+
Type DeviceType `json:"type"`
37+
Brand string `json:"brand"`
38+
Model string `json:"model"`
3939
}
4040

4141
type DeviceType string
@@ -58,17 +58,17 @@ const (
5858
)
5959

6060
type OperatingSystemResult struct {
61-
Name string
62-
Version string
63-
Platform string
61+
Name string `json:"name"`
62+
Version string `json:"version"`
63+
Platform string `json:"platform"`
6464
}
6565

6666
type BotResult struct {
67-
Name string
68-
Category string
69-
URL string
67+
Name string `json:"name"`
68+
Category string `json:"category"`
69+
URL string `json:"url"`
7070
Producer struct {
71-
Name string
72-
URL string
73-
}
71+
Name string `json:"name"`
72+
URL string `json:"url"`
73+
} `json:"producer"`
7474
}

0 commit comments

Comments
 (0)
This repository has been archived.