Documentation ¶
Overview ¶
Package store implements operations associated with update migration records.
Index ¶
- type Context
- type Migrations
- func (r Migrations) CreateTableIfNotExists() error
- func (r Migrations) Delete(migrations ...interface{}) error
- func (r Migrations) DropTablesIfExists() error
- func (r Migrations) GetDBMap() *gorp.DbMap
- func (r Migrations) GetMigrations() ([]model.Migration, error)
- func (r Migrations) GetMigrationsSorted() (model.Migrations, error)
- func (r Migrations) Insert(migrations ...interface{}) error
- type Releases
- func (r Releases) CreateTableIfNotExists() error
- func (r Releases) Delete(releases ...interface{}) error
- func (r Releases) DropTablesIfExists() error
- func (r Releases) GetDBMap() *gorp.DbMap
- func (r Releases) GetMigrationsSorted() (model.Releases, error)
- func (r Releases) GetReleases() ([]model.Release, error)
- func (r Releases) Insert(releases ...interface{}) error
- type Unittests
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Context ¶
type Context struct { Migrations Migrations Releases Releases Unittests Unittests // contains filtered or unexported fields }
Context defines the global database context with access to all database available tables and operations.
type Migrations ¶
type Migrations struct {
// contains filtered or unexported fields
}
Migrations defines a wrapper struct for all of the migrations table operations.
func (Migrations) CreateTableIfNotExists ¶
func (r Migrations) CreateTableIfNotExists() error
CreateTableIfNotExists create migrations table if one does not exist.
func (Migrations) Delete ¶
func (r Migrations) Delete(migrations ...interface{}) error
Delete instructs a migration record to be deleted from the database.
func (Migrations) DropTablesIfExists ¶
func (r Migrations) DropTablesIfExists() error
DropTablesIfExists drops a table from the database if already exists.
func (Migrations) GetDBMap ¶
func (r Migrations) GetDBMap() *gorp.DbMap
GetDBMap returns the underlying migrations table database model object.
func (Migrations) GetMigrations ¶
func (r Migrations) GetMigrations() ([]model.Migration, error)
GetMigrations returns database migration records.
func (Migrations) GetMigrationsSorted ¶
func (r Migrations) GetMigrationsSorted() (model.Migrations, error)
GetMigrationsSorted returns sorted database migration records.
func (Migrations) Insert ¶
func (r Migrations) Insert(migrations ...interface{}) error
Insert adds a migration record to the database.
type Releases ¶
type Releases struct {
// contains filtered or unexported fields
}
Releases defines a wrapper struct for all of the releases table operations.
func (Releases) CreateTableIfNotExists ¶
CreateTableIfNotExists create releases table if one does not exist.
func (Releases) DropTablesIfExists ¶
DropTablesIfExists drops a table from the database if already exists.
func (Releases) GetDBMap ¶
func (r Releases) GetDBMap() *gorp.DbMap
GetDBMap returns the underlying releases table database model object.
func (Releases) GetMigrationsSorted ¶
GetMigrationsSorted returns sorted database release records.
func (Releases) GetReleases ¶
GetReleases returns database release records.