godop

package
v0.0.0-...-d8123f7 Latest Latest
Warning

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

Go to latest
Published: Oct 6, 2020 License: MIT Imports: 7 Imported by: 2

Documentation

Overview

Package godop provides a godo (DigitalOcean API) compatible autocertdns.Provisioner.

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
}

Client wraps a DigitalOcean godo.Client.

func New

func New(opts ...Option) (*Client, error)

New wraps a godo.Client with a Client that can also handle DNS provisioning requests for use with the autocertdns.Manager.

func (*Client) Provision

func (c *Client) Provision(ctxt context.Context, typ, name, token string) error

Provision creates a DNS record of typ, for the specified domain name and with the value in token.

func (*Client) Unprovision

func (c *Client) Unprovision(ctxt context.Context, typ, name, token string) error

Unprovision deletes the DNS record of typ, for the specified domain name, and for the record with the specified token as the value.

type Option

type Option func(c *Client) error

Option is the Client option type.

func Domain

func Domain(domain string) Option

Domain is a Client option to set the domain.

func Errorf

func Errorf(f func(string, ...interface{})) Option

Errorf is a Client option to specify the error logging function used.

func GodoClient

func GodoClient(client *godo.Client) Option

GodoClient is a Client option to pass an already created godo client.

func GodoClientToken

func GodoClientToken(ctxt context.Context, token string) Option

GodoClientToken is a Client option to pass only the godo client token, and a new godo client will be created.

func GodoClientTokenFile

func GodoClientTokenFile(ctxt context.Context, filename string) Option

GodoClientTokenFile is a Client option to create a new godo client using a token stored in a file on disk.

func Logf

func Logf(f func(string, ...interface{})) Option

Logf is a Client option to specify the logging function used.

Jump to

Keyboard shortcuts

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