utils

package
v0.0.0-...-24c4b6f Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2024 License: CC0-1.0 Imports: 16 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewClient

func NewClient(settings config.Settings, user *User, s3Service *s3.S3, excludes []acme.Challenge) (*acme.Client, error)

Types

type DNSProvider

type DNSProvider struct{}

func (*DNSProvider) CleanUp

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

func (*DNSProvider) Present

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

func (*DNSProvider) Timeout

func (p *DNSProvider) Timeout() (time.Duration, time.Duration)

type Distribution

type Distribution struct {
	Settings config.Settings
	Service  *cloudfront.CloudFront
}

func (*Distribution) Create

func (d *Distribution) Create(callerReference string, domains []string, origin, path string, insecureOrigin bool, forwardedHeaders Headers, forwardCookies bool, tags map[string]string) (*cloudfront.Distribution, error)

func (*Distribution) Delete

func (d *Distribution) Delete(distId string) (bool, 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) SetCertificate

func (d *Distribution) SetCertificate(distId, certId string) 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, path string, insecureOrigin bool, forwardedHeaders Headers, forwardCookies bool) (*cloudfront.Distribution, error)

type DistributionIface

type DistributionIface interface {
	Create(callerReference string, domains []string, origin, path string, insecureOrigin bool, forwardedHeaders Headers, forwardCookies bool, tags map[string]string) (*cloudfront.Distribution, error)
	Update(distId string, domains []string, origin, path string, insecureOrigin bool, forwardedHeaders Headers, forwardCookies bool) (*cloudfront.Distribution, error)
	Get(distId string) (*cloudfront.Distribution, error)
	SetCertificate(distId, certId string) 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 HTTPProvider

type HTTPProvider struct {
	Settings config.Settings
	Service  *s3.S3
}

func (*HTTPProvider) CleanUp

func (p *HTTPProvider) CleanUp(domain, token, keyAuth string) error

func (*HTTPProvider) Present

func (p *HTTPProvider) Present(domain, token, keyAuth string) error

type Headers

type Headers map[string]bool

func (Headers) Add

func (h Headers) Add(header string)

func (Headers) Contains

func (h Headers) Contains(header string) bool

func (Headers) Strings

func (h Headers) Strings() []string

type Iam

type Iam struct {
	Settings config.Settings
	Service  *iam.IAM
}

func (*Iam) DeleteCertificate

func (i *Iam) DeleteCertificate(name string) error

func (*Iam) ListCertificates

func (i *Iam) ListCertificates(callback func(iam.ServerCertificateMetadata) bool) error

func (*Iam) UploadCertificate

func (i *Iam) UploadCertificate(name string, cert acme.CertificateResource) (string, error)

type IamIface

type IamIface interface {
	UploadCertificate(name string, cert acme.CertificateResource) (string, error)
	DeleteCertificate(name string) error
	ListCertificates(callback func(iam.ServerCertificateMetadata) bool) error
}

type User

type User struct {
	Email        string
	Registration *acme.RegistrationResource
	// contains filtered or unexported fields
}

func (*User) GetEmail

func (u *User) GetEmail() string

func (*User) GetPrivateKey

func (u *User) GetPrivateKey() crypto.PrivateKey

func (*User) GetRegistration

func (u *User) GetRegistration() *acme.RegistrationResource

func (*User) SetPrivateKey

func (u *User) SetPrivateKey(key crypto.PrivateKey)

Jump to

Keyboard shortcuts

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