/
responses.go
157 lines (139 loc) · 6.84 KB
/
responses.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
package memfault
import "time"
// APIKey provides the apikey
type APIKey struct {
APIKey string `json:"api_key,omitempty"`
}
// UserAPIKeyRes is information about the logged in user api key
type UserAPIKeyRes struct {
Data APIKey `json:"data,omitempty"`
}
// provides information about the organisation
type organization struct {
ID int `json:"id,omitempty"`
Name string `json:"name,omitempty"`
Slug string `json:"slug,omitempty"`
}
// provides the organisation access control list
type organizationACL struct {
Admin bool `json:"admin,omitempty"`
CustomerSupport bool `json:"customer_support,omitempty"`
Organization organization `json:"organization,omitempty"`
}
// UserRes is information about the logged in User
type UserRes struct {
CreatedDate time.Time `json:"created_date,omitempty"`
Email string `json:"email,omitempty"`
ID int `json:"id,omitempty"`
Name string `json:"name,omitempty"`
Organizations []organization `json:"organizations,omitempty"`
UpdatedDate time.Time `json:"updated_date,omitempty"`
PrivacyNotice bool `json:"has_accepted_privacy_notice,omitempty"`
TermsOfService bool `json:"has_accepted_terms_of_service,omitempty"`
Impersonated string `json:"impersonator,omitempty"`
OrganizationsAcls []organizationACL `json:"organization_acls,omitempty"`
}
// intergrations of the project
type integrations struct {
Name string `json:"name,omitempty"`
}
// device link strategies
type deviceLinkStrategies struct {
Name string `json:"name,omitempty"`
}
// setup datails for the project
type setupDetails struct {
OperatingSystem []string `json:"operating_system,omitempty"`
CompilerOther string `json:"compiler_other,omitempty"`
BuildToolchain []string `json:"build_toolchain,omitempty"`
BuildToolchainOther string `json:"build_toolchain_other,omitempty"`
AdditionalChips string `json:"additional_chips,omitempty"`
ProgrammingLanguagesOther string `json:"programming_languages_other,omitempty"`
DebuggingToolchain []string `json:"debugging_toolchain,omitempty"`
ConnectivityOther string `json:"connectivity_other,omitempty"`
PrimaryChip string `json:"primary_chip,omitempty"`
Compiler []string `json:"compiler,omitempty"`
Connectivity []string `json:"connectivity,omitempty"`
PrimaryChipOther string `json:"primary_chip_other,omitempty"`
DebuggingToolchainOther string `json:"debugging_toolchain_other,omitempty"`
GmsCertification string `json:"gms_certification,omitempty"`
OperatingSystemOther string `json:"operating_system_other,omitempty"`
ProgrammingLanguages []string `json:"programming_languages,omitempty"`
}
// Details to the project
type projectData struct {
CreatedDate time.Time `json:"created_date,omitempty"`
Slug string `json:"slug,omitempty"`
LegacyLatestAPIEnabled bool `json:"legacy_latest_api_enabled,omitempty"`
Integrations []integrations `json:"integrations,omitempty"`
AlertsEnabled bool `json:"alerts_enabled,omitempty"`
UpdatedDate time.Time `json:"updated_date,omitempty"`
CountDeployments int `json:"count_deployments,omitempty"`
DashboardEnabled bool `json:"dashboard_enabled,omitempty"`
DeviceLinkStrategies []deviceLinkStrategies `json:"device_link_strategies,omitempty"`
PrimarySoftwareType string `json:"primary_software_type,omitempty"`
BugReportEnabled bool `json:"bugreport_export_enabled,omitempty"`
MetricChartEnabled bool `json:"metric_chart_enabled,omitempty"`
ChunksDebugLogLength int `json:"chunks_debug_log_length,omitempty"`
EventDebugLogLength int `json:"event_debug_log_length,omitempty"`
APIKey string `json:"api_key,omitempty"`
MultiComponentEnabled bool `json:"multi_component_enabled,omitempty"`
SetupDetails setupDetails `json:"setup_details,omitempty"`
VersioningScheme string `json:"versioning_scheme,omitempty"`
Name string `json:"name,omitempty"`
Os string `json:"os,omitempty"`
Platform string `json:"platform,omitempty"`
ID int `json:"id,omitempty"`
}
// CreateProjectRes thirs is a new project created
type CreateProjectRes struct {
Data projectData `json:"data,omitempty"`
}
// project error message
type errorInformation struct {
Code int `json:"code,omitempty"`
HTTPCode int `json:"http_code,omitempty"`
Message string `json:"message,omitempty"`
ErrorType string `json:"type,omitempty"`
}
// ErrorRes eror message that project already exist
type ErrorRes struct {
Error errorInformation `json:"error,omitempty"`
}
type paging struct {
PerPage int `json:"per_page,omitempty"`
TotalCount int `json:"total_count,omitempty"`
PageCount int `json:"page_count,omitempty"`
Page int `json:"page,omitempty"`
ItemCount int `json:"item_count,omitempty"`
}
// ListProjectRes struct
type ListProjectRes struct {
Data []projectData `json:"data,omitempty"`
Paging paging `json:"paging,omitempty"`
}
// CohortData struct
type CohortData struct {
ByPassPrimarySoftwareTypeCheck bool `json:"bypass_primary_software_type_check,omitempty"`
ByPassVersionChecks bool `json:"bypass_version_checks,omitempty"`
CountActiveDeployments int `json:"count_active_deployments,omitempty"`
CountDevices int `json:"count_devices,omitempty"`
CountStagedDevices int `json:"count_staged_devices,omitempty"`
CreatedDate time.Time `json:"created_date,omitempty"`
ID int `json:"id,omitempty"`
IgnoreTraces bool `json:"ignore_traces,omitempty"`
LastDeployment time.Time `json:"last_deployment,omitempty"`
Name string `json:"name,omitempty"`
ReturnEqualLatestReleases bool `json:"return_equal_latest_releases,omitempty"`
Slug string `json:"slug,omitempty"`
UpdatedDate time.Time `json:"updated_date,omitempty"`
UpdatesEnabled bool `json:"updates_enabled,omitempty"`
}
// CreateCohortRes struct
type CreateCohortRes struct {
Data CohortData `json:"data,omitempty"`
}
// ListCohortRes struct
type ListCohortRes struct {
Data []CohortData `json:"data,omitempty"`
}