mem

package
v0.0.0-...-a2260f7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 1, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

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) Dump

func (m *MemStorage) Dump(ctx context.Context, dir string)

func (*MemStorage) GetLastPost

func (m *MemStorage) GetLastPost(ctx context.Context, channelID string) (storage.Post, error)

func (*MemStorage) GetLastPostID

func (m *MemStorage) GetLastPostID(ctx context.Context, channelID string) (int64, error)

func (*MemStorage) GetPosts

func (m *MemStorage) GetPosts(ctx context.Context, channelID string, from, to time.Time) ([]storage.Post, error)

func (*MemStorage) IsChannelRegistered

func (m *MemStorage) IsChannelRegistered(ctx context.Context, channelID string) (bool, error)

func (*MemStorage) IsImageExists

func (m *MemStorage) IsImageExists(ctx context.Context, etag string) (int64, error)

func (*MemStorage) RegisterChannel

func (m *MemStorage) RegisterChannel(ctx context.Context, channelID string) error

func (*MemStorage) SaveImage

func (m *MemStorage) SaveImage(ctx context.Context, etag string, data []byte) (int64, error)

func (*MemStorage) SavePosts

func (m *MemStorage) SavePosts(ctx context.Context, channelID string, posts []storage.Post) error

func (*MemStorage) UnregisterChannel

func (m *MemStorage) UnregisterChannel(ctx context.Context, channelID string) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL