mocks

package
v1.13.9 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2024 License: MIT Imports: 4 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Association added in v1.8.0

type Association struct {
	mock.Mock
}

Association is an autogenerated mock type for the Association type

func NewAssociation added in v1.8.0

func NewAssociation(t interface {
	mock.TestingT
	Cleanup(func())
}) *Association

NewAssociation creates a new instance of Association. 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 (*Association) Append added in v1.8.0

func (_m *Association) Append(values ...interface{}) error

Append provides a mock function with given fields: values

func (*Association) Clear added in v1.8.0

func (_m *Association) Clear() error

Clear provides a mock function with given fields:

func (*Association) Count added in v1.8.0

func (_m *Association) Count() int64

Count provides a mock function with given fields:

func (*Association) Delete added in v1.8.0

func (_m *Association) Delete(values ...interface{}) error

Delete provides a mock function with given fields: values

func (*Association) Find added in v1.8.0

func (_m *Association) Find(out interface{}, conds ...interface{}) error

Find provides a mock function with given fields: out, conds

func (*Association) Replace added in v1.8.0

func (_m *Association) Replace(values ...interface{}) error

Replace provides a mock function with given fields: values

type Cursor added in v1.13.0

type Cursor struct {
	mock.Mock
}

Cursor is an autogenerated mock type for the Cursor type

func NewCursor added in v1.13.0

func NewCursor(t interface {
	mock.TestingT
	Cleanup(func())
}) *Cursor

NewCursor creates a new instance of Cursor. 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 (*Cursor) Scan added in v1.13.0

func (_m *Cursor) Scan(value interface{}) error

Scan provides a mock function with given fields: value

type Factory added in v1.13.0

type Factory struct {
	mock.Mock
}

Factory is an autogenerated mock type for the Factory type

func NewFactory added in v1.13.0

func NewFactory(t mockConstructorTestingTNewFactory) *Factory

NewFactory creates a new instance of Factory. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.

func (*Factory) Count added in v1.13.0

func (_m *Factory) Count(count int) orm.Factory

Count provides a mock function with given fields: count

func (*Factory) Create added in v1.13.0

func (_m *Factory) Create(value interface{}, attributes ...map[string]interface{}) error

Create provides a mock function with given fields: value, attributes

func (*Factory) CreateQuietly added in v1.13.0

func (_m *Factory) CreateQuietly(value interface{}, attributes ...map[string]interface{}) error

CreateQuietly provides a mock function with given fields: value, attributes

func (*Factory) Make added in v1.13.0

func (_m *Factory) Make(value interface{}, attributes ...map[string]interface{}) error

Make provides a mock function with given fields: value, attributes

type Orm

type Orm struct {
	mock.Mock
}

Orm is an autogenerated mock type for the Orm type

func NewOrm

func NewOrm(t interface {
	mock.TestingT
	Cleanup(func())
}) *Orm

NewOrm creates a new instance of Orm. 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 (*Orm) Connection

func (_m *Orm) Connection(name string) orm.Orm

Connection provides a mock function with given fields: name

func (*Orm) DB added in v1.8.0

func (_m *Orm) DB() (*sql.DB, error)

DB provides a mock function with given fields:

func (*Orm) Factory added in v1.13.0

func (_m *Orm) Factory() orm.Factory

Factory provides a mock function with given fields:

func (*Orm) Observe added in v1.11.0

func (_m *Orm) Observe(model interface{}, observer orm.Observer)

Observe provides a mock function with given fields: model, observer

func (*Orm) Query

func (_m *Orm) Query() orm.Query

Query provides a mock function with given fields:

func (*Orm) Transaction

func (_m *Orm) Transaction(txFunc func(orm.Transaction) error) error

Transaction provides a mock function with given fields: txFunc

func (*Orm) WithContext

func (_m *Orm) WithContext(ctx context.Context) orm.Orm

WithContext provides a mock function with given fields: ctx

type Query added in v1.10.0

type Query struct {
	mock.Mock
}

Query is an autogenerated mock type for the Query type

