Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateDatabaseIfNotExist ¶
func CreateDatabaseIfNotExist(db *pg.DB, p *config.PostgresConfig)
CreateDatabaseIfNotExist creates our postgresql database from postgres config
func CreateDatabaseUserIfNotExist ¶
func CreateDatabaseUserIfNotExist(db *pg.DB, p *config.PostgresConfig)
CreateDatabaseUserIfNotExist creates a database user
func CreateSchema ¶
func CreateSchema(db *pg.DB, models ...interface{})
CreateSchema creates the tables for given models
Types ¶
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
Manager holds a group of methods for writing tests
func NewManager ¶
func NewManager(accountRepo *repository.AccountRepo, roleRepo *repository.RoleRepo, db *pg.DB) *Manager
NewManager returns a new manager
func (*Manager) CreateRoles ¶
func (m *Manager) CreateRoles()
CreateRoles is a thin wrapper for roleRepo.CreateRoles(), which populates our roles table
func (*Manager) CreateSchema ¶
func (m *Manager) CreateSchema(models ...interface{})
CreateSchema creates tables declared as models (struct)
Click to show internal directories.
Click to hide internal directories.