job

package
v1.1.2 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ApptChange

type ApptChange struct {
	Time        time.Time
	Appointment time.Time
	PatientID   int
	PatientName string
	IsBooking   bool
}

ApptChange struct

type Collector

type Collector interface {
	// collects latest changed appointments ordered by time of change
	CollectChangedAppts(time.Time) ([]*ApptChange, error)
}

Collector interface

type Job

type Job interface {
	Run()
}

Job interface

func New

func New(collector Collector, mailer Mailer, lastRun time.Time) Job

New creates a Job instance

type Mailer

type Mailer interface {
	Run(<-chan struct{}) error
	SendMessage(string, string) error
}

Mailer interface

type MockCollector

type MockCollector struct {
	mock.Mock
}

MockCollector is an autogenerated mock type for the Collector type

func (*MockCollector) CollectChangedAppts

func (_m *MockCollector) CollectChangedAppts(_a0 time.Time) ([]*ApptChange, error)

CollectChangedAppts provides a mock function with given fields: _a0

type MockMailer

type MockMailer struct {
	mock.Mock
}

MockMailer is an autogenerated mock type for the Mailer type

func (*MockMailer) Run

func (_m *MockMailer) Run(_a0 <-chan struct{}) error

Run provides a mock function with given fields: _a0

func (*MockMailer) SendMessage

func (_m *MockMailer) SendMessage(_a0 string, _a1 string) error

SendMessage provides a mock function with given fields: _a0, _a1

Jump to

Keyboard shortcuts

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