2015-06-03 01:25:37 +01:00
|
|
|
package registry
|
|
|
|
|
|
|
|
type Service struct {
|
2015-12-15 21:02:43 +00:00
|
|
|
Name string `json:"name"`
|
|
|
|
Version string `json:"version"`
|
|
|
|
Metadata map[string]string `json:"metadata"`
|
|
|
|
Endpoints []*Endpoint `json:"endpoints"`
|
|
|
|
Nodes []*Node `json:"nodes"`
|
2015-06-03 01:25:37 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
type Node struct {
|
2015-12-15 21:02:43 +00:00
|
|
|
Id string `json:"id"`
|
|
|
|
Address string `json:"address"`
|
|
|
|
Port int `json:"port"`
|
|
|
|
Metadata map[string]string `json:"metadata"`
|
2015-06-03 01:25:37 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
type Endpoint struct {
|
2015-12-15 21:02:43 +00:00
|
|
|
Name string `json:"name"`
|
|
|
|
Request *Value `json:"request"`
|
|
|
|
Response *Value `json:"response"`
|
|
|
|
Metadata map[string]string `json:"metadata"`
|
2015-06-03 01:25:37 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
type Value struct {
|
2015-12-15 21:02:43 +00:00
|
|
|
Name string `json:"name"`
|
|
|
|
Type string `json:"type"`
|
|
|
|
Values []*Value `json:"values"`
|
2015-06-03 01:25:37 +01:00
|
|
|
}
|