Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrInputConflictOnSave = errors.New("conflic when saving an input: the input version is different from the persisted input")
Functions ¶
This section is empty.
Types ¶
type ChatDoesNotBelowToUserError ¶
type ChatDoesNotBelowToUserError struct {
UserID, ChatID int64
}
ChatDoesNotBelowToUserError is returned when the user isn't the owner of the chat.
func (ChatDoesNotBelowToUserError) Error ¶
func (e ChatDoesNotBelowToUserError) Error() string
type ChatNotFoundError ¶
type ChatNotFoundError struct {
ChatID int64
}
ChatNotFoundError is returned when the passed chatID doesn't match with any chat.
func (ChatNotFoundError) Error ¶
func (e ChatNotFoundError) Error() string
type Input ¶
type Input struct {
// contains filtered or unexported fields
}
func (Input) Description ¶
type InputFactory ¶
type InputFactory struct {
// contains filtered or unexported fields
}
func NewInputFactory ¶
func NewInputFactory(telegramClient TelegramService) InputFactory
type InputRepository ¶
type InputType ¶
type InputType struct {
// contains filtered or unexported fields
}
var ( TelegramPrivate InputType = InputType{/* contains filtered or unexported fields */} TelegramChannel InputType = InputType{/* contains filtered or unexported fields */} TelegramGroup InputType = InputType{/* contains filtered or unexported fields */} TelegramSuperGroup InputType = InputType{/* contains filtered or unexported fields */} )
func NewInputTypeFromStr ¶
type TelegramService ¶
type TelegramService interface {
// IsChatValid verify if chat below to the user ID and if the current bot
// have the required permissions on that chat.
IsChatValid(ctx context.Context, chatId, userId int64) (bool, error)
}
TelegramService represent a service to access to TelegramAPI
Click to show internal directories.
Click to hide internal directories.