Documentation
¶
Index ¶
- type Client
- func (c *Client) Create(ctx context.Context, req CreateRequest) error
- func (c *Client) Delete(ctx context.Context, req DeleteRequest) error
- func (c *Client) Find(ctx context.Context, req FindRequest) (map[string]interface{}, error)
- func (c *Client) Index(ctx context.Context, req IndexRequest) ([]IndexResponse, error)
- func (c *Client) Update(ctx context.Context, req UpdateRequest) error
- type CreateRequest
- type DeleteRequest
- type FindRequest
- type HTTPClient
- type IndexRequest
- type IndexResponse
- type UpdateRequest
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) error
Create Create IP or Network Alias.
func (*Client) Delete ¶
func (c *Client) Delete(ctx context.Context, req DeleteRequest) error
Delete Remove IP or Network alias.
func (*Client) Index ¶
func (c *Client) Index(ctx context.Context, req IndexRequest) ([]IndexResponse, error)
Index List aliases
type CreateRequest ¶
type CreateRequest struct {
Cidr string `url:"cidr" json:"cidr"` // Network/IP specification in CIDR format.
Name string `url:"name" json:"name"` // Alias name.
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
Comment *string `url:"comment,omitempty" json:"comment,omitempty"`
}
type DeleteRequest ¶
type DeleteRequest struct {
Name string `url:"name" json:"name"` // Alias name.
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
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.
}
type FindRequest ¶
type HTTPClient ¶
type IndexRequest ¶
type IndexResponse ¶
type IndexResponse struct {
Cidr string `url:"cidr" json:"cidr"`
Digest string `url:"digest" json:"digest"` // Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.
Name string `url:"name" json:"name"`
// The following parameters are optional
Comment *string `url:"comment,omitempty" json:"comment,omitempty"`
}
type UpdateRequest ¶
type UpdateRequest struct {
Cidr string `url:"cidr" json:"cidr"` // Network/IP specification in CIDR format.
Name string `url:"name" json:"name"` // Alias name.
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
Comment *string `url:"comment,omitempty" json:"comment,omitempty"`
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.
Rename *string `url:"rename,omitempty" json:"rename,omitempty"` // Rename an existing alias.
}
Click to show internal directories.
Click to hide internal directories.