mocks

package
v1.7.0 Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2026 License: MIT Imports: 4 Imported by: 0 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

This section is empty.

Types

type MockMediaLister

type MockMediaLister struct {
	mock.Mock
}

MockMediaLister is an autogenerated mock type for the MediaLister type

func NewMockMediaLister

func NewMockMediaLister(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockMediaLister

NewMockMediaLister creates a new instance of MockMediaLister. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.

func (*MockMediaLister) EXPECT

func (*MockMediaLister) ListByCursor

func (_mock *MockMediaLister) ListByCursor(ctx context.Context, userID int, limit int, beforeID int) ([]*media.Media, error)

ListByCursor provides a mock function for the type MockMediaLister

type MockMediaLister_Expecter

type MockMediaLister_Expecter struct {
	// contains filtered or unexported fields
}

func (*MockMediaLister_Expecter) ListByCursor

func (_e *MockMediaLister_Expecter) ListByCursor(ctx any, userID any, limit any, beforeID any) *MockMediaLister_ListByCursor_Call

ListByCursor is a helper method to define mock.On call

  • ctx context.Context
  • userID int
  • limit int
  • beforeID int

type MockMediaLister_ListByCursor_Call

type MockMediaLister_ListByCursor_Call struct {
	*mock.Call
}

MockMediaLister_ListByCursor_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListByCursor'

func (*MockMediaLister_ListByCursor_Call) Return

func (_c *MockMediaLister_ListByCursor_Call) Return(medias []*media.Media, err error) *MockMediaLister_ListByCursor_Call

func (*MockMediaLister_ListByCursor_Call) Run

func (_c *MockMediaLister_ListByCursor_Call) Run(run func(ctx context.Context, userID int, limit int, beforeID int)) *MockMediaLister_ListByCursor_Call

func (*MockMediaLister_ListByCursor_Call) RunAndReturn

func (_c *MockMediaLister_ListByCursor_Call) RunAndReturn(run func(ctx context.Context, userID int, limit int, beforeID int) ([]*media.Media, error)) *MockMediaLister_ListByCursor_Call

type MockTextGenerationService

type MockTextGenerationService struct {
	mock.Mock
}

MockTextGenerationService is an autogenerated mock type for the TextGenerationService type

func NewMockTextGenerationService

func NewMockTextGenerationService(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockTextGenerationService

NewMockTextGenerationService creates a new instance of MockTextGenerationService. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.

func (*MockTextGenerationService) EXPECT

func (*MockTextGenerationService) EnhanceText

func (_mock *MockTextGenerationService) EnhanceText(ctx context.Context, content string, format string, mediaContext string) (textgen.EnhanceResult, error)

EnhanceText provides a mock function for the type MockTextGenerationService

func (*MockTextGenerationService) TranslateText

func (_mock *MockTextGenerationService) TranslateText(ctx context.Context, content string, title string, metaDescription string, sourceLang string, targetLang string, format string) (textgen.TranslateResult, error)

TranslateText provides a mock function for the type MockTextGenerationService

type MockTextGenerationService_EnhanceText_Call

type MockTextGenerationService_EnhanceText_Call struct {
	*mock.Call
}

MockTextGenerationService_EnhanceText_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'EnhanceText'

func (*MockTextGenerationService_EnhanceText_Call) Return

func (_c *MockTextGenerationService_EnhanceText_Call) Return(enhanceResult textgen.EnhanceResult, err error) *MockTextGenerationService_EnhanceText_Call

func (*MockTextGenerationService_EnhanceText_Call) Run

func (*MockTextGenerationService_EnhanceText_Call) RunAndReturn

func (_c *MockTextGenerationService_EnhanceText_Call) RunAndReturn(run func(ctx context.Context, content string, format string, mediaContext string) (textgen.EnhanceResult, error)) *MockTextGenerationService_EnhanceText_Call

type MockTextGenerationService_Expecter

type MockTextGenerationService_Expecter struct {
	// contains filtered or unexported fields
}

func (*MockTextGenerationService_Expecter) EnhanceText

func (_e *MockTextGenerationService_Expecter) EnhanceText(ctx any, content any, format any, mediaContext any) *MockTextGenerationService_EnhanceText_Call

EnhanceText is a helper method to define mock.On call

  • ctx context.Context
  • content string
  • format string
  • mediaContext string

func (*MockTextGenerationService_Expecter) TranslateText

func (_e *MockTextGenerationService_Expecter) TranslateText(ctx any, content any, title any, metaDescription any, sourceLang any, targetLang any, format any) *MockTextGenerationService_TranslateText_Call

TranslateText is a helper method to define mock.On call

  • ctx context.Context
  • content string
  • title string
  • metaDescription string
  • sourceLang string
  • targetLang string
  • format string

type MockTextGenerationService_TranslateText_Call

type MockTextGenerationService_TranslateText_Call struct {
	*mock.Call
}

MockTextGenerationService_TranslateText_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'TranslateText'

func (*MockTextGenerationService_TranslateText_Call) Return

func (_c *MockTextGenerationService_TranslateText_Call) Return(translateResult textgen.TranslateResult, err error) *MockTextGenerationService_TranslateText_Call

func (*MockTextGenerationService_TranslateText_Call) Run

func (_c *MockTextGenerationService_TranslateText_Call) Run(run func(ctx context.Context, content string, title string, metaDescription string, sourceLang string, targetLang string, format string)) *MockTextGenerationService_TranslateText_Call

func (*MockTextGenerationService_TranslateText_Call) RunAndReturn

func (_c *MockTextGenerationService_TranslateText_Call) RunAndReturn(run func(ctx context.Context, content string, title string, metaDescription string, sourceLang string, targetLang string, format string) (textgen.TranslateResult, error)) *MockTextGenerationService_TranslateText_Call

Jump to

Keyboard shortcuts

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