processors

package
v0.1.8 Latest Latest
Warning

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

Go to latest
Published: Sep 2, 2018 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EmailSender

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

EmailSender is a DataProcessor that sends email

func (*EmailSender) ProcessData

func (e *EmailSender) ProcessData(d models.Data, outputChan chan models.Data, killChan chan error)

ProcessData implementation

type HTTPRequestor

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

HTTPRequestor is a DataProcessor that makes a HTTP request

func NewHTTPRequestor

func NewHTTPRequestor(method, url string) *HTTPRequestor

NewHTTPRequestor is the HTTPRequestor constructor

func (*HTTPRequestor) ProcessData

func (h *HTTPRequestor) ProcessData(d models.Data, outputChan chan models.Data, killChan chan error)

ProcessData implementation

type Logger

type Logger struct{}

Logger is a processor that just logs and passes input to output

func (*Logger) ProcessData

func (l *Logger) ProcessData(
	d models.Data,
	outputChan chan models.Data,
	killChan chan error,
)

ProcessData implementation

type Null

type Null struct{}

Null is a processor that just passes input to output

func (*Null) ProcessData

func (*Null) ProcessData(d models.Data, outputChan chan models.Data, killChan chan error)

ProcessData implementation

type SendgridEmailSender

type SendgridEmailSender struct {
	FromName  string
	FromEmail string
	ToName    string
	ToEmail   string
	Subject   string
}

SendgridEmailSender is a DataProcessor that sends email via Sendgrid

func NewSendgridEmailSender

func NewSendgridEmailSender(
	fromName, fromEmail, toName, toEmail, subject string,
) *SendgridEmailSender

NewSendgridEmailSender returns a new *SendgridEmailSender

func (*SendgridEmailSender) ProcessData

func (s *SendgridEmailSender) ProcessData(
	d models.Data, outputChan chan models.Data,
	killChan chan error,
)

ProcessData implementation

Jump to

Keyboard shortcuts

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