micro/registry/service.go

29 lines
746 B
Go
Raw Normal View History

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