package postgres import "github.com/jackc/pgx/v5/pgxpool" type Storage struct { pool *pgxpool.Pool } func New(pool *pgxpool.Pool) *Storage { return &Storage{pool: pool} } func (s *Storage) Pool() *pgxpool.Pool { return s.pool } func (s *Storage) Users() *UserRepo { return &UserRepo{pool: s.pool} } func (s *Storage) Chats() *ChatRepo { return &ChatRepo{pool: s.pool} } func (s *Storage) Messages() *MessageRepo { return &MessageRepo{pool: s.pool} } func (s *Storage) Sessions() *SessionRepo { return &SessionRepo{pool: s.pool} } func (s *Storage) Attachments() *AttachmentRepo { return &AttachmentRepo{pool: s.pool} } func (s *Storage) Outbox() *OutboxRepo { return &OutboxRepo{pool: s.pool} } func (s *Storage) Variants() *AttachmentVariantRepo { return &AttachmentVariantRepo{pool: s.pool} } func (s *Storage) FailedJobs() *FailedJobRepo { return &FailedJobRepo{pool: s.pool} }