Documentation ¶
Index ¶
- Constants
- type Message
- type Options
- type Repository
- func (s *Repository) ClearSent(ctx context.Context, userID int64) error
- func (s *Repository) ClearSystem(ctx context.Context, userID int64) error
- func (s *Repository) CreateMessage(ctx context.Context, fromUserID int64, toUserID int64, text string) error
- func (s *Repository) DeleteMessage(ctx context.Context, userID int64, messageID int64) error
- func (s *Repository) GetDialogCount(ctx context.Context, userID int64, withUserID int64) (int32, error)
- func (s *Repository) GetDialogbox(ctx context.Context, userID int64, withUserID int64, page int32) ([]Message, *util.Pages, error)
- func (s *Repository) GetInbox(ctx context.Context, userID int64, page int32) ([]Message, *util.Pages, error)
- func (s *Repository) GetInboxCount(ctx context.Context, userID int64) (int32, error)
- func (s *Repository) GetInboxNewCount(ctx context.Context, userID int64) (int32, error)
- func (s *Repository) GetSentCount(ctx context.Context, userID int64) (int32, error)
- func (s *Repository) GetSentbox(ctx context.Context, userID int64, page int32) ([]Message, *util.Pages, error)
- func (s *Repository) GetSystemCount(ctx context.Context, userID int64) (int32, error)
- func (s *Repository) GetSystemNewCount(ctx context.Context, userID int64) (int32, error)
- func (s *Repository) GetSystembox(ctx context.Context, userID int64, page int32) ([]Message, *util.Pages, error)
- func (s *Repository) GetUserNewMessagesCount(ctx context.Context, userID int64) (int32, error)
Constants ¶
View Source
const ( MaxText = 2000 MessagesPerPage = 20 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Repository ¶
type Repository struct {
// contains filtered or unexported fields
}
func NewRepository ¶
func NewRepository(db *goqu.Database, telegramService *telegram.Service) *Repository
func (*Repository) ClearSent ¶
func (s *Repository) ClearSent(ctx context.Context, userID int64) error
func (*Repository) ClearSystem ¶
func (s *Repository) ClearSystem(ctx context.Context, userID int64) error
func (*Repository) CreateMessage ¶
func (*Repository) DeleteMessage ¶
func (*Repository) GetDialogCount ¶
func (*Repository) GetDialogbox ¶
func (*Repository) GetInboxCount ¶
func (*Repository) GetInboxNewCount ¶
func (*Repository) GetSentCount ¶
func (*Repository) GetSentbox ¶
func (*Repository) GetSystemCount ¶
func (*Repository) GetSystemNewCount ¶
func (*Repository) GetSystembox ¶
func (*Repository) GetUserNewMessagesCount ¶
Click to show internal directories.
Click to hide internal directories.