communication

package
v0.0.0-...-d3d53d6 Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2016 License: BSD-3-Clause Imports: 7 Imported by: 0

Documentation

Overview

Package communication contains the implementation for communication channels that itsyou.online can use to communicate with users.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DevEmailService

type DevEmailService struct{}

DevEmailService is the implementation of an EmailService suitable for use in local development environments

func (*DevEmailService) Send

func (s *DevEmailService) Send(recipients []string, subject string, message string) (err error)

Send sends an Email

type DevSMSService

type DevSMSService struct {
}

DevSMSService is a fake sms service that just logs the sms that should be send

func (*DevSMSService) Send

func (s *DevSMSService) Send(phonenumber string, message string) (err error)

Send sends an SMS

type EmailService

type EmailService interface {
	Send(recipients []string, subject string, message string) (err error)
}

EmailService defines an email communication channel

type SMSService

type SMSService interface {
	Send(phonenumber string, message string) (err error)
}

SMSService defines an sms communication channel

type SMTPEmailService

type SMTPEmailService struct {
	// contains filtered or unexported fields
}

SMTPEmailService implements an email service using plain old SMTP

func NewSMTPEmailService

func NewSMTPEmailService(host string, port int, user string, password string) (service *SMTPEmailService)

NewSMTPEmailService creates a nes SMTPEmailService

func (*SMTPEmailService) Send

func (s *SMTPEmailService) Send(recipients []string, subject string, message string) (err error)

Send sends an Email

type TwilioSMSService

type TwilioSMSService struct {
	AccountSID          string
	AuthToken           string
	MessagingServiceSID string
}

TwilioSMSService is an SMS communication channel using Twilio

func (*TwilioSMSService) Send

func (s *TwilioSMSService) Send(phonenumber string, message string) (err error)

Send sends an SMS

Jump to

Keyboard shortcuts

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