-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #10 from vania-pooh/master
VNC and platform support
- Loading branch information
Showing
13 changed files
with
191 additions
and
160 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,3 +2,4 @@ | |
*.iml | ||
sctl | ||
vendor | ||
coverage.* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,67 +1,31 @@ | ||
package cmd | ||
|
||
import "encoding/xml" | ||
|
||
// Input data | ||
|
||
type JsonHost struct { | ||
type Host struct { | ||
Port int `json:"port"` | ||
Count int `json:"count"` | ||
Username string `json:"username"` | ||
Password string `json:"password"` | ||
VNC string `json:"vnc"` | ||
} | ||
|
||
type JsonRegion map[string]JsonHost | ||
|
||
type JsonRegions map[string]JsonRegion | ||
|
||
type JsonHosts map[string]JsonRegions | ||
|
||
type JsonVersions map[string]string | ||
|
||
type JsonBrowser struct { | ||
DefaultVersion string `json:"defaultVersion"` | ||
Versions JsonVersions `json:"versions"` | ||
} | ||
|
||
type JsonQuota map[string]JsonBrowser | ||
type Region map[string]Host | ||
|
||
type JsonInput struct { | ||
Hosts JsonHosts `json:"hosts"` | ||
Quota map[string]JsonQuota `json:"quota"` | ||
Aliases map[string][]string `json:"aliases"` | ||
} | ||
type Regions map[string]Region | ||
|
||
// Output data | ||
type Hosts map[string]Regions | ||
|
||
type XmlBrowsers struct { | ||
XMLName xml.Name `xml:"qa:browsers"` | ||
XmlNS string `xml:"xmlns:qa,attr"` | ||
Browsers []XmlBrowser `xml:"browser"` | ||
} | ||
type Versions map[string]string | ||
|
||
type XmlBrowser struct { | ||
Name string `xml:"name,attr"` | ||
DefaultVersion string `xml:"defaultVersion,attr"` | ||
Versions []XmlVersion `xml:"version"` | ||
type Browser struct { | ||
DefaultVersion string `json:"defaultVersion"` | ||
DefaultPlatform string `json:"defaultPlatform"` | ||
Versions Versions `json:"versions"` | ||
} | ||
|
||
type XmlVersion struct { | ||
Number string `xml:"number,attr"` | ||
Regions []XmlRegion `xml:"region"` | ||
} | ||
|
||
type XmlHosts []XmlHost | ||
|
||
type XmlRegion struct { | ||
Name string `xml:"name,attr"` | ||
Hosts XmlHosts `xml:"host"` | ||
} | ||
type Quota map[string]Browser | ||
|
||
type XmlHost struct { | ||
Name string `xml:"name,attr"` | ||
Port int `xml:"port,attr"` | ||
Count int `xml:"count,attr"` | ||
Username string `xml:"username,attr,omitempty"` | ||
Password string `xml:"password,attr,omitempty"` | ||
type Input struct { | ||
Hosts Hosts `json:"hosts"` | ||
Quota map[string]Quota `json:"quota"` | ||
Aliases map[string][]string `json:"aliases"` | ||
} |
Oops, something went wrong.