-
Notifications
You must be signed in to change notification settings - Fork 0
/
types.go
44 lines (34 loc) · 803 Bytes
/
types.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
package resource
import "time"
type Source struct {
List []string `json:"list"`
// A hack to avoid global resources behaviour
Unique string `json:"unique"`
}
type Version struct {
Item string `json:"item"`
Date time.Time `json:"date"`
}
type CheckRequest struct {
Source Source `json:"source"`
Version Version `json:"version"`
}
type CheckResponse []Version
type InRequest struct {
Source Source `json:"source"`
Version Version `json:"version"`
}
type InResponse struct {
Version Version `json:"version"`
}
type OutRequest struct {
Source Source `json:"source"`
Params OutParams `json:"params"`
}
type OutParams struct {
// Path to a file containing the previous version
Previous string `json:"previous"`
}
type OutResponse struct {
Version Version `json:"version"`
}