Documentation
¶
Index ¶
- Constants
- Variables
- func AddFirewall(_ *cobra.Command, args []string)
- func CreateFirewallRule(cmd *cobra.Command, args []string) error
- func DeleteFirewall(_ *cobra.Command, args []string)
- func DeleteFirewallRule(_ *cobra.Command, args []string)
- func DisableFirewall(_ *cobra.Command, args []string)
- func EditIp(cmd *cobra.Command, args []string)
- func EnableFirewall(_ *cobra.Command, args []string)
- func GetFirewall(_ *cobra.Command, args []string)
- func GetFirewallRule(_ *cobra.Command, args []string)
- func GetIp(_ *cobra.Command, args []string)
- func IpDeleteReverse(_ *cobra.Command, args []string)
- func IpGetReverse(_ *cobra.Command, args []string)
- func IpSetReverse(_ *cobra.Command, args []string)
- func ListFirewall(_ *cobra.Command, args []string)
- func ListFirewallRules(_ *cobra.Command, args []string)
- func ListIp(_ *cobra.Command, _ []string)
Constants ¶
const FirewallRuleCreateExample = `{
"action": "permit",
"protocol": "tcp",
"sequence": 0,
"source": "10.0.0.0/8",
"destinationPort": 443
}`
Variables ¶
var ( FirewallRuleSpec struct { Action string `json:"action"` Protocol string `json:"protocol"` Sequence int `json:"sequence"` Source string `json:"source,omitempty"` DestinationPort int `json:"destinationPort,omitempty"` SourcePort int `json:"sourcePort,omitempty"` TCPFragments bool `json:"-"` TCPOption string `json:"-"` } )
var ( IPSpec struct { Description string `json:"description,omitempty"` } )
Functions ¶
func AddFirewall ¶ added in v0.11.0
AddFirewall adds an IP to the firewall. API: POST /v1/ip/{ip}/firewall
func CreateFirewallRule ¶ added in v0.11.0
CreateFirewallRule creates a new firewall rule. API: POST /v1/ip/{ip}/firewall/{ipOnFirewall}/rule Uses RunE signature so client-side validation errors are returned to cobra (which prints them and exits cleanly without calling os.Exit).
func DeleteFirewall ¶ added in v0.11.0
DeleteFirewall removes an IP and all its rules from the firewall. API: DELETE /v1/ip/{ip}/firewall/{ipOnFirewall}
func DeleteFirewallRule ¶ added in v0.11.0
DeleteFirewallRule deletes a firewall rule. API: DELETE /v1/ip/{ip}/firewall/{ipOnFirewall}/rule/{sequence}
func DisableFirewall ¶ added in v0.11.0
DisableFirewall disables the firewall on an IP. API: PUT /v1/ip/{ip}/firewall/{ipOnFirewall}
func EnableFirewall ¶ added in v0.11.0
EnableFirewall enables the firewall on an IP. API: PUT /v1/ip/{ip}/firewall/{ipOnFirewall}
func GetFirewall ¶ added in v0.11.0
GetFirewall shows firewall status for a specific IP. API: GET /v1/ip/{ip}/firewall/{ipOnFirewall}
func GetFirewallRule ¶ added in v0.11.0
GetFirewallRule gets details of a specific firewall rule. API: GET /v1/ip/{ip}/firewall/{ipOnFirewall}/rule/{sequence}
func IpDeleteReverse ¶
func IpGetReverse ¶
func IpSetReverse ¶
func ListFirewall ¶ added in v0.11.0
ListFirewall lists IPs registered on the firewall for the given IP block. API: GET /v1/ip/{ip}/firewall
func ListFirewallRules ¶ added in v0.11.0
ListFirewallRules lists all firewall rules for the given IP. API: GET /v1/ip/{ip}/firewall/{ipOnFirewall}/rule
Types ¶
This section is empty.