provider

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: May 26, 2023 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrProviderNotFound = errors.New("provider not found")

Functions

func RegistedProviders added in v1.1.0

func RegistedProviders() []string

func Register

func Register(name string, factory DNSProviderFactory)

Types

type DNSProviderFactory

type DNSProviderFactory func(*DNSProviderFactoryArgs) (IDNSProvider, error)

type DNSProviderFactoryArgs added in v1.1.0

type DNSProviderFactoryArgs struct {
	Spec *dnsv1.DNSProviderSpec
	Ctx  context.Context
}

type IDNSProvider

type IDNSProvider interface {
	SearchRecord(ctx context.Context, record *dnsv1.DNSRecord) (id string, ok bool, err error)
	CreateRecord(ctx context.Context, record *dnsv1.DNSRecord) (id string, err error)
	UpdateRecord(ctx context.Context, record *dnsv1.DNSRecord, id *string) (err error)
	DeleteRecord(ctx context.Context, record *dnsv1.DNSRecord, id *string) (err error)
}

func New

func New(ctx context.Context, provider *dnsv1.DNSProviderSpec) (IDNSProvider, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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