akamai

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: May 11, 2021 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AkamaiConfig

type AkamaiConfig struct {
	AkamaiConfigPath    string
	AkamaiContracts     string `yaml:"akamai_contracts"`
	AkamaiNameFilter    string `yaml:"akamai_name_filter"`
	AkamaiEdgercPath    string `yaml:"akamai_edgerc_path"`
	AkamaiEdgercSection string `yaml:"akamai_edgerc_section"`
	AkamaiHost          string `yaml:"akamai_host"`
	AkamaiAccessToken   string `yaml:"akamai_access_token"`
	AkamaiClientToken   string `yaml:"akamai_client_token"`
	AkamaiClientSecret  string `yaml:"akamai_client_secret"`
	MaxBody             int    `yaml:"akamai_max_body"`
	AccountKey          string `yaml:"akamai_account_key"`
}

type AkamaiDNSService

type AkamaiDNSService interface {
	GetDomains(ctx context.Context) ([]string, error)
	GetDomain(ctx context.Context, domain string) (*registrar.Domain, error)
	GetTsigKey(ctx context.Context, domain string) (*dns.TSIGKey, error)
	GetServeAlgorithm(ctx context.Context, domain string) (string, error)
	GetMasterIPs(ctx context.Context) ([]string, error)
}

edgeDNSClient is a proxy interface of the Akamai edgegrid configdns-v2 package that can be stubbed for testing.

type AkamaiRegistrar

type AkamaiRegistrar struct {
	registrar.BaseRegistrarProvider
	// contains filtered or unexported fields
}

AkamaiProvider implements the DNS provider for Akamai.

func NewAkamaiRegistrar

func NewAkamaiRegistrar(ctx context.Context, akaConfig AkamaiConfig, akaService AkamaiDNSService) (*AkamaiRegistrar, error)

NewAkamaiProvider initializes a new Akamai DNS based Provider.

func (*AkamaiRegistrar) GetDomain

func (a *AkamaiRegistrar) GetDomain(ctx context.Context, domain string) (*registrar.Domain, error)

func (*AkamaiRegistrar) GetDomains

func (a *AkamaiRegistrar) GetDomains(ctx context.Context) ([]string, error)

func (*AkamaiRegistrar) GetMasterIPs

func (a *AkamaiRegistrar) GetMasterIPs(ctx context.Context) ([]string, error)

func (*AkamaiRegistrar) GetServeAlgorithm

func (a *AkamaiRegistrar) GetServeAlgorithm(ctx context.Context, domain string) (algo string, err error)

func (*AkamaiRegistrar) GetTsigKey

func (a *AkamaiRegistrar) GetTsigKey(ctx context.Context, domain string) (tsigKey *dns.TSIGKey, err error)

type OpenDNSConfig

type OpenDNSConfig struct {
	// contains filtered or unexported fields
}

func (OpenDNSConfig) GetNameServerRecordList

func (o OpenDNSConfig) GetNameServerRecordList(contractId string) ([]string, error)

func (OpenDNSConfig) GetZone

func (o OpenDNSConfig) GetZone(domain string) (*dns.ZoneResponse, error)

func (OpenDNSConfig) GetZoneKey

func (o OpenDNSConfig) GetZoneKey(domain string) (*dns.TSIGKeyResponse, error)

func (OpenDNSConfig) ListZones

func (o OpenDNSConfig) ListZones(queryArgs dns.ZoneListQueryArgs) (*dns.ZoneListResponse, error)

Open DNS stubbable functions

type OpenEdgegridDNSService

type OpenEdgegridDNSService interface {
	ListZones(queryArgs dns.ZoneListQueryArgs) (*dns.ZoneListResponse, error)
	GetZone(domain string) (*dns.ZoneResponse, error)
	GetZoneKey(domain string) (*dns.TSIGKeyResponse, error)
	GetNameServerRecordList(contractId string) ([]string, error)
}

Jump to

Keyboard shortcuts

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