mocks

package
v3.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 14, 2021 License: Apache-2.0 Imports: 2 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MockEventStorage

type MockEventStorage struct {
	EmptyCall            func() bool
	CountCall            func() int64
	PopNCall             func(n int64) ([]dtos.EventDTO, error)
	PopNWithMetadataCall func(n int64) ([]dtos.QueueStoredEventDTO, error)
	PushCall             func(event dtos.EventDTO, size int) error
	DropCall             func(size *int64) error
}

MockEventStorage is a mocked implementation of Event Storage

func (MockEventStorage) Count

func (m MockEventStorage) Count() int64

Count mock

func (MockEventStorage) Drop

func (m MockEventStorage) Drop(size *int64) error

Drop mock

func (MockEventStorage) Empty

func (m MockEventStorage) Empty() bool

Empty mock

func (MockEventStorage) PopN

func (m MockEventStorage) PopN(n int64) ([]dtos.EventDTO, error)

PopN mock

func (MockEventStorage) PopNWithMetadata

func (m MockEventStorage) PopNWithMetadata(n int64) ([]dtos.QueueStoredEventDTO, error)

PopNWithMetadata mock

func (MockEventStorage) Push

func (m MockEventStorage) Push(event dtos.EventDTO, size int) error

Push mock

type MockImpressionStorage

type MockImpressionStorage struct {
	EmptyCall            func() bool
	CountCall            func() int64
	LogImpressionsCall   func(impressions []dtos.Impression) error
	PopNCall             func(n int64) ([]dtos.Impression, error)
	PopNWithMetadataCall func(n int64) ([]dtos.ImpressionQueueObject, error)
	DropCall             func(size *int64) error
}

MockImpressionStorage is a mocked implementation of Impression Storage

func (MockImpressionStorage) Count

func (m MockImpressionStorage) Count() int64

Count mock

func (MockImpressionStorage) Drop

func (m MockImpressionStorage) Drop(size *int64) error

Drop mock

func (MockImpressionStorage) Empty

func (m MockImpressionStorage) Empty() bool

Empty mock

func (MockImpressionStorage) LogImpressions

func (m MockImpressionStorage) LogImpressions(impressions []dtos.Impression) error

LogImpressions mock

func (MockImpressionStorage) PopN

PopN mock

func (MockImpressionStorage) PopNWithMetadata

func (m MockImpressionStorage) PopNWithMetadata(n int64) ([]dtos.ImpressionQueueObject, error)

PopNWithMetadata mock

type MockSegmentStorage

type MockSegmentStorage struct {
	ChangeNumberCall       func(segmentName string) (int64, error)
	KeysCall               func(segmentName string) *set.ThreadUnsafeSet
	UpdateCall             func(name string, toAdd *set.ThreadUnsafeSet, toRemove *set.ThreadUnsafeSet, changeNumber int64) error
	SegmentContainsKeyCall func(segmentName string, key string) (bool, error)
	SetChangeNumberCall    func(segmentName string, till int64) error
	CountRemovedKeysCall   func(segmentName string) int64
	SegmentKeysCountCall   func() int64
}

MockSegmentStorage is a mocked implementation of Segment Storage

func (MockSegmentStorage) ChangeNumber

func (m MockSegmentStorage) ChangeNumber(segmentName string) (int64, error)

ChangeNumber mock

func (MockSegmentStorage) CountRemovedKeys

func (m MockSegmentStorage) CountRemovedKeys(segmentName string) int64

CountRemovedKeys mock

func (MockSegmentStorage) Keys

func (m MockSegmentStorage) Keys(segmentName string) *set.ThreadUnsafeSet

Keys mock

func (MockSegmentStorage) SegmentContainsKey

func (m MockSegmentStorage) SegmentContainsKey(segmentName string, key string) (bool, error)

SegmentContainsKey mock

func (MockSegmentStorage) SegmentKeysCount added in v3.1.0

func (m MockSegmentStorage) SegmentKeysCount() int64

func (MockSegmentStorage) SetChangeNumber

func (m MockSegmentStorage) SetChangeNumber(segmentName string, till int64) error

SetChangeNumber mock

func (MockSegmentStorage) Update

func (m MockSegmentStorage) Update(name string, toAdd *set.ThreadUnsafeSet, toRemove *set.ThreadUnsafeSet, changeNumber int64) error

Update mock

type MockSplitStorage

