plugins

package
v0.66.3 Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2024 License: MPL-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ACMEPluginsCreateRequestBody

type ACMEPluginsCreateRequestBody struct {
	BaseACMEPluginData
	// ACME Plugin ID name
	Plugin string `json:"id" url:"id"`
	// DNS plugin data. (base64 encoded)
	Data *DNSPluginData `url:"data,omitempty"`
	// Flag to disable the config.
	Disable bool `url:"disable,omitempty,int"`
}

ACMEPluginsCreateRequestBody contains the body for creating a new ACME plugin.

type ACMEPluginsGetResponseBody

type ACMEPluginsGetResponseBody struct {
	Data *ACMEPluginsGetResponseData `json:"data,omitempty"`
}

ACMEPluginsGetResponseBody contains the body from an ACME plugins get response.

type ACMEPluginsGetResponseData

type ACMEPluginsGetResponseData struct {
	BaseACMEPluginData
	// ACME Plugin ID name
	Plugin string `json:"plugin" url:"plugin"`
	// DNS plugin data.
	Data *DNSPluginData `json:"data"`
}

ACMEPluginsGetResponseData contains the data from an ACME plugins get response.

type ACMEPluginsListResponseBody

type ACMEPluginsListResponseBody struct {
	// Unique identifier for ACME plugin instance.
	Data []*ACMEPluginsListResponseData `json:"data,omitempty"`
}

ACMEPluginsListResponseBody contains the body from an ACME plugins list response.

type ACMEPluginsListResponseData

type ACMEPluginsListResponseData struct {
	BaseACMEPluginData
	// ACME Plugin ID name
	Plugin string `json:"plugin" url:"plugin"`
	// DNS plugin data.
	Data *DNSPluginData `json:"data,omitempty"`
}

ACMEPluginsListResponseData contains the data from an ACME plugins list response.

type ACMEPluginsUpdateRequestBody

type ACMEPluginsUpdateRequestBody struct {
	BaseACMEPluginData
	// DNS plugin data. (base64 encoded)
	Data *DNSPluginData `url:"data,omitempty"`
	// A list of settings you want to delete.
	Delete string `url:"delete,omitempty"`
	// Flag to disable the config.
	Disable bool `url:"disable,omitempty,int"`
}

ACMEPluginsUpdateRequestBody contains the body for updating an existing ACME plugin.

type BaseACMEPluginData

type BaseACMEPluginData struct {
	// ACME challenge type (dns, standalone).
	Type string `json:"type,omitempty" url:"type,omitempty"`
	// Prevent changes if current configuration file has a different digest. This can be used to prevent concurrent modifications.
	Digest string `json:"digest,omitempty" url:"digest,omitempty"`
	// API plugin name
	API string `json:"api,omitempty" url:"api,omitempty"`
	// Extra delay in seconds to wait before requesting validation. Allows to cope with a long TTL of DNS records (0 - 172800).
	ValidationDelay int64 `json:"validation-delay,omitempty" url:"validation-delay,omitempty"`
}

BaseACMEPluginData contains common fields for ACME plugin data.

type Client

type Client struct {
	api.Client
}

Client is an interface for accessing the Proxmox ACME plugins API.

func (*Client) Create

Create creates a new ACME plugin.

func (*Client) Delete

func (c *Client) Delete(ctx context.Context, id string) error

Delete removes an ACME plugin.

func (*Client) ExpandPath

func (c *Client) ExpandPath(path string) string

ExpandPath expands a relative path to the Proxmox ACME plugins API path.

func (*Client) Get

Get retrieves a single ACME plugin based on its identifier.

func (*Client) List

List returns a list of ACME plugins.

func (*Client) Update

func (c *Client) Update(ctx context.Context, id string, data *ACMEPluginsUpdateRequestBody) error

Update updates an existing ACME plugin.

type DNSPluginData

type DNSPluginData map[string]string

DNSPluginData is a map of DNS plugin data.

func (DNSPluginData) EncodeValues

func (d DNSPluginData) EncodeValues(key string, v *url.Values) error

EncodeValues encodes the DNSPluginData into the URL values.

func (*DNSPluginData) UnmarshalJSON

func (d *DNSPluginData) UnmarshalJSON(b []byte) error

UnmarshalJSON unmarshals a DNSPluginData struct from JSON.

Jump to

Keyboard shortcuts

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