summaryrefslogtreecommitdiffstats
path: root/modules
diff options
context:
space:
mode:
author6543 <6543@obermui.de>2019-12-12 05:23:05 +0100
committertechknowlogick <techknowlogick@gitea.io>2019-12-11 23:23:05 -0500
commitaceb1085c79e4c75268ce794a8ee84631382a403 (patch)
tree0e2a9137e07d04ff33c034f2a610e4a51fa0897a /modules
parent382936a668c48b3c83fe80cdf138f76fb74a5f8f (diff)
downloadgitea-aceb1085c79e4c75268ce794a8ee84631382a403.tar.gz
gitea-aceb1085c79e4c75268ce794a8ee84631382a403.zip
[API] extend StopWatch (#9196)
* squash api-stopwatch * fix prepair logic! + add Tests * fix lint * more robust time compare * delete responce 202 -> 204 * change http responce in test too
Diffstat (limited to 'modules')
-rw-r--r--modules/structs/issue_stopwatch.go19
1 files changed, 19 insertions, 0 deletions
diff --git a/modules/structs/issue_stopwatch.go b/modules/structs/issue_stopwatch.go
new file mode 100644
index 0000000000..10510e36ef
--- /dev/null
+++ b/modules/structs/issue_stopwatch.go
@@ -0,0 +1,19 @@
+// Copyright 2019 The Gitea Authors. All rights reserved.
+// Use of this source code is governed by a MIT-style
+// license that can be found in the LICENSE file.
+
+package structs
+
+import (
+ "time"
+)
+
+// StopWatch represent a running stopwatch
+type StopWatch struct {
+ // swagger:strfmt date-time
+ Created time.Time `json:"created"`
+ IssueIndex int64 `json:"issue_index"`
+}
+
+// StopWatches represent a list of stopwatches
+type StopWatches []StopWatch