Compare commits
2 Commits
v0.0.1-alp
...
v0.0.1-alp
| Author | SHA1 | Date | |
|---|---|---|---|
| b3b119c402 | |||
| b4e2400bcf |
@@ -22,17 +22,15 @@ type FirewallZone struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (c *Client) ListFirewallZones(ctx context.Context, site string) ([]FirewallZone, error) {
|
func (c *Client) ListFirewallZones(ctx context.Context, site string) ([]FirewallZone, error) {
|
||||||
var respBody struct {
|
var respBody []FirewallZone
|
||||||
Meta meta `json:"meta"`
|
|
||||||
Data []FirewallZone `json:"data"`
|
|
||||||
}
|
|
||||||
|
|
||||||
err := c.do(ctx, "GET", fmt.Sprintf("site/%s/firewall/zone", site), nil, &respBody)
|
err := c.do(ctx, "GET", fmt.Sprintf("site/%s/firewall/zone", site), nil, &respBody)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
return respBody.Data, nil
|
return respBody, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *Client) GetFirewallZone(ctx context.Context, site, id string) (*FirewallZone, error) {
|
func (c *Client) GetFirewallZone(ctx context.Context, site, id string) (*FirewallZone, error) {
|
||||||
|
|||||||
Reference in New Issue
Block a user