Mike Schwörer
358c238f3d
Some checks failed
Build Docker and Deploy / Run goext test-suite (push) Failing after 1m28s
23 lines
436 B
Go
23 lines
436 B
Go
package googleapi
|
|
|
|
import (
|
|
"context"
|
|
"net/http"
|
|
)
|
|
|
|
type GoogleClient interface {
|
|
SendMail(ctx context.Context, from string, recipients []string, cc []string, bcc []string, subject string, body MailBody, attachments []MailAttachment) (MailRef, error)
|
|
}
|
|
|
|
type client struct {
|
|
oauth GoogleOAuth
|
|
http http.Client
|
|
}
|
|
|
|
func NewGoogleClient(oauth GoogleOAuth) GoogleClient {
|
|
return &client{
|
|
oauth: oauth,
|
|
http: http.Client{},
|
|
}
|
|
}
|