Documentation ¶
Index ¶
- func GetLogger(name string) *log.Entry
- func GetSQLiteDB(connectionString string) (*gorm.DB, error)
- type BotLogger
- type Chat
- type LoggerFactory
- type Message
- type MessageRepository
- func (mr *MessageRepository) GetChats() ([]*Chat, error)
- func (mr *MessageRepository) HouseKeeping(maxAge time.Duration) error
- func (mr *MessageRepository) Save(message *Message) error
- func (mr *MessageRepository) SaveChat(chat *tgbotapi.Chat) error
- func (mr *MessageRepository) SaveMessage(message *tgbotapi.Message) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type BotLogger ¶
type BotLogger struct {
// contains filtered or unexported fields
}
func CreateBotLogger ¶
type LoggerFactory ¶
type LoggerFactory struct {
// contains filtered or unexported fields
}
func CreateLoggerFactory ¶
func CreateLoggerFactory(config *config.LoggerConfiguration) *LoggerFactory
func GetLoggerFactory ¶
func GetLoggerFactory() *LoggerFactory
type MessageRepository ¶
type MessageRepository struct {
// contains filtered or unexported fields
}
func CreateMessageRepository ¶
func CreateMessageRepository(db *gorm.DB) *MessageRepository
func (*MessageRepository) GetChats ¶
func (mr *MessageRepository) GetChats() ([]*Chat, error)
func (*MessageRepository) HouseKeeping ¶
func (mr *MessageRepository) HouseKeeping(maxAge time.Duration) error
func (*MessageRepository) Save ¶
func (mr *MessageRepository) Save(message *Message) error
func (*MessageRepository) SaveChat ¶
func (mr *MessageRepository) SaveChat(chat *tgbotapi.Chat) error
func (*MessageRepository) SaveMessage ¶
func (mr *MessageRepository) SaveMessage(message *tgbotapi.Message) error
Click to show internal directories.
Click to hide internal directories.