func NewQuery added in v1.10.0

func NewQuery(t interface {
	mock.TestingT
	Cleanup(func())
}) *Query

NewQuery creates a new instance of Query. 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 (*Query) Association added in v1.10.0

func (_m *Query) Association(association string) orm.Association

Association provides a mock function with given fields: association

func (*Query) Begin added in v1.10.0

func (_m *Query) Begin() (orm.Transaction, error)

Begin provides a mock function with given fields:

func (*Query) Count added in v1.10.0

func (_m *Query) Count(count *int64) error

Count provides a mock function with given fields: count

func (*Query) Create added in v1.10.0

func (_m *Query) Create(value interface{}) error

Create provides a mock function with given fields: value

func (*Query) Cursor added in v1.13.0

func (_m *Query) Cursor() (chan orm.Cursor, error)

Cursor provides a mock function with given fields:

func (*Query) Delete added in v1.10.0

func (_m *Query) Delete(value interface{}, conds ...interface{}) (*orm.Result, error)

Delete provides a mock function with given fields: value, conds

func (*Query) Distinct added in v1.10.0

func (_m *Query) Distinct(args ...interface{}) orm.Query

Distinct provides a mock function with given fields: args

func (*Query) Driver added in v1.10.0

func (_m *Query) Driver() orm.Driver

Driver provides a mock function with given fields:

func (*Query) Exec added in v1.10.0

func (_m *Query) Exec(sql string, values ...interface{}) (*orm.Result, error)

Exec provides a mock function with given fields: sql, values

func (*Query) Find added in v1.10.0

func (_m *Query) Find(dest interface{}, conds ...interface{}) error

Find provides a mock function with given fields: dest, conds

func (*Query) FindOrFail added in v1.11.0

func (_m *Query) FindOrFail(dest interface{}, conds ...interface{}) error

FindOrFail provides a mock function with given fields: dest, conds

func (*Query) First added in v1.10.0

func (_m *Query) First(dest interface{}) error

First provides a mock function with given fields: dest

func (*Query) FirstOr added in v1.10.0

func (_m *Query) FirstOr(dest interface{}, callback func() error) error

FirstOr provides a mock function with given fields: dest, callback

func (*Query) FirstOrCreate added in v1.10.0

func (_m *Query) FirstOrCreate(dest interface{}, conds ...interface{}) error

FirstOrCreate provides a mock function with given fields: dest, conds

func (*Query) FirstOrFail added in v1.10.0

func (_m *Query) FirstOrFail(dest interface{}) error

FirstOrFail provides a mock function with given fields: dest

func (*Query) FirstOrNew added in v1.10.0

func (_m *Query) FirstOrNew(dest interface{}, attributes interface{}, values ...interface{}) error

FirstOrNew provides a mock function with given fields: dest, attributes, values

func (*Query) ForceDelete added in v1.10.0

func (_m *Query) ForceDelete(value interface{}, conds ...interface{}) (*orm.Result, error)

ForceDelete provides a mock function with given fields: value, conds

func (*Query) Get added in v1.10.0

func (_m *Query) Get(dest interface{}) error

Get provides a mock function with given fields: dest

func (*Query) Group added in v1.10.0

func (_m *Query) Group(name string) orm.Query

Group provides a mock function with given fields: name

func (*Query) Having added in v1.10.0

func (_m *Query) Having(query interface{}, args ...interface{}) orm.Query

Having provides a mock function with given fields: query, args

func (*Query) Join added in v1.10.0

func (_m *Query) Join(query string, args ...interface{}) orm.Query

Join provides a mock function with given fields: query, args

func (*Query) Limit added in v1.10.0

func (_m *Query) Limit(limit int) orm.Query

Limit provides a mock function with given fields: limit

func (*Query) Load added in v1.10.0

func (_m *Query) Load(dest interface{}, relation string, args ...interface{}) error

Load provides a mock function with given fields: dest, relation, args

func (*Query) LoadMissing added in v1.10.0

func (_m *Query) LoadMissing(dest interface{}, relation string, args ...interface{}) error

LoadMissing provides a mock function with given fields: dest, relation, args

func (*Query) LockForUpdate added in v1.11.0

func (_m *Query) LockForUpdate() orm.Query

LockForUpdate provides a mock function with given fields:

func (*Query) Model added in v1.10.0

func (_m *Query) Model(value interface{}) orm.Query

Model provides a mock function with given fields: value

func (*Query) Offset added in v1.10.0

func (_m *Query) Offset(offset int) orm.Query

Offset provides a mock function with given fields: offset

func (*Query) Omit added in v1.10.0

func (_m *Query) Omit(columns ...string) orm.Query

Omit provides a mock function with given fields: columns

func (*Query) OrWhere added in v1.10.0

func (_m *Query) OrWhere(query interface{}, args ...interface{}) orm.Query

OrWhere provides a mock function with given fields: query, args

func (*Query) Order added in v1.10.0

func (_m *Query) Order(value interface{}) orm.Query

Order provides a mock function with given fields: value

func (*Query) Paginate added in v1.10.0

func (_m *Query) Paginate(page int, limit int, dest interface{}, total *int64) error

Paginate provides a mock function with given fields: page, limit, dest, total

func (*Query) Pluck added in v1.10.0

func (_m *Query) Pluck(column string, dest interface{}) error

Pluck provides a mock function with given fields: column, dest

func (*Query) Raw added in v1.10.0

func (_m *Query) Raw(sql string, values ...interface{}) orm.Query

Raw provides a mock function with given fields: sql, values

func (*Query) Save added in v1.10.0

func (_m *Query) Save(value interface{}) error

Save provides a mock function with given fields: value

func (*Query) SaveQuietly added in v1.11.0

func (_m *Query) SaveQuietly(value interface{}) error

SaveQuietly provides a mock function with given fields: value

func (*Query) Scan added in v1.10.0

func (_m *Query) Scan(dest interface{}) error

Scan provides a mock function with given fields: dest

func (*Query) Scopes added in v1.10.0

func (_m *Query) Scopes(funcs ...func(orm.Query) orm.Query) orm.Query

Scopes provides a mock function with given fields: funcs

func (*Query) Select added in v1.10.0

func (_m *Query) Select(query interface{}, args ...interface{}) orm.Query

Select provides a mock function with given fields: query, args

func (*Query) SharedLock added in v1.11.0

func (_m *Query) SharedLock() orm.Query

SharedLock provides a mock function with given fields:

func (*Query) Sum added in v1.13.0

func (_m *Query) Sum(column string, dest interface{}) error

Sum provides a mock function with given fields: column, dest

func (*Query) Table added in v1.10.0

func (_m *Query) Table(name string, args ...interface{}) orm.Query

Table provides a mock function with given fields: name, args

func (*Query) Update added in v1.10.0

func (_m *Query) Update(column interface{}, value ...interface{}) (*orm.Result, error)

Update provides a mock function with given fields: column, value

func (*Query) UpdateOrCreate added in v1.10.0

func (_m *Query) UpdateOrCreate(dest interface{}, attributes interface{}, values interface{}) error

UpdateOrCreate provides a mock function with given fields: dest, attributes, values

func (*Query) Where added in v1.10.0

func (_m *Query) Where(query interface{}, args ...interface{}) orm.Query

Where provides a mock function with given fields: query, args

func (*Query) With added in v1.10.0

func (_m *Query) With(query string, args ...interface{}) orm.Query

With provides a mock function with given fields: query, args

func (*Query) WithTrashed added in v1.10.0

func (_m *Query) WithTrashed() orm.Query

WithTrashed provides a mock function with given fields:

func (*Query) WithoutEvents added in v1.11.0

func (_m *Query) WithoutEvents() orm.Query

WithoutEvents provides a mock function with given fields:

type Transaction

type Transaction struct {
	mock.Mock
}

Transaction is an autogenerated mock type for the Transaction type

func NewTransaction

