Documentation ¶
Index ¶
- Constants
- Variables
- func StrSlicesAreEqual(ss1 []string, ss2 []string) bool
- type CertificateDetails
- type CertificateManager
- func (cm *CertificateManager) DeleteCertificate(arn string) error
- func (cm *CertificateManager) GetDomainValidationChallenges(arn string) ([]DomainValidationChallenge, error)
- func (cm *CertificateManager) IsCertificateIssued(arn string) (bool, error)
- func (cm *CertificateManager) ListIssuedCertificates() ([]CertificateDetails, error)
- func (cm *CertificateManager) RequestCertificate(ds []string, instanceID string) (*string, error)
- type CertificateManagerInterface
- type Distribution
- func (d *Distribution) Create(callerReference string, domains []string, origin string, defaultTTL int64, ...) (*cloudfront.Distribution, error)
- func (d *Distribution) Delete(distId string) (bool, error)
- func (d *Distribution) Disable(distId string) error
- func (d *Distribution) Get(distId string) (*cloudfront.Distribution, error)
- func (d *Distribution) ListDistributions(callback func(cloudfront.DistributionSummary) bool) error
- func (d *Distribution) SetCertificateAndCname(distId, certId string, domains []string) error
- func (d *Distribution) Update(distId string, domains *[]string, origin string, defaultTTL *int64, ...) (*cloudfront.Distribution, error)
- type DistributionIface
- type DomainValidationChallenge
- type Headers
Constants ¶
View Source
const CertificateTagName string = "ServiceInstance"
View Source
const ManagedByTagName string = "ManagedBy"
View Source
const ManagedByTagValue string = "cdn-broker"
Variables ¶
View Source
var ErrValidationTimedOut = errors.New("validation timed out")
ErrValidationTimedOut is the error that we return when the validation of the certificate has timed out, no further explanation is offered by the ACM API.
Functions ¶
func StrSlicesAreEqual ¶
StrSlicesAreEqual returns a bool val if ss1 and ss2 contain the same elems
Types ¶
type CertificateDetails ¶
type CertificateManager ¶
func (*CertificateManager) DeleteCertificate ¶
func (cm *CertificateManager) DeleteCertificate(arn string) error
func (*CertificateManager) GetDomainValidationChallenges ¶
func (cm *CertificateManager) GetDomainValidationChallenges(arn string) ([]DomainValidationChallenge, error)
func (*CertificateManager) IsCertificateIssued ¶
func (cm *CertificateManager) IsCertificateIssued(arn string) (bool, error)
func (*CertificateManager) ListIssuedCertificates ¶
func (cm *CertificateManager) ListIssuedCertificates() ([]CertificateDetails, error)
func (*CertificateManager) RequestCertificate ¶
func (cm *CertificateManager) RequestCertificate(ds []string, instanceID string) (*string, error)
type CertificateManagerInterface ¶
type CertificateManagerInterface interface { //the original is func (c *ACM) RequestCertificate(input *RequestCertificateInput) (*RequestCertificateOutput, error) //we only need to supply the DomainName and SubjectAlternativeNames, everything else can be derived from these. //we will be using only DNS validation //CertificateArn - *string RequestCertificate(ds []string, instanceID string) (*string, error) DeleteCertificate(arn string) error IsCertificateIssued(arn string) (bool, error) GetDomainValidationChallenges(arn string) ([]DomainValidationChallenge, error) ListIssuedCertificates() ([]CertificateDetails, error) }
func NewCertificateManager ¶
func NewCertificateManager(logger lager.Logger, settings config.Settings, session *session.Session) CertificateManagerInterface
NewCertificateManager retruns the NewCertificateManagerInterface, forceing ACM to be in Virginia (us-east-1) region, becuase CloudFront only supports reading certs from that region ONLY for more details - https://docs.aws.amazon.com/cloudfront/latest/APIReference/API_ViewerCertificate.html#cloudfront-Type-ViewerCertificate-ACMCertificateArn
type Distribution ¶
type Distribution struct { Settings config.Settings Service cloudfrontiface.CloudFrontAPI }
func (*Distribution) Create ¶
func (d *Distribution) Create(callerReference string, domains []string, origin string, defaultTTL int64, forwardedHeaders Headers, forwardCookies bool, tags map[string]string) (*cloudfront.Distribution, error)
func (*Distribution) Disable ¶
func (d *Distribution) Disable(distId string) error
func (*Distribution) Get ¶
func (d *Distribution) Get(distId string) (*cloudfront.Distribution, error)
func (*Distribution) ListDistributions ¶
func (d *Distribution) ListDistributions(callback func(cloudfront.DistributionSummary) bool) error
func (*Distribution) SetCertificateAndCname ¶
func (d *Distribution) SetCertificateAndCname(distId, certId string, domains []string) error
func (*Distribution) Update ¶
func (d *Distribution) Update( distId string, domains *[]string, origin string, defaultTTL *int64, forwardedHeaders *Headers, forwardCookies *bool, ) (*cloudfront.Distribution, error)
type DistributionIface ¶
type DistributionIface interface { Create(callerReference string, domains []string, origin string, defaultTTL int64, forwardedHeaders Headers, forwardCookies bool, tags map[string]string) (*cloudfront.Distribution, error) Update(distId string, domains *[]string, origin string, defaultTTL *int64, forwardedHeaders *Headers, forwardCookies *bool) (*cloudfront.Distribution, error) Get(distId string) (*cloudfront.Distribution, error) SetCertificateAndCname(distId, certId string, domains []string) error Disable(distId string) error Delete(distId string) (bool, error) ListDistributions(callback func(cloudfront.DistributionSummary) bool) error }
type DomainValidationChallenge ¶
type DomainValidationChallenge struct { DomainName string `json:"validating_domain_name"` RecordName string `json:"challenge_dns_record"` // RecordType can be only of CNAME type // const acm.RecordTypeCname represents that RecordType string `json:"challenges_dns_record_type"` RecordValue string `json:"challenges_dns_record_value"` // The validation status of the domain name. This can be one of the following // values: // // * PENDING_VALIDATION // // * SUCCESS // // * FAILED ValidationStatus string `json:"status"` }
Click to show internal directories.
Click to hide internal directories.