Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewRepository ¶
Types ¶
type Repository ¶
Repository is an interface of repository
type SessionRepository ¶
type SessionRepository struct { Repository SessionLifeTime time.Duration }
SessionRepository is a repository for the session entity
func NewSessionRepository ¶
func NewSessionRepository(repository Repository, sessionLifeTimeInHours uint) (*SessionRepository, error)
NewSessionRepository creates a new SessionRepository
func (*SessionRepository) Delete ¶
func (r *SessionRepository) Delete(ctx context.Context, ID string) error
Delete removes the entity with given ID from the storage.
type TgSessionRepository ¶
type TgSessionRepository struct { Repository ID string }
SessionRepository is a repository for the tg session
func NewTgSessionRepository ¶
func NewTgSessionRepository(repository Repository) *TgSessionRepository
NewTgSessionRepository creates a new TgSessionRepository
func (*TgSessionRepository) Delete ¶
func (r *TgSessionRepository) Delete(ctx context.Context, ID string) error
Delete removes the entity with given ID from the storage.
Click to show internal directories.
Click to hide internal directories.