Documentation ¶
Index ¶
Constants ¶
View Source
const ButtonClicksDirPath = "buttons"
View Source
const CommandsDirPath = "commands"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FileLogger ¶
type FileLogger struct {
// contains filtered or unexported fields
}
FileLogger is a logger that logs statistics events to the files.
It implements Logger interface.
func (*FileLogger) LogButtonClick ¶
func (*FileLogger) LogCommand ¶
type Logger ¶
type Logger interface { // LogButtonClick logs a user button click to the database. LogButtonClick(chatId int64, userId int64, messageId int, button string) error // LogCommand logs a bot command from user. LogCommand(chatId int64, userId int64, messageId int, command string) error }
Logger is an interface for logging statistics events.
func NewFileLogger ¶
NewFileLogger creates a new logger that logs statistics events to the files.
func NewPostgresLogger ¶
NewPostgresLogger creates a new logger that logs statistics events to the database.
type PostgresLogger ¶
type PostgresLogger struct {
// contains filtered or unexported fields
}
PostgresLogger is a logger that logs statistics events to the database.
It implements Logger interface.
func (*PostgresLogger) LogButtonClick ¶
func (*PostgresLogger) LogCommand ¶
Click to show internal directories.
Click to hide internal directories.