Documentation
¶
Index ¶
- func GetCreateDeleteSetsFromChanges(changes *plan.Changes) ([]*endpoint.Endpoint, []*endpoint.Endpoint)
- type Configuration
- type DNSClient
- func (c *DNSClient) CreateRecord(ctx context.Context, _ string, record *anxcloudDns.Record) error
- func (c *DNSClient) DeleteRecord(ctx context.Context, zoneName, recordID string) 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)
- func (c *DNSClient) GetZonesByDomainName(ctx context.Context, domainName string) ([]*anxcloudDns.Zone, error)
- type DNSService
- type Provider
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
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 ¶
func (*DNSClient) GetZonesByDomainName ¶
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) GetZonesByDomainName(ctx context.Context, domainName string) ([]*anxcloudDns.Zone, error) DeleteRecord(ctx context.Context, zoneName, recordID string) error CreateRecord(ctx context.Context, zoneName string, 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.