func NewTransaction(t interface {
	mock.TestingT
	Cleanup(func())
}) *Transaction

NewTransaction creates a new instance of Transaction. 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 (*Transaction) Association added in v1.8.0

func (_m *Transaction) Association(association string) orm.Association

Association provides a mock function with given fields: association

func (*Transaction) Begin added in v1.10.0

func (_m *Transaction) Begin() (orm.Transaction, error)

Begin provides a mock function with given fields:

func (*Transaction) Commit

func (_m *Transaction) Commit() error

Commit provides a mock function with given fields:

func (*Transaction) Count

func (_m *Transaction) Count(count *int64) error

Count provides a mock function with given fields: count

func (*Transaction) Create

func (_m *Transaction) Create(value interface{}) error

Create provides a mock function with given fields: value

func (*Transaction) Cursor added in v1.13.1

func (_m *Transaction) Cursor() (chan orm.Cursor, error)

Cursor provides a mock function with given fields:

func (*Transaction) Delete

func (_m *Transaction) Delete(value interface{}, conds ...interface{}) (*orm.Result, error)

Delete provides a mock function with given fields: value, conds

func (*Transaction) Distinct added in v1.0.5

func (_m *Transaction) Distinct(args ...interface{}) orm.Query

Distinct provides a mock function with given fields: args

func (*Transaction) Driver added in v1.2.3

func (_m *Transaction) Driver() orm.Driver

Driver provides a mock function with given fields:

func (*Transaction) Exec

func (_m *Transaction) Exec(sql string, values ...interface{}) (*orm.Result, error)

Exec provides a mock function with given fields: sql, values

func (*Transaction) Find

func (_m *Transaction) Find(dest interface{}, conds ...interface{}) error

Find provides a mock function with given fields: dest, conds

func (*Transaction) FindOrFail added in v1.11.0

func (_m *Transaction) FindOrFail(dest interface{}, conds ...interface{}) error

FindOrFail provides a mock function with given fields: dest, conds

func (*Transaction) First

func (_m *Transaction) First(dest interface{}) error

First provides a mock function with given fields: dest

func (*Transaction) FirstOr added in v1.10.0

func (_m *Transaction) FirstOr(dest interface{}, callback func() error) error

FirstOr provides a mock function with given fields: dest, callback

func (*Transaction) FirstOrCreate

func (_m *Transaction) FirstOrCreate(dest interface{}, conds ...interface{}) error

FirstOrCreate provides a mock function with given fields: dest, conds

func (*Transaction) FirstOrFail added in v1.10.0

func (_m *Transaction) FirstOrFail(dest interface{}) error

FirstOrFail provides a mock function with given fields: dest

func (*Transaction) FirstOrNew added in v1.10.0

func (_m *Transaction) FirstOrNew(dest interface{}, attributes interface{}, values ...interface{}) error

FirstOrNew provides a mock function with given fields: dest, attributes, values

func (*Transaction) ForceDelete

func (_m *Transaction) ForceDelete(value interface{}, conds ...interface{}) (*orm.Result, error)

ForceDelete provides a mock function with given fields: value, conds

func (*Transaction) Get

func (_m *Transaction) Get(dest interface{}) error

Get provides a mock function with given fields: dest

func (*Transaction) Group

func (_m *Transaction) Group(name string) orm.Query

Group provides a mock function with given fields: name

func (*Transaction) Having

func (_m *Transaction) Having(query interface{}, args ...interface{}) orm.Query

Having provides a mock function with given fields: query, args

func (*Transaction) Join

func (_m *Transaction) Join(query string, args ...interface{}) orm.Query

Join provides a mock function with given fields: query, args

func (*Transaction) Limit

func (_m *Transaction) Limit(limit int) orm.Query

Limit provides a mock function with given fields: limit

func (*Transaction) Load added in v1.8.0

func (_m *Transaction) Load(dest interface{}, relation string, args ...interface{}) error

Load provides a mock function with given fields: dest, relation, args

func (*Transaction) LoadMissing added in v1.8.0

