Versions in this module Expand all Collapse all v0 v0.0.1 May 8, 2021 Changes in this version + const VERSION + func Markdown(msg tgbotapi.MessageConfig) tgbotapi.MessageConfig + func NewLogger(level logrus.Level, namespace string) *logrus.Logger + type AddTagCommand struct + SearchTag string + Tags []string + type Bot struct + func New(token string, logger *logrus.Logger, storage Storage, config Config) (*Bot, error) + func (b *Bot) Start() error + func (b *Bot) Stop() error + type Command interface + func ParseCommand(message *tgbotapi.Message) (Command, error) + type Config struct + AdminContact string + AuthCode string + type CurrencyCommand struct + Currency string + type DumpCommand struct + Format string + From time.Time + Tags []string + type Entry struct + Comment string + Currency string + ID string + MessageID int64 + ReplyID int64 + Tags []string + Value float32 + type EntryCommand struct + Entry Entry + type Features struct + func (f *Features) Scan(data interface{}) error + func (f Features) Value() (driver.Value, error) + type HelpCommand struct + type InternalError struct + Err error + func NewInternalError(e error) *InternalError + func (InternalError) String() string + func (e InternalError) Error() string + type InvalidAuthCodeError struct + func (e InvalidAuthCodeError) Error() string + func (e InvalidAuthCodeError) String() string + type InvalidCurrencyError struct + Currency string + func (e InvalidCurrencyError) Error() string + func (e InvalidCurrencyError) String() string + type InvalidSyntaxError struct + func (e InvalidSyntaxError) Error() string + func (e InvalidSyntaxError) String() string + type ListTagsCommand struct + SearchTags []string + type NamespaceHook struct + func NewNamespaceHook(ns string) *NamespaceHook + func (h *NamespaceHook) Fire(e *logrus.Entry) error + func (h *NamespaceHook) Levels() []logrus.Level + type RemoveTagCommand struct + Tags []string + type StartCommand struct + Code string + type StatCommand struct + From time.Time + Tags []string + type Storage interface + AddTag func(ctx context.Context, user *User, search string, tags []string) error + GetUserByTelegramID func(ctx context.Context, id int64) (*User, error) + IterEntries func(ctx context.Context, user *User, from time.Time, tags []string) (<-chan *Entry, error) + ListTag func(ctx context.Context, user *User, search []string) ([]string, error) + RemoveTag func(ctx context.Context, user *User, tags []string) error + SaveEntry func(ctx context.Context, user *User, command *Entry) (*Entry, error) + SaveReplyID func(ctx context.Context, user *User, message, reply int64) error + SaveUser func(ctx context.Context, user *User) (*User, error) + type UnknownCommandError struct + Command string + func (e UnknownCommandError) Error() string + func (e UnknownCommandError) String() string + type User struct + BotVersion int + Currency string + Enabled bool + Features Features + ID string + TelegramID int64 + type UserNotFoundError struct + func (UserNotFoundError) String() string + func (e UserNotFoundError) Error() string