Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewWhitelistUserMiddlewarePoller ¶
func NewWhitelistUserMiddlewarePoller( originalPoller telebot.Poller, allowedUsers []subscription.User) *telebot.MiddlewarePoller
NewWhitelistUserMiddlewarePoller instantiates new WhitelistUserMiddlewarePoller object
func ParseStringWithArticle ¶
ParseStringWithArticle parses a string and extracts the article number
Current implementation supports the following formats:
- Raw article number: 111222, 111-222, 111_222
- Link to shop item page: https://www.domain.com/.../111222
Types ¶
type Bot ¶
type Bot struct {
// contains filtered or unexported fields
}
Bot works as a frontend to the systems
type CallbackData ¶
type CallbackData struct {
// contains filtered or unexported fields
}
func NewCallbackData ¶
func NewCallbackData() *CallbackData
func (*CallbackData) AddItem ¶
func (cd *CallbackData) AddItem(key string, value interface{})
func (*CallbackData) Decode ¶
func (cd *CallbackData) Decode(s string) (map[string]interface{}, error)
func (*CallbackData) Encode ¶
func (cd *CallbackData) Encode() (string, error)
type Config ¶
type Config struct { AllowedUsers []subscription.User Token string }
Config holds telegram bot configuration
type WhitelistUserMiddlewarePoller ¶
type WhitelistUserMiddlewarePoller struct {
// contains filtered or unexported fields
}
WhitelistUserMiddlewarePoller filters user with whitelisting strategy
Click to show internal directories.
Click to hide internal directories.