Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var UnsupportedDriver = errors.New("Unsupported database driver.")
Functions ¶
func CollectionCanBeDeleted ¶
checks if collection can be deleted by selected options
func SelectStrategy ¶
returns specified strategy
Types ¶
type GopherError ¶
type GopherError struct {
Message string
}
func (*GopherError) Error ¶
func (e *GopherError) Error() string
type Mongo ¶
type Mongo struct {
// contains filtered or unexported fields
}
Mongo type fields:
name - contains the DB name session - new connection to the db
func NewMongoCleaningGopher ¶
creates new cleaner for mongo driver
func (*Mongo) CleanWithTruncation ¶
func (m *Mongo) CleanWithTruncation()
Clean with Mongo adapter - truncation strategy
type Mysql ¶
type Mysql struct {
// contains filtered or unexported fields
}
func NewMysqlConnection ¶
creates new cleaner for mysql driver
type Postgres ¶
type Postgres struct {
// contains filtered or unexported fields
}
func NewPostgresConnection ¶
creates new cleaner for mysql driver
type Redis ¶
Redis type fields:
name - contains the DB name strategy - contains the selected strategy for cleaning the DB options - options for additional info - [except, only]
func NewRedisCleaningGopher ¶
func (*Redis) CleanWithTruncation ¶
func (m *Redis) CleanWithTruncation()
Clean with Redis adapter - truncation strategy
type TruncateableSqlCleaner ¶
type TruncateableSqlCleaner struct {
// contains filtered or unexported fields
}
func NewTruncateableSqlCleaningGopher ¶
func NewTruncateableSqlCleaningGopher(adapter string, options map[string]string) (*TruncateableSqlCleaner, error)
func (*TruncateableSqlCleaner) Clean ¶
func (tsc *TruncateableSqlCleaner) Clean(options map[string][]string)
func (*TruncateableSqlCleaner) CleanWithStatment ¶
func (tsc *TruncateableSqlCleaner) CleanWithStatment(options map[string][]string, stm string) error
func (*TruncateableSqlCleaner) Close ¶
func (tsc *TruncateableSqlCleaner) Close()
closes the connection to the DB
func (*TruncateableSqlCleaner) String ¶
func (tsc *TruncateableSqlCleaner) String() string
For debug purposes
type TruncateableSqlDatabase ¶
Click to show internal directories.
Click to hide internal directories.