selprovider

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 8, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CREATE = "CREATE"
	UPDATE = "UPDATE"
	DELETE = "DELETE"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	// BaseURL is a Selectel DNS API endpoint for v2.DNSClient
	BaseURL string
	// KeystoneProvider needed to generate X-Auth-Token header with keystone-header for requests to the DNS API.
	KeystoneProvider KeystoneProvider
	// DomainFilter is a list with domains that will be affected. If it is empty all available domains will be affected.
	DomainFilter endpoint.DomainFilter
	// DryRun is a flag specifies user's wish to run without requests to the DNS API
	DryRun bool
	// Workers is a number of goroutines that will create requests to the DNS API.
	Workers int
}

Config is used to configure the creation of the Provider.

type KeystoneProvider

type KeystoneProvider interface {
	GetToken() (string, error)
}

type Provider

type Provider struct {
	provider.BaseProvider
	// contains filtered or unexported fields
}

Provider implements the DNS provider interface for Selectel DNS.

func New

func New(config Config, logger *zap.Logger) (*Provider, error)

New creates a new Selectel DNS provider.

func (*Provider) ApplyChanges

func (p *Provider) ApplyChanges(ctx context.Context, changes *plan.Changes) error

ApplyChanges applies a given set of changes.

func (*Provider) GetDomainFilter

func (p *Provider) GetDomainFilter() endpoint.DomainFilter

func (*Provider) Records

func (p *Provider) Records(ctx context.Context) ([]*endpoint.Endpoint, error)

Records returns resource records.

Directories

Path Synopsis
Package mock_selprovider is a generated GoMock package.
Package mock_selprovider is a generated GoMock package.

Jump to

Keyboard shortcuts

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