mocks

package
v0.2.4 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Creator

type Creator struct {
	mock.Mock
}

Creator is an autogenerated mock type for the Creator type

func NewCreator

func NewCreator(t interface {
	mock.TestingT
	Cleanup(func())
}) *Creator

NewCreator creates a new instance of Creator. 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 (*Creator) EXPECT

func (_m *Creator) EXPECT() *Creator_Expecter

func (*Creator) Generate

func (_m *Creator) Generate(ctx context.Context, text string, model string, cfg *embedding.Config) (*embedding.Embedding, error)

Generate provides a mock function with given fields: ctx, text, model, cfg

type Creator_Expecter

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

func (*Creator_Expecter) Generate

func (_e *Creator_Expecter) Generate(ctx interface{}, text interface{}, model interface{}, cfg interface{}) *Creator_Generate_Call

Generate is a helper method to define mock.On call

  • ctx context.Context
  • text string
  • model string
  • cfg *embedding.Config

type Creator_Generate_Call

type Creator_Generate_Call struct {
	*mock.Call
}

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

func (*Creator_Generate_Call) Return

func (*Creator_Generate_Call) Run

func (_c *Creator_Generate_Call) Run(run func(ctx context.Context, text string, model string, cfg *embedding.Config)) *Creator_Generate_Call

func (*Creator_Generate_Call) RunAndReturn

type Repository

type Repository struct {
	mock.Mock
}

Repository is an autogenerated mock type for the Repository type

func NewRepository

func NewRepository(t interface {
	mock.TestingT
	Cleanup(func())
}) *Repository

NewRepository creates a new instance of Repository. 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 (*Repository) Count

func (_m *Repository) Count(ctx context.Context, index string, keyQuery string) (int, error)

Count provides a mock function with given fields: ctx, index, keyQuery

func (*Repository) EXPECT

func (_m *Repository) EXPECT() *Repository_Expecter

func (*Repository) GetByTargetID

func (_m *Repository) GetByTargetID(ctx context.Context, targetID string) (*embedding.Embedding, error)

GetByTargetID provides a mock function with given fields: ctx, targetID

func (*Repository) Search

func (_m *Repository) Search(ctx context.Context, index string, query string, embeddingData *embedding.Embedding) ([]embedding.SearchResult, error)

Search provides a mock function with given fields: ctx, index, query, embeddingData

func (*Repository) Store

func (_m *Repository) Store(ctx context.Context, targetID string, embeddingData *embedding.Embedding, key string) error

Store provides a mock function with given fields: ctx, targetID, embeddingData, key

func (*Repository) StoreWithHMSet

func (_m *Repository) StoreWithHMSet(ctx context.Context, index string, key string, gatewayID string, embeddingData *embedding.Embedding, data []byte) error

StoreWithHMSet provides a mock function with given fields: ctx, index, key, gatewayID, embeddingData, data

type Repository_Count_Call

type Repository_Count_Call struct {
	*mock.Call
}

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

func (*Repository_Count_Call) Return

func (_c *Repository_Count_Call) Return(_a0 int, _a1 error) *Repository_Count_Call

func (*Repository_Count_Call) Run

func (_c *Repository_Count_Call) Run(run func(ctx context.Context, index string, keyQuery string)) *Repository_Count_Call

func (*Repository_Count_Call) RunAndReturn

type Repository_Expecter

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

func (*Repository_Expecter) Count

func (_e *Repository_Expecter) Count(ctx interface{}, index interface{}, keyQuery interface{}) *Repository_Count_Call

Count is a helper method to define mock.On call

  • ctx context.Context
  • index string
  • keyQuery string

func (*Repository_Expecter) GetByTargetID

func (_e *Repository_Expecter) GetByTargetID(ctx interface{}, targetID interface{}) *Repository_GetByTargetID_Call

GetByTargetID is a helper method to define mock.On call

  • ctx context.Context
  • targetID string

func (*Repository_Expecter) Search

func (_e *Repository_Expecter) Search(ctx interface{}, index interface{}, query interface{}, embeddingData interface{}) *Repository_Search_Call

Search is a helper method to define mock.On call

  • ctx context.Context
  • index string
  • query string
  • embeddingData *embedding.Embedding

func (*Repository_Expecter) Store

func (_e *Repository_Expecter) Store(ctx interface{}, targetID interface{}, embeddingData interface{}, key interface{}) *Repository_Store_Call

Store is a helper method to define mock.On call

  • ctx context.Context
  • targetID string
  • embeddingData *embedding.Embedding
  • key string

func (*Repository_Expecter) StoreWithHMSet

func (_e *Repository_Expecter) StoreWithHMSet(ctx interface{}, index interface{}, key interface{}, gatewayID interface{}, embeddingData interface{}, data interface{}) *Repository_StoreWithHMSet_Call

StoreWithHMSet is a helper method to define mock.On call

  • ctx context.Context
  • index string
  • key string
  • gatewayID string
  • embeddingData *embedding.Embedding
  • data []byte

type Repository_GetByTargetID_Call

type Repository_GetByTargetID_Call struct {
	*mock.Call
}

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

func (*Repository_GetByTargetID_Call) Return

func (*Repository_GetByTargetID_Call) Run

func (*Repository_GetByTargetID_Call) RunAndReturn

type Repository_Search_Call

type Repository_Search_Call struct {
	*mock.Call
}

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

func (*Repository_Search_Call) Return

func (*Repository_Search_Call) Run

func (_c *Repository_Search_Call) Run(run func(ctx context.Context, index string, query string, embeddingData *embedding.Embedding)) *Repository_Search_Call

func (*Repository_Search_Call) RunAndReturn

type Repository_StoreWithHMSet_Call

type Repository_StoreWithHMSet_Call struct {
	*mock.Call
}

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

func (*Repository_StoreWithHMSet_Call) Return

func (*Repository_StoreWithHMSet_Call) Run

func (_c *Repository_StoreWithHMSet_Call) Run(run func(ctx context.Context, index string, key string, gatewayID string, embeddingData *embedding.Embedding, data []byte)) *Repository_StoreWithHMSet_Call

func (*Repository_StoreWithHMSet_Call) RunAndReturn

type Repository_Store_Call

type Repository_Store_Call struct {
	*mock.Call
}

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

func (*Repository_Store_Call) Return

func (*Repository_Store_Call) Run

func (_c *Repository_Store_Call) Run(run func(ctx context.Context, targetID string, embeddingData *embedding.Embedding, key string)) *Repository_Store_Call

func (*Repository_Store_Call) RunAndReturn

Jump to

Keyboard shortcuts

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