Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GormMemoryBackend ¶
type GormMemoryBackend struct {
// contains filtered or unexported fields
}
GormMemoryBackend implements core.MemoryBackend Uses GORM connection to retrieve memory from Postgres database
func NewGormMemoryBackend ¶
func NewGormMemoryBackend(db *gorm.DB, userID string) *GormMemoryBackend
NewGormMemoryBackend returns a new GormMemoryBackend
func (*GormMemoryBackend) Add ¶
func (a *GormMemoryBackend) Add(m ...*core.Message) error
Add adds messages to the GormMemoryBackend using "append"
func (*GormMemoryBackend) Dump ¶
func (a *GormMemoryBackend) Dump() ([]*core.Message, error)
Dump returns the whole GormMemoryBackend array
func (*GormMemoryBackend) GetMaxN ¶
func (a *GormMemoryBackend) GetMaxN(n int) ([]*core.Message, error)
GetMaxN returns the last N number of messages
func (*GormMemoryBackend) Migrate ¶
func (a *GormMemoryBackend) Migrate() error
Migrate database add the infraestruct tables and relations
func (*GormMemoryBackend) Prune ¶
func (a *GormMemoryBackend) Prune()
Prune resets the array in the GormMemoryBackend
Click to show internal directories.
Click to hide internal directories.