mocks

package
v0.11.9 Latest Latest
Warning

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

Go to latest
Published: Apr 7, 2025 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Entity added in v0.10.0

type Entity struct {
	mock.Mock
}

Entity is an autogenerated mock type for the Entity type

func NewEntity added in v0.10.0

func NewEntity(t interface {
	mock.TestingT
	Cleanup(func())
}) *Entity

NewEntity creates a new instance of Entity. 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 (*Entity) APIVersion added in v0.10.0

func (_m *Entity) APIVersion() string

APIVersion provides a mock function with no fields

func (*Entity) GetMeta added in v0.10.0

func (_m *Entity) GetMeta() *v1.Meta

GetMeta provides a mock function with no fields

func (*Entity) JSONField added in v0.10.0

func (_m *Entity) JSONField() string

JSONField provides a mock function with no fields

func (*Entity) Kind added in v0.10.0

func (_m *Entity) Kind() string

Kind provides a mock function with no fields

func (*Entity) Schema added in v0.10.0

func (_m *Entity) Schema() string

Schema provides a mock function with no fields

func (*Entity) TableName added in v0.10.0

func (_m *Entity) TableName() string

TableName provides a mock function with no fields

type Storage

type Storage[E datastore.Entity] struct {
	mock.Mock
}

Storage is an autogenerated mock type for the Storage type

func NewStorage added in v0.9.0

func NewStorage[E datastore.Entity](t interface {
	mock.TestingT
	Cleanup(func())
}) *Storage[E]

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. The first argument is typically a *testing.T value.

func (*Storage[E]) Create

func (_m *Storage[E]) Create(ctx context.Context, ve E) error

Create provides a mock function with given fields: ctx, ve

func (*Storage[E]) Delete

func (_m *Storage[E]) Delete(ctx context.Context, id string) error

Delete provides a mock function with given fields: ctx, id

func (*Storage[E]) DeleteAll added in v0.11.3

func (_m *Storage[E]) DeleteAll(ctx context.Context, ids ...string) error

DeleteAll provides a mock function with given fields: ctx, ids

func (*Storage[E]) Find

func (_m *Storage[E]) Find(ctx context.Context, filter map[string]interface{}, paging *v1.Paging) ([]E, *uint64, error)

Find provides a mock function with given fields: ctx, filter, paging

func (*Storage[E]) Get

func (_m *Storage[E]) Get(ctx context.Context, id string) (E, error)

Get provides a mock function with given fields: ctx, id

func (*Storage[E]) GetHistory added in v0.7.0

func (_m *Storage[E]) GetHistory(ctx context.Context, id string, at time.Time, ve E) error

GetHistory provides a mock function with given fields: ctx, id, at, ve

func (*Storage[E]) GetHistoryCreated added in v0.10.0

func (_m *Storage[E]) GetHistoryCreated(ctx context.Context, id string, ve E) error

GetHistoryCreated provides a mock function with given fields: ctx, id, ve

func (*Storage[E]) Update

func (_m *Storage[E]) Update(ctx context.Context, ve E) error

Update provides a mock function with given fields: ctx, ve

Jump to

Keyboard shortcuts

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