akamai

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Jun 25, 2018 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Overview

Package akamai implements a DNS provider for solving the DNS-01 challenge using Akamai FastDNS. See https://developer.akamai.com/api/luna/config-dns/overview.html

Index

Constants

View Source
const NoMaxBody = -1

Variables

This section is empty.

Functions

This section is empty.

Types

type DNSProvider

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

DNSProvider is an implementation of the acme.ChallengeProvider interface

func NewDNSProvider

func NewDNSProvider(serviceConsumerDomain, clientToken, clientSecret, accessToken string) (*DNSProvider, error)

NewDNSProvider returns a DNSProvider instance configured for Akamai.

func (*DNSProvider) CleanUp

func (a *DNSProvider) CleanUp(domain, token, keyAuth string) error

CleanUp removes the TXT record matching the specified parameters

func (*DNSProvider) Present

func (a *DNSProvider) Present(domain, token, keyAuth string) error

Present creates a TXT record to fulfil the dns-01 challenge

func (*DNSProvider) Timeout

func (a *DNSProvider) Timeout() (timeout, interval time.Duration)

Timeout returns the timeout and interval to use when checking for DNS propagation. Adjusting here to cope with spikes in propagation times.

type EdgeGridAuth

type EdgeGridAuth struct {
	ClientToken   string
	ClientSecret  string
	AccessToken   string
	HeadersToSign []string
	MaxBody       int
	// contains filtered or unexported fields
}

EdgeGridAuth holds all values required to perform Akamai API Client Authentication. See https://developer.akamai.com/introduction/Client_Auth.html.

func NewEdgeGridAuth

func NewEdgeGridAuth(clientToken, clientSecret, accessToken string, headersToSign ...string) *EdgeGridAuth

NewEdgeGridAuth returns a new request signer for Akamai EdgeGrid

func (*EdgeGridAuth) SignRequest

func (e *EdgeGridAuth) SignRequest(req *http.Request) error

SignRequest calculates the signature for Akamai Open API and adds it as the Authorization header. The Authorization header starts with the signing algorithm moniker (name of the algorithm) used to sign the request. The moniker below identifies EdgeGrid V1, hash message authentication code, SHA–256 as the hash standard. This moniker is then followed by a space and an ordered list of name value pairs with each field separated by a semicolon.

Jump to

Keyboard shortcuts

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