Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- {
- "message": {
- "Server1.example.com": [
- {
- "application": "Apache",
- "host": {
- "name": "/^Server-[13456]/"
- },
- "owner": "User1",
- "project": "Web",
- "subowner": "User2"
- }
- ],
- "Server2.example.com": [
- {
- "application": "Mysql",
- "host": {
- "name": "/^Server[23456]/"
- },
- "owner": "User2",
- "project": "DB",
- "subowner": "User3"
- }
- ]
- },
- "response_ms": 659,
- "success": true
- }
- type ServerDetails struct {
- Message struct{
- Hostname struct{
- Details struct{
- Application string `json:"application"`
- }`json:"-"`
- }`json:"-"`
- }`json:"message"`
- }
- {
- "application": "Apache",
- "host": {
- "name": "/^Server-[13456]/"
- },
- type YourStruct struct {
- Success bool
- ResponseMS int
- Servers map[string]*ServerStruct
- }
- type ServerStruct struct {
- Application string
- Owner string
- [...]
- }
- type AutoGenerated struct {
- Message struct {
- Server1ExampleCom []struct {
- Application string `json:"application"`
- Host struct {
- Name string `json:"name"`
- } `json:"host"`
- Owner string `json:"owner"`
- Project string `json:"project"`
- Subowner string `json:"subowner"`
- } `json:"Server1.example.com"`
- Server2ExampleCom []struct {
- Application string `json:"application"`
- Host struct {
- Name string `json:"name"`
- } `json:"host"`
- Owner string `json:"owner"`
- Project string `json:"project"`
- Subowner string `json:"subowner"`
- } `json:"Server2.example.com"`
- } `json:"message"`
- ResponseMs int `json:"response_ms"`
- Success bool `json:"success"`
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement