infrastructure

package
v0.0.0-...-503cebf Latest Latest
Warning

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

Go to latest
Published: Aug 15, 2017 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrorAPIKey = errors.New("Environment variable SENDGRID_API_KEY is undefined.")

ErrorAPIKey ...

View Source
var ErrorCouldNotFindSubjectClaim = errors.New("Could not find subject claim")

ErrorCouldNotFindSubjectClaim ...

View Source
var ErrorSubjectWasNotAString = errors.New("Subject was not a string")

ErrorSubjectWasNotAString ...

Functions

func Ints64Contains

func Ints64Contains(s []int64, e int64) bool

Ints64Contains ...

func IntsContains

func IntsContains(s []int, e int) bool

IntsContains ...

Types

type ConsoleLogger

type ConsoleLogger struct {
}

ConsoleLogger ...

func (ConsoleLogger) Error

func (logger ConsoleLogger) Error(message string, err error)

func (ConsoleLogger) Info

func (logger ConsoleLogger) Info(message string)

Info ...

type EmailService

type EmailService interface {
	SendEmail(toAddress string,
		subject string, text string, fromAddress string, fromName string) (bool, error)
}

EmailService ...

type FakeEmailService

type FakeEmailService struct {
}

FakeEmailService ...

func (*FakeEmailService) SendEmail

func (fakeEmailService *FakeEmailService) SendEmail(toAddress string,
	subject string, text string, fromAddress string, fromName string) (bool, error)

SendEmail ...

type GorrilaAndJwtSubjectFinder

type GorrilaAndJwtSubjectFinder struct {
}

GorrilaAndJwtSubjectFinder ...

func NewGorrilaAndJwtSubjectFinder

func NewGorrilaAndJwtSubjectFinder() *GorrilaAndJwtSubjectFinder

NewGorrilaAndJwtSubjectFinder ...

func (*GorrilaAndJwtSubjectFinder) FindSubject

func (g *GorrilaAndJwtSubjectFinder) FindSubject(r *http.Request, logger Logger) (string, error)

FindSubject ...

type Logger

type Logger interface {
	Info(message string)
	Error(message string, err error)
}

Logger ...

type NilLogger

type NilLogger struct {
}

NilLogger ...

func (NilLogger) Error

func (logger NilLogger) Error(message string, err error)

func (NilLogger) Info

func (logger NilLogger) Info(message string)

Info ...

type SendGridEmailService

type SendGridEmailService struct {
}

SendGridEmailService ...

func (*SendGridEmailService) SendEmail

func (sendGridEmailService *SendGridEmailService) SendEmail(toAddress string,
	subject string, text string, fromAddress string, fromName string) (bool, error)

SendEmail ...

type SubjectFinder

type SubjectFinder interface {
	FindSubject(r *http.Request, logger Logger) (string, error)
}

SubjectFinder ...

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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