emailbridge

package module
v0.0.0-...-8cd9967 Latest Latest
Warning

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

Go to latest
Published: Dec 27, 2020 License: Apache-2.0 Imports: 14 Imported by: 1

README

NAME

emailbridge - Email Bridge CLI

SYNOPSIS

emailbridge

[--debug]
[--help|-h]
[--senderEmail]=[value]
[--senderPassword]=[value]
[--version|-v]

Usage:

emailbridge [GLOBAL OPTIONS] command [COMMAND OPTIONS] [ARGUMENTS...]

GLOBAL OPTIONS

--debug: Enable debug log level

--help, -h: show help

--senderEmail="": Sender Email for authentication and FROM field

--senderPassword="": Sender password for authentication

--version, -v: print the version

COMMANDS

startBridge

Start HTTP to EMAIL Bridge

--encryptPassphrase="":

--pathStatic="": (default: static)

--pathStorage="": (default: storage)

--port="": HTTP Server port (default: 8080)

sendExampleMessage

Send example message

help, h

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConfigLoad

func ConfigLoad(configFile string, cfg *Config) (err error)

Types

type Config

type Config struct {
	Server            string             `yaml:"server", envconfig:"SERVER"`
	Port              int                `yaml:"port", envconfig:"PORT"`
	CORS              string             `yaml:"cors", envconfig:"CORS"`
	StaticFolder      string             `yaml:"staticFolder", envconfig:"STATIC_FOLDER"`
	EncryptPassphrase string             `yaml:"encryptPassphrase", envconfig:"ENCRYPT_PASSPHRASE"`
	EngineConfig      email.EngineConfig `yaml:"engineConfig"`
	Routes            Routes             `yaml:"routes"`
}

func BuildDefault

func BuildDefault() (ret *Config)

func (*Config) Setup

func (o *Config) Setup()

func (*Config) WriteConfig

func (o *Config) WriteConfig(configFile string) (err error)

type HttpEmailBridge

type HttpEmailBridge struct {
	*email.Engine
	*encrypt.Encryptor
	// contains filtered or unexported fields
}

func NewEmailBridge

func NewEmailBridge(config *Config, serveMux *http.ServeMux) (ret *HttpEmailBridge, err error)

func (*HttpEmailBridge) FaviconHandler

func (o *HttpEmailBridge) FaviconHandler(w http.ResponseWriter, r *http.Request)

func (*HttpEmailBridge) GenerateEmailCode

func (o *HttpEmailBridge) GenerateEmailCode(w http.ResponseWriter, r *http.Request)

func (*HttpEmailBridge) SendEmail

func (o *HttpEmailBridge) SendEmail(w http.ResponseWriter, r *http.Request)

func (*HttpEmailBridge) SendEmailByCode

func (o *HttpEmailBridge) SendEmailByCode(w http.ResponseWriter, r *http.Request)

func (HttpEmailBridge) WireRoutes

func (o HttpEmailBridge) WireRoutes(serveMux *http.ServeMux, routes *Routes)

type Routes

type Routes struct {
	Prefix            string `yaml:"prefix"`
	GenerateEmailCode string `yaml:"generateEmailCode"`
	SendEmail         string `yaml:"sendEmail"`
	SendEmailByCode   string `yaml:"sendEmailByCode"`
	Favicon           string `yaml:"favicon"`
}

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

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