Documentation
¶
Index ¶
- func FilterZonesByDomainName(zones []*anxcloudDns.Zone, domainName string) []*anxcloudDns.Zone
- func GetCreateDeleteSetsFromChanges(changes *plan.Changes) ([]*endpoint.Endpoint, []*endpoint.Endpoint)
- type Configuration
- type DNSClient
- func (c *DNSClient) CreateRecord(ctx context.Context, record *anxcloudDns.Record) error
- func (c *DNSClient) DeleteRecord(ctx context.Context, record *anxcloudDns.Record) error
- func (c *DNSClient) GetRecords(ctx context.Context) ([]*anxcloudDns.Record, error)
- func (c *DNSClient) GetRecordsByZoneNameAndName(ctx context.Context, zoneName, name string) ([]*anxcloudDns.Record, error)
- func (c *DNSClient) GetZones(ctx context.Context) ([]*anxcloudDns.Zone, error)
- type DNSService
- type Provider
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FilterZonesByDomainName ¶ added in v0.2.1
func FilterZonesByDomainName(zones []*anxcloudDns.Zone, domainName string) []*anxcloudDns.Zone
Types ¶
type Configuration ¶
type Configuration struct { APIToken string `env:"ANEXIA_API_TOKEN,notEmpty"` APIEndpointURL string `env:"ANEXIA_API_URL"` DryRun bool `env:"DRY_RUN" envDefault:"false"` }
Configuration holds configuration from environmental variables.
func Init ¶
func Init() Configuration
Init sets up configuration by reading set environmental variables.
type DNSClient ¶
type DNSClient struct {
// contains filtered or unexported fields
}
func (*DNSClient) CreateRecord ¶
func (*DNSClient) DeleteRecord ¶
func (*DNSClient) GetRecords ¶
func (*DNSClient) GetRecordsByZoneNameAndName ¶
type DNSService ¶
type DNSService interface { GetZones(ctx context.Context) ([]*anxcloudDns.Zone, error) GetRecords(ctx context.Context) ([]*anxcloudDns.Record, error) GetRecordsByZoneNameAndName(ctx context.Context, zoneName, name string) ([]*anxcloudDns.Record, error) DeleteRecord(ctx context.Context, record *anxcloudDns.Record) error CreateRecord(ctx context.Context, record *anxcloudDns.Record) error }
type Provider ¶
type Provider struct { provider.BaseProvider // contains filtered or unexported fields }
func NewProvider ¶
func NewProvider(configuration *Configuration, domainFilter endpoint.DomainFilter) (*Provider, error)
NewProvider returns an instance of new provider.
func (*Provider) ApplyChanges ¶
Click to show internal directories.
Click to hide internal directories.