internal

package
v0.0.0-...-2413741 Latest Latest
Warning

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

Go to latest
Published: May 19, 2024 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LogValidationErrors

func LogValidationErrors(request *SendEmailRequest)

func ReadConfigFromEnv

func ReadConfigFromEnv()

func SendEmail

func SendEmail(bodyString string) error

func SendRawEmail

func SendRawEmail(c *gin.Context, dateDir string, logFilePath string)

func StartServer

func StartServer()

Types

type Body

type Body struct {
	Text Content `json:"Text"`
	Html Content `json:"Html"`
}

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 Content

type Content struct {
	Data    string `json:"Data"`
	CharSet string `json:"CharSet"`
}

type Destination

type Destination struct {
	ToAddresses  []string `json:"ToAddresses"`
	CcAddresses  []string `json:"CcAddresses"`
	BccAddresses []string `json:"BccAddresses"`
}

type Message

type Message struct {
	Body    Body    `json:"Body"`
	Subject Subject `json:"Subject"`
}

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"`
}

type Subject

type Subject struct {
	Data string `json:"Data"`
}

Jump to

Keyboard shortcuts

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