Documentation ¶
Index ¶
- type Client
- func (c *Client) GetOptions(ctx context.Context, req *GetOptionsRequest) (*GetOptionsResponse, error)
- func (c *Client) Index(ctx context.Context, req *IndexRequest) (*IndexResponse, error)
- func (c *Client) Log(ctx context.Context, req *LogRequest) (*LogResponse, error)
- func (c *Client) Refs(ctx context.Context, req *RefsRequest) (*RefsResponse, error)
- func (c *Client) SetOptions(ctx context.Context, req *SetOptionsRequest) (*SetOptionsResponse, error)
- type GetOptionsRequest
- type GetOptionsResponse
- type HTTPClient
- type IndexRequest
- type IndexResponse
- type LogRequest
- type LogResponse
- type RefsRequest
- type RefsResponse
- type SetOptionsRequest
- type SetOptionsResponse
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
}
func New ¶
func New(c HTTPClient) *Client
func (*Client) GetOptions ¶
func (c *Client) GetOptions(ctx context.Context, req *GetOptionsRequest) (*GetOptionsResponse, error)
GetOptions Get VM firewall options.
func (*Client) Index ¶
func (c *Client) Index(ctx context.Context, req *IndexRequest) (*IndexResponse, error)
Index Directory index.
func (*Client) Log ¶
func (c *Client) Log(ctx context.Context, req *LogRequest) (*LogResponse, error)
Log Read firewall log
func (*Client) Refs ¶
func (c *Client) Refs(ctx context.Context, req *RefsRequest) (*RefsResponse, error)
Refs Lists possible IPSet/Alias reference which are allowed in source/dest properties.
func (*Client) SetOptions ¶
func (c *Client) SetOptions(ctx context.Context, req *SetOptionsRequest) (*SetOptionsResponse, error)
SetOptions Set Firewall options.
type GetOptionsRequest ¶
type GetOptionsResponse ¶
type GetOptionsResponse struct { // The following parameters are optional Dhcp *util.SpecialBool `url:"dhcp,omitempty",json:"dhcp,omitempty"` // Enable DHCP. Enable *util.SpecialBool `url:"enable,omitempty",json:"enable,omitempty"` // Enable/disable firewall rules. Ipfilter *util.SpecialBool `url:"ipfilter,omitempty",json:"ipfilter,omitempty"` // Enable default IP filters. This is equivalent to adding an empty ipfilter-net<id> ipset for every interface. Such ipsets implicitly contain sane default restrictions such as restricting IPv6 link local addresses to the one derived from the interface's MAC address. For containers the configured IP addresses will be implicitly added. LogLevelIn *string `url:"log_level_in,omitempty",json:"log_level_in,omitempty"` // Log level for incoming traffic. LogLevelOut *string `url:"log_level_out,omitempty",json:"log_level_out,omitempty"` // Log level for outgoing traffic. Macfilter *util.SpecialBool `url:"macfilter,omitempty",json:"macfilter,omitempty"` // Enable/disable MAC address filter. Ndp *util.SpecialBool `url:"ndp,omitempty",json:"ndp,omitempty"` // Enable NDP (Neighbor Discovery Protocol). PolicyIn *string `url:"policy_in,omitempty",json:"policy_in,omitempty"` // Input policy. PolicyOut *string `url:"policy_out,omitempty",json:"policy_out,omitempty"` // Output policy. Radv *util.SpecialBool `url:"radv,omitempty",json:"radv,omitempty"` // Allow sending Router Advertisement. }
type HTTPClient ¶
type IndexRequest ¶
type IndexResponse ¶
type IndexResponse []*map[string]interface{}
type LogRequest ¶
type LogRequest struct { Node string `url:"node",json:"node"` // The cluster node name. Vmid int `url:"vmid",json:"vmid"` // The (unique) ID of the VM. // The following parameters are optional Limit *int `url:"limit,omitempty",json:"limit,omitempty"` Start *int `url:"start,omitempty",json:"start,omitempty"` }
type LogResponse ¶
type RefsRequest ¶
type RefsResponse ¶
type SetOptionsRequest ¶
type SetOptionsRequest struct { Node string `url:"node",json:"node"` // The cluster node name. Vmid int `url:"vmid",json:"vmid"` // The (unique) ID of the VM. // The following parameters are optional Delete *string `url:"delete,omitempty",json:"delete,omitempty"` // A list of settings you want to delete. Dhcp *util.SpecialBool `url:"dhcp,omitempty",json:"dhcp,omitempty"` // Enable DHCP. Digest *string `url:"digest,omitempty",json:"digest,omitempty"` // Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications. Enable *util.SpecialBool `url:"enable,omitempty",json:"enable,omitempty"` // Enable/disable firewall rules. Ipfilter *util.SpecialBool `url:"ipfilter,omitempty",json:"ipfilter,omitempty"` // Enable default IP filters. This is equivalent to adding an empty ipfilter-net<id> ipset for every interface. Such ipsets implicitly contain sane default restrictions such as restricting IPv6 link local addresses to the one derived from the interface's MAC address. For containers the configured IP addresses will be implicitly added. LogLevelIn *string `url:"log_level_in,omitempty",json:"log_level_in,omitempty"` // Log level for incoming traffic. LogLevelOut *string `url:"log_level_out,omitempty",json:"log_level_out,omitempty"` // Log level for outgoing traffic. Macfilter *util.SpecialBool `url:"macfilter,omitempty",json:"macfilter,omitempty"` // Enable/disable MAC address filter. Ndp *util.SpecialBool `url:"ndp,omitempty",json:"ndp,omitempty"` // Enable NDP (Neighbor Discovery Protocol). PolicyIn *string `url:"policy_in,omitempty",json:"policy_in,omitempty"` // Input policy. PolicyOut *string `url:"policy_out,omitempty",json:"policy_out,omitempty"` // Output policy. Radv *util.SpecialBool `url:"radv,omitempty",json:"radv,omitempty"` // Allow sending Router Advertisement. }
type SetOptionsResponse ¶
type SetOptionsResponse map[string]interface{}
Click to show internal directories.
Click to hide internal directories.