Documentation ¶
Index ¶
- func LogValidationErrors(request *SendEmailRequest)
- func ReadConfigFromEnv()
- func SendEmail(bodyString string) error
- func SendRawEmail(c *gin.Context, dateDir string, logFilePath string)
- func StartServer()
- type Body
- type ConfigType
- type Content
- type Destination
- type Message
- type RequestBody
- type SendEmailRequest
- type Subject
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LogValidationErrors ¶
func LogValidationErrors(request *SendEmailRequest)
func ReadConfigFromEnv ¶
func ReadConfigFromEnv()
func StartServer ¶
func StartServer()
Types ¶
type ConfigType ¶
type ConfigType struct { Port int `env:"PORT" envDefault:"8081"` SmtpHost string `env:"SMTP_HOST" envDefault:"localhost"` SmtpPort int `env:"SMTP_PORT" envDefault:"25"` SmtpUser string `env:"SMTP_USER"` SmtpPass string `env:"SMTP_PASS"` }
var Config ConfigType
type Destination ¶
type RequestBody ¶
type RequestBody struct {
Action string `json:"Action"`
}
type SendEmailRequest ¶
type SendEmailRequest struct { Action string `json:"Action"` Destination Destination `json:"Destination"` Message Message `json:"Message"` Source string `json:"Source"` ReplyToAddresses []string `json:"ReplyToAddresses"` }
Click to show internal directories.
Click to hide internal directories.