Documentation ¶ Index ¶ Variables type DB func Open(cfg *config.Config) (*DB, error) func (db *DB) Init() error func (db *DB) Log(r *revision.Revision, forced bool) error func (db *DB) Perform(r *revision.Revision, force bool) error func (db *DB) ReadLog(ids ...string) ([]*revision.Revision, error) func (db *DB) ReadLogReverse(ids ...string) ([]*revision.Revision, error) type Type Constants ¶ This section is empty. Variables ¶ View Source var ( ErrInitialized = errors.New("database already initialized") ErrAlreadyPerformed = errors.New("already performed revision") ErrCheckHashFailed = errors.New("revision hash check failed") ) Functions ¶ This section is empty. Types ¶ type DB ¶ type DB struct { *sql.DB Type Type } func Open ¶ func Open(cfg *config.Config) (*DB, error) func (*DB) Init ¶ func (db *DB) Init() error func (*DB) Log ¶ func (db *DB) Log(r *revision.Revision, forced bool) error func (*DB) Perform ¶ func (db *DB) Perform(r *revision.Revision, force bool) error func (*DB) ReadLog ¶ func (db *DB) ReadLog(ids ...string) ([]*revision.Revision, error) func (*DB) ReadLogReverse ¶ func (db *DB) ReadLogReverse(ids ...string) ([]*revision.Revision, error) type Type ¶ type Type uint32 const ( SQLite3 Type = iota Postgres MySQL ) Source Files ¶ View all Source files database.go mysql.go postgres.go sqlite3.go Click to show internal directories. Click to hide internal directories.