goext/googleapi/service.go
Mike Schwörer 358c238f3d
Some checks failed
Build Docker and Deploy / Run goext test-suite (push) Failing after 1m28s
google mail API [[FIN]]
2023-12-04 13:55:41 +01:00

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{},
}
}