Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterAutoIDAssign ¶
func RegisterAutoIDAssign(db *gorm.DB, generators generators.IDGenerators)
Types ¶
type DBConnection ¶
type DBConnection struct { User string Password string Database string Address string Port int Location string Type string Debug bool MaxOpenConnection int MaxIdleConnection int DB *gorm.DB IDGenerators generators.IDGenerators }
func NewConnection ¶
func NewConnection() *DBConnection
func (*DBConnection) AssignGenerators ¶
func (cs *DBConnection) AssignGenerators(idGenerators generators.IDGenerators)
func (*DBConnection) DSN ¶
func (cs *DBConnection) DSN() string
func (*DBConnection) ToString ¶
func (cs *DBConnection) ToString() string
type DefaultRepository ¶
type DefaultRepository struct {
// contains filtered or unexported fields
}
func (*DefaultRepository) Reader ¶
func (d *DefaultRepository) Reader() *gorm.DB
func (*DefaultRepository) Writer ¶
func (d *DefaultRepository) Writer() *gorm.DB
type Repository ¶
func New ¶
func New(generators generators.IDGenerators, debug bool) (Repository, error)
func NewRepository ¶
func NewRepository(master *DBConnection, slave *DBConnection) Repository
func NewWithOptions ¶ added in v0.3.7
func NewWithOptions(generators generators.IDGenerators, debug bool, max, idle int) (Repository, error)
Click to show internal directories.
Click to hide internal directories.