Documentation
¶
Index ¶
- Constants
- func Markdown(msg tgbotapi.MessageConfig) tgbotapi.MessageConfig
- func NewLogger(level logrus.Level, namespace string) *logrus.Logger
- type AddTagCommand
- type Bot
- type Command
- type Config
- type CurrencyCommand
- type DumpCommand
- type Entry
- type EntryCommand
- type Features
- type HelpCommand
- type InternalError
- type InvalidAuthCodeError
- type InvalidCurrencyError
- type InvalidSyntaxError
- type ListTagsCommand
- type NamespaceHook
- type RemoveTagCommand
- type StartCommand
- type StatCommand
- type Storage
- type UnknownCommandError
- type User
- type UserNotFoundError
Constants ¶
View Source
const VERSION = 1
Variables ¶
This section is empty.
Functions ¶
func Markdown ¶
func Markdown(msg tgbotapi.MessageConfig) tgbotapi.MessageConfig
Types ¶
type AddTagCommand ¶
type CurrencyCommand ¶
type CurrencyCommand struct {
Currency string
}
type EntryCommand ¶
type EntryCommand struct {
Entry Entry
}
type HelpCommand ¶
type HelpCommand struct{}
type InternalError ¶
type InternalError struct {
Err error
}
func NewInternalError ¶
func NewInternalError(e error) *InternalError
func (InternalError) Error ¶
func (e InternalError) Error() string
func (InternalError) String ¶
func (InternalError) String() string
type InvalidAuthCodeError ¶
type InvalidAuthCodeError struct { }
func (InvalidAuthCodeError) Error ¶
func (e InvalidAuthCodeError) Error() string
func (InvalidAuthCodeError) String ¶
func (e InvalidAuthCodeError) String() string
type InvalidCurrencyError ¶
type InvalidCurrencyError struct {
Currency string
}
func (InvalidCurrencyError) Error ¶
func (e InvalidCurrencyError) Error() string
func (InvalidCurrencyError) String ¶
func (e InvalidCurrencyError) String() string
type InvalidSyntaxError ¶
type InvalidSyntaxError struct { }
func (InvalidSyntaxError) Error ¶
func (e InvalidSyntaxError) Error() string
func (InvalidSyntaxError) String ¶
func (e InvalidSyntaxError) String() string
type ListTagsCommand ¶
type ListTagsCommand struct {
SearchTags []string
}
type NamespaceHook ¶
type NamespaceHook struct {
// contains filtered or unexported fields
}
func NewNamespaceHook ¶
func NewNamespaceHook(ns string) *NamespaceHook
func (*NamespaceHook) Levels ¶
func (h *NamespaceHook) Levels() []logrus.Level
type RemoveTagCommand ¶
type RemoveTagCommand struct {
Tags []string
}
type StartCommand ¶
type StartCommand struct {
Code string
}
type StatCommand ¶
type Storage ¶
type Storage interface { SaveUser(ctx context.Context, user *User) (*User, error) GetUserByTelegramID(ctx context.Context, id int64) (*User, error) SaveEntry(ctx context.Context, user *User, command *Entry) (*Entry, error) SaveReplyID(ctx context.Context, user *User, message, reply int64) error IterEntries(ctx context.Context, user *User, from time.Time, tags []string) (<-chan *Entry, error) AddTag(ctx context.Context, user *User, search string, tags []string) error RemoveTag(ctx context.Context, user *User, tags []string) error ListTag(ctx context.Context, user *User, search []string) ([]string, error) }
type UnknownCommandError ¶
type UnknownCommandError struct {
Command string
}
func (UnknownCommandError) Error ¶
func (e UnknownCommandError) Error() string
func (UnknownCommandError) String ¶
func (e UnknownCommandError) String() string
type User ¶
type User struct { ID string TelegramID int64 BotVersion int Enabled bool Currency string Features Features }
User struct using for save user settings, version and possible multiple chat providers support
type UserNotFoundError ¶
type UserNotFoundError struct{}
func (UserNotFoundError) Error ¶
func (e UserNotFoundError) Error() string
func (UserNotFoundError) String ¶
func (UserNotFoundError) String() string
Source Files
¶
Click to show internal directories.
Click to hide internal directories.