ipams

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Jan 17, 2024 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) error

Create Create a new sdn ipam object.

func (*Client) Delete

func (c *Client) Delete(ctx context.Context, req DeleteRequest) error

Delete Delete sdn ipam object configuration.

func (*Client) Find

func (c *Client) Find(ctx context.Context, req FindRequest) (map[string]interface{}, error)

Find Read sdn ipam configuration.

func (*Client) Index

func (c *Client) Index(ctx context.Context, req IndexRequest) ([]IndexResponse, error)

Index SDN ipams index.

func (*Client) Update

func (c *Client) Update(ctx context.Context, req UpdateRequest) error

Update Update sdn ipam object configuration.

type CreateRequest

type CreateRequest struct {
	Ipam string `url:"ipam" json:"ipam"` // The SDN ipam object identifier.
	Type Type   `url:"type" json:"type"` // Plugin type.

	// The following parameters are optional
	Section *int    `url:"section,omitempty" json:"section,omitempty"`
	Token   *string `url:"token,omitempty" json:"token,omitempty"`
	Url     *string `url:"url,omitempty" json:"url,omitempty"`
}

type DeleteRequest

type DeleteRequest struct {
	Ipam string `url:"ipam" json:"ipam"` // The SDN ipam object identifier.

}

type FindRequest

type FindRequest struct {
	Ipam string `url:"ipam" json:"ipam"` // The SDN ipam object identifier.

}

type HTTPClient

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

type IndexRequest

type IndexRequest struct {

	// The following parameters are optional
	Type *Type `url:"type,omitempty" json:"type,omitempty"` // Only list sdn ipams of specific type
}

type IndexResponse

type IndexResponse struct {
	Ipam string `url:"ipam" json:"ipam"`
	Type string `url:"type" json:"type"`
}

type Type added in v0.0.15

type Type string
const (
	Type_NETBOX  Type = "netbox"
	Type_PHPIPAM Type = "phpipam"
	Type_PVE     Type = "pve"
)

func PtrType added in v0.0.15

func PtrType(i Type) *Type

type UpdateRequest

type UpdateRequest struct {
	Ipam string `url:"ipam" json:"ipam"` // The SDN ipam object identifier.

	// The following parameters are optional
	Delete  *string `url:"delete,omitempty" json:"delete,omitempty"` // A list of settings you want to delete.
	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.
	Section *int    `url:"section,omitempty" json:"section,omitempty"`
	Token   *string `url:"token,omitempty" json:"token,omitempty"`
	Url     *string `url:"url,omitempty" json:"url,omitempty"`
}

Jump to

Keyboard shortcuts

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