plural

package
v0.14.0 Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2023 License: Apache-2.0 Imports: 12 Imported by: 1

Documentation

Index

Constants

View Source
const (
	CreateAction = "c"
	DeleteAction = "d"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client interface {
	DnsRecords() ([]*DnsRecord, error)
	CreateRecord(record *DnsRecord) (*DnsRecord, error)
	DeleteRecord(name, ttype string) error
}

func NewClient

func NewClient(conf *Config) (Client, error)

type Config

type Config struct {
	Token    string
	Endpoint string
	Cluster  string
	Provider string
}

func (*Config) BaseUrl

func (c *Config) BaseUrl() (string, error)

type DnsRecord

type DnsRecord struct {
	Type    string
	Name    string
	Records []string
}

type PluralProvider

type PluralProvider struct {
	provider.BaseProvider
	Client Client
}

func NewPluralProvider

func NewPluralProvider(cluster, provider string) (*PluralProvider, error)

func (*PluralProvider) AdjustEndpoints

func (p *PluralProvider) AdjustEndpoints(endpoints []*endpoint.Endpoint) ([]*endpoint.Endpoint, error)

func (*PluralProvider) ApplyChanges

func (p *PluralProvider) ApplyChanges(_ context.Context, diffs *plan.Changes) error

func (*PluralProvider) Records

func (p *PluralProvider) Records(_ context.Context) (endpoints []*endpoint.Endpoint, err error)

type RecordChange

type RecordChange struct {
	Action string
	Record *DnsRecord
}

Jump to

Keyboard shortcuts

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