Documentation
¶
Index ¶
- Variables
- type AFKData
- type AllowService
- type ChatService
- type ChatsPluginsService
- type ChatsUsersService
- type Credential
- type CredentialService
- type GelbooruService
- type GeminiData
- type GeocodingService
- type GoogleImages
- type HomeService
- type Image
- type ManagerService
- type Plugin
- type PluginService
- type Reminder
- type User
- type UserService
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrAlreadyExists = errors.New("record already exists") ErrNotFound = errors.New("record not found") ErrQueryNotFound = errors.New("query not found") )
View Source
var ErrAddressNotFound = errors.New("address not found")
View Source
var ErrHomeAddressNotSet = errors.New("home address not set")
Functions ¶
This section is empty.
Types ¶
type AFKData ¶
type AFKData struct {
Since time.Time `db:"afk_since"`
Reason sql.NullString `db:"afk_reason"`
FirstName string `db:"first_name"`
}
type AllowService ¶
type ChatService ¶
type ChatsPluginsService ¶
type ChatsUsersService ¶
type ChatsUsersService interface {
Create(chat *gotgbot.Chat, user *gotgbot.User) error
CreateBatch(chat *gotgbot.Chat, users *[]gotgbot.User) error
GetAllUsersWithMsgCount(chat *gotgbot.Chat) ([]User, error)
IsAllowed(chat *gotgbot.Chat, user *gotgbot.User) bool
Leave(chat *gotgbot.Chat, user *gotgbot.User) error
}
type Credential ¶
type CredentialService ¶
type GelbooruService ¶
type GeminiData ¶
type GeminiData struct {
History sql.NullString `db:"gemini_history"`
ExpiresOn sql.NullTime `db:"gemini_history_expires_on"`
}
type GeocodingService ¶
type GoogleImages ¶
type HomeService ¶
type ManagerService ¶
type ManagerService interface {
Plugins() []plugin.Plugin
EnablePlugin(name string) error
EnablePluginForChat(chat *gotgbot.Chat, name string) error
DisablePlugin(name string) error
DisablePluginForChat(chat *gotgbot.Chat, name string) error
IsPluginEnabled(name string) bool
IsPluginDisabledForChat(chat *gotgbot.Chat, name string) bool
}
type PluginService ¶
type User ¶
type User struct {
ID int64 `db:"id"`
FirstName string `db:"first_name"`
LastName sql.NullString `db:"last_name"`
Username sql.NullString `db:"username"`
Allowed bool `db:"allowed"`
MsgCount int64 `db:"msg_count"`
InGroup bool `db:"in_group"`
Birthday sql.NullTime `db:"birthday"`
}
func (*User) GetFullName ¶
Source Files
¶
Click to show internal directories.
Click to hide internal directories.