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) 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 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 IP or Network Alias.
func (*Client) Delete ¶
func (c *Client) Delete(ctx context.Context, req *DeleteRequest) (*DeleteResponse, error)
Delete Remove IP or Network alias.
func (*Client) Find ¶
func (c *Client) Find(ctx context.Context, req *FindRequest) (*FindResponse, error)
Find Read alias.
func (*Client) Index ¶
func (c *Client) Index(ctx context.Context, req *IndexRequest) (*IndexResponse, error)
Index List aliases
func (*Client) Update ¶
func (c *Client) Update(ctx context.Context, req *UpdateRequest) (*UpdateResponse, error)
Update Update IP or Network alias.
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 CreateResponse ¶
type CreateResponse map[string]interface{}
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 DeleteResponse ¶
type DeleteResponse map[string]interface{}
type FindRequest ¶
type FindResponse ¶
type FindResponse map[string]interface{}
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.
}
type UpdateResponse ¶
type UpdateResponse map[string]interface{}
Click to show internal directories.
Click to hide internal directories.