exoscale

package
v0.0.0-...-68a8344 Latest Latest
Warning

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

Go to latest
Published: Sep 2, 2020 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EgoscaleClientI

type EgoscaleClientI interface {
	GetRecords(context.Context, string) ([]egoscale.DNSRecord, error)
	GetDomains(context.Context) ([]egoscale.DNSDomain, error)
	CreateRecord(context.Context, string, egoscale.DNSRecord) (*egoscale.DNSRecord, error)
	DeleteRecord(context.Context, string, int64) error
	UpdateRecord(context.Context, string, egoscale.UpdateDNSRecord) (*egoscale.DNSRecord, error)
}

EgoscaleClientI for replaceable implementation

type ExoscaleOption

type ExoscaleOption func(*ExoscaleProvider)

ExoscaleOption for Provider options

func ExoscaleWithDomain

func ExoscaleWithDomain(domainFilter endpoint.DomainFilter) ExoscaleOption

ExoscaleWithDomain modifies the domain on which dns zones are filtered

func ExoscaleWithLogging

func ExoscaleWithLogging() ExoscaleOption

ExoscaleWithLogging injects logging when ApplyChanges is called

type ExoscaleProvider

type ExoscaleProvider struct {
	provider.BaseProvider

	OnApplyChanges func(changes *plan.Changes)
	// contains filtered or unexported fields
}

ExoscaleProvider initialized as dns provider with no records

func NewExoscaleProvider

func NewExoscaleProvider(endpoint, apiKey, apiSecret string, dryRun bool, opts ...ExoscaleOption) *ExoscaleProvider

NewExoscaleProvider returns ExoscaleProvider DNS provider interface implementation

func NewExoscaleProviderWithClient

func NewExoscaleProviderWithClient(_, apiKey, apiSecret string, client EgoscaleClientI, dryRun bool, opts ...ExoscaleOption) *ExoscaleProvider

NewExoscaleProviderWithClient returns ExoscaleProvider DNS provider interface implementation (Client provided)

func (*ExoscaleProvider) ApplyChanges

func (ep *ExoscaleProvider) ApplyChanges(ctx context.Context, changes *plan.Changes) error

ApplyChanges simply modifies DNS via exoscale API

func (*ExoscaleProvider) Records

func (ep *ExoscaleProvider) Records(ctx context.Context) ([]*endpoint.Endpoint, error)

Records returns the list of endpoints

Jump to

Keyboard shortcuts

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