-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathmain.go
More file actions
32 lines (25 loc) · 722 Bytes
/
main.go
File metadata and controls
32 lines (25 loc) · 722 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
package main
import (
"log"
acmeclient "github.com/disbeliefff/acme-lib/pkg/acme-client"
"github.com/disbeliefff/acme-lib/pkg/lib/logging"
"go.uber.org/zap"
)
func main() {
zapLogger, err := zap.NewDevelopment()
if err != nil {
log.Fatalf("failed to initialize zap logger: %v", err)
}
defer zapLogger.Sync()
logger := logging.NewZapLogger(zapLogger)
// Initialize ACME client with Let's Encrypt directory URL
cfg := acmeclient.Config{
LEdir: "https://acme-v02.api.letsencrypt.org/directory",
Logger: logger,
}
client, err := acmeclient.New(cfg)
if err != nil {
log.Fatalf("failed to create ACME client: %v", err)
}
client.Config.Logger.Info("ACME client initialized", "LEdir", cfg.LEdir)
}