Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var GitHubClient = &http.Client{ Timeout: 30 * time.Second, CheckRedirect: func(_ *http.Request, _ []*http.Request) error { return http.ErrUseLastResponse }, }
GitHubClient is a shared HTTP client for GitHub API and OAuth calls. Does not follow redirects (OAuth token exchange needs raw response).
var QuotaCheckClient = &http.Client{Timeout: 5 * time.Second}
QuotaCheckClient is a lightweight HTTP client for GitHub rate limit checks.
Functions ¶
func SendEmail ¶
func SendEmail(ctx context.Context, apiKey, from, to, subject, html, text, replyTo string, opts ...EmailOption) error
SendEmail sends an email via the Resend API. The apiKey is a Resend API key. from and to are email addresses; subject, html, and text are the message content. replyTo is optional — if non-empty, sets the Reply-To header on the email. unsubURL is optional — if non-empty, adds List-Unsubscribe header for email clients (e.g. Gmail) to show a native unsubscribe option.
Types ¶
type EmailOption ¶
EmailOption configures optional email parameters.
func WithUnsubscribeURL ¶
func WithUnsubscribeURL(url string) EmailOption
WithUnsubscribeURL adds a List-Unsubscribe header to the email.