mock

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2026 License: MIT Imports: 15 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewEventStore

func NewEventStore[T exporter.ExportableEvent]() exporter.EventStore[T]

Types

type Exporter

type Exporter struct {
	Err               error
	ExportedEvents    []exporter.ExportableEvent
	ExpectedNumberErr int
	CurrentNumberErr  int

	Bulk bool
	// contains filtered or unexported fields
}

func (*Exporter) Export

func (m *Exporter) Export(
	_ context.Context,
	_ *fflog.FFLogger,
	events []exporter.ExportableEvent,
) error

func (*Exporter) GetExportedEvents

func (m *Exporter) GetExportedEvents() []exporter.ExportableEvent

func (*Exporter) IsBulk

func (m *Exporter) IsBulk() bool

type ExporterDeprecated

type ExporterDeprecated struct {
	Err               error
	ExportedEvents    []exporter.FeatureEvent
	ExpectedNumberErr int
	CurrentNumberErr  int

	Bulk bool
	// contains filtered or unexported fields
}

ExporterDeprecated -----.

func (*ExporterDeprecated) Export

func (m *ExporterDeprecated) Export(
	_ context.Context,
	_ *log.Logger,
	events []exporter.FeatureEvent,
) error

func (*ExporterDeprecated) GetExportedEvents

func (m *ExporterDeprecated) GetExportedEvents() []exporter.ExportableEvent

func (*ExporterDeprecated) IsBulk

func (m *ExporterDeprecated) IsBulk() bool

type ExporterDeprecatedV2

type ExporterDeprecatedV2 struct {
	Err               error
	ExportedEvents    []exporter.FeatureEvent
	ExpectedNumberErr int
	CurrentNumberErr  int

	Bulk bool
	// contains filtered or unexported fields
}

ExporterDeprecatedV2 -----.

func (*ExporterDeprecatedV2) Export

func (*ExporterDeprecatedV2) GetExportedEvents

func (m *ExporterDeprecatedV2) GetExportedEvents() []exporter.ExportableEvent

func (*ExporterDeprecatedV2) IsBulk

func (m *ExporterDeprecatedV2) IsBulk() bool

type ExporterMock

type ExporterMock interface {
	exporter.CommonExporter
	GetExportedEvents() []exporter.ExportableEvent
}

type HTTP

type HTTP struct {
	Req           http.Request
	EndRatelimit  time.Time
	RateLimit     bool
	HasBeenCalled bool
}

func (*HTTP) Do

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

type NotificationService

type NotificationService struct {
	NotifyCalls int
	CloseCalled bool
	// contains filtered or unexported fields
}

func (*NotificationService) Close

func (n *NotificationService) Close()

func (*NotificationService) GetNotifyCalls

func (n *NotificationService) GetNotifyCalls() int

func (*NotificationService) Notify

func (n *NotificationService) Notify(_, _ map[string]flag.Flag, _ *fflog.FFLogger)

func (*NotificationService) WasCloseCalled

func (n *NotificationService) WasCloseCalled() bool

type Notifier

type Notifier struct {
	NotifyCalls int
	// contains filtered or unexported fields
}

func (*Notifier) GetNotifyCalls

func (n *Notifier) GetNotifyCalls() int

func (*Notifier) Notify

func (n *Notifier) Notify(_ notifier.DiffCache) error

type TrackingEventExporter

type TrackingEventExporter struct {
	Err               error
	ExportedEvents    []exporter.TrackingEvent
	ExpectedNumberErr int
	CurrentNumberErr  int

	Bulk bool
	// contains filtered or unexported fields
}

func (*TrackingEventExporter) Export

func (*TrackingEventExporter) GetExportedEvents

func (m *TrackingEventExporter) GetExportedEvents() []exporter.ExportableEvent

func (*TrackingEventExporter) IsBulk

func (m *TrackingEventExporter) IsBulk() bool

Directories

Path Synopsis
Package mockretriever provides mock implementations of various retriever interfaces for testing purposes in the semaphore project.
Package mockretriever provides mock implementations of various retriever interfaces for testing purposes in the semaphore project.

Jump to

Keyboard shortcuts

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