Documentation ¶
Index ¶
- type BaseStore
- type ChatStore
- type ChatStoreQuery
- func (csq *ChatStoreQuery) All(ctx context.Context) ([]*core.Chat, error)
- func (csq *ChatStoreQuery) Count(ctx context.Context) (int, error)
- func (csq *ChatStoreQuery) Delete(ctx context.Context) (int, error)
- func (csq *ChatStoreQuery) ID(ids ...core.ChatID) core.ChatStoreQuery
- func (csq *ChatStoreQuery) One(ctx context.Context) (*core.Chat, error)
- func (csq *ChatStoreQuery) OwnerID(id core.UserID) core.ChatStoreQuery
- func (csq *ChatStoreQuery) TelegramID(id int64) core.ChatStoreQuery
- type DownloadStore
- func (store *DownloadStore) Add(ctx context.Context, dwn *core.Download) error
- func (store *DownloadStore) GetChatStats(ctx context.Context, id core.ChatID) (*core.ChatDownloadStats, error)
- func (store *DownloadStore) GetFileStats(ctx context.Context, id core.FileID) (*core.FileDownloadStats, error)
- func (store *DownloadStore) Query() core.DownloadStoreQuery
- type FileStore
- type Postgres
- type UserStore
- func (store *UserStore) Add(ctx context.Context, user *core.User) error
- func (store *UserStore) Find(ctx context.Context, id core.UserID) (*core.User, error)
- func (store *UserStore) Query() core.UserStoreQuery
- func (store *UserStore) RefStats(ctx context.Context) (core.UserRefStats, error)
- func (store *UserStore) Update(ctx context.Context, user *core.User) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ChatStore ¶
type ChatStore struct {
BaseStore
}
func (*ChatStore) Query ¶
func (store *ChatStore) Query() core.ChatStoreQuery
type ChatStoreQuery ¶
func (*ChatStoreQuery) Count ¶
func (csq *ChatStoreQuery) Count(ctx context.Context) (int, error)
Count items in store.
func (*ChatStoreQuery) ID ¶
func (csq *ChatStoreQuery) ID(ids ...core.ChatID) core.ChatStoreQuery
ID Filter
func (*ChatStoreQuery) OwnerID ¶
func (csq *ChatStoreQuery) OwnerID(id core.UserID) core.ChatStoreQuery
OwnerID filter
func (*ChatStoreQuery) TelegramID ¶
func (csq *ChatStoreQuery) TelegramID(id int64) core.ChatStoreQuery
TelegramID filter
type DownloadStore ¶
type DownloadStore struct {
BaseStore
}
func (*DownloadStore) GetChatStats ¶
func (store *DownloadStore) GetChatStats(ctx context.Context, id core.ChatID) (*core.ChatDownloadStats, error)
func (*DownloadStore) GetFileStats ¶
func (store *DownloadStore) GetFileStats(ctx context.Context, id core.FileID) (*core.FileDownloadStats, error)
func (*DownloadStore) Query ¶
func (store *DownloadStore) Query() core.DownloadStoreQuery
type FileStore ¶
type FileStore struct {
BaseStore
}
func (*FileStore) Query ¶
func (store *FileStore) Query() core.FileStoreQuery
type Postgres ¶
func (*Postgres) Download ¶
func (pg *Postgres) Download() core.DownloadStore
func (*Postgres) Tx ¶
Tx run code in database transaction. Based on: https://stackoverflow.com/a/23502629.
Source Files ¶
Click to show internal directories.
Click to hide internal directories.