acme

package
v0.0.1-beta.2 Latest Latest
Warning

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

Go to latest
Published: Jun 9, 2025 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultAcmeDirectory = "https://acme-v02.api.letsencrypt.org/directory"

const DefaultAcmeDirectory = "https://acme-staging-v02.api.letsencrypt.org/directory" // Staging endpoint

Variables

View Source
var ErrNotFound = errors.New("account key not found")

Functions

func GetExistingCertificate

func GetExistingCertificate(ctx context.Context, albArn, domain string) (string, *x509.Certificate, error)

func LoadOrCreateAccountKey

func LoadOrCreateAccountKey(ctx context.Context, keyStore AccountKeyStore) (*ecdsa.PrivateKey, error)

func RemoveHttpRule

func RemoveHttpRule(ctx context.Context, albArn string, ruleCond alb.RuleCondition) error

func SetupHttpRule

func SetupHttpRule(ctx context.Context, albArn, lambdaArn string, ruleCond alb.RuleCondition) error

func UpdateAcmeCertificate

func UpdateAcmeCertificate(ctx context.Context, albArn, domain string, solver acmez.Solver) error

Types

type AccountKeyStore

type AccountKeyStore interface {
	Load(ctx context.Context) ([]byte, error)
	Save(ctx context.Context, key []byte) error
}

type Acme

type Acme struct {
	Directory  string
	AccountKey crypto.Signer
	Logger     *zap.Logger
	AlbArn     string
	HttpSolver acmez.Solver
}

func (Acme) GetCertificate

func (a Acme) GetCertificate(ctx context.Context, domains []string) (crypto.Signer, []byte, error)

type FileAccountKeyStore

type FileAccountKeyStore struct {
	Path string
}

func (FileAccountKeyStore) Load

func (f FileAccountKeyStore) Load(ctx context.Context) ([]byte, error)

func (FileAccountKeyStore) Save

func (f FileAccountKeyStore) Save(ctx context.Context, key []byte) error

type SSMAccountKeyStore

type SSMAccountKeyStore struct {
	Name string
}

func (SSMAccountKeyStore) Load

func (s SSMAccountKeyStore) Load(ctx context.Context) ([]byte, error)

func (SSMAccountKeyStore) Save

func (s SSMAccountKeyStore) Save(ctx context.Context, key []byte) error

Jump to

Keyboard shortcuts

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