Documentation
¶
Overview ¶
Package interfaces provides database interfaces for the db package.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MongoClientInterface ¶
type MongoClientInterface interface {
Ping(ctx context.Context, rp *readpref.ReadPref) error
Connect(ctx context.Context) error
Database(name string, opts ...*options.DatabaseOptions) *mongo.Database
}
MongoClientInterface defines the interface for mongo.Client operations
type PgxPoolInterface ¶
type PgxPoolInterface interface {
Ping(ctx context.Context) error
Begin(ctx context.Context) (pgx.Tx, error)
Close()
}
PgxPoolInterface defines the interface for pgxpool.Pool operations
type PgxTxInterface ¶
type PgxTxInterface interface {
Commit(ctx context.Context) error
Rollback(ctx context.Context) error
}
PgxTxInterface defines the interface for pgx.Tx operations
type SQLDBInterface ¶
type SQLDBInterface interface {
PingContext(ctx context.Context) error
BeginTx(ctx context.Context, opts *sql.TxOptions) (*sql.Tx, error)
SetMaxOpenConns(n int)
SetMaxIdleConns(n int)
SetConnMaxLifetime(d time.Duration)
}
SQLDBInterface defines the interface for sql.DB operations
type SQLTxInterface ¶
SQLTxInterface defines the interface for sql.Tx operations
Click to show internal directories.
Click to hide internal directories.