Documentation ¶
Index ¶
- type MongoCollection
- func (_m *MongoCollection) Bulk() *mgo.Bulk
- func (_m *MongoCollection) Count() (int, error)
- func (_m *MongoCollection) Create(info *mgo.CollectionInfo) error
- func (_m *MongoCollection) DropAllIndexes() error
- func (_m *MongoCollection) DropCollection() error
- func (_m *MongoCollection) DropIndex(key ...string) error
- func (_m *MongoCollection) DropIndexName(name string) error
- func (_m *MongoCollection) EnsureIndex(index mgo.Index) error
- func (_m *MongoCollection) EnsureIndexKey(key ...string) error
- func (_m *MongoCollection) Find(query interface{}) *mgo.Query
- func (_m *MongoCollection) FindId(id interface{}) *mgo.Query
- func (_m *MongoCollection) Indexes() ([]mgo.Index, error)
- func (_m *MongoCollection) Insert(docs ...interface{}) error
- func (_m *MongoCollection) NewIter(session *mgo.Session, firstBatch []bson.Raw, cursorID int64, err error) *mgo.Iter
- func (_m *MongoCollection) Pipe(pipeline interface{}) *mgo.Pipe
- func (_m *MongoCollection) Remove(selector interface{}) error
- func (_m *MongoCollection) RemoveAll(selector interface{}) (*mgo.ChangeInfo, error)
- func (_m *MongoCollection) RemoveId(id interface{}) error
- func (_m *MongoCollection) Repair() *mgo.Iter
- func (_m *MongoCollection) Update(selector interface{}, update interface{}) error
- func (_m *MongoCollection) UpdateAll(selector interface{}, update interface{}) (*mgo.ChangeInfo, error)
- func (_m *MongoCollection) UpdateId(id interface{}, update interface{}) error
- func (_m *MongoCollection) Upsert(selector interface{}, update interface{}) (*mgo.ChangeInfo, error)
- func (_m *MongoCollection) UpsertId(id interface{}, update interface{}) (*mgo.ChangeInfo, error)
- func (_m *MongoCollection) Watch(pipeline interface{}, options mgo.ChangeStreamOptions) (*mgo.ChangeStream, error)
- func (_m *MongoCollection) With(s *mgo.Session) *mgo.Collection
- type MongoQuery
- func (_m *MongoQuery) All(result interface{}) error
- func (_m *MongoQuery) Apply(change mgo.Change, result interface{}) (*mgo.ChangeInfo, error)
- func (_m *MongoQuery) Batch(n int) *mgo.Query
- func (_m *MongoQuery) Collation(collation *mgo.Collation) *mgo.Query
- func (_m *MongoQuery) Comment(comment string) *mgo.Query
- func (_m *MongoQuery) Count() (int, error)
- func (_m *MongoQuery) Distinct(key string, result interface{}) error
- func (_m *MongoQuery) Explain(result interface{}) error
- func (_m *MongoQuery) For(result interface{}, f func() error) error
- func (_m *MongoQuery) Hint(indexKey ...string) *mgo.Query
- func (_m *MongoQuery) Iter() *mgo.Iter
- func (_m *MongoQuery) Limit(n int) *mgo.Query
- func (_m *MongoQuery) LogReplay() *mgo.Query
- func (_m *MongoQuery) MapReduce(job *mgo.MapReduce, result interface{}) (*mgo.MapReduceInfo, error)
- func (_m *MongoQuery) One(result interface{}) error
- func (_m *MongoQuery) Prefetch(p float64) *mgo.Query
- func (_m *MongoQuery) Select(selector interface{}) *mgo.Query
- func (_m *MongoQuery) SetMaxScan(n int) *mgo.Query
- func (_m *MongoQuery) SetMaxTime(d time.Duration) *mgo.Query
- func (_m *MongoQuery) Skip(n int) *mgo.Query
- func (_m *MongoQuery) Snapshot() *mgo.Query
- func (_m *MongoQuery) Sort(fields ...string) *mgo.Query
- func (_m *MongoQuery) Tail(timeout time.Duration) *mgo.Iter
- type MongoSession
- func (_m *MongoSession) BuildInfo() (mgo.BuildInfo, error)
- func (_m *MongoSession) Clone() *mgo.Session
- func (_m *MongoSession) Close()
- func (_m *MongoSession) Copy() *mgo.Session
- func (_m *MongoSession) DB(name string) *mgo.Database
- func (_m *MongoSession) DatabaseNames() ([]string, error)
- func (_m *MongoSession) EnsureSafe(safe *mgo.Safe)
- func (_m *MongoSession) FindRef(ref *mgo.DBRef) *mgo.Query
- func (_m *MongoSession) Fsync(async bool) error
- func (_m *MongoSession) FsyncLock() error
- func (_m *MongoSession) FsyncUnlock() error
- func (_m *MongoSession) LiveServers() []string
- func (_m *MongoSession) Login(cred *mgo.Credential) error
- func (_m *MongoSession) LogoutAll()
- func (_m *MongoSession) Mode() mgo.Mode
- func (_m *MongoSession) New() *mgo.Session
- func (_m *MongoSession) Ping() error
- func (_m *MongoSession) Refresh()
- func (_m *MongoSession) ResetIndexCache()
- func (_m *MongoSession) Run(cmd interface{}, result interface{}) error
- func (_m *MongoSession) Safe() *mgo.Safe
- func (_m *MongoSession) SelectServers(tags ...bson.D)
- func (_m *MongoSession) SetBatch(n int)
- func (_m *MongoSession) SetBypassValidation(bypass bool)
- func (_m *MongoSession) SetCursorTimeout(d time.Duration)
- func (_m *MongoSession) SetMode(consistency mgo.Mode, refresh bool)
- func (_m *MongoSession) SetPoolLimit(limit int)
- func (_m *MongoSession) SetPoolTimeout(timeout time.Duration)
- func (_m *MongoSession) SetPrefetch(p float64)
- func (_m *MongoSession) SetSafe(safe *mgo.Safe)
- func (_m *MongoSession) SetSocketTimeout(d time.Duration)
- func (_m *MongoSession) SetSyncTimeout(d time.Duration)
- type SQLDatabase
- func (_m *SQLDatabase) Begin() (*sql.Tx, error)
- func (_m *SQLDatabase) BeginTx(ctx context.Context, opts *sql.TxOptions) (*sql.Tx, error)
- func (_m *SQLDatabase) Close() error
- func (_m *SQLDatabase) Conn(ctx context.Context) (*sql.Conn, error)
- func (_m *SQLDatabase) Driver() driver.Driver
- func (_m *SQLDatabase) Exec(query string, args ...interface{}) (sql.Result, error)
- func (_m *SQLDatabase) ExecContext(ctx context.Context, query string, args ...interface{}) (sql.Result, error)
- func (_m *SQLDatabase) Ping() error
- func (_m *SQLDatabase) PingContext(ctx context.Context) error
- func (_m *SQLDatabase) Prepare(query string) (*sql.Stmt, error)
- func (_m *SQLDatabase) PrepareContext(ctx context.Context, query string) (*sql.Stmt, error)
- func (_m *SQLDatabase) Query(query string, args ...interface{}) (*sql.Rows, error)
- func (_m *SQLDatabase) QueryContext(ctx context.Context, query string, args ...interface{}) (*sql.Rows, error)
- func (_m *SQLDatabase) QueryRow(query string, args ...interface{}) *sql.Row
- func (_m *SQLDatabase) QueryRowContext(ctx context.Context, query string, args ...interface{}) *sql.Row
- func (_m *SQLDatabase) SetConnMaxLifetime(d time.Duration)
- func (_m *SQLDatabase) SetMaxIdleConns(n int)
- func (_m *SQLDatabase) SetMaxOpenConns(n int)
- func (_m *SQLDatabase) Stats() sql.DBStats
- type SQLRows
- func (_m *SQLRows) Close() error
- func (_m *SQLRows) ColumnTypes() ([]*sql.ColumnType, error)
- func (_m *SQLRows) Columns() ([]string, error)
- func (_m *SQLRows) Err() error
- func (_m *SQLRows) Next() bool
- func (_m *SQLRows) NextResultSet() bool
- func (_m *SQLRows) Scan(dest ...interface{}) error
- func (_m *SQLRows) SetLimit(n int)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MongoCollection ¶
MongoCollection is an autogenerated mock type for the MongoCollection type
func (*MongoCollection) Bulk ¶
func (_m *MongoCollection) Bulk() *mgo.Bulk
Bulk provides a mock function with given fields:
func (*MongoCollection) Count ¶
func (_m *MongoCollection) Count() (int, error)
Count provides a mock function with given fields:
func (*MongoCollection) Create ¶
func (_m *MongoCollection) Create(info *mgo.CollectionInfo) error
Create provides a mock function with given fields: info
func (*MongoCollection) DropAllIndexes ¶
func (_m *MongoCollection) DropAllIndexes() error
DropAllIndexes provides a mock function with given fields:
func (*MongoCollection) DropCollection ¶
func (_m *MongoCollection) DropCollection() error
DropCollection provides a mock function with given fields:
func (*MongoCollection) DropIndex ¶
func (_m *MongoCollection) DropIndex(key ...string) error
DropIndex provides a mock function with given fields: key
func (*MongoCollection) DropIndexName ¶
func (_m *MongoCollection) DropIndexName(name string) error
DropIndexName provides a mock function with given fields: name
func (*MongoCollection) EnsureIndex ¶
func (_m *MongoCollection) EnsureIndex(index mgo.Index) error
EnsureIndex provides a mock function with given fields: index
func (*MongoCollection) EnsureIndexKey ¶
func (_m *MongoCollection) EnsureIndexKey(key ...string) error
EnsureIndexKey provides a mock function with given fields: key
func (*MongoCollection) Find ¶
func (_m *MongoCollection) Find(query interface{}) *mgo.Query
Find provides a mock function with given fields: query
func (*MongoCollection) FindId ¶
func (_m *MongoCollection) FindId(id interface{}) *mgo.Query
FindId provides a mock function with given fields: id
func (*MongoCollection) Indexes ¶
func (_m *MongoCollection) Indexes() ([]mgo.Index, error)
Indexes provides a mock function with given fields:
func (*MongoCollection) Insert ¶
func (_m *MongoCollection) Insert(docs ...interface{}) error
Insert provides a mock function with given fields: docs
func (*MongoCollection) NewIter ¶
func (_m *MongoCollection) NewIter(session *mgo.Session, firstBatch []bson.Raw, cursorID int64, err error) *mgo.Iter
NewIter provides a mock function with given fields: session, firstBatch, cursorID, err
func (*MongoCollection) Pipe ¶
func (_m *MongoCollection) Pipe(pipeline interface{}) *mgo.Pipe
Pipe provides a mock function with given fields: pipeline
func (*MongoCollection) Remove ¶
func (_m *MongoCollection) Remove(selector interface{}) error
Remove provides a mock function with given fields: selector
func (*MongoCollection) RemoveAll ¶
func (_m *MongoCollection) RemoveAll(selector interface{}) (*mgo.ChangeInfo, error)
RemoveAll provides a mock function with given fields: selector
func (*MongoCollection) RemoveId ¶
func (_m *MongoCollection) RemoveId(id interface{}) error
RemoveId provides a mock function with given fields: id
func (*MongoCollection) Repair ¶
func (_m *MongoCollection) Repair() *mgo.Iter
Repair provides a mock function with given fields:
func (*MongoCollection) Update ¶
func (_m *MongoCollection) Update(selector interface{}, update interface{}) error
Update provides a mock function with given fields: selector, update
func (*MongoCollection) UpdateAll ¶
func (_m *MongoCollection) UpdateAll(selector interface{}, update interface{}) (*mgo.ChangeInfo, error)
UpdateAll provides a mock function with given fields: selector, update
func (*MongoCollection) UpdateId ¶
func (_m *MongoCollection) UpdateId(id interface{}, update interface{}) error
UpdateId provides a mock function with given fields: id, update
func (*MongoCollection) Upsert ¶
func (_m *MongoCollection) Upsert(selector interface{}, update interface{}) (*mgo.ChangeInfo, error)
Upsert provides a mock function with given fields: selector, update
func (*MongoCollection) UpsertId ¶
func (_m *MongoCollection) UpsertId(id interface{}, update interface{}) (*mgo.ChangeInfo, error)
UpsertId provides a mock function with given fields: id, update
func (*MongoCollection) Watch ¶
func (_m *MongoCollection) Watch(pipeline interface{}, options mgo.ChangeStreamOptions) (*mgo.ChangeStream, error)
Watch provides a mock function with given fields: pipeline, options
func (*MongoCollection) With ¶
func (_m *MongoCollection) With(s *mgo.Session) *mgo.Collection
With provides a mock function with given fields: s
type MongoQuery ¶
MongoQuery is an autogenerated mock type for the MongoQuery type
func (*MongoQuery) All ¶
func (_m *MongoQuery) All(result interface{}) error
All provides a mock function with given fields: result
func (*MongoQuery) Apply ¶
func (_m *MongoQuery) Apply(change mgo.Change, result interface{}) (*mgo.ChangeInfo, error)
Apply provides a mock function with given fields: change, result
func (*MongoQuery) Batch ¶
func (_m *MongoQuery) Batch(n int) *mgo.Query
Batch provides a mock function with given fields: n
func (*MongoQuery) Collation ¶
func (_m *MongoQuery) Collation(collation *mgo.Collation) *mgo.Query
Collation provides a mock function with given fields: collation
func (*MongoQuery) Comment ¶
func (_m *MongoQuery) Comment(comment string) *mgo.Query
Comment provides a mock function with given fields: comment
func (*MongoQuery) Count ¶
func (_m *MongoQuery) Count() (int, error)
Count provides a mock function with given fields:
func (*MongoQuery) Distinct ¶
func (_m *MongoQuery) Distinct(key string, result interface{}) error
Distinct provides a mock function with given fields: key, result
func (*MongoQuery) Explain ¶
func (_m *MongoQuery) Explain(result interface{}) error
Explain provides a mock function with given fields: result
func (*MongoQuery) For ¶
func (_m *MongoQuery) For(result interface{}, f func() error) error
For provides a mock function with given fields: result, f
func (*MongoQuery) Hint ¶
func (_m *MongoQuery) Hint(indexKey ...string) *mgo.Query
Hint provides a mock function with given fields: indexKey
func (*MongoQuery) Iter ¶
func (_m *MongoQuery) Iter() *mgo.Iter
Iter provides a mock function with given fields:
func (*MongoQuery) Limit ¶
func (_m *MongoQuery) Limit(n int) *mgo.Query
Limit provides a mock function with given fields: n
func (*MongoQuery) LogReplay ¶
func (_m *MongoQuery) LogReplay() *mgo.Query
LogReplay provides a mock function with given fields:
func (*MongoQuery) MapReduce ¶
func (_m *MongoQuery) MapReduce(job *mgo.MapReduce, result interface{}) (*mgo.MapReduceInfo, error)
MapReduce provides a mock function with given fields: job, result
func (*MongoQuery) One ¶
func (_m *MongoQuery) One(result interface{}) error
One provides a mock function with given fields: result
func (*MongoQuery) Prefetch ¶
func (_m *MongoQuery) Prefetch(p float64) *mgo.Query
Prefetch provides a mock function with given fields: p
func (*MongoQuery) Select ¶
func (_m *MongoQuery) Select(selector interface{}) *mgo.Query
Select provides a mock function with given fields: selector
func (*MongoQuery) SetMaxScan ¶
func (_m *MongoQuery) SetMaxScan(n int) *mgo.Query
SetMaxScan provides a mock function with given fields: n
func (*MongoQuery) SetMaxTime ¶
func (_m *MongoQuery) SetMaxTime(d time.Duration) *mgo.Query
SetMaxTime provides a mock function with given fields: d
func (*MongoQuery) Skip ¶
func (_m *MongoQuery) Skip(n int) *mgo.Query
Skip provides a mock function with given fields: n
func (*MongoQuery) Snapshot ¶
func (_m *MongoQuery) Snapshot() *mgo.Query
Snapshot provides a mock function with given fields:
type MongoSession ¶
MongoSession is an autogenerated mock type for the MongoSession type
func (*MongoSession) BuildInfo ¶
func (_m *MongoSession) BuildInfo() (mgo.BuildInfo, error)
BuildInfo provides a mock function with given fields:
func (*MongoSession) Clone ¶
func (_m *MongoSession) Clone() *mgo.Session
Clone provides a mock function with given fields:
func (*MongoSession) Close ¶
func (_m *MongoSession) Close()
Close provides a mock function with given fields:
func (*MongoSession) Copy ¶
func (_m *MongoSession) Copy() *mgo.Session
Copy provides a mock function with given fields:
func (*MongoSession) DB ¶
func (_m *MongoSession) DB(name string) *mgo.Database
DB provides a mock function with given fields: name
func (*MongoSession) DatabaseNames ¶
func (_m *MongoSession) DatabaseNames() ([]string, error)
DatabaseNames provides a mock function with given fields:
func (*MongoSession) EnsureSafe ¶
func (_m *MongoSession) EnsureSafe(safe *mgo.Safe)
EnsureSafe provides a mock function with given fields: safe
func (*MongoSession) FindRef ¶
func (_m *MongoSession) FindRef(ref *mgo.DBRef) *mgo.Query
FindRef provides a mock function with given fields: ref
func (*MongoSession) Fsync ¶
func (_m *MongoSession) Fsync(async bool) error
Fsync provides a mock function with given fields: async
func (*MongoSession) FsyncLock ¶
func (_m *MongoSession) FsyncLock() error
FsyncLock provides a mock function with given fields:
func (*MongoSession) FsyncUnlock ¶
func (_m *MongoSession) FsyncUnlock() error
FsyncUnlock provides a mock function with given fields:
func (*MongoSession) LiveServers ¶
func (_m *MongoSession) LiveServers() []string
LiveServers provides a mock function with given fields:
func (*MongoSession) Login ¶
func (_m *MongoSession) Login(cred *mgo.Credential) error
Login provides a mock function with given fields: cred
func (*MongoSession) LogoutAll ¶
func (_m *MongoSession) LogoutAll()
LogoutAll provides a mock function with given fields:
func (*MongoSession) Mode ¶
func (_m *MongoSession) Mode() mgo.Mode
Mode provides a mock function with given fields:
func (*MongoSession) New ¶
func (_m *MongoSession) New() *mgo.Session
New provides a mock function with given fields:
func (*MongoSession) Ping ¶
func (_m *MongoSession) Ping() error
Ping provides a mock function with given fields:
func (*MongoSession) Refresh ¶
func (_m *MongoSession) Refresh()
Refresh provides a mock function with given fields:
func (*MongoSession) ResetIndexCache ¶
func (_m *MongoSession) ResetIndexCache()
ResetIndexCache provides a mock function with given fields:
func (*MongoSession) Run ¶
func (_m *MongoSession) Run(cmd interface{}, result interface{}) error
Run provides a mock function with given fields: cmd, result
func (*MongoSession) Safe ¶
func (_m *MongoSession) Safe() *mgo.Safe
Safe provides a mock function with given fields:
func (*MongoSession) SelectServers ¶
func (_m *MongoSession) SelectServers(tags ...bson.D)
SelectServers provides a mock function with given fields: tags
func (*MongoSession) SetBatch ¶
func (_m *MongoSession) SetBatch(n int)
SetBatch provides a mock function with given fields: n
func (*MongoSession) SetBypassValidation ¶
func (_m *MongoSession) SetBypassValidation(bypass bool)
SetBypassValidation provides a mock function with given fields: bypass
func (*MongoSession) SetCursorTimeout ¶
func (_m *MongoSession) SetCursorTimeout(d time.Duration)
SetCursorTimeout provides a mock function with given fields: d
func (*MongoSession) SetMode ¶
func (_m *MongoSession) SetMode(consistency mgo.Mode, refresh bool)
SetMode provides a mock function with given fields: consistency, refresh
func (*MongoSession) SetPoolLimit ¶
func (_m *MongoSession) SetPoolLimit(limit int)
SetPoolLimit provides a mock function with given fields: limit
func (*MongoSession) SetPoolTimeout ¶
func (_m *MongoSession) SetPoolTimeout(timeout time.Duration)
SetPoolTimeout provides a mock function with given fields: timeout
func (*MongoSession) SetPrefetch ¶
func (_m *MongoSession) SetPrefetch(p float64)
SetPrefetch provides a mock function with given fields: p
func (*MongoSession) SetSafe ¶
func (_m *MongoSession) SetSafe(safe *mgo.Safe)
SetSafe provides a mock function with given fields: safe
func (*MongoSession) SetSocketTimeout ¶
func (_m *MongoSession) SetSocketTimeout(d time.Duration)
SetSocketTimeout provides a mock function with given fields: d
func (*MongoSession) SetSyncTimeout ¶
func (_m *MongoSession) SetSyncTimeout(d time.Duration)
SetSyncTimeout provides a mock function with given fields: d
type SQLDatabase ¶
SQLDatabase is an autogenerated mock type for the SQLDatabase type
func (*SQLDatabase) Begin ¶
func (_m *SQLDatabase) Begin() (*sql.Tx, error)
Begin provides a mock function with given fields:
func (*SQLDatabase) Close ¶
func (_m *SQLDatabase) Close() error
Close provides a mock function with given fields:
func (*SQLDatabase) Driver ¶
func (_m *SQLDatabase) Driver() driver.Driver
Driver provides a mock function with given fields:
func (*SQLDatabase) Exec ¶
func (_m *SQLDatabase) Exec(query string, args ...interface{}) (sql.Result, error)
Exec provides a mock function with given fields: query, args
func (*SQLDatabase) ExecContext ¶
func (_m *SQLDatabase) ExecContext(ctx context.Context, query string, args ...interface{}) (sql.Result, error)
ExecContext provides a mock function with given fields: ctx, query, args
func (*SQLDatabase) Ping ¶
func (_m *SQLDatabase) Ping() error
Ping provides a mock function with given fields:
func (*SQLDatabase) PingContext ¶
func (_m *SQLDatabase) PingContext(ctx context.Context) error
PingContext provides a mock function with given fields: ctx
func (*SQLDatabase) Prepare ¶
func (_m *SQLDatabase) Prepare(query string) (*sql.Stmt, error)
Prepare provides a mock function with given fields: query
func (*SQLDatabase) PrepareContext ¶
PrepareContext provides a mock function with given fields: ctx, query
func (*SQLDatabase) Query ¶
func (_m *SQLDatabase) Query(query string, args ...interface{}) (*sql.Rows, error)
Query provides a mock function with given fields: query, args
func (*SQLDatabase) QueryContext ¶
func (_m *SQLDatabase) QueryContext(ctx context.Context, query string, args ...interface{}) (*sql.Rows, error)
QueryContext provides a mock function with given fields: ctx, query, args
func (*SQLDatabase) QueryRow ¶
func (_m *SQLDatabase) QueryRow(query string, args ...interface{}) *sql.Row
QueryRow provides a mock function with given fields: query, args
func (*SQLDatabase) QueryRowContext ¶
func (_m *SQLDatabase) QueryRowContext(ctx context.Context, query string, args ...interface{}) *sql.Row
QueryRowContext provides a mock function with given fields: ctx, query, args
func (*SQLDatabase) SetConnMaxLifetime ¶
func (_m *SQLDatabase) SetConnMaxLifetime(d time.Duration)
SetConnMaxLifetime provides a mock function with given fields: d
func (*SQLDatabase) SetMaxIdleConns ¶
func (_m *SQLDatabase) SetMaxIdleConns(n int)
SetMaxIdleConns provides a mock function with given fields: n
func (*SQLDatabase) SetMaxOpenConns ¶
func (_m *SQLDatabase) SetMaxOpenConns(n int)
SetMaxOpenConns provides a mock function with given fields: n
func (*SQLDatabase) Stats ¶
func (_m *SQLDatabase) Stats() sql.DBStats
Stats provides a mock function with given fields:
type SQLRows ¶
SQLRows is an autogenerated mock type for the SQLRows type
func (*SQLRows) ColumnTypes ¶
func (_m *SQLRows) ColumnTypes() ([]*sql.ColumnType, error)
ColumnTypes provides a mock function with given fields:
func (*SQLRows) NextResultSet ¶
NextResultSet provides a mock function with given fields: