Documentation ¶
Index ¶
- type DatabaseService
- func (d *DatabaseService) AutoReconnect(database api.Database[any]) error
- func (d *DatabaseService) Close() error
- func (d *DatabaseService) Init(service api.MainService) error
- func (d *DatabaseService) Postgres() api.Database[*gorm.DB]
- func (d *DatabaseService) Redis() api.Database[api.RedisClient]
- func (d *DatabaseService) Settings() api.ServiceSettings
- func (d *DatabaseService) Start() error
- type PostgresDatabase
- type RedisDatabase
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DatabaseService ¶
type DatabaseService struct {
// contains filtered or unexported fields
}
func NewDatabaseService ¶
func NewDatabaseService() *DatabaseService
func (*DatabaseService) AutoReconnect ¶
func (d *DatabaseService) AutoReconnect(database api.Database[any]) error
func (*DatabaseService) Close ¶
func (d *DatabaseService) Close() error
func (*DatabaseService) Init ¶
func (d *DatabaseService) Init(service api.MainService) error
func (*DatabaseService) Redis ¶
func (d *DatabaseService) Redis() api.Database[api.RedisClient]
func (*DatabaseService) Settings ¶
func (d *DatabaseService) Settings() api.ServiceSettings
func (*DatabaseService) Start ¶
func (d *DatabaseService) Start() error
type PostgresDatabase ¶
type PostgresDatabase struct {
// contains filtered or unexported fields
}
func (*PostgresDatabase) Connect ¶
func (p *PostgresDatabase) Connect() (err error)
func (*PostgresDatabase) Disconnect ¶
func (p *PostgresDatabase) Disconnect() error
func (*PostgresDatabase) GetClient ¶
func (p *PostgresDatabase) GetClient() *gorm.DB
func (*PostgresDatabase) GetName ¶
func (p *PostgresDatabase) GetName() string
func (*PostgresDatabase) Ping ¶
func (p *PostgresDatabase) Ping() bool
func (*PostgresDatabase) WaitForStart ¶
func (p *PostgresDatabase) WaitForStart()
type RedisDatabase ¶
type RedisDatabase struct {
// contains filtered or unexported fields
}
func (*RedisDatabase) Connect ¶
func (r *RedisDatabase) Connect() (err error)
func (*RedisDatabase) Disconnect ¶
func (r *RedisDatabase) Disconnect() error
func (*RedisDatabase) GetClient ¶
func (r *RedisDatabase) GetClient() api.RedisClient
func (*RedisDatabase) GetName ¶
func (r *RedisDatabase) GetName() string
func (*RedisDatabase) Ping ¶
func (r *RedisDatabase) Ping() bool
func (*RedisDatabase) WaitForStart ¶
func (r *RedisDatabase) WaitForStart()
Click to show internal directories.
Click to hide internal directories.