mocks

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jun 7, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Association

type Association struct {
	mock.Mock
}

Association is an autogenerated mock type for the Association type

func NewAssociation

func NewAssociation(t mockConstructorTestingTNewAssociation) *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.

func (*Association) Append

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

Append provides a mock function with given fields: values

func (*Association) Clear

func (_m *Association) Clear() error

Clear provides a mock function with given fields:

func (*Association) Count

func (_m *Association) Count() int64

Count provides a mock function with given fields:

func (*Association) Delete

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

Delete provides a mock function with given fields: values

func (*Association) Find

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

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

func (*Association) Replace

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

Replace provides a mock function with given fields: values

type Orm

type Orm struct {
	mock.Mock
}

Orm is an autogenerated mock type for the Orm type

func NewOrm

func NewOrm(t mockConstructorTestingTNewOrm) *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.

func (*Orm) Connection

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

Connection provides a mock function with given fields: name

func (*Orm) DB

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

DB provides a mock function with given fields:

func (*Orm) Observe

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

type Query struct {
	mock.Mock
}

Query is an autogenerated mock type for the Query type

func NewQuery

func NewQuery(t mockConstructorTestingTNewQuery) *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.

func (*Query) Association

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

Association provides a mock function with given fields: association

func (*Query) Begin

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

Begin provides a mock function with given fields:

func (*Query) Count

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

Count provides a mock function with given fields: count

func (*Query) Create

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

Create provides a mock function with given fields: value

func (*Query) Delete

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

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

func (*Query) Distinct

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

Distinct provides a mock function with given fields: args

func (*Query) Driver

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

Driver provides a mock function with given fields:

func (*Query) Exec

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

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

func (*Query) Find

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

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

func (*Query) FindOrFail

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

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

func (*Query) First

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

First provides a mock function with given fields: dest

func (*Query) FirstOr

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

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

func (*Query) FirstOrCreate

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

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

func (*Query) FirstOrFail

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

FirstOrFail provides a mock function with given fields: dest

func (*Query) FirstOrNew

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

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

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

func (*Query) Get

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

Get provides a mock function with given fields: dest

func (*Query) Group

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

Group provides a mock function with given fields: name

func (*Query) Having

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

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

func (*Query) Join

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

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

func (*Query) Limit

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

Limit provides a mock function with given fields: limit

func (*Query) Load

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

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

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

LockForUpdate provides a mock function with given fields:

func (*Query) Model

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

Model provides a mock function with given fields: value

func (*Query) Offset

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

Offset provides a mock function with given fields: offset

func (*Query) Omit

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

Omit provides a mock function with given fields: columns

func (*Query) OrWhere

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

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

func (*Query) Order

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

Order provides a mock function with given fields: value

func (*Query) Paginate

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

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

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

func (*Query) Raw

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

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

func (*Query) Save

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

Save provides a mock function with given fields: value

func (*Query) SaveQuietly

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

SaveQuietly provides a mock function with given fields: value

func (*Query) Scan

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

Scan provides a mock function with given fields: dest

func (*Query) Scopes

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

Scopes provides a mock function with given fields: funcs

func (*Query) Select

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

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

func (*Query) SharedLock

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

SharedLock provides a mock function with given fields:

func (*Query) Table

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

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

func (*Query) Update

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

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

func (*Query) UpdateOrCreate

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

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

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

func (*Query) With

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

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

func (*Query) WithTrashed

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

WithTrashed provides a mock function with given fields:

func (*Query) WithoutEvents

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 mockConstructorTestingTNewTransaction) *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.

func (*Transaction) Association

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

Association provides a mock function with given fields: association

func (*Transaction) Begin

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) 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

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

Distinct provides a mock function with given fields: args

func (*Transaction) Driver

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

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

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

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

FirstOrFail provides a mock function with given fields: dest

func (*Transaction) FirstOrNew

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

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

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

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

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

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

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

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

SharedLock provides a mock function with given fields:

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

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

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

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