mock

package
v0.0.0-...-ec85eee Latest Latest
Warning

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

Go to latest
Published: Aug 20, 2019 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FakeClockNow

func FakeClockNow()

FakeClockNow mocks clock.Now

func FakeClockNowWithExtraTime

func FakeClockNowWithExtraTime(d time.Duration)

FakeClockNowWithDuration moves the clock by with given duration

func NewDB

func NewDB() (*sqlx.DB, func())

NewDB returns mocked DB and a function to close the DB

Types

type Mailer

type Mailer struct {
}

Mailer represents mocked mailer

func (*Mailer) SendEmail

func (s *Mailer) SendEmail(m *mailer.Mail) error

SendEmail mocks sending email

type SMSMessenger

type SMSMessenger struct {
}

SMSMessenger represents mocked mailer

func (*SMSMessenger) SendSMSMessage

func (s *SMSMessenger) SendSMSMessage(toPhoneNumber string, body string) error

SendSMSMessage mocks sending sms message

Jump to

Keyboard shortcuts

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