You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
terraform/builtin/providers/mailgun/config.go

28 lines
412 B

package mailgun
import (
"log"
"github.com/pearkes/mailgun"
)
type Config struct {
APIKey string
}
// Client() returns a new client for accessing mailgun.
//
func (c *Config) Client() (*mailgun.Client, error) {
// We don't set a domain right away
client, err := mailgun.NewClient(c.APIKey)
if err != nil {
return nil, err
}
log.Printf("[INFO] Mailgun Client configured ")
return client, nil
}