Documentation ¶
Index ¶
- Constants
- type Client
- func (c *Client) GetOptions(ctx context.Context, req GetOptionsRequest) (GetOptionsResponse, error)
- func (c *Client) Index(ctx context.Context, req IndexRequest) ([]map[string]interface{}, 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) error
- type GetOptionsRequest
- type GetOptionsResponse
- type HTTPClient
- type IndexRequest
- type LogLevelIn
- type LogLevelOut
- type LogRequest
- type LogResponse
- type PolicyIn
- type PolicyOut
- type RefsRequest
- type RefsResponse
- type SetOptionsRequest
- type Type
Constants ¶
View Source
const ( LogLevelIn_EMERG LogLevelIn = "emerg" LogLevelIn_ALERT LogLevelIn = "alert" LogLevelIn_CRIT LogLevelIn = "crit" LogLevelIn_ERR LogLevelIn = "err" LogLevelIn_WARNING LogLevelIn = "warning" LogLevelIn_NOTICE LogLevelIn = "notice" LogLevelIn_INFO LogLevelIn = "info" LogLevelIn_DEBUG LogLevelIn = "debug" LogLevelIn_NOLOG LogLevelIn = "nolog" LogLevelOut_EMERG LogLevelOut = "emerg" LogLevelOut_ALERT LogLevelOut = "alert" LogLevelOut_CRIT LogLevelOut = "crit" LogLevelOut_ERR LogLevelOut = "err" LogLevelOut_WARNING LogLevelOut = "warning" LogLevelOut_NOTICE LogLevelOut = "notice" LogLevelOut_INFO LogLevelOut = "info" LogLevelOut_DEBUG LogLevelOut = "debug" LogLevelOut_NOLOG LogLevelOut = "nolog" PolicyIn_ACCEPT PolicyIn = "ACCEPT" PolicyIn_REJECT PolicyIn = "REJECT" PolicyIn_DROP PolicyIn = "DROP" PolicyOut_ACCEPT PolicyOut = "ACCEPT" PolicyOut_REJECT PolicyOut = "REJECT" PolicyOut_DROP PolicyOut = "DROP" Type_ALIAS Type = "alias" Type_IPSET Type = "ipset" )
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) 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) error
SetOptions Set Firewall options.
type GetOptionsRequest ¶
type GetOptionsResponse ¶
type GetOptionsResponse struct { // The following parameters are optional Dhcp *util.PVEBool `url:"dhcp,omitempty" json:"dhcp,omitempty"` // Enable DHCP. Enable *util.PVEBool `url:"enable,omitempty" json:"enable,omitempty"` // Enable/disable firewall rules. Ipfilter *util.PVEBool `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 *LogLevelIn `url:"log_level_in,omitempty" json:"log_level_in,omitempty"` // Log level for incoming traffic. LogLevelOut *LogLevelOut `url:"log_level_out,omitempty" json:"log_level_out,omitempty"` // Log level for outgoing traffic. Macfilter *util.PVEBool `url:"macfilter,omitempty" json:"macfilter,omitempty"` // Enable/disable MAC address filter. Ndp *util.PVEBool `url:"ndp,omitempty" json:"ndp,omitempty"` // Enable NDP (Neighbor Discovery Protocol). PolicyIn *PolicyIn `url:"policy_in,omitempty" json:"policy_in,omitempty"` // Input policy. PolicyOut *PolicyOut `url:"policy_out,omitempty" json:"policy_out,omitempty"` // Output policy. Radv *util.PVEBool `url:"radv,omitempty" json:"radv,omitempty"` // Allow sending Router Advertisement. }
type HTTPClient ¶
type IndexRequest ¶
type LogLevelIn ¶ added in v0.0.15
type LogLevelIn string
func PtrLogLevelIn ¶ added in v0.0.15
func PtrLogLevelIn(i LogLevelIn) *LogLevelIn
type LogLevelOut ¶ added in v0.0.15
type LogLevelOut string
func PtrLogLevelOut ¶ added in v0.0.15
func PtrLogLevelOut(i LogLevelOut) *LogLevelOut
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"` Since *int `url:"since,omitempty" json:"since,omitempty"` // Display log since this UNIX epoch. Start *int `url:"start,omitempty" json:"start,omitempty"` Until *int `url:"until,omitempty" json:"until,omitempty"` // Display log until this UNIX epoch. }
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.PVEBool `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.PVEBool `url:"enable,omitempty" json:"enable,omitempty"` // Enable/disable firewall rules. Ipfilter *util.PVEBool `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 *LogLevelIn `url:"log_level_in,omitempty" json:"log_level_in,omitempty"` // Log level for incoming traffic. LogLevelOut *LogLevelOut `url:"log_level_out,omitempty" json:"log_level_out,omitempty"` // Log level for outgoing traffic. Macfilter *util.PVEBool `url:"macfilter,omitempty" json:"macfilter,omitempty"` // Enable/disable MAC address filter. Ndp *util.PVEBool `url:"ndp,omitempty" json:"ndp,omitempty"` // Enable NDP (Neighbor Discovery Protocol). PolicyIn *PolicyIn `url:"policy_in,omitempty" json:"policy_in,omitempty"` // Input policy. PolicyOut *PolicyOut `url:"policy_out,omitempty" json:"policy_out,omitempty"` // Output policy. Radv *util.PVEBool `url:"radv,omitempty" json:"radv,omitempty"` // Allow sending Router Advertisement. }
Click to show internal directories.
Click to hide internal directories.