/
entities.go
58 lines (53 loc) 路 2.09 KB
/
entities.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
/*
Some struct definitons for Kong entities.
*/
package entities
type ServiceKey struct {
Id string `json:"id"`
}
type CertificateKey struct {
Id string `json:"id"`
}
type Route struct {
Id string `json:"id"`
CreatedAt int `json:"created_at"`
UpdatedAt int `json:"updated_at"`
Name string `json:"name"`
Protocols []string `json:"protocols"`
Methods []string `json:"methods"`
Hosts []string `json:"hosts"`
Paths []string `json:"paths"`
Headers []string `json:"headers"`
HTTPSRedirectStatusCode int `json:"https_redirect_status_code"`
RegexPriority int `json:"regex_priority"`
StripPath bool `json:"strip_path"`
PreserveHost bool `json:"preserve_host"`
SNIs []string `json:"snis"`
Sources []string `json:"sources"`
Destinations []string `json:"destinations"`
Tags []string `json:"tags"`
Service ServiceKey `json:"service"`
}
type Service struct {
Id string `json:"id"`
CreatedAt int `json:"created_at"`
UpdatedAt int `json:"updated_at"`
Name string `json:"name"`
Retries int `json:"retries"`
Protocol string `json:"protocol"`
Host string `json:"host"`
Port int `json:"port"`
Path string `json:"path"`
ConnectTimeout int `json:"connect_timeout"`
WriteTimeout int `json:"write_timeout"`
ReadTimeout int `json:"read_timeout"`
Tags []string `json:"tags"`
ClientCertificate CertificateKey `json:"client_certificate"`
}
type Consumer struct {
Id string `json:"id"`
CreatedAt int `json:"created_at"`
Username string `json:"username"`
CustomId string `json:"custom_id"`
Tags []string `json:"tags"`
}