forked from sclevine/agouti
/
types.go
44 lines (33 loc) · 962 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 api
type Log struct {
Message string
Level string
Timestamp int64
}
// A Cookie defines a web cookie
type Cookie struct {
// Name is the name of the cookie (required)
Name string `json:"name"`
// Value is the value of the cookie (required)
Value string `json:"value"`
// Path is the path of the cookie (default: "/")
Path string `json:"path,omitempty"`
// Domain is the domain of the cookie (default: current page domain)
Domain string `json:"domain,omitempty"`
// Secure is set to true for secure cookies (default: false)
Secure bool `json:"secure,omitempty"`
// HTTPOnly is set to true for HTTP-Only cookies (default: false)
HTTPOnly bool `json:"httpOnly,omitempty"`
// Expiry is the time when the cookie expires
Expiry float64 `json:"expiry,omitempty"`
}
type Selector struct {
Using string `json:"using"`
Value string `json:"value"`
}
type Button int
const (
LeftButton Button = iota
MiddleButton
RightButton
)