Documentation
¶
Overview ¶
Package firewall represents our SiteHost `/server/firewall` API endpoint.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is a Service to work with API Jobs.
func (*Client) Get ¶
func (s *Client) Get(ctx context.Context, request GetRequest) (response GetResponse, err error)
Get retrieves the server firewall configuration.
func (*Client) Update ¶
func (s *Client) Update(ctx context.Context, request UpdateRequest) (response UpdateResponse, err error)
Update function updates the server firewall.
type GetRequest ¶
GetRequest represents a request to get a server's firewall configuration.
type GetResponse ¶
type GetResponse struct {
Return []struct {
Group string `json:"group"`
Pos string `json:"pos"`
Interface string `json:"interface"`
IsRA bool `json:"is_ra"`
} `json:"return"`
Message string `json:"msg"`
Status bool `json:"status"`
}
GetResponse represents the result of a request to retrieve a server's firewall configuration.
type UpdateRequest ¶
type UpdateRequest struct {
ClientID string `json:"client_id"`
ServerName string `json:"server"`
SecurityGroups []string `json:"groups"`
}
UpdateRequest represents a request to update a server's firewall.
type UpdateResponse ¶
type UpdateResponse struct {
Return struct {
models.Job `json:"job"`
} `json:"return"`
models.APIResponse
}
UpdateResponse represents the result of a request to update a server's firewall call.
Directories
¶
| Path | Synopsis |
|---|---|
|
Package securitygroups represents our SiteHost `/server/firewall/security_groups` API endpoint.
|
Package securitygroups represents our SiteHost `/server/firewall/security_groups` API endpoint. |
Click to show internal directories.
Click to hide internal directories.