func (_m *Transaction) LoadMissing(dest interface{}, relation string, args ...interface{}) error

LoadMissing provides a mock function with given fields: dest, relation, args

func (*Transaction) LockForUpdate added in v1.11.0

func (_m *Transaction) LockForUpdate() orm.Query

LockForUpdate provides a mock function with given fields:

func (*Transaction) Model

func (_m *Transaction) Model(value interface{}) orm.Query

Model provides a mock function with given fields: value

func (*Transaction) Offset

func (_m *Transaction) Offset(offset int) orm.Query

Offset provides a mock function with given fields: offset

func (*Transaction) Omit added in v1.8.0

func (_m *Transaction) Omit(columns ...string) orm.Query

Omit provides a mock function with given fields: columns

func (*Transaction) OrWhere

func (_m *Transaction) OrWhere(query interface{}, args ...interface{}) orm.Query

OrWhere provides a mock function with given fields: query, args

func (*Transaction) Order

func (_m *Transaction) Order(value interface{}) orm.Query

Order provides a mock function with given fields: value

func (*Transaction) Paginate added in v1.9.0

func (_m *Transaction) Paginate(page int, limit int, dest interface{}, total *int64) error

Paginate provides a mock function with given fields: page, limit, dest, total

func (*Transaction) Pluck

func (_m *Transaction) Pluck(column string, dest interface{}) error

Pluck provides a mock function with given fields: column, dest

func (*Transaction) Raw

func (_m *Transaction) Raw(sql string, values ...interface{}) orm.Query

Raw provides a mock function with given fields: sql, values

func (*Transaction) Rollback

func (_m *Transaction) Rollback() error

Rollback provides a mock function with given fields:

func (*Transaction) Save

func (_m *Transaction) Save(value interface{}) error

Save provides a mock function with given fields: value

func (*Transaction) SaveQuietly added in v1.11.0

func (_m *Transaction) SaveQuietly(value interface{}) error

SaveQuietly provides a mock function with given fields: value

func (*Transaction) Scan

func (_m *Transaction) Scan(dest interface{}) error

Scan provides a mock function with given fields: dest

func (*Transaction) Scopes

func (_m *Transaction) Scopes(funcs ...func(orm.Query) orm.Query) orm.Query

Scopes provides a mock function with given fields: funcs

func (*Transaction) Select

func (_m *Transaction) Select(query interface{}, args ...interface{}) orm.Query

Select provides a mock function with given fields: query, args

func (*Transaction) SharedLock added in v1.11.0

func (_m *Transaction) SharedLock() orm.Query

SharedLock provides a mock function with given fields:

func (*Transaction) Sum added in v1.13.1

func (_m *Transaction) Sum(column string, dest interface{}) error

Sum provides a mock function with given fields: column, dest

func (*Transaction) Table

func (_m *Transaction) Table(name string, args ...interface{}) orm.Query

Table provides a mock function with given fields: name, args

func (*Transaction) Update

func (_m *Transaction) Update(column interface{}, value ...interface{}) (*orm.Result, error)

Update provides a mock function with given fields: column, value

func (*Transaction) UpdateOrCreate added in v1.10.0

func (_m *Transaction) UpdateOrCreate(dest interface{}, attributes interface{}, values interface{}) error

UpdateOrCreate provides a mock function with given fields: dest, attributes, values

func (*Transaction) Where

func (_m *Transaction) Where(query interface{}, args ...interface{}) orm.Query

Where provides a mock function with given fields: query, args

func (*Transaction) With added in v1.8.0

func (_m *Transaction) With(query string, args ...interface{}) orm.Query

With provides a mock function with given fields: query, args

func (*Transaction) WithTrashed

func (_m *Transaction) WithTrashed() orm.Query

WithTrashed provides a mock function with given fields:

func (*Transaction) WithoutEvents added in v1.11.0

func (_m *Transaction) WithoutEvents() orm.Query

WithoutEvents provides a mock function with given fields:

Jump to

Keyboard shortcuts

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