Documentation
¶
Index ¶
- Variables
- func GetSettingByKey[T any](s *Storage, key string) (*T, error)
- func SetSetting[T any](s *Storage, key string, value T) error
- type CategoryCounts
- type Storage
- func (s *Storage) AddLink(userId int64, category string, link string, headline string) error
- func (s *Storage) AddUser(userId int64, name string) error
- func (s *Storage) Close() error
- func (s *Storage) DeleteUser(user *models.User) error
- func (s *Storage) GetResidentMacs() (*[]string, error)
- func (s *Storage) GetUser(userId int64) (*models.User, error)
- func (s *Storage) ListCategories(userID int64) ([]CategoryCounts, error)
- func (s *Storage) ListUsers() ([]*models.User, error)
- func (s *Storage) SetResidentMacs(macs []string) error
- func (s *Storage) StoreSession(userId int64, chatId int64, lastUserAction time.Time, sessionData string) error
- func (s *Storage) UserExists(userId int64) bool
- func (s *Storage) UserSessions() ([]*models.UserSession, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrDuplicate = errors.New("duplicate database entry")
Functions ¶
Types ¶
type CategoryCounts ¶
type Storage ¶
type Storage struct {
// contains filtered or unexported fields
}
func NewStorage ¶
func (*Storage) GetResidentMacs ¶
func (*Storage) ListCategories ¶
func (s *Storage) ListCategories(userID int64) ([]CategoryCounts, error)
func (*Storage) SetResidentMacs ¶
func (*Storage) StoreSession ¶
func (*Storage) UserExists ¶
func (*Storage) UserSessions ¶
func (s *Storage) UserSessions() ([]*models.UserSession, error)
Click to show internal directories.
Click to hide internal directories.