mirror of
https://github.com/certimate-go/certimate.git
synced 2026-06-22 21:05:48 +08:00
26 lines
392 B
Go
26 lines
392 B
Go
package certdeploy
|
|
|
|
import (
|
|
"log/slog"
|
|
)
|
|
|
|
type Client struct {
|
|
logger *slog.Logger
|
|
}
|
|
|
|
type ClientConfigure func(*Client)
|
|
|
|
func NewClient(configures ...ClientConfigure) *Client {
|
|
client := &Client{}
|
|
for _, configure := range configures {
|
|
configure(client)
|
|
}
|
|
return client
|
|
}
|
|
|
|
func WithLogger(logger *slog.Logger) ClientConfigure {
|
|
return func(c *Client) {
|
|
c.logger = logger
|
|
}
|
|
}
|