mocks

package
v0.0.0-...-4dfe32f Latest Latest
Warning

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

Go to latest
Published: Oct 26, 2023 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package mocks contains various mock objects used by unit test: Producer mock, Storage mock, and OCMClient mock.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type OCMClient

type OCMClient struct {
	mock.Mock
}

OCMClient is an autogenerated mock type for the OCMClient type

func NewOCMClient

func NewOCMClient(t mockConstructorTestingTNewOCMClient) *OCMClient

NewOCMClient creates a new instance of OCMClient. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.

func (*OCMClient) GetTokens

func (_m *OCMClient) GetTokens(delay time.Duration) (string, string, error)

GetTokens provides a mock function with given fields: delay

type Producer

type Producer struct {
	mock.Mock
}

Producer is an autogenerated mock type for the Producer type

func NewProducer

func NewProducer(t mockConstructorTestingTNewProducer) *Producer

NewProducer creates a new instance of Producer. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.

func (*Producer) Close

func (_m *Producer) Close() error

Close provides a mock function with given fields:

func (*Producer) ProduceMessage

func (_m *Producer) ProduceMessage(msg types.ProducerMessage) (int32, int64, error)

ProduceMessage provides a mock function with given fields: msg

type Storage

type Storage struct {
	mock.Mock
}

Storage is an autogenerated mock type for the Storage type

func NewStorage

func NewStorage(t mockConstructorTestingTNewStorage) *Storage

NewStorage creates a new instance of Storage. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.

func (*Storage) CleanupNewReports

func (_m *Storage) CleanupNewReports(maxAge string) (int, error)

CleanupNewReports provides a mock function with given fields: maxAge

func (*Storage) CleanupOldReports

func (_m *Storage) CleanupOldReports(maxAge string) (int, error)

CleanupOldReports provides a mock function with given fields: maxAge

func (*Storage) Close

func (_m *Storage) Close() error

Close provides a mock function with given fields:

func (*Storage) DeleteRowFromNewReports

func (_m *Storage) DeleteRowFromNewReports(orgID types.OrgID, clusterName types.ClusterName, updatedAt types.Timestamp) (int, error)

DeleteRowFromNewReports provides a mock function with given fields: orgID, clusterName, updatedAt

func (*Storage) DeleteRowFromReported

func (_m *Storage) DeleteRowFromReported(orgID types.OrgID, clusterName types.ClusterName, notifiedAt types.Timestamp) (int, error)

DeleteRowFromReported provides a mock function with given fields: orgID, clusterName, notifiedAt

func (*Storage) PrintNewReportsForCleanup

func (_m *Storage) PrintNewReportsForCleanup(maxAge string) error

PrintNewReportsForCleanup provides a mock function with given fields: maxAge

func (*Storage) PrintOldReportsForCleanup

func (_m *Storage) PrintOldReportsForCleanup(maxAge string) error

PrintOldReportsForCleanup provides a mock function with given fields: maxAge

func (*Storage) ReadClusterList

func (_m *Storage) ReadClusterList() ([]types.ClusterEntry, error)

ReadClusterList provides a mock function with given fields:

func (*Storage) ReadErrorExists

func (_m *Storage) ReadErrorExists(
	orgID types.OrgID,
	clusterName types.ClusterName,
	lastCheckedTime time.Time,
) (bool, error)

func (*Storage) ReadLastNotifiedRecordForClusterList

func (_m *Storage) ReadLastNotifiedRecordForClusterList(clusterEntries []types.ClusterEntry, timeOffset string, eventTarget types.EventTarget) (types.NotifiedRecordsPerCluster, error)

ReadLastNotifiedRecordForClusterList provides a mock function with given fields: clusterEntries, timeOffset, eventTarget

func (*Storage) ReadNotificationTypes

func (_m *Storage) ReadNotificationTypes() ([]types.NotificationType, error)

ReadNotificationTypes provides a mock function with given fields:

func (*Storage) ReadReportForCluster

func (_m *Storage) ReadReportForCluster(orgID types.OrgID, clusterName types.ClusterName) (types.ClusterReport, types.Timestamp, error)

ReadReportForCluster provides a mock function with given fields: orgID, clusterName

func (*Storage) ReadReportForClusterAtOffset

func (_m *Storage) ReadReportForClusterAtOffset(orgID types.OrgID, clusterName types.ClusterName, offset types.KafkaOffset) (types.ClusterReport, error)

ReadReportForClusterAtOffset provides a mock function with given fields: orgID, clusterName, offset

func (*Storage) ReadReportForClusterAtTime

func (_m *Storage) ReadReportForClusterAtTime(orgID types.OrgID, clusterName types.ClusterName, updatedAt types.Timestamp) (types.ClusterReport, error)

ReadReportForClusterAtTime provides a mock function with given fields: orgID, clusterName, updatedAt

func (*Storage) ReadStates

func (_m *Storage) ReadStates() ([]types.State, error)

ReadStates provides a mock function with given fields:

func (*Storage) WriteNotificationRecord

func (_m *Storage) WriteNotificationRecord(notificationRecord *types.NotificationRecord) error

WriteNotificationRecord provides a mock function with given fields: notificationRecord

func (*Storage) WriteNotificationRecordForCluster

func (_m *Storage) WriteNotificationRecordForCluster(clusterEntry types.ClusterEntry, notificationTypeID types.NotificationTypeID, stateID types.StateID, report types.ClusterReport, notifiedAt types.Timestamp, errorLog string, eventTarget types.EventTarget) error

WriteNotificationRecordForCluster provides a mock function with given fields: clusterEntry, notificationTypeID, stateID, report, notifiedAt, errorLog, eventTarget

func (*Storage) WriteNotificationRecordImpl

func (_m *Storage) WriteNotificationRecordImpl(orgID types.OrgID, accountNumber types.AccountNumber, clusterName types.ClusterName, notificationTypeID types.NotificationTypeID, stateID types.StateID, report types.ClusterReport, updatedAt types.Timestamp, notifiedAt types.Timestamp, errorLog string, eventType types.EventTarget) error

WriteNotificationRecordImpl provides a mock function with given fields: orgID, accountNumber, clusterName, notificationTypeID, stateID, report, updatedAt, notifiedAt, errorLog, eventType

func (*Storage) WriteReadError

func (_m *Storage) WriteReadError(
	orgID types.OrgID,
	clusterName types.ClusterName,
	lastCheckedTime time.Time,
	e error,
) error

Jump to

Keyboard shortcuts

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