Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Authorization ¶
type Authorization struct {
// contains filtered or unexported fields
}
func NewAuthorization ¶
func NewAuthorization(source *DataSource) *Authorization
func (*Authorization) CheckAuthorization ¶
func (a *Authorization) CheckAuthorization(userMessage *Message) bool
func (*Authorization) TryAuthorize ¶
func (a *Authorization) TryAuthorize(msg *Message) bool
type DataSource ¶
type DataSource struct {
// contains filtered or unexported fields
}
func NewDataSource ¶
func NewDataSource(path string) (*DataSource, error)
func (DataSource) FindCommand ¶
func (ds DataSource) FindCommand(cmdText string) *Command
func (DataSource) FindUserByFirstNameAndLatName ¶
func (ds DataSource) FindUserByFirstNameAndLatName(firstName string, lastName string) *UserDB
func (DataSource) FindUserByTelegramId ¶
func (ds DataSource) FindUserByTelegramId(TelegramID int) *UserDB
func (DataSource) SetTelegramIdToUser ¶
func (ds DataSource) SetTelegramIdToUser(user *UserDB, telegramId int) bool
type MessageTemplate ¶
type UI ¶
type UI struct {
// contains filtered or unexported fields
}
func NewUI ¶
func NewUI(dataSource *DataSource) *UI
func (UI) HandleMessage ¶
func (u UI) HandleMessage(userMessage *Message) *tgbotapi.MessageConfig
Click to show internal directories.
Click to hide internal directories.