aliases

package
v0.0.0-...-066dabf Latest Latest
Warning

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

Go to latest
Published: Jan 2, 2024 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GetRequest

type GetRequest struct {
	Client *api.Client
}

func (GetRequest) Get

func (g GetRequest) Get() (GetResponse, error)

func (GetRequest) GetAll

func (g GetRequest) GetAll() ([]byte, error)

func (GetRequest) ParseParams

func (g GetRequest) ParseParams(apiURL *url.URL) error

type GetResponse

type GetResponse []struct {
	CIDR    string `json:"cidr"`
	Digest  string `json:"digest"`
	Name    string `json:"name"`
	Comment string `json:"comment"`
}

type ItemDeleteRequest

type ItemDeleteRequest struct {
	Client *api.Client
	Name   string
	Digest string
}

func (ItemDeleteRequest) Delete

func (g ItemDeleteRequest) Delete() error

type ItemGetRequest

type ItemGetRequest struct {
	Client *api.Client
	Name   string
}

func (ItemGetRequest) Get

func (g ItemGetRequest) Get() (*ItemGetResponse, error)

func (ItemGetRequest) GetItem

func (g ItemGetRequest) GetItem() ([]byte, error)

GetItem satisfies the ItemGetter interface Not to be used directly. Use Get() instead.

type ItemGetResponse

type ItemGetResponse struct {
	Name      string  `json:"name"`
	CIDR      string  `json:"cidr"`
	Comment   *string `json:"comment,omitempty"`
	IPVersion int     `json:"ipversion"`
}

type ItemPutRequest

type ItemPutRequest struct {
	Client *api.Client
	Name   string
	CIDR   string

	// Optional arguments
	Comment *string
	Digest  *string
	Rename  *string
}

func (ItemPutRequest) ParseParams

func (g ItemPutRequest) ParseParams(apiURL *url.URL) error

ParseParams satisfies the ItemPutter interface. Not to be used directly. Use Put() instead.

func (ItemPutRequest) Put

func (g ItemPutRequest) Put() error

func (ItemPutRequest) PutItem

func (g ItemPutRequest) PutItem() ([]byte, error)

PutItem satisfies the ItemPutter interface. Not to be used directly. Use Put() instead.

type PostRequest

type PostRequest struct {
	Client *api.Client

	// Required fields
	CIDR string
	Name string

	// Optional fields
	Comment *string
}

func (PostRequest) ParseParams

func (p PostRequest) ParseParams(apiURL *url.URL) error

ParseParams satisfies the ItemPutter interface. Not to be used directly. Use Post() instead.

func (PostRequest) Post

func (p PostRequest) Post() error

func (PostRequest) PostItem

func (p PostRequest) PostItem() ([]byte, error)

PostItem satisfies the ItemPutter interface. Not to be used directly. Use Post() instead.

Jump to

Keyboard shortcuts

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