Documentation ¶
Index ¶
- type Storage
- func (s *Storage) AddBot(newBot *bot.Bot) error
- func (s *Storage) AddChat(chat *chat.Chat) error
- func (s *Storage) AddFile(file *file.File) error
- func (s *Storage) AddMessage(msg *chat.Message) error
- func (s *Storage) AddUser(user *user.User) error
- func (s *Storage) DeleteBot(id string) error
- func (s *Storage) DeleteChat(id string) error
- func (s *Storage) DeleteCommand(id string) error
- func (s *Storage) DeleteCommandsByBot(botId string) error
- func (s *Storage) DeleteFiles(ids []string) error
- func (s *Storage) DeleteKey(botId string) error
- func (s *Storage) DeleteMessagesByChat(chatId string) error
- func (s *Storage) DeleteUser(id string) error
- func (s *Storage) DeleteWebhook(botId string) error
- func (s *Storage) EditBot(editedBot *bot.Bot) error
- func (s *Storage) GetAllBots() ([]*bot.Bot, error)
- func (s *Storage) GetBot(id string) (*bot.Bot, error)
- func (s *Storage) GetChat(id string) (*chat.Chat, error)
- func (s *Storage) GetChats(userId, botId string) ([]*chat.Chat, error)
- func (s *Storage) GetCommand(id string) (*bot.Command, error)
- func (s *Storage) GetCommands(botId string) ([]*bot.Command, error)
- func (s *Storage) GetFiles(ids []string) ([]*file.File, error)
- func (s *Storage) GetKey(botId string) (*bot.Key, error)
- func (s *Storage) GetMessage(id string) (*chat.Message, error)
- func (s *Storage) GetMessagesByChat(chatId, senderId string, page, limit int, since int64) (int, []*chat.Message, error)
- func (s *Storage) GetUser(id string) (*user.User, error)
- func (s *Storage) GetWebhook(botId string) (*bot.Webhook, error)
- func (s *Storage) InitTables() error
- func (s *Storage) SaveCommand(cmd *bot.Command) error
- func (s *Storage) SaveKey(botKey *bot.Key) error
- func (s *Storage) SaveWebhook(webhook *bot.Webhook) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Storage ¶
type Storage struct {
// contains filtered or unexported fields
}
func (*Storage) DeleteChat ¶
func (*Storage) DeleteCommand ¶
func (*Storage) DeleteCommandsByBot ¶
func (*Storage) DeleteFiles ¶
func (*Storage) DeleteMessagesByChat ¶
func (*Storage) DeleteUser ¶
func (*Storage) DeleteWebhook ¶
func (*Storage) GetMessagesByChat ¶
func (*Storage) InitTables ¶
Click to show internal directories.
Click to hide internal directories.