mocks

package
v0.0.0-...-a06bd82 Latest Latest
Warning

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

Go to latest
Published: Jan 25, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ArchiverPortMock

type ArchiverPortMock struct {
	port.ArchiverPort
	FakeArchiveLastYearMonthlyFolders  func(lastYear int, rootFolderId string) error
	ArchiveLastYearMonthlyFoldersCalls int
	FakeArchiveLastYearSpreadsheets    func(lastYear int, rootFolderId string) (lastMonthSpreadSheetId string, err error)
	ArchiveLastYearSpreadsheetsCalls   int
}

func (*ArchiverPortMock) ArchiveLastYearMonthlyFolders

func (m *ArchiverPortMock) ArchiveLastYearMonthlyFolders(lastYear int, rootFolderId string) error

func (*ArchiverPortMock) ArchiveLastYearSpreadsheets

func (m *ArchiverPortMock) ArchiveLastYearSpreadsheets(lastYear int, rootFolderId string) (lastMonthSpreadSheetId string, err error)

type ClockMock

type ClockMock struct {
	Time *time.Time
}

func (ClockMock) Now

func (c ClockMock) Now() time.Time

type DrivePortMock

type DrivePortMock struct {
	port.GoogleDrivePort
	FakeCopySpreadsheet                 func(targetFile string, destinationFile string) (string, error)
	CopySpreadsheetCalls                int
	FakeCopySpreadsheetFromId           func(targetId string, destinationName string) (string, error)
	CopySpreadsheetFromIdCalls          int
	FakeCreateFolder                    func(name string, parentFolderId string) (string, error)
	CreateFolderCalls                   int
	FakeMoveSpreadsheetToAnotherFolder  func(fileName, sourceFolderId, targetFolderId string) (string, error)
	MoveSpreadsheetToAnotherFolderCalls int
	FakeMoveFolderToAnotherFolder       func(fileName, sourceFolderId, targetFolderId string) (string, error)
	MoveFolderToAnotherFolderCalls      int
}

func (*DrivePortMock) CopySpreadsheet

func (m *DrivePortMock) CopySpreadsheet(targetFile string, destinationFile string) (string, error)

func (*DrivePortMock) CopySpreadsheetFromId

func (m *DrivePortMock) CopySpreadsheetFromId(targetId string, destinationName string) (string, error)

func (*DrivePortMock) CreateFolder

func (m *DrivePortMock) CreateFolder(name string, parentFolderId string) (string, error)

func (*DrivePortMock) MoveFolderToAnotherFolder

func (m *DrivePortMock) MoveFolderToAnotherFolder(fileName, sourceFolderId, targetFolderId string) (string, error)

func (*DrivePortMock) MoveSpreadsheetToAnotherFolder

func (m *DrivePortMock) MoveSpreadsheetToAnotherFolder(fileName, sourceFolderId, targetFolderId string) (string, error)

type SheetPortMock

type SheetPortMock struct {
	port.GoogleSheetPort
	FakeCutAndPasteRange  func(spreadSheetId string, cutRange string, pasteRange string) error
	CutAndPasteRangeCalls int
	FakeClearRange        func(spreadSheetId string, _range string) error
	ClearRangeCalls       int
	FakeSetValue          func(spreadSheetId string, value string, column string) error
	SetValueCalls         int
}

func (*SheetPortMock) ClearRange

func (m *SheetPortMock) ClearRange(spreadSheetId string, _range string) error

func (*SheetPortMock) CutAndPasteRange

func (m *SheetPortMock) CutAndPasteRange(spreadSheetId string, cutRange string, pasteRange string) error

func (*SheetPortMock) SetValue

func (m *SheetPortMock) SetValue(spreadSheetId string, value string, column string) error

type TranslationsPortMock

type TranslationsPortMock struct {
	port.TranslationsPort
	FakeGet  func(locale string) (*localizer.Localizer, error)
	GetCalls int
}

func (*TranslationsPortMock) Get

Jump to

Keyboard shortcuts

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