Documentation ¶
Index ¶
- type MemStorage
- func (m *MemStorage) AllChannels(ctx context.Context) ([]string, error)
- func (m *MemStorage) Dump(ctx context.Context, dir string)
- func (m *MemStorage) GetLastPost(ctx context.Context, channelID string) (storage.Post, error)
- func (m *MemStorage) GetLastPostID(ctx context.Context, channelID string) (int64, error)
- func (m *MemStorage) GetPosts(ctx context.Context, channelID string, from, to time.Time) ([]storage.Post, error)
- func (m *MemStorage) IsChannelRegistered(ctx context.Context, channelID string) (bool, error)
- func (m *MemStorage) IsImageExists(ctx context.Context, etag string) (int64, error)
- func (m *MemStorage) RegisterChannel(ctx context.Context, channelID string) error
- func (m *MemStorage) SaveImage(ctx context.Context, etag string, data []byte) (int64, error)
- func (m *MemStorage) SavePosts(ctx context.Context, channelID string, posts []storage.Post) error
- func (m *MemStorage) UnregisterChannel(ctx context.Context, channelID string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MemStorage ¶
type MemStorage struct {
// contains filtered or unexported fields
}
func NewMemStorage ¶
func NewMemStorage() *MemStorage
func (*MemStorage) AllChannels ¶
func (m *MemStorage) AllChannels(ctx context.Context) ([]string, error)
func (*MemStorage) GetLastPost ¶
func (*MemStorage) GetLastPostID ¶
func (*MemStorage) IsChannelRegistered ¶
func (*MemStorage) IsImageExists ¶
func (*MemStorage) RegisterChannel ¶
func (m *MemStorage) RegisterChannel(ctx context.Context, channelID string) error
func (*MemStorage) UnregisterChannel ¶
func (m *MemStorage) UnregisterChannel(ctx context.Context, channelID string) error
Click to show internal directories.
Click to hide internal directories.