mocks

package
v0.0.0-...-9a10099 Latest Latest
Warning

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

Go to latest
Published: Aug 29, 2022 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MockBambooApi

type MockBambooApi struct {
	BambooSession                  model.BambooSession
	LogInUsernameParam             *string
	LogInPasswordParam             *string
	LogInCalled                    bool
	AddTimesheetRecordCalled       bool
	AddTimesheetRecordSessionParam *model.BambooSession
	AddTimesheetRecordEntriesParam []model.TimesheetEntry
	GetHomeContentCalled           bool
	GetHomeContentFunc             func() model.TimeTracking
}

func (*MockBambooApi) AddTimesheetRecord

func (m *MockBambooApi) AddTimesheetRecord(session model.BambooSession, entries []model.TimesheetEntry)

func (*MockBambooApi) GetHomeContent

func (m *MockBambooApi) GetHomeContent() model.TimeTracking

func (*MockBambooApi) LogIn

func (m *MockBambooApi) LogIn(username string, password string) model.BambooSession

func (*MockBambooApi) Reset

func (m *MockBambooApi) Reset()

type MockClient

type MockClient struct {
	DoFunc func(req *http.Request) (*http.Response, error)
}

func (*MockClient) Do

func (m *MockClient) Do(req *http.Request) (*http.Response, error)

type MockS3Client

type MockS3Client struct {
	s3iface.S3API

	GetObjectRequestArg s3.GetObjectInput

	GetObjectResponseOutput s3.GetObjectOutput
}

func (*MockS3Client) GetObject

func (m *MockS3Client) GetObject(input *s3.GetObjectInput) (*s3.GetObjectOutput, error)

type MockS3Repository

type MockS3Repository struct {
	GetS3FileContentFunc      func(key string, bucket string) string
	GetS3FileContentKeyArg    string
	GetS3FileContentBucketArg string
}

func (*MockS3Repository) GetS3FileContent

func (m *MockS3Repository) GetS3FileContent(key string, bucket string) string

type MockSesClient

type MockSesClient struct {
	sesiface.SESAPI

	SendEmailInputRequestArgument ses.SendEmailInput

	SendEmailOutputResponse ses.SendEmailOutput
}

func (*MockSesClient) SendEmail

func (m *MockSesClient) SendEmail(input *ses.SendEmailInput) (*ses.SendEmailOutput, error)

type MockSesRepository

type MockSesRepository struct {
	SendEmailSenderArg    string
	SendEmailRecipientArg string
	SendEmailHtmlBodyArg  string
	SendEmailSubjectArg   string
}

func (*MockSesRepository) SendEmail

func (m *MockSesRepository) SendEmail(sender string, recipient string, htmlBody string, subject string)

type MockTimesheetParser

type MockTimesheetParser struct {
	TimesheetEntries []model.TimesheetEntry
}

func (MockTimesheetParser) GetTimesheetEntries

func (m MockTimesheetParser) GetTimesheetEntries(_ time.Weekday) []model.TimesheetEntry

Jump to

Keyboard shortcuts

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