plural

package
v0.13.0 Latest Latest
Warning

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

Go to latest
Published: Oct 17, 2022 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

func (*PluralProvider) ApplyChanges

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

func (*PluralProvider) PropertyValuesEqual

func (p *PluralProvider) PropertyValuesEqual(name, previous, current string) bool

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