Documentation
¶
Index ¶
- type ByDateDesc
- type MessageInMemoryStore
- type MessageRepository
- type MessageRepositoryInMemory
- func (r *MessageRepositoryInMemory) Delete(ctx context.Context, id string) <-chan error
- func (r *MessageRepositoryInMemory) Find(ctx context.Context, id string) <-chan QueryResult
- func (r *MessageRepositoryInMemory) FindAll(ctx context.Context) <-chan QueryResult
- func (r *MessageRepositoryInMemory) Reset(ctx context.Context) <-chan error
- func (r *MessageRepositoryInMemory) Save(ctx context.Context, m *domain.Message) <-chan error
- type QueryResult
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ByDateDesc ¶
ByDateDesc ...
func (ByDateDesc) Len ¶
func (d ByDateDesc) Len() int
func (ByDateDesc) Less ¶
func (d ByDateDesc) Less(i, j int) bool
func (ByDateDesc) Swap ¶
func (d ByDateDesc) Swap(i, j int)
type MessageInMemoryStore ¶
type MessageInMemoryStore struct {
// contains filtered or unexported fields
}
MessageInMemoryStore ...
func NewMessageInMemoryStore ¶
func NewMessageInMemoryStore() *MessageInMemoryStore
NewMessageInMemoryStore ...
type MessageRepository ¶
type MessageRepository interface { Save(context.Context, *domain.Message) <-chan error Delete(context.Context, string) <-chan error Reset(context.Context) <-chan error Find(context.Context, string) <-chan QueryResult FindAll(context.Context) <-chan QueryResult }
MessageRepository ...
func NewLRUCacheStore ¶
func NewLRUCacheStore(size int, logger *zap.Logger) (MessageRepository, error)
type MessageRepositoryInMemory ¶
type MessageRepositoryInMemory struct {
// contains filtered or unexported fields
}
MessageRepositoryInMemory ...
func NewMessageInMemory ¶
func NewMessageInMemory(store *MessageInMemoryStore) *MessageRepositoryInMemory
NewMessageInMemory ...
func (*MessageRepositoryInMemory) Delete ¶
func (r *MessageRepositoryInMemory) Delete(ctx context.Context, id string) <-chan error
Delete ...
func (*MessageRepositoryInMemory) Find ¶
func (r *MessageRepositoryInMemory) Find(ctx context.Context, id string) <-chan QueryResult
Find ...
func (*MessageRepositoryInMemory) FindAll ¶
func (r *MessageRepositoryInMemory) FindAll(ctx context.Context) <-chan QueryResult
FindAll ...
Click to show internal directories.
Click to hide internal directories.