Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrNilConfig indicates a nil config was provided. ErrNilConfig = platformerrors.New("postmark config is nil") // ErrEmptyServerToken indicates an empty server token was provided. ErrEmptyServerToken = platformerrors.New("empty Postmark server token") // ErrNilHTTPClient indicates a nil HTTP client was provided. ErrNilHTTPClient = platformerrors.New("nil HTTP client") )
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
ServerToken string `env:"SERVER_TOKEN" json:"serverToken"`
// BaseURL overrides the API base URL (e.g. for testing with httptest).
BaseURL string `env:"BASE_URL" json:"baseURL"`
}
Config configures Postmark to send email.
type Emailer ¶
type Emailer struct {
// contains filtered or unexported fields
}
Emailer uses Postmark to send email.
func NewPostmarkEmailer ¶
func NewPostmarkEmailer(cfg *Config, logger logging.Logger, tracerProvider tracing.TracerProvider, client *http.Client, circuitBreaker circuitbreaking.CircuitBreaker) (*Emailer, error)
NewPostmarkEmailer returns a new Postmark-backed Emailer.
Click to show internal directories.
Click to hide internal directories.