config

package
v0.0.0-...-f8b4945 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 1, 2026 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

Package config loads rssdigest's SMTP and addressing settings from the env.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	SMTPHost string
	SMTPPort string
	SMTPUser string
	SMTPPass string
	From     string
	To       string
	APIKey   string // Anthropic; optional
}

Config holds everything needed to send a digest.

func Load

func Load(getenv func(string) string) Config

Load reads config from the given env lookup (e.g. os.Getenv). Port defaults to 587. APIKey is optional; the other SMTP/address fields are required only when actually sending (the caller checks Validate before a non-dry-run send).

func (Config) Validate

func (c Config) Validate() error

Validate reports the first missing field required for sending email.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL