Documentation ¶
Overview ¶
Package cryptokeys contains a specialized client for interacting with PowerDNS' "Cryptokeys" API.
More information ¶
Official API documentation: https://doc.powerdns.com/authoritative/http-api/cryptokey.html
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client interface { // ListCryptokeys lists all CryptoKeys, except its privatekey ListCryptokeys(ctx context.Context, serverID, zoneID string) ([]Cryptokey, error) // GetCryptokey returns all data about the CryptoKey, including the privatekey. // If the server with the given "serverID" does not exist, // the error return value will contain a pdnshttp.ErrNotFound error (see example) GetCryptokey(ctx context.Context, serverID, zoneID string, cryptokeyID int) (*Cryptokey, error) // CreateCryptokey creates a new CryptoKey CreateCryptokey(ctx context.Context, serverID, zoneID string, opts Cryptokey) (*Cryptokey, error) // ToggleCryptokey (de)activates a CryptoKey for the given zone ToggleCryptokey(ctx context.Context, serverID, zoneID string, cryptokeyID int) error // DeleteCryptokey deletes a CryptoKey from the given zone DeleteCryptokey(ctx context.Context, serverID, zoneID string, cryptokeyID int) error }
Client defines method for interacting with the PowerDNS "Cryptokeys" endpoints
type Cryptokey ¶
type Cryptokey struct { ID int `json:"id,omitempty"` Type string `json:"type,omitempty"` KeyType string `json:"keytype,omitempty"` Active bool `json:"active,omitempty"` Published bool `json:"published,omitempty"` DNSKey string `json:"dnskey,omitempty"` DS []string `json:"ds,omitempty"` PrivateKey string `json:"privatekey,omitempty"` Algorithm string `json:"algorithm,omitempty"` Bits int `json:"bits,omitempty"` }
Cryptokey represents a Cryptokey model of the API More information: https://doc.powerdns.com/authoritative/http-api/cryptokey.html#cryptokey
Click to show internal directories.
Click to hide internal directories.