Documentation
¶
Index ¶
- Constants
- type Controller
- type ControllerImpl
- type Migration
- type MigrationModule
- type MigrationModuleImpl
- type MigrationRepository
- type MigrationRepositoryImpl
- type P
- type Reference
- type ReferenceRepository
- type ReferenceRepositoryImpl
- func (r *ReferenceRepositoryImpl) Down(m Migration) error
- func (r *ReferenceRepositoryImpl) GetLast() (Reference, error)
- func (r *ReferenceRepositoryImpl) IsLocked() (bool, error)
- func (r *ReferenceRepositoryImpl) List() ([]Reference, error)
- func (r *ReferenceRepositoryImpl) Lock() error
- func (r *ReferenceRepositoryImpl) Prepare() error
- func (r *ReferenceRepositoryImpl) Unlock() error
- func (r *ReferenceRepositoryImpl) Up(m Migration) error
- type Relation
- type Service
- type ServiceImpl
Constants ¶
View Source
const DB_TIMESTAMP_FORMAT = "2006-01-02 15:04:05"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Controller ¶
type Controller interface {
Create(name string) (string, error)
Up() (string, error)
Unlock() (string, error)
Down() (string, error)
Latest() (string, error)
}
func NewMigrationModule ¶
func NewMigrationModule(settings stgs.Settings, pool lib.DB) Controller
type ControllerImpl ¶
type ControllerImpl struct {
Service Service
}
func (*ControllerImpl) Down ¶
func (c *ControllerImpl) Down() (string, error)
func (*ControllerImpl) Latest ¶
func (c *ControllerImpl) Latest() (string, error)
func (*ControllerImpl) Unlock ¶
func (c *ControllerImpl) Unlock() (string, error)
func (*ControllerImpl) Up ¶
func (c *ControllerImpl) Up() (string, error)
type MigrationModule ¶
type MigrationModule interface {
Controller() Controller
}
type MigrationModuleImpl ¶
type MigrationModuleImpl struct {
// contains filtered or unexported fields
}
func (*MigrationModuleImpl) Controller ¶
func (mod *MigrationModuleImpl) Controller() Controller
type MigrationRepository ¶
type MigrationRepositoryImpl ¶
func (*MigrationRepositoryImpl) Create ¶
func (r *MigrationRepositoryImpl) Create(name string) error
func (*MigrationRepositoryImpl) List ¶
func (r *MigrationRepositoryImpl) List() ([]Migration, error)
type ReferenceRepository ¶
type ReferenceRepositoryImpl ¶
func (*ReferenceRepositoryImpl) Down ¶
func (r *ReferenceRepositoryImpl) Down(m Migration) error
func (*ReferenceRepositoryImpl) GetLast ¶
func (r *ReferenceRepositoryImpl) GetLast() (Reference, error)
func (*ReferenceRepositoryImpl) IsLocked ¶
func (r *ReferenceRepositoryImpl) IsLocked() (bool, error)
func (*ReferenceRepositoryImpl) List ¶
func (r *ReferenceRepositoryImpl) List() ([]Reference, error)
func (*ReferenceRepositoryImpl) Lock ¶
func (r *ReferenceRepositoryImpl) Lock() error
func (*ReferenceRepositoryImpl) Prepare ¶
func (r *ReferenceRepositoryImpl) Prepare() error
func (*ReferenceRepositoryImpl) Unlock ¶
func (r *ReferenceRepositoryImpl) Unlock() error
func (*ReferenceRepositoryImpl) Up ¶
func (r *ReferenceRepositoryImpl) Up(m Migration) error
type ServiceImpl ¶
type ServiceImpl struct {
Migrations MigrationRepository
References ReferenceRepository
}
func (*ServiceImpl) Create ¶
func (s *ServiceImpl) Create(name string) error
func (*ServiceImpl) Down ¶
func (s *ServiceImpl) Down() (Migration, error)
func (*ServiceImpl) Latest ¶
func (s *ServiceImpl) Latest() ([]Migration, error)
func (*ServiceImpl) Unlock ¶
func (s *ServiceImpl) Unlock() error
func (*ServiceImpl) Up ¶
func (s *ServiceImpl) Up() (Migration, error)
Click to show internal directories.
Click to hide internal directories.