type MockSplitStorage struct {
	AllCall               func() []dtos.SplitDTO
	ChangeNumberCall      func() (int64, error)
	FetchManyCall         func(splitNames []string) map[string]*dtos.SplitDTO
	KillLocallyCall       func(splitName string, defaultTreatment string, changeNumber int64)
	PutManyCall           func(splits []dtos.SplitDTO, changeNumber int64)
	RemoveCall            func(splitName string)
	SegmentNamesCall      func() *set.ThreadUnsafeSet
	SetChangeNumberCall   func(changeNumber int64) error
	SplitCall             func(splitName string) *dtos.SplitDTO
	SplitNamesCall        func() []string
	TrafficTypeExistsCall func(trafficType string) bool
}

MockSplitStorage is a mocked implementation of Split Storage

func (MockSplitStorage) All

func (m MockSplitStorage) All() []dtos.SplitDTO

All mock

func (MockSplitStorage) ChangeNumber

func (m MockSplitStorage) ChangeNumber() (int64, error)

ChangeNumber mock

func (MockSplitStorage) FetchMany

func (m MockSplitStorage) FetchMany(splitNames []string) map[string]*dtos.SplitDTO

FetchMany mock

func (MockSplitStorage) KillLocally

func (m MockSplitStorage) KillLocally(splitName string, defaultTreatment string, changeNumber int64)

KillLocally mock

func (MockSplitStorage) PutMany

func (m MockSplitStorage) PutMany(splits []dtos.SplitDTO, changeNumber int64)

PutMany mock

func (MockSplitStorage) Remove

func (m MockSplitStorage) Remove(splitname string)

Remove mock

func (MockSplitStorage) SegmentNames

func (m MockSplitStorage) SegmentNames() *set.ThreadUnsafeSet

SegmentNames mock

func (MockSplitStorage) SetChangeNumber

func (m MockSplitStorage) SetChangeNumber(changeNumber int64) error

SetChangeNumber mock

func (MockSplitStorage) Split

func (m MockSplitStorage) Split(splitName string) *dtos.SplitDTO

Split mock

func (MockSplitStorage) SplitNames

func (m MockSplitStorage) SplitNames() []string

SplitNames mock

func (MockSplitStorage) TrafficTypeExists

func (m MockSplitStorage) TrafficTypeExists(trafficType string) bool

TrafficTypeExists mock

type MockTelemetryStorage added in v3.1.0

type MockTelemetryStorage struct {
	RecordConfigDataCall       func(configData dtos.Config) error
	RecordLatencyCall          func(method string, latency int64)
	RecordExceptionCall        func(method string)
	RecordImpressionsStatsCall func(dataType int, count int64)
	RecordEventsStatsCall      func(dataType int, count int64)
	RecordSuccessfulSyncCall   func(resource int, time int64)
	RecordSyncErrorCall        func(resource int, status int)
	RecordSyncLatencyCall      func(resource int, latency int64)
	RecordAuthRejectionsCall   func()
	RecordTokenRefreshesCall   func()
	RecordStreamingEventCall   func(streamingEvent *dtos.StreamingEvent)
	AddTagCall                 func(tag string)
	RecordSessionLengthCall    func(session int64)
	RecordNonReadyUsageCall    func()
	RecordBURTimeoutCall       func()
	PopLatenciesCall           func() dtos.MethodLatencies
	PopExceptionsCall          func() dtos.MethodExceptions
	GetImpressionsStatsCall    func(dataType int) int64
	GetEventsStatsCall         func(dataType int) int64
	GetLastSynchronizationCall func() dtos.LastSynchronization
	PopHTTPErrorsCall          func() dtos.HTTPErrors
	PopHTTPLatenciesCall       func() dtos.HTTPLatencies
	PopAuthRejectionsCall      func() int64
	PopTokenRefreshesCall      func() int64
	PopStreamingEventsCall     func() []dtos.StreamingEvent
	PopTagsCall                func() []string
	GetSessionLengthCall       func() int64
	GetNonReadyUsagesCall      func() int64
	GetBURTimeoutsCall         func() int64
}

MockTelemetryStorage is a mocked implementation of Telemetry Storage

func (MockTelemetryStorage) AddTag added in v3.1.0

func (m MockTelemetryStorage) AddTag(tag string)

AddTag mock

func (MockTelemetryStorage) GetBURTimeouts added in v3.1.0

func (m MockTelemetryStorage) GetBURTimeouts() int64

GetBURTimeouts mock

func (MockTelemetryStorage) GetEventsStats added in v3.1.0

func (m MockTelemetryStorage) GetEventsStats(dataType int) int64

GetEventsStats mock

func (MockTelemetryStorage) GetImpressionsStats added in v3.1.0

func (m MockTelemetryStorage) GetImpressionsStats(dataType int) int64

GetImpressionsStats mock

func (MockTelemetryStorage) GetLastSynchronization added in v3.1.0

func (m MockTelemetryStorage) GetLastSynchronization() dtos.LastSynchronization

GetLastSynchronization mock

func (MockTelemetryStorage) GetNonReadyUsages added in v3.1.0

func (m MockTelemetryStorage) GetNonReadyUsages() int64

GetNonReadyUsages mock

func (MockTelemetryStorage) GetSessionLength added in v3.1.0

func (m MockTelemetryStorage) GetSessionLength() int64

GetSessionLength mock

func (MockTelemetryStorage) PopAuthRejections added in v3.1.0

func (m MockTelemetryStorage) PopAuthRejections() int64

PopAuthRejections mock

func (MockTelemetryStorage) PopExceptions added in v3.1.0

func (m MockTelemetryStorage) PopExceptions() dtos.MethodExceptions

PopExceptions mock

func (MockTelemetryStorage) PopHTTPErrors added in v3.1.0

func (m MockTelemetryStorage) PopHTTPErrors() dtos.HTTPErrors

PopHTTPErrors mock

func (MockTelemetryStorage) PopHTTPLatencies added in v3.1.0

func (m MockTelemetryStorage) PopHTTPLatencies() dtos.HTTPLatencies

PopHTTPLatencies mock

func (MockTelemetryStorage) PopLatencies added in v3.1.0

func (m MockTelemetryStorage) PopLatencies() dtos.MethodLatencies

PopLatencies mock

func (MockTelemetryStorage) PopStreamingEvents added in v3.1.0

func (m MockTelemetryStorage) PopStreamingEvents() []dtos.StreamingEvent

PopStreamingEvents mock

func (MockTelemetryStorage) PopTags added in v3.1.0

func (m MockTelemetryStorage) PopTags() []string

PopTags mock

func (MockTelemetryStorage) PopTokenRefreshes added in v3.1.0

func (m MockTelemetryStorage) PopTokenRefreshes() int64

PopTokenRefreshes mock

func (MockTelemetryStorage) RecordAuthRejections added in v3.1.0

func (m MockTelemetryStorage) RecordAuthRejections()

RecordAuthRejections mock

func (MockTelemetryStorage) RecordBURTimeout added in v3.1.0

func (m MockTelemetryStorage) RecordBURTimeout()

RecordBURTimeout mock

func (MockTelemetryStorage) RecordConfigData added in v3.1.0

func (m MockTelemetryStorage) RecordConfigData(configData dtos.Config) error

RecordConfig mock

func (MockTelemetryStorage) RecordEventsStats added in v3.1.0

func (m MockTelemetryStorage) RecordEventsStats(dataType int, count int64)

RecordEventsStats mock

func (MockTelemetryStorage) RecordException added in v3.1.0

func (m MockTelemetryStorage) RecordException(method string)

RecordException mock

func (MockTelemetryStorage) RecordImpressionsStats added in v3.1.0

func (m MockTelemetryStorage) RecordImpressionsStats(dataType int, count int64)

RecordImpressionsStats mock

func (MockTelemetryStorage) RecordLatency added in v3.1.0

func (m MockTelemetryStorage) RecordLatency(method string, latency int64)

RecordLatency mock

func (MockTelemetryStorage) RecordNonReadyUsage added in v3.1.0

func (m MockTelemetryStorage) RecordNonReadyUsage()

RecordNonReadyUsage mock

func (MockTelemetryStorage) RecordSessionLength added in v3.1.0

func (m MockTelemetryStorage) RecordSessionLength(session int64)

RecordSessionLength mock

func (MockTelemetryStorage) RecordStreamingEvent added in v3.1.0

func (m MockTelemetryStorage) RecordStreamingEvent(streamingEvent *dtos.StreamingEvent)

RecordStreamingEvent mock

func (MockTelemetryStorage) RecordSuccessfulSync added in v3.1.0

func (m MockTelemetryStorage) RecordSuccessfulSync(resource int, time int64)

RecordSuccessfulSync mock

func (MockTelemetryStorage) RecordSyncError added in v3.1.0

func (m MockTelemetryStorage) RecordSyncError(resource int, status int)

RecordSyncError mock

func (MockTelemetryStorage) RecordSyncLatency added in v3.1.0

func (m MockTelemetryStorage) RecordSyncLatency(resource int, latency int64)

RecordSyncLatency mock

func (MockTelemetryStorage) RecordTokenRefreshes added in v3.1.0

func (m MockTelemetryStorage) RecordTokenRefreshes()

RecordTokenRefreshes mock

Jump to

Keyboard shortcuts

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