@@ -12,7 +12,8 @@ import (
12
12
"golang.org/x/xerrors"
13
13
)
14
14
15
- const InsightsTimeLayout = time .RFC3339
15
+ // Duplicated in coderd.
16
+ const insightsTimeLayout = time .RFC3339
16
17
17
18
// InsightsReportInterval is the interval of time over which to generate a
18
19
// smaller insights report within a time range.
@@ -61,8 +62,8 @@ type UserLatencyInsightsRequest struct {
61
62
62
63
func (c * Client ) UserLatencyInsights (ctx context.Context , req UserLatencyInsightsRequest ) (UserLatencyInsightsResponse , error ) {
63
64
var qp []string
64
- qp = append (qp , fmt .Sprintf ("start_time=%s" , req .StartTime .Format (InsightsTimeLayout )))
65
- qp = append (qp , fmt .Sprintf ("end_time=%s" , req .EndTime .Format (InsightsTimeLayout )))
65
+ qp = append (qp , fmt .Sprintf ("start_time=%s" , req .StartTime .Format (insightsTimeLayout )))
66
+ qp = append (qp , fmt .Sprintf ("end_time=%s" , req .EndTime .Format (insightsTimeLayout )))
66
67
if len (req .TemplateIDs ) > 0 {
67
68
var templateIDs []string
68
69
for _ , id := range req .TemplateIDs {
@@ -161,8 +162,8 @@ type TemplateInsightsRequest struct {
161
162
162
163
func (c * Client ) TemplateInsights (ctx context.Context , req TemplateInsightsRequest ) (TemplateInsightsResponse , error ) {
163
164
var qp []string
164
- qp = append (qp , fmt .Sprintf ("start_time=%s" , req .StartTime .Format (InsightsTimeLayout )))
165
- qp = append (qp , fmt .Sprintf ("end_time=%s" , req .EndTime .Format (InsightsTimeLayout )))
165
+ qp = append (qp , fmt .Sprintf ("start_time=%s" , req .StartTime .Format (insightsTimeLayout )))
166
+ qp = append (qp , fmt .Sprintf ("end_time=%s" , req .EndTime .Format (insightsTimeLayout )))
166
167
if len (req .TemplateIDs ) > 0 {
167
168
var templateIDs []string
168
169
for _ , id := range req .TemplateIDs {
0 commit comments