aliases

package
v0.0.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 7, 2023 License: MIT Imports: 1 Imported by: 0

Documentation

Index

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) (*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.

	// 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.

	// 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 FindRequest struct {
	Name string `url:"name",json:"name"` // Alias name.

}

type FindResponse

type FindResponse map[string]interface{}

type HTTPClient

type HTTPClient interface {
	Do(context.Context, string, string, interface{}, interface{}) error
}

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.

	// 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{}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL