Documentation ¶
Index ¶
- type Client
- func (c *Client) Create(ctx context.Context, req *CreateRequest) (*CreateResponse, error)
- func (c *Client) Delete(ctx context.Context, req *DeleteRequest) (*DeleteResponse, error)
- func (c *Client) Find(ctx context.Context, req *FindRequest) (*FindResponse, error)
- func (c *Client) Index(ctx context.Context, req *IndexRequest) (*IndexResponse, error)
- func (c *Client) MassDelete(ctx context.Context, req *MassDeleteRequest) (*MassDeleteResponse, error)
- func (c *Client) MassUpdate(ctx context.Context, req *MassUpdateRequest) (*MassUpdateResponse, error)
- func (c *Client) Update(ctx context.Context, req *UpdateRequest) (*UpdateResponse, error)
- type CreateRequest
- type CreateResponse
- type DeleteRequest
- type DeleteResponse
- type FindRequest
- type FindResponse
- type HTTPClient
- type IndexRequest
- type IndexResponse
- type MassDeleteRequest
- type MassDeleteResponse
- type MassUpdateRequest
- type MassUpdateResponse
- type UpdateRequest
- type UpdateResponse
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) Create ¶
func (c *Client) Create(ctx context.Context, req *CreateRequest) (*CreateResponse, error)
Create Create network device configuration
func (*Client) Delete ¶
func (c *Client) Delete(ctx context.Context, req *DeleteRequest) (*DeleteResponse, error)
Delete Delete network device configuration
func (*Client) Find ¶
func (c *Client) Find(ctx context.Context, req *FindRequest) (*FindResponse, error)
Find Read network device configuration
func (*Client) Index ¶
func (c *Client) Index(ctx context.Context, req *IndexRequest) (*IndexResponse, error)
Index List available networks
func (*Client) MassDelete ¶
func (c *Client) MassDelete(ctx context.Context, req *MassDeleteRequest) (*MassDeleteResponse, error)
MassDelete Revert network configuration changes.
func (*Client) MassUpdate ¶
func (c *Client) MassUpdate(ctx context.Context, req *MassUpdateRequest) (*MassUpdateResponse, error)
MassUpdate Reload network configuration
func (*Client) Update ¶
func (c *Client) Update(ctx context.Context, req *UpdateRequest) (*UpdateResponse, error)
Update Update network device configuration
type CreateRequest ¶
type CreateRequest struct { Iface string `url:"iface",json:"iface"` // Network interface name. Node string `url:"node",json:"node"` // The cluster node name. Type string `url:"type",json:"type"` // Network interface type // The following parameters are optional Address *string `url:"address,omitempty",json:"address,omitempty"` // IP address. Address6 *string `url:"address6,omitempty",json:"address6,omitempty"` // IP address. Autostart *bool `url:"autostart,omitempty",json:"autostart,omitempty"` // Automatically start interface on boot. BondMode *string `url:"bond_mode,omitempty",json:"bond_mode,omitempty"` // Bonding mode. BondPrimary *string `url:"bond-primary,omitempty",json:"bond-primary,omitempty"` // Specify the primary interface for active-backup bond. BondXmitHashPolicy *string `url:"bond_xmit_hash_policy,omitempty",json:"bond_xmit_hash_policy,omitempty"` // Selects the transmit hash policy to use for slave selection in balance-xor and 802.3ad modes. BridgePorts *string `url:"bridge_ports,omitempty",json:"bridge_ports,omitempty"` // Specify the interfaces you want to add to your bridge. BridgeVlanAware *bool `url:"bridge_vlan_aware,omitempty",json:"bridge_vlan_aware,omitempty"` // Enable bridge vlan support. Cidr *string `url:"cidr,omitempty",json:"cidr,omitempty"` // IPv4 CIDR. Cidr6 *string `url:"cidr6,omitempty",json:"cidr6,omitempty"` // IPv6 CIDR. Comments *string `url:"comments,omitempty",json:"comments,omitempty"` // Comments Comments6 *string `url:"comments6,omitempty",json:"comments6,omitempty"` // Comments Gateway *string `url:"gateway,omitempty",json:"gateway,omitempty"` // Default gateway address. Gateway6 *string `url:"gateway6,omitempty",json:"gateway6,omitempty"` // Default ipv6 gateway address. Mtu *int `url:"mtu,omitempty",json:"mtu,omitempty"` // MTU. Netmask *string `url:"netmask,omitempty",json:"netmask,omitempty"` // Network mask. Netmask6 *int `url:"netmask6,omitempty",json:"netmask6,omitempty"` // Network mask. OvsBonds *string `url:"ovs_bonds,omitempty",json:"ovs_bonds,omitempty"` // Specify the interfaces used by the bonding device. OvsBridge *string `url:"ovs_bridge,omitempty",json:"ovs_bridge,omitempty"` // The OVS bridge associated with a OVS port. This is required when you create an OVS port. OvsOptions *string `url:"ovs_options,omitempty",json:"ovs_options,omitempty"` // OVS interface options. OvsPorts *string `url:"ovs_ports,omitempty",json:"ovs_ports,omitempty"` // Specify the interfaces you want to add to your bridge. OvsTag *int `url:"ovs_tag,omitempty",json:"ovs_tag,omitempty"` // Specify a VLan tag (used by OVSPort, OVSIntPort, OVSBond) Slaves *string `url:"slaves,omitempty",json:"slaves,omitempty"` // Specify the interfaces used by the bonding device. VlanId *int `url:"vlan-id,omitempty",json:"vlan-id,omitempty"` // vlan-id for a custom named vlan interface (ifupdown2 only). VlanRawDevice *string `url:"vlan-raw-device,omitempty",json:"vlan-raw-device,omitempty"` // Specify the raw interface for the vlan interface. }
type CreateResponse ¶
type CreateResponse map[string]interface{}
type DeleteRequest ¶
type DeleteResponse ¶
type DeleteResponse map[string]interface{}
type FindRequest ¶
type FindResponse ¶
type HTTPClient ¶
type IndexRequest ¶
type IndexResponse ¶
type IndexResponse []*map[string]interface{}
type MassDeleteRequest ¶
type MassDeleteRequest struct {
Node string `url:"node",json:"node"` // The cluster node name.
}
type MassDeleteResponse ¶
type MassDeleteResponse map[string]interface{}
type MassUpdateRequest ¶
type MassUpdateRequest struct {
Node string `url:"node",json:"node"` // The cluster node name.
}
type MassUpdateResponse ¶
type MassUpdateResponse string
type UpdateRequest ¶
type UpdateRequest struct { Iface string `url:"iface",json:"iface"` // Network interface name. Node string `url:"node",json:"node"` // The cluster node name. Type string `url:"type",json:"type"` // Network interface type // The following parameters are optional Address *string `url:"address,omitempty",json:"address,omitempty"` // IP address. Address6 *string `url:"address6,omitempty",json:"address6,omitempty"` // IP address. Autostart *bool `url:"autostart,omitempty",json:"autostart,omitempty"` // Automatically start interface on boot. BondMode *string `url:"bond_mode,omitempty",json:"bond_mode,omitempty"` // Bonding mode. BondPrimary *string `url:"bond-primary,omitempty",json:"bond-primary,omitempty"` // Specify the primary interface for active-backup bond. BondXmitHashPolicy *string `url:"bond_xmit_hash_policy,omitempty",json:"bond_xmit_hash_policy,omitempty"` // Selects the transmit hash policy to use for slave selection in balance-xor and 802.3ad modes. BridgePorts *string `url:"bridge_ports,omitempty",json:"bridge_ports,omitempty"` // Specify the interfaces you want to add to your bridge. BridgeVlanAware *bool `url:"bridge_vlan_aware,omitempty",json:"bridge_vlan_aware,omitempty"` // Enable bridge vlan support. Cidr *string `url:"cidr,omitempty",json:"cidr,omitempty"` // IPv4 CIDR. Cidr6 *string `url:"cidr6,omitempty",json:"cidr6,omitempty"` // IPv6 CIDR. Comments *string `url:"comments,omitempty",json:"comments,omitempty"` // Comments Comments6 *string `url:"comments6,omitempty",json:"comments6,omitempty"` // Comments Delete *string `url:"delete,omitempty",json:"delete,omitempty"` // A list of settings you want to delete. Gateway *string `url:"gateway,omitempty",json:"gateway,omitempty"` // Default gateway address. Gateway6 *string `url:"gateway6,omitempty",json:"gateway6,omitempty"` // Default ipv6 gateway address. Mtu *int `url:"mtu,omitempty",json:"mtu,omitempty"` // MTU. Netmask *string `url:"netmask,omitempty",json:"netmask,omitempty"` // Network mask. Netmask6 *int `url:"netmask6,omitempty",json:"netmask6,omitempty"` // Network mask. OvsBonds *string `url:"ovs_bonds,omitempty",json:"ovs_bonds,omitempty"` // Specify the interfaces used by the bonding device. OvsBridge *string `url:"ovs_bridge,omitempty",json:"ovs_bridge,omitempty"` // The OVS bridge associated with a OVS port. This is required when you create an OVS port. OvsOptions *string `url:"ovs_options,omitempty",json:"ovs_options,omitempty"` // OVS interface options. OvsPorts *string `url:"ovs_ports,omitempty",json:"ovs_ports,omitempty"` // Specify the interfaces you want to add to your bridge. OvsTag *int `url:"ovs_tag,omitempty",json:"ovs_tag,omitempty"` // Specify a VLan tag (used by OVSPort, OVSIntPort, OVSBond) Slaves *string `url:"slaves,omitempty",json:"slaves,omitempty"` // Specify the interfaces used by the bonding device. VlanId *int `url:"vlan-id,omitempty",json:"vlan-id,omitempty"` // vlan-id for a custom named vlan interface (ifupdown2 only). VlanRawDevice *string `url:"vlan-raw-device,omitempty",json:"vlan-raw-device,omitempty"` // Specify the raw interface for the vlan interface. }
type UpdateResponse ¶
type UpdateResponse map[string]interface{}
Click to show internal directories.
Click to hide internal directories.