exoscale

package
v0.15.1 Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2024 License: Apache-2.0 Imports: 8 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EgoscaleClientI

type EgoscaleClientI interface {
	ListDNSDomainRecords(context.Context, string, string) ([]egoscale.DNSDomainRecord, error)
	ListDNSDomains(context.Context, string) ([]egoscale.DNSDomain, error)
	CreateDNSDomainRecord(context.Context, string, string, *egoscale.DNSDomainRecord) (*egoscale.DNSDomainRecord, error)
	DeleteDNSDomainRecord(context.Context, string, string, *egoscale.DNSDomainRecord) error
	UpdateDNSDomainRecord(context.Context, string, string, *egoscale.DNSDomainRecord) 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(env, zone, key, secret string, dryRun bool, opts ...ExoscaleOption) (*ExoscaleProvider, error)

NewExoscaleProvider returns ExoscaleProvider DNS provider interface implementation

func NewExoscaleProviderWithClient

func NewExoscaleProviderWithClient(client EgoscaleClientI, env, zone